diff --git a/configure.in b/configure.in index a197dc1..71b7161 100644 --- a/configure.in +++ b/configure.in @@ -219,7 +219,7 @@ if test "$buildnpp" = "yes"; then if test "x$have_dbus" = "xyes"; then have_nspr=yes AC_DEFINE(HAVE_DBUS, 1, [have DBus]) - LIBQTDBUS="`$PKG_CONFIG --libs dbus-1` -ldbus-qt-1" + LIBQTDBUS="`$PKG_CONFIG --libs dbus-1` -ldbus-tqt-1" LIBDBUS_CFLAGS="`$PKG_CONFIG --cflags dbus-1`" AC_DEFINE(HAVE_NSPR, 1, [build Netscape plugin loader]) LIBNSPR_LIBS="`$PKG_CONFIG --libs gtk+-x11-2.0` `$PKG_CONFIG --libs dbus-glib-1` `$PKG_CONFIG --libs gthread-2.0`" diff --git a/configure.in.in b/configure.in.in index d302f38..9f08c4b 100644 --- a/configure.in.in +++ b/configure.in.in @@ -154,7 +154,7 @@ if test "$buildnpp" = "yes"; then if test "x$have_dbus" = "xyes"; then have_nspr=yes AC_DEFINE(HAVE_DBUS, 1, [have DBus]) - LIBQTDBUS="`$PKG_CONFIG --libs dbus-1` -ldbus-qt-1" + LIBQTDBUS="`$PKG_CONFIG --libs dbus-1` -ldbus-tqt-1" LIBDBUS_CFLAGS="`$PKG_CONFIG --cflags dbus-1`" AC_DEFINE(HAVE_NSPR, 1, [build Netscape plugin loader]) LIBNSPR_LIBS="`$PKG_CONFIG --libs gtk+-x11-2.0` `$PKG_CONFIG --libs dbus-glib-1` `$PKG_CONFIG --libs gthread-2.0`" diff --git a/src/Makefile.am b/src/Makefile.am index c481b8d..52ae3db 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -26,7 +26,7 @@ libkmplayerkofficepart_la_LIBADD= libkmplayercommon.la $(LIB_KOFFICE) kdeinit_LTLIBRARIES=kmplayer.la kmplayer_la_SOURCES= main.cpp kmplayerapp.cpp kmplayertvsource.cpp kmplayerbroadcast.cpp kmplayervdr.cpp kmplayer_la_LIBADD= libkmplayercommon.la -kmplayer_la_LDFLAGS= -module $(KDE_PLUGIN) +kmplayer_la_LDFLAGS= -module $(KDE_PLUGIN) $(LIB_QT) EXTRA_PROGRAMS = kxineplayer kxvplayer kgstplayer if include_kxineplayer diff --git a/src/gstplayer.cpp b/src/gstplayer.cpp index 092a8b2..a17a0ef 100644 --- a/src/gstplayer.cpp +++ b/src/gstplayer.cpp @@ -22,13 +22,13 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include "kmplayer_backend.h" #include "kmplayer_callback_stub.h" #include "kmplayer_callback.h" @@ -48,7 +48,7 @@ static Display *display; static KGStreamerPlayer *gstapp; static KMPlayer::Callback_stub * callback; static Window wid; -static QMutex mutex (true); +static TQMutex mutex (true); static bool window_created = true; static bool wants_config; static bool verbose; @@ -59,15 +59,15 @@ static int movie_height; static int movie_length; static int repeat_count; static int screen; -static const int event_finished = QEvent::User; -static const int event_playing = QEvent::User + 1; -static const int event_size = QEvent::User + 2; -static const int event_eos = QEvent::User + 3; -static const int event_progress = QEvent::User + 4; -static const int event_error = QEvent::User + 5; -static const int event_video = QEvent::User + 6; -static QString mrl; -static QString sub_mrl; +static const int event_finished = TQEvent::User; +static const int event_playing = TQEvent::User + 1; +static const int event_size = TQEvent::User + 2; +static const int event_eos = TQEvent::User + 3; +static const int event_progress = TQEvent::User + 4; +static const int event_error = TQEvent::User + 5; +static const int event_video = TQEvent::User + 6; +static TQString mrl; +static TQString sub_mrl; static const char *ao_driver; static const char *vo_driver; static const char *playbin_name = "player"; @@ -75,24 +75,24 @@ static const char *dvd_device; static const char *vcd_device; static GstElement *gst_elm_play; static GstBus *gst_bus; -static unsigned int /*GstMessageType*/ ignore_messages_mask; +static unsigned int /*GstMessageType*/ ignore_messages_tqmask; static GstXOverlay *xoverlay; static GstColorBalance *color_balance; static gulong gst_bus_sync; static gulong gst_bus_async; -static QString elmentry ("entry"); -static QString elmitem ("item"); -static QString attname ("NAME"); -static QString atttype ("TYPE"); -static QString attdefault ("DEFAULT"); -static QString attvalue ("VALUE"); -static QString attstart ("START"); -static QString attend ("END"); -static QString valrange ("range"); -static QString valnum ("num"); -static QString valbool ("bool"); -static QString valenum ("enum"); -static QString valstring ("string"); +static TQString elmentry ("entry"); +static TQString elmitem ("item"); +static TQString attname ("NAME"); +static TQString atttype ("TYPE"); +static TQString attdefault ("DEFAULT"); +static TQString attvalue ("VALUE"); +static TQString attstart ("START"); +static TQString attend ("END"); +static TQString valrange ("range"); +static TQString valnum ("num"); +static TQString valbool ("bool"); +static TQString valenum ("enum"); +static TQString valstring ("string"); extern "C" { // nothing yet @@ -111,7 +111,7 @@ cb_error (GstElement * play, fprintf (stderr, "cb_error: %s %s\n", err->message, debug); if (GST_STATE (play) == GST_STATE_PLAYING) gst_element_set_state (play, GST_STATE_READY); - QApplication::postEvent (gstapp, new QEvent ((QEvent::Type)event_finished)); + TQApplication::postEvent (gstapp, new TQEvent ((TQEvent::Type)event_finished)); } // NULL -> READY -> PAUSED -> PLAYING @@ -124,7 +124,7 @@ gstCapsSet (GstPad *pad, GstCaps *caps = gst_pad_get_negotiated_caps (pad); if (!caps) return; - QApplication::postEvent (gstapp, new QEvent ((QEvent::Type) event_video)); + TQApplication::postEvent (gstapp, new TQEvent ((TQEvent::Type) event_video)); const GstStructure * s = gst_caps_get_structure (caps, 0); if (s) { const GValue *par; @@ -140,7 +140,7 @@ gstCapsSet (GstPad *pad, else movie_height = (int) ((float) den * movie_height / num); } - QApplication::postEvent (gstapp, new GstSizeEvent (movie_length, movie_width, movie_height)); + TQApplication::postEvent (gstapp, new GstSizeEvent (movie_length, movie_width, movie_height)); } gst_caps_unref (caps); } @@ -204,7 +204,7 @@ static void gstGetDuration () { if (movie_length != len / (GST_MSECOND * 100)) { movie_length = len / (GST_MSECOND * 100); fprintf (stderr, "new length %d\n", movie_length); - QApplication::postEvent (gstapp, new GstSizeEvent (movie_length, movie_width, movie_height)); + TQApplication::postEvent (gstapp, new GstSizeEvent (movie_length, movie_width, movie_height)); } } @@ -217,12 +217,12 @@ static void gstTag (const GstTagList *, const gchar *tag, gpointer) { static void gstBusMessage (GstBus *, GstMessage * message, gpointer) { GstMessageType msg_type = GST_MESSAGE_TYPE (message); /* somebody else is handling the message, probably in gstPolForStateChange*/ - if (ignore_messages_mask & msg_type) + if (ignore_messages_tqmask & msg_type) return; switch (msg_type) { case GST_MESSAGE_ERROR: fprintf (stderr, "error msg\n"); - QApplication::postEvent (gstapp, new QEvent ((QEvent::Type) event_error)); + TQApplication::postEvent (gstapp, new TQEvent ((TQEvent::Type) event_error)); if (gst_elm_play) { gst_element_set_state (gst_elm_play, GST_STATE_NULL); //gstPollForStateChange (gst_elm_play, GST_STATE_NULL); @@ -246,7 +246,7 @@ static void gstBusMessage (GstBus *, GstMessage * message, gpointer) { case GST_MESSAGE_BUFFERING: { gint percent = 0; gst_structure_get_int (message->structure, "buffer-percent", &percent); - QApplication::postEvent (gstapp, new GstProgressEvent (percent)); + TQApplication::postEvent (gstapp, new GstProgressEvent (percent)); //fprintf (stderr, "Buffering message (%u%%)\n", percent); break; } @@ -266,7 +266,7 @@ static void gstBusMessage (GstBus *, GstMessage * message, gpointer) { if (old_state == GST_STATE_PAUSED && new_state >= GST_STATE_PLAYING) { gstGetDuration (); - QApplication::postEvent (gstapp, new QEvent ((QEvent::Type) event_playing)); + TQApplication::postEvent (gstapp, new TQEvent ((TQEvent::Type) event_playing)); } else if (old_state >= GST_STATE_PAUSED && new_state <= GST_STATE_READY) { if (repeat_count-- > 0 && @@ -274,8 +274,8 @@ static void gstBusMessage (GstBus *, GstMessage * message, gpointer) { gstPollForStateChange(gst_elm_play, GST_STATE_PAUSED))) gst_element_set_state(gst_elm_play, GST_STATE_PLAYING); else - QApplication::postEvent (gstapp, - new QEvent ((QEvent::Type) event_finished)); + TQApplication::postEvent (gstapp, + new TQEvent ((TQEvent::Type) event_finished)); } } //g_free (src_name); @@ -310,14 +310,14 @@ static bool gstPollForStateChange (GstElement *element, GstState state, gint64 t GError **error = 0L; events = GST_MESSAGE_STATE_CHANGED | GST_MESSAGE_ERROR | GST_MESSAGE_EOS; - saved_events = ignore_messages_mask; + saved_events = ignore_messages_tqmask; if (element && element == gst_elm_play) { /* we do want the main handler to process state changed messages for * playbin as well, otherwise it won't hook up the timeout etc. */ - ignore_messages_mask |= (events ^ GST_MESSAGE_STATE_CHANGED); + ignore_messages_tqmask |= (events ^ GST_MESSAGE_STATE_CHANGED); } else { - ignore_messages_mask |= events; + ignore_messages_tqmask |= events; } while (true) { @@ -367,14 +367,14 @@ static bool gstPollForStateChange (GstElement *element, GstState state, gint64 t success: /* state change succeeded */ fprintf (stderr, "state change to %s succeeded\n", gst_element_state_get_name (state)); - ignore_messages_mask = saved_events; + ignore_messages_tqmask = saved_events; return true; timed_out: /* it's taking a long time to open -- just tell totem it was ok, this allows * the user to stop the loading process with the normal stop button */ fprintf (stderr, "state change to %s timed out, returning success and handling errors asynchroneously\n", gst_element_state_get_name (state)); - ignore_messages_mask = saved_events; + ignore_messages_tqmask = saved_events; return true; error: @@ -382,20 +382,20 @@ error: gst_element_state_get_name (state), (error && *error) ? (*error)->message : "unknown"); /* already set *error */ - ignore_messages_mask = saved_events; - QApplication::postEvent (gstapp, new QEvent ((QEvent::Type) event_error)); + ignore_messages_tqmask = saved_events; + TQApplication::postEvent (gstapp, new TQEvent ((TQEvent::Type) event_error)); return false; } //----------------------------------------------------------------------------- GstSizeEvent::GstSizeEvent (int l, int w, int h) - : QEvent ((QEvent::Type) event_size), + : TQEvent ((TQEvent::Type) event_size), length (l), width (w), height (h) {} GstProgressEvent::GstProgressEvent (const int p) - : QEvent ((QEvent::Type) event_progress), progress (p) + : TQEvent ((TQEvent::Type) event_progress), progress (p) {} //----------------------------------------------------------------------------- @@ -403,16 +403,16 @@ GstProgressEvent::GstProgressEvent (const int p) using namespace KMPlayer; Backend::Backend () - : DCOPObject (QCString ("Backend")) { + : DCOPObject (TQCString ("Backend")) { } Backend::~Backend () {} -void Backend::setURL (QString url) { +void Backend::setURL (TQString url) { mrl = url; } -void Backend::setSubTitleURL (QString url) { +void Backend::setSubTitleURL (TQString url) { sub_mrl = url; } @@ -421,7 +421,7 @@ void Backend::play (int repeat) { } void Backend::stop () { - QTimer::singleShot (0, gstapp, SLOT (stop ())); + TQTimer::singleShot (0, gstapp, TQT_SLOT (stop ())); } void Backend::pause () { @@ -455,10 +455,10 @@ void Backend::volume (int v, bool) { void Backend::frequency (int) { } -void Backend::setAudioLang (int, QString) { +void Backend::setAudioLang (int, TQString) { } -void Backend::setSubtitle (int, QString) { +void Backend::setSubtitle (int, TQString) { } void Backend::quit () { @@ -467,29 +467,29 @@ void Backend::quit () { if (running) stop (); else - QTimer::singleShot (0, qApp, SLOT (quit ())); + TQTimer::singleShot (0, tqApp, TQT_SLOT (quit ())); } -bool updateConfigEntry (const QString & name, const QString & value) { +bool updateConfigEntry (const TQString & name, const TQString & value) { fprintf (stderr, "%s=%s\n", name.ascii (), (const char *) value.local8Bit ()); return true; } -void Backend::setConfig (QByteArray /*data*/) { - /*QString err; +void Backend::setConfig (TQByteArray /*data*/) { + /*TQString err; int line, column; - QDomDocument dom; + TQDomDocument dom; if (dom.setContent (data, false, &err, &line, &column)) { if (dom.childNodes().length() == 1) { - for (QDomNode node = dom.firstChild().firstChild(); + for (TQDomNode node = dom.firstChild().firstChild(); !node.isNull (); node = node.nextSibling ()) { - QDomNamedNodeMap attr = node.attributes (); + TQDomNamedNodeMap attr = node.attributes (); updateConfigEntry (attr.namedItem (attname).nodeValue (), attr.namedItem (attvalue).nodeValue ()); } } else - err = QString ("invalid data"); + err = TQString ("invalid data"); } if (callback) callback->errorMessage (0, err);*/ @@ -503,7 +503,7 @@ bool Backend::isPlaying () { } KGStreamerPlayer::KGStreamerPlayer (int _argc, char ** _argv) - : QApplication (_argc, _argv, false) { + : TQApplication (_argc, _argv, false) { } void KGStreamerPlayer::init () { @@ -540,11 +540,11 @@ KGStreamerPlayer::~KGStreamerPlayer () { gstapp = 0L; } -void getConfigEntries (QByteArray & buf) { - QDomDocument doc; - QDomElement root = doc.createElement (QString ("document")); +void getConfigEntries (TQByteArray & buf) { + TQDomDocument doc; + TQDomElement root = doc.createElement (TQString ("document")); doc.appendChild (root); - QCString exp = doc.toCString (); + TQCString exp = doc.toCString (); buf = exp; buf.resize (exp.length ()); // strip terminating \0 } @@ -573,7 +573,7 @@ void KGStreamerPlayer::play (int repeat) { fprintf (stderr, "couldn't create playbin\n"); goto fail; } - ignore_messages_mask = 0; + ignore_messages_tqmask = 0; gst_bus = gst_element_get_bus (gst_elm_play); gst_bus_add_signal_watch (gst_bus); @@ -634,13 +634,13 @@ void KGStreamerPlayer::play (int repeat) { if (GST_STATE (gst_elm_play) > GST_STATE_READY) gst_element_set_state (gst_elm_play, GST_STATE_READY); - if (mrl.startsWith (QChar ('/'))) - mrl = QString ("file://") + mrl; + if (mrl.startsWith (TQChar ('/'))) + mrl = TQString ("file://") + mrl; uri = g_strdup (mrl.local8Bit ()); g_object_set (gst_elm_play, "uri", uri, NULL); if (!sub_mrl.isEmpty ()) { - if (sub_mrl.startsWith (QChar ('/'))) - sub_mrl = QString ("file://") + sub_mrl; + if (sub_mrl.startsWith (TQChar ('/'))) + sub_mrl = TQString ("file://") + sub_mrl; sub_uri = g_strdup (sub_mrl.local8Bit ()); g_object_set (gst_elm_play, "suburi", sub_uri, NULL); g_free (sub_uri); @@ -653,7 +653,7 @@ void KGStreamerPlayer::play (int repeat) { gstPollForStateChange (gst_elm_play, GST_STATE_PLAYING); } g_free (uri); - QTimer::singleShot (500, this, SLOT (updatePosition ())); + TQTimer::singleShot (500, this, TQT_SLOT (updatePosition ())); return; fail: if (videosink) { @@ -665,7 +665,7 @@ fail: gst_object_unref (audiosink); } mutex.unlock (); - QApplication::postEvent (gstapp, new QEvent ((QEvent::Type)event_finished)); + TQApplication::postEvent (gstapp, new TQEvent ((TQEvent::Type)event_finished)); } void KGStreamerPlayer::pause () { @@ -697,11 +697,11 @@ void KGStreamerPlayer::stop () { } mutex.unlock (); if (!gst_elm_play || (gst_elm_play && !notified_playing)) - QApplication::postEvent (gstapp, new QEvent ((QEvent::Type) event_finished)); + TQApplication::postEvent (gstapp, new TQEvent ((TQEvent::Type) event_finished)); } void KGStreamerPlayer::finished () { - QTimer::singleShot (10, this, SLOT (stop ())); + TQTimer::singleShot (10, this, TQT_SLOT (stop ())); } static void adjustColorSetting (const char * channel, int val) { @@ -770,11 +770,11 @@ void KGStreamerPlayer::updatePosition () { callback->moviePosition (int (val / (GST_MSECOND * 100))); } mutex.unlock (); - QTimer::singleShot (500, this, SLOT (updatePosition ())); + TQTimer::singleShot (500, this, TQT_SLOT (updatePosition ())); } } -bool KGStreamerPlayer::event (QEvent * e) { +bool KGStreamerPlayer::event (TQEvent * e) { switch (e->type()) { case event_finished: { fprintf (stderr, "event_finished\n"); @@ -797,7 +797,7 @@ bool KGStreamerPlayer::event (QEvent * e) { if (callback) callback->finished (); else - QTimer::singleShot (0, this, SLOT (quit ())); + TQTimer::singleShot (0, this, TQT_SLOT (quit ())); break; } //callback->movieParams (se->length/100, se->width, se->height, se->height ? 1.0*se->width/se->height : 1.0); @@ -806,7 +806,7 @@ bool KGStreamerPlayer::event (QEvent * e) { fprintf (stderr, "movie parms: %d %d %d\n", se->length, se->width, se->height); if (callback) { if (se->length < 0) se->length = 0; - callback->movieParams (se->length, se->width, se->height, se->height ? 1.0*se->width/se->height : 1.0, QStringList (), QStringList ()); + callback->movieParams (se->length, se->width, se->height, se->height ? 1.0*se->width/se->height : 1.0, TQStringList (), TQStringList ()); } if (window_created && movie_width > 0 && movie_height > 0) { XLockDisplay (display); @@ -832,7 +832,7 @@ bool KGStreamerPlayer::event (QEvent * e) { break; case event_video: if (callback) - callback->statusMessage ((int) KMPlayer::Callback::stat_hasvideo, QString ()); + callback->statusMessage ((int) KMPlayer::Callback::stat_hasvideo, TQString ()); break; default: return false; @@ -840,12 +840,12 @@ bool KGStreamerPlayer::event (QEvent * e) { return true; } -void KGStreamerPlayer::saveState (QSessionManager & sm) { +void KGStreamerPlayer::saveState (TQSessionManager & sm) { if (callback) - sm.setRestartHint (QSessionManager::RestartNever); + sm.setRestartHint (TQSessionManager::RestartNever); } -class XEventThread : public QThread { +class XEventThread : public TQThread { protected: void run () { Time prev_click_time = 0; @@ -967,8 +967,8 @@ int main(int argc, char **argv) { } else if (!strcmp (argv [i], "-loop") && i < argc - 1) { repeat_count = atol (argv [++i]); } else if (!strcmp (argv [i], "-cb")) { - QString str = argv [++i]; - int pos = str.find ('/'); + TQString str = argv [++i]; + int pos = str.tqfind ('/'); if (pos > -1) { fprintf (stderr, "callback is %s %s\n", str.left (pos).ascii (), str.mid (pos + 1).ascii ()); callback = new KMPlayer::Callback_stub @@ -979,7 +979,7 @@ int main(int argc, char **argv) { delete gstapp; return 1; } else { - mrl = QString::fromLocal8Bit (argv[i]); + mrl = TQString::fromLocal8Bit (argv[i]); } } @@ -993,12 +993,12 @@ int main(int argc, char **argv) { gstapp->init (); if (callback) { - QByteArray buf; + TQByteArray buf; if (wants_config) getConfigEntries (buf); callback->started (dcopclient.appId (), buf); } else - QTimer::singleShot (10, gstapp, SLOT (play (int))); + TQTimer::singleShot (10, gstapp, TQT_SLOT (play (int))); gstapp->exec (); diff --git a/src/gstplayer.h b/src/gstplayer.h index 5eec508..be6cf71 100644 --- a/src/gstplayer.h +++ b/src/gstplayer.h @@ -20,24 +20,25 @@ #ifndef _K_GST_PLAYER_H_ #define _K_GST_PLAYER_H_ -#include -#include -#include +#include +#include +#include -struct GstSizeEvent : public QEvent { +struct GstSizeEvent : public TQEvent { GstSizeEvent (int l, int w, int h); int length; int width; int height; }; -struct GstProgressEvent : public QEvent { +struct GstProgressEvent : public TQEvent { GstProgressEvent (int p); int progress; }; -class KGStreamerPlayer : public QApplication { +class KGStreamerPlayer : public TQApplication { Q_OBJECT + TQ_OBJECT public: KGStreamerPlayer (int argc, char ** argv); ~KGStreamerPlayer (); @@ -50,7 +51,7 @@ public: void brightness (int val); void volume (int val); void seek (int val); - bool event (QEvent * e); + bool event (TQEvent * e); public slots: void play (int repeat_count); void stop (); @@ -58,7 +59,7 @@ public slots: void updatePosition (); //void postFinished (); protected: - void saveState (QSessionManager & sm); + void saveState (TQSessionManager & sm); }; #endif //_K_GST_PLAYER_H_ diff --git a/src/kmplayer.h b/src/kmplayer.h index f2faa92..fc76d36 100644 --- a/src/kmplayer.h +++ b/src/kmplayer.h @@ -33,9 +33,9 @@ static const int id_status_msg = 1; static const int id_status_timer = 2; -class QPopupMenu; -class QMenuItem; -class QListViewItem; +class TQPopupMenu; +class TQMenuItem; +class TQListViewItem; class KProcess; class KMPlayerBroadcastConfig; class KMPlayerFFServerConfig; @@ -58,9 +58,10 @@ namespace KMPlayer { class KMPlayerApp : public KMainWindow { Q_OBJECT + TQ_OBJECT public: - KMPlayerApp (QWidget* parent=0, const char* name=0); + KMPlayerApp (TQWidget* tqparent=0, const char* name=0); ~KMPlayerApp (); void openDocumentFile (const KURL& url=KURL()); void addURL (const KURL& url); @@ -97,7 +98,7 @@ public slots: void slotViewToolBar (); void slotViewStatusBar (); void slotViewMenuBar (); - void slotStatusMsg (const QString &text); + void slotStatusMsg (const TQString &text); void slotSourceChanged (KMPlayer::Source *, KMPlayer::Source *); private slots: void dvdNav (); @@ -126,8 +127,8 @@ private slots: void slotConfigureToolbars (); void slotClearHistory (); void windowVideoConsoleToggled (int wt); - void playListItemSelected (QListViewItem *); - void playListItemDropped (QDropEvent * e, QListViewItem * after); + void playListItemSelected (TQListViewItem *); + void playListItemDropped (TQDropEvent * e, TQListViewItem * after); void playListItemMoved (); void menuDropInList (); void menuDropInGroup (); @@ -135,10 +136,10 @@ private slots: void menuDeleteNode (); void menuMoveUpNode (); void menuMoveDownNode (); - void preparePlaylistMenu (KMPlayer::PlayListItem *, QPopupMenu *); + void preparePlaylistMenu (KMPlayer::PlayListItem *, TQPopupMenu *); private: - void menuItemClicked (QPopupMenu * menu, int id); + void menuItemClicked (TQPopupMenu * menu, int id); void minimalMode (bool deco=true); KConfig * config; KSystemTray * m_systray; @@ -167,18 +168,18 @@ private: KToggleAction * viewStatusBar; KToggleAction * viewMenuBar; KToggleAction * viewKeepRatio; - QMenuItem * m_sourcemenu; - QPopupMenu * m_dvdmenu; - QPopupMenu * m_dvdnavmenu; - QPopupMenu * m_vcdmenu; - QPopupMenu * m_audiocdmenu; - QPopupMenu * m_tvmenu; - QPopupMenu * m_dropmenu; + TQMenuItem * m_sourcemenu; + TQPopupMenu * m_dvdmenu; + TQPopupMenu * m_dvdnavmenu; + TQPopupMenu * m_vcdmenu; + TQPopupMenu * m_audiocdmenu; + TQPopupMenu * m_tvmenu; + TQPopupMenu * m_dropmenu; KMPlayerFFServerConfig * m_ffserverconfig; KMPlayerBroadcastConfig * m_broadcastconfig; - QCString m_dcopName; + TQCString m_dcopName; KURL::List m_drop_list; - QListViewItem * m_drop_after; + TQListViewItem * m_drop_after; int edit_tree_id; int manip_tree_id; int last_time_left; @@ -195,10 +196,10 @@ private: class KMPLAYER_NO_EXPORT FileDocument : public KMPlayer::Document { public: - FileDocument (short id, const QString &, KMPlayer::PlayListNotify * notify = 0L); - KMPlayer::NodePtr childFromTag (const QString & tag); - void readFromFile (const QString & file); - void writeToFile (const QString & file); + FileDocument (short id, const TQString &, KMPlayer::PlayListNotify * notify = 0L); + KMPlayer::NodePtr childFromTag (const TQString & tag); + void readFromFile (const TQString & file); + void writeToFile (const TQString & file); }; #endif // KMPLAYER_H diff --git a/src/kmplayer_asx.cpp b/src/kmplayer_asx.cpp index 9ab333a..26869f3 100644 --- a/src/kmplayer_asx.cpp +++ b/src/kmplayer_asx.cpp @@ -24,14 +24,14 @@ using namespace KMPlayer; -static QString getAsxAttribute (Element * e, const QString & attr) { +static TQString getAsxAttribute (Element * e, const TQString & attr) { for (AttributePtr a = e->attributes ()->first (); a; a = a->nextSibling ()) if (attr == a->name ().toString ().lower ()) return a->value (); - return QString (); + return TQString (); } -KDE_NO_EXPORT NodePtr ASX::Asx::childFromTag (const QString & tag) { +KDE_NO_EXPORT NodePtr ASX::Asx::childFromTag (const TQString & tag) { const char * name = tag.latin1 (); if (!strcasecmp (name, "entry")) return new ASX::Entry (m_doc); @@ -59,7 +59,7 @@ KDE_NO_EXPORT Node::PlayType ASX::Asx::playType () { //----------------------------------------------------------------------------- -KDE_NO_EXPORT NodePtr ASX::Entry::childFromTag (const QString & tag) { +KDE_NO_EXPORT NodePtr ASX::Entry::childFromTag (const TQString & tag) { const char * name = tag.latin1 (); if (!strcasecmp (name, "ref")) return new ASX::Ref (m_doc); @@ -105,7 +105,7 @@ KDE_NO_EXPORT void ASX::Entry::activate () { for (NodePtr e = firstChild (); e; e = e->nextSibling ()) if (e->id == id_node_param) { Element * elm = convertNode (e); - if (getAsxAttribute(elm,"name").lower() == QString("clipsummary")) { + if (getAsxAttribute(elm,"name").lower() == TQString("clipsummary")) { PlayListNotify * n = document ()->notify_listener; if (n) n->setInfoMessage (KURL::decode_string ( @@ -119,7 +119,7 @@ KDE_NO_EXPORT void ASX::Entry::activate () { KDE_NO_EXPORT void ASX::Entry::deactivate () { PlayListNotify * n = document ()->notify_listener; if (n) - n->setInfoMessage (QString ()); + n->setInfoMessage (TQString ()); } KDE_NO_EXPORT bool ASX::Entry::expose () const { diff --git a/src/kmplayer_asx.h b/src/kmplayer_asx.h index bfdbd7f..7eec2b9 100644 --- a/src/kmplayer_asx.h +++ b/src/kmplayer_asx.h @@ -21,7 +21,7 @@ #ifndef _KMPLAYER_ASX_H_ #define _KMPLAYER_ASX_H_ -#include +#include #include "kmplayerplaylist.h" @@ -45,7 +45,7 @@ const short id_node_duration = 408; class KMPLAYER_NO_EXPORT Asx : public Mrl { public: KDE_NO_CDTOR_EXPORT Asx (NodePtr & d) : Mrl (d, id_node_asx) {} - NodePtr childFromTag (const QString & tag); + NodePtr childFromTag (const TQString & tag); KDE_NO_EXPORT const char * nodeName () const { return "ASX"; } bool expose () const { return !pretty_name.isEmpty (); } PlayType playType (); @@ -58,7 +58,7 @@ class KMPLAYER_NO_EXPORT Entry : public Mrl { public: KDE_NO_CDTOR_EXPORT Entry (NodePtr & d) : Mrl (d, id_node_entry), ref_child_count (0) {} - NodePtr childFromTag (const QString & tag); + NodePtr childFromTag (const TQString & tag); KDE_NO_EXPORT const char * nodeName () const { return "Entry"; } /** * False, but since we might have a 'base' child, we can have a rel. src @@ -76,7 +76,7 @@ public: class KMPLAYER_NO_EXPORT Ref : public Mrl { public: KDE_NO_CDTOR_EXPORT Ref (NodePtr & d) : Mrl (d, id_node_ref) {} - //NodePtr childFromTag (const QString & tag); + //NodePtr childFromTag (const TQString & tag); void opened (); KDE_NO_EXPORT const char * nodeName () const { return "Ref"; } bool expose () const; @@ -88,7 +88,7 @@ public: class KMPLAYER_NO_EXPORT EntryRef : public Mrl { public: KDE_NO_CDTOR_EXPORT EntryRef (NodePtr & d) : Mrl (d, id_node_entryref) {} - //NodePtr childFromTag (const QString & tag); + //NodePtr childFromTag (const TQString & tag); void opened (); KDE_NO_EXPORT const char * nodeName () const { return "EntryRef"; } }; diff --git a/src/kmplayer_atom.cpp b/src/kmplayer_atom.cpp index da79902..a35c649 100644 --- a/src/kmplayer_atom.cpp +++ b/src/kmplayer_atom.cpp @@ -22,7 +22,7 @@ using namespace KMPlayer; -NodePtr ATOM::Feed::childFromTag (const QString & tag) { +NodePtr ATOM::Feed::childFromTag (const TQString & tag) { if (!strcmp (tag.latin1 (), "entry")) return new ATOM::Entry (m_doc); else if (!strcmp (tag.latin1 (), "link")) @@ -40,7 +40,7 @@ void ATOM::Feed::closed () { } } -NodePtr ATOM::Entry::childFromTag (const QString & tag) { +NodePtr ATOM::Entry::childFromTag (const TQString & tag) { if (!strcmp (tag.latin1 (), "link")) return new ATOM::Link (m_doc); else if (!strcmp (tag.latin1 (), "content")) @@ -65,8 +65,8 @@ Node::PlayType ATOM::Link::playType () { } void ATOM::Link::closed () { - QString href; - QString rel; + TQString href; + TQString rel; for (AttributePtr a = attributes ()->first (); a; a = a->nextSibling ()) { if (a->name () == StringPool::attr_href) href = a->value (); @@ -75,7 +75,7 @@ void ATOM::Link::closed () { else if (a->name () == "rel") rel = a->value (); } - if (!href.isEmpty () && rel == QString::fromLatin1 ("enclosure")) + if (!href.isEmpty () && rel == TQString::tqfromLatin1 ("enclosure")) src = href; else if (pretty_name.isEmpty ()) pretty_name = href; @@ -86,13 +86,13 @@ void ATOM::Content::closed () { if (a->name () == StringPool::attr_src) src = a->value (); else if (a->name () == StringPool::attr_type) { - QString v = a->value ().lower (); - if (v == QString::fromLatin1 ("text")) - mimetype = QString::fromLatin1 ("text/plain"); - else if (v == QString::fromLatin1 ("html")) - mimetype = QString::fromLatin1 ("text/html"); - else if (v == QString::fromLatin1 ("xhtml")) - mimetype = QString::fromLatin1 ("application/xhtml+xml"); + TQString v = a->value ().lower (); + if (v == TQString::tqfromLatin1 ("text")) + mimetype = TQString::tqfromLatin1 ("text/plain"); + else if (v == TQString::tqfromLatin1 ("html")) + mimetype = TQString::tqfromLatin1 ("text/html"); + else if (v == TQString::tqfromLatin1 ("xhtml")) + mimetype = TQString::tqfromLatin1 ("application/xhtml+xml"); else mimetype = v; } diff --git a/src/kmplayer_atom.h b/src/kmplayer_atom.h index b121ead..09eec97 100644 --- a/src/kmplayer_atom.h +++ b/src/kmplayer_atom.h @@ -21,7 +21,7 @@ #ifndef _KMPLAYER_ATOM_H_ #define _KMPLAYER_ATOM_H_ -#include +#include #include "kmplayerplaylist.h" @@ -42,7 +42,7 @@ const short id_node_content = 305; class KMPLAYER_NO_EXPORT Feed : public Mrl { public: KDE_NO_CDTOR_EXPORT Feed (NodePtr & d) : Mrl (d, id_node_feed) {} - NodePtr childFromTag (const QString & tag); + NodePtr childFromTag (const TQString & tag); KDE_NO_EXPORT const char * nodeName () const { return "feed"; } void closed (); bool expose () const { return !pretty_name.isEmpty (); } @@ -51,7 +51,7 @@ public: class KMPLAYER_NO_EXPORT Entry : public Mrl { public: KDE_NO_CDTOR_EXPORT Entry (NodePtr & d) : Mrl (d, id_node_entry) {} - NodePtr childFromTag (const QString & tag); + NodePtr childFromTag (const TQString & tag); KDE_NO_EXPORT const char * nodeName () const { return "entry"; } PlayType playType () { return play_type_none; } void closed (); diff --git a/src/kmplayer_backend.h b/src/kmplayer_backend.h index 242ee32..7270b4b 100644 --- a/src/kmplayer_backend.h +++ b/src/kmplayer_backend.h @@ -31,8 +31,8 @@ public: Backend (); virtual ~Backend (); k_dcop: - virtual ASYNC setURL (QString url); - virtual ASYNC setSubTitleURL (QString url); + virtual ASYNC setURL (TQString url); + virtual ASYNC setSubTitleURL (TQString url); virtual ASYNC play (int repeat_count); virtual ASYNC stop (); virtual ASYNC pause (); @@ -45,9 +45,9 @@ k_dcop: virtual ASYNC volume (int v, bool absolute); virtual ASYNC frequency (int f); virtual ASYNC quit (); - virtual ASYNC setConfig (QByteArray); - virtual ASYNC setAudioLang (int, QString); - virtual ASYNC setSubtitle (int, QString); + virtual ASYNC setConfig (TQByteArray); + virtual ASYNC setAudioLang (int, TQString); + virtual ASYNC setSubtitle (int, TQString); virtual bool isPlaying (); private: BackendPrivate * d; diff --git a/src/kmplayer_callback.h b/src/kmplayer_callback.h index 45d4f88..8bbcf39 100644 --- a/src/kmplayer_callback.h +++ b/src/kmplayer_callback.h @@ -20,7 +20,7 @@ #define _KMPLAYER_CALLBACK_H_ #include -#include +#include namespace KMPlayer { @@ -32,13 +32,13 @@ public: enum StatusCode { stat_addurl = 0, stat_newtitle, stat_hasvideo }; Callback (CallbackProcess *); k_dcop: - ASYNC statusMessage (int code, QString msg); - ASYNC errorMessage (int code, QString msg); - ASYNC subMrl (QString mrl, QString title); + ASYNC statusMessage (int code, TQString msg); + ASYNC errorMessage (int code, TQString msg); + ASYNC subMrl (TQString mrl, TQString title); ASYNC finished (); ASYNC playing (); - ASYNC started (QCString dcopname, QByteArray data); - ASYNC movieParams (int length, int width, int height, float aspect, QStringList alang, QStringList slang); + ASYNC started (TQCString dcopname, TQByteArray data); + ASYNC movieParams (int length, int width, int height, float aspect, TQStringList alang, TQStringList slang); ASYNC moviePosition (int position); ASYNC loadingProgress (int percentage); ASYNC toggleFullScreen (); diff --git a/src/kmplayer_koffice_part.cpp b/src/kmplayer_koffice_part.cpp index 756402a..85b27ac 100644 --- a/src/kmplayer_koffice_part.cpp +++ b/src/kmplayer_koffice_part.cpp @@ -23,14 +23,14 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -48,11 +48,11 @@ #ifdef HAVE_KOFFICE -#include -//#include -#include -#include -#include +#include +//#include +#include +#include +#include #include class KMPlayerFactory : public KParts::Factory { @@ -60,8 +60,8 @@ public: KMPlayerFactory (); virtual ~KMPlayerFactory (); virtual KParts::Part *createPartObject - (QWidget *wparent, const char *wname, QObject *parent, const char *name, - const char *className, const QStringList &args); + (TQWidget *wtqparent, const char *wname, TQObject *tqparent, const char *name, + const char *className, const TQStringList &args); static KInstance * instance () { return s_instance; } private: static KInstance * s_instance; @@ -80,21 +80,21 @@ KMPlayerFactory::~KMPlayerFactory () { } KParts::Part *KMPlayerFactory::createPartObject - (QWidget *wparent, const char *wname, - QObject *parent, const char * name, - const char * cls, const QStringList & args) { + (TQWidget *wtqparent, const char *wname, + TQObject *tqparent, const char * name, + const char * cls, const TQStringList & args) { if (strstr (cls, "KoDocument")) - return new KOfficeMPlayer (wparent, wname, parent, name); + return new KOfficeMPlayer (wtqparent, wname, tqparent, name); return 0L; } //----------------------------------------------------------------------------- -KOfficeMPlayer::KOfficeMPlayer (QWidget *parentWidget, const char *widgetName, QObject* parent, const char* name, bool singleViewMode) - : KoDocument (parentWidget, widgetName, parent, name, singleViewMode), +KOfficeMPlayer::KOfficeMPlayer (TQWidget *tqparentWidget, const char *widgetName, TQObject* tqparent, const char* name, bool singleViewMode) + : KoDocument (tqparentWidget, widgetName, tqparent, name, singleViewMode), m_config (new KConfig ("kmplayerrc")), - m_player (new KMPlayer (parentWidget, 0L, 0L, 0L, m_config)) + m_player (new KMPlayer (tqparentWidget, 0L, 0L, 0L, m_config)) { setInstance (KMPlayerFactory::instance (), false); setReadWrite (false); @@ -107,8 +107,8 @@ KOfficeMPlayer::~KOfficeMPlayer () { kdDebug() << "KOfficeMPlayer::~KOfficeMPlayer" << /*kdBacktrace() <<*/ endl; } -void KOfficeMPlayer::paintContent (QPainter& p, const QRect& r, bool, double, double) { - p.fillRect (r, QBrush (QColor (0, 0, 0))); +void KOfficeMPlayer::paintContent (TQPainter& p, const TQRect& r, bool, double, double) { + p.fillRect (r, TQBrush (TQColor (0, 0, 0))); } bool KOfficeMPlayer::initDoc() { @@ -116,8 +116,8 @@ bool KOfficeMPlayer::initDoc() { return true; } -bool KOfficeMPlayer::loadXML (QIODevice *, const QDomDocument & doc) { - QDomNode node = doc.firstChild (); +bool KOfficeMPlayer::loadXML (TQIODevice *, const TQDomDocument & doc) { + TQDomNode node = doc.firstChild (); if (node.isNull ()) return true; kdDebug() << "KOfficeMPlayer::loadXML " << node.nodeName () << endl; node = node.firstChild (); @@ -129,39 +129,39 @@ bool KOfficeMPlayer::loadXML (QIODevice *, const QDomDocument & doc) { return true; } -bool KOfficeMPlayer::loadOasis (const QDomDocument &, KoOasisStyles &, const QDomDocument &, KoStore *) { +bool KOfficeMPlayer::loadOasis (const TQDomDocument &, KoOasisStyles &, const TQDomDocument &, KoStore *) { return true; } -QDomDocument KOfficeMPlayer::saveXML() { - QDomDocument doc = createDomDocument ("kmplayer", QString::number(1.0)); - QDomElement docelm = doc.documentElement(); +TQDomDocument KOfficeMPlayer::saveXML() { + TQDomDocument doc = createDomDocument ("kmplayer", TQString::number(1.0)); + TQDomElement docelm = doc.documentElement(); docelm.setAttribute ("editor", "KMPlayer"); docelm.setAttribute ("mime", "application/x-kmplayer"); - QDomElement url = doc.createElement ("url"); + TQDomElement url = doc.createElement ("url"); url.appendChild (doc.createTextNode (m_player->url ().url ())); doc.appendChild (url); return doc; } -KoView* KOfficeMPlayer::createViewInstance (QWidget* parent, const char* name) { +KoView* KOfficeMPlayer::createViewInstance (TQWidget* tqparent, const char* name) { kdDebug() << "KOfficeMPlayer::createViewInstance" << endl; - return new KOfficeMPlayerView (this, parent); + return new KOfficeMPlayerView (this, tqparent); } -KOfficeMPlayerView::KOfficeMPlayerView (KOfficeMPlayer* part, QWidget* parent, const char* name) - : KoView (part, parent, name), +KOfficeMPlayerView::KOfficeMPlayerView (KOfficeMPlayer* part, TQWidget* tqparent, const char* name) + : KoView (part, tqparent, name), m_view (static_cast (part->player ()->view ())) { - kdDebug() << "KOfficeMPlayerView::KOfficeMPlayerView this:" << this << " parent:" << parent << endl; - m_oldparent = static_cast (m_view->parent()); - m_view->reparent (this, QPoint (0, 0)); - QVBoxLayout * box = new QVBoxLayout (this, 0, 0); + kdDebug() << "KOfficeMPlayerView::KOfficeMPlayerView this:" << this << " tqparent:" << tqparent << endl; + m_oldtqparent = static_cast (m_view->tqparent()); + m_view->reparent (this, TQPoint (0, 0)); + TQVBoxLayout * box = new TQVBoxLayout (this, 0, 0); box->addWidget (m_view); } KOfficeMPlayerView::~KOfficeMPlayerView () { kdDebug() << "KOfficeMPlayerView::~KOfficeMPlayerView this:" << this << endl; - m_view->reparent (m_oldparent, QPoint (0, 0)); + m_view->reparent (m_oldtqparent, TQPoint (0, 0)); } #include "kmplayer_koffice_part.moc" diff --git a/src/kmplayer_koffice_part.h b/src/kmplayer_koffice_part.h index 632a570..ca9002e 100644 --- a/src/kmplayer_koffice_part.h +++ b/src/kmplayer_koffice_part.h @@ -28,11 +28,11 @@ #include #include #endif //HAVE_KOFFICE -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "kmplayerview.h" #include "kmplayersource.h" @@ -42,39 +42,41 @@ class KAboutData; class KMPlayer; class KInstance; class KConfig; -class QIODevice; +class TQIODevice; #ifdef HAVE_KOFFICE class KOfficeMPlayer; class KOfficeMPlayerView : public KoView { Q_OBJECT + TQ_OBJECT public: - KOfficeMPlayerView (KOfficeMPlayer* part, QWidget* parent, const char* name = 0 ); + KOfficeMPlayerView (KOfficeMPlayer* part, TQWidget* tqparent, const char* name = 0 ); ~KOfficeMPlayerView (); void updateReadWrite(bool) {} private: KMPlayer::View * m_view; - QGuardedPtr m_oldparent; + TQGuardedPtr m_oldtqparent; }; class KOfficeMPlayer : public KoDocument { Q_OBJECT + TQ_OBJECT public: - KOfficeMPlayer (QWidget *parentWidget = 0, const char *widgetName = 0, QObject* parent = 0, const char* name = 0, bool singleViewMode = false); + KOfficeMPlayer (TQWidget *tqparentWidget = 0, const char *widgetName = 0, TQObject* tqparent = 0, const char* name = 0, bool singleViewMode = false); ~KOfficeMPlayer (); - virtual void paintContent (QPainter& painter, const QRect& rect, + virtual void paintContent (TQPainter& painter, const TQRect& rect, bool transparent = false, double zoomX = 1.0, double zoomY = 1.0); virtual bool initDoc (); - virtual bool loadXML (QIODevice *, const QDomDocument &); - virtual bool loadOasis (const QDomDocument &, KoOasisStyles &, const QDomDocument &, KoStore *); - virtual QDomDocument saveXML (); - virtual QCString mimeType() const { return "application/x-kmplayer"; } + virtual bool loadXML (TQIODevice *, const TQDomDocument &); + virtual bool loadOasis (const TQDomDocument &, KoOasisStyles &, const TQDomDocument &, KoStore *); + virtual TQDomDocument saveXML (); + virtual TQCString mimeType() const { return "application/x-kmplayer"; } KMPlayer * player () const { return m_player; } protected: - virtual KoView* createViewInstance (QWidget* parent, const char* name); + virtual KoView* createViewInstance (TQWidget* tqparent, const char* name); private: KConfig * m_config; KMPlayer * m_player; diff --git a/src/kmplayer_part.cpp b/src/kmplayer_part.cpp index 74698b9..0064f41 100644 --- a/src/kmplayer_part.cpp +++ b/src/kmplayer_part.cpp @@ -23,10 +23,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include class KXMLGUIClient; // workaround for kde3.3 on sarge with gcc4, kactioncollection.h does not forward declare KXMLGUIClient #include @@ -72,17 +72,17 @@ KDE_NO_CDTOR_EXPORT KMPlayerPartStatic::~KMPlayerPartStatic () { struct KMPLAYER_NO_EXPORT GroupPredicate { const KMPlayerPart * m_part; - const QString & m_group; + const TQString & m_group; bool m_get_any; - GroupPredicate(const KMPlayerPart *part, const QString &group, bool b=false) + GroupPredicate(const KMPlayerPart *part, const TQString &group, bool b=false) : m_part (part), m_group (group), m_get_any (b) {} bool operator () (const KMPlayerPart * part) const { return ((m_get_any && part != m_part && !part->master () && !part->url ().isEmpty ()) || (m_part->allowRedir (part->m_docbase) && (part->m_group == m_group || - part->m_group == QString::fromLatin1("_master") || - m_group == QString::fromLatin1("_master")) && + part->m_group == TQString::tqfromLatin1("_master") || + m_group == TQString::tqfromLatin1("_master")) && (part->m_features & KMPlayerPart::Feat_Viewer) != (m_part->m_features & KMPlayerPart::Feat_Viewer))); } @@ -97,9 +97,9 @@ public: KMPlayerFactory (); virtual ~KMPlayerFactory (); virtual KParts::Part *createPartObject - (QWidget *wparent, const char *wname, - QObject *parent, const char *name, - const char *className, const QStringList &args); + (TQWidget *wtqparent, const char *wname, + TQObject *tqparent, const char *name, + const char *className, const TQStringList &args); static KInstance * instance () { return s_instance; } private: static KInstance * s_instance; @@ -118,27 +118,27 @@ KDE_NO_CDTOR_EXPORT KMPlayerFactory::~KMPlayerFactory () { } KDE_NO_EXPORT KParts::Part *KMPlayerFactory::createPartObject - (QWidget *wparent, const char *wname, - QObject *parent, const char * name, - const char * cls, const QStringList & args) { + (TQWidget *wtqparent, const char *wname, + TQObject *tqparent, const char * name, + const char * cls, const TQStringList & args) { kdDebug() << "KMPlayerFactory::createPartObject " << cls << endl; - return new KMPlayerPart (wparent, wname, parent, name, args); + return new KMPlayerPart (wtqparent, wname, tqparent, name, args); } //----------------------------------------------------------------------------- -static bool getBoolValue (const QString & value) { - return (value.lower() != QString::fromLatin1("false") && - value.lower() != QString::fromLatin1("off") && - value.lower() != QString::fromLatin1("0")); +static bool getBoolValue (const TQString & value) { + return (value.lower() != TQString::tqfromLatin1("false") && + value.lower() != TQString::tqfromLatin1("off") && + value.lower() != TQString::tqfromLatin1("0")); } #define SET_FEAT_ON(f) { m_features |= f; turned_off_features &= ~f; } #define SET_FEAT_OFF(f) { m_features &= ~f; turned_off_features |= f; } -KDE_NO_CDTOR_EXPORT KMPlayerPart::KMPlayerPart (QWidget * wparent, const char *wname, - QObject * parent, const char *name, const QStringList &args) - : PartBase (wparent, wname, parent, name, new KConfig ("kmplayerrc")), +KDE_NO_CDTOR_EXPORT KMPlayerPart::KMPlayerPart (TQWidget * wtqparent, const char *wname, + TQObject * tqparent, const char *name, const TQStringList &args) + : PartBase (wtqparent, wname, tqparent, name, new KConfig ("kmplayerrc")), m_master (0L), m_browserextension (new KMPlayerBrowserExtension (this)), m_liveconnectextension (new KMPlayerLiveConnectExtension (this)), @@ -154,27 +154,27 @@ KDE_NO_CDTOR_EXPORT KMPlayerPart::KMPlayerPart (QWidget * wparent, const char *w m_sources ["hrefsource"] = (new KMPlayerHRefSource (this)); #ifdef HAVE_NSPR KMPlayer::NpPlayer *npp = (KMPlayer::NpPlayer *) players () ["npp"]; - connect (npp, SIGNAL (evaluate (const QString &, QString &)), - m_liveconnectextension, SLOT (evaluate (const QString &, QString &))); - connect (npp, SIGNAL (openUrl (const KURL &, const QString &)), + connect (npp, TQT_SIGNAL (evaluate (const TQString &, TQString &)), + m_liveconnectextension, TQT_SLOT (evaluate (const TQString &, TQString &))); + connect (npp, TQT_SIGNAL (openUrl (const KURL &, const TQString &)), m_browserextension, - SLOT (slotRequestOpenURL (const KURL &, const QString &))); + TQT_SLOT (slotRequestOpenURL (const KURL &, const TQString &))); #endif - /*KAction *playact =*/ new KAction(i18n("P&lay"), QString ("player_play"), KShortcut (), this, SLOT(play ()), actionCollection (), "play"); - /*KAction *pauseact =*/ new KAction(i18n("&Pause"), QString ("player_pause"), KShortcut (), this, SLOT(pause ()), actionCollection (), "pause"); - /*KAction *stopact =*/ new KAction(i18n("&Stop"), QString ("player_stop"), KShortcut (), this, SLOT(stop ()), actionCollection (), "stop"); - new KAction (i18n ("Increase Volume"), QString ("player_volume"), KShortcut (), this, SLOT (increaseVolume ()), actionCollection (), "edit_volume_up"); - new KAction (i18n ("Decrease Volume"), QString ("player_volume"), KShortcut (), this, SLOT (decreaseVolume ()), actionCollection (), "edit_volume_down"); + /*KAction *playact =*/ new KAction(i18n("P&lay"), TQString ("player_play"), KShortcut (), this, TQT_SLOT(play ()), actionCollection (), "play"); + /*KAction *pauseact =*/ new KAction(i18n("&Pause"), TQString ("player_pause"), KShortcut (), this, TQT_SLOT(pause ()), actionCollection (), "pause"); + /*KAction *stopact =*/ new KAction(i18n("&Stop"), TQString ("player_stop"), KShortcut (), this, TQT_SLOT(stop ()), actionCollection (), "stop"); + new KAction (i18n ("Increase Volume"), TQString ("player_volume"), KShortcut (), this, TQT_SLOT (increaseVolume ()), actionCollection (), "edit_volume_up"); + new KAction (i18n ("Decrease Volume"), TQString ("player_volume"), KShortcut (), this, TQT_SLOT (decreaseVolume ()), actionCollection (), "edit_volume_down"); Source * urlsource = m_sources ["urlsource"]; KMPlayer::ControlPanel * panel = m_view->controlPanel (); - QStringList::const_iterator it = args.begin (); - QStringList::const_iterator end = args.end (); + TQStringList::const_iterator it = args.begin (); + TQStringList::const_iterator end = args.end (); int turned_off_features = 0; for ( ; it != end; ++it) { - int equalPos = (*it).find("="); + int equalPos = (*it).tqfind("="); if (equalPos > 0) { - QString name = (*it).left (equalPos).lower (); - QString value = (*it).right ((*it).length () - equalPos - 1); + TQString name = (*it).left (equalPos).lower (); + TQString value = (*it).right ((*it).length () - equalPos - 1); if (value.at(0)=='\"') value = value.right (value.length () - 1); if (value.at (value.length () - 1) == '\"') @@ -184,121 +184,121 @@ KDE_NO_CDTOR_EXPORT KMPlayerPart::KMPlayerPart (QWidget * wparent, const char *w urlsource->setURL (KURL (value)); urlsource->setIdentified (false); m_havehref = true; - } else if (name == QString::fromLatin1("width")) { + } else if (name == TQString::tqfromLatin1("width")) { m_noresize = true; - } else if (name == QString::fromLatin1("height")) { + } else if (name == TQString::tqfromLatin1("height")) { m_noresize = true; - } else if (name == QString::fromLatin1("type")) { + } else if (name == TQString::tqfromLatin1("type")) { urlsource->document ()->mrl ()->mimetype = value; - } else if (name == QString::fromLatin1("controls")) { + } else if (name == TQString::tqfromLatin1("controls")) { //http://service.real.com/help/library/guides/production8/realpgd.htm?src=noref,rnhmpg_080301,rnhmtn,nosrc //http://service.real.com/help/library/guides/production8/htmfiles/control.htm - QStringList sl = QStringList::split (QChar (','), value); - QStringList::const_iterator it = sl.begin (); - const QStringList::const_iterator e = sl.end (); - for (QStringList::const_iterator i = sl.begin (); i != e; ++i) { - QString val_lower ((*i).lower ()); - if (val_lower == QString::fromLatin1("imagewindow")) { + TQStringList sl = TQStringList::split (TQChar (','), value); + TQStringList::const_iterator it = sl.begin (); + const TQStringList::const_iterator e = sl.end (); + for (TQStringList::const_iterator i = sl.begin (); i != e; ++i) { + TQString val_lower ((*i).lower ()); + if (val_lower == TQString::tqfromLatin1("imagewindow")) { SET_FEAT_ON (Feat_ImageWindow | Feat_Viewer) - } else if (val_lower == QString::fromLatin1("all")) { + } else if (val_lower == TQString::tqfromLatin1("all")) { m_features = (Feat_Controls | Feat_StatusBar); - } else if (val_lower == QString::fromLatin1("tacctrl")) { + } else if (val_lower == TQString::tqfromLatin1("tacctrl")) { SET_FEAT_ON (Feat_Label) - } else if (val_lower == QString::fromLatin1("controlpanel")) { + } else if (val_lower == TQString::tqfromLatin1("controlpanel")) { SET_FEAT_ON (Feat_Controls) - } else if (val_lower == QString::fromLatin1("infovolumepanel")){ + } else if (val_lower == TQString::tqfromLatin1("infovolumepanel")){ SET_FEAT_ON (Feat_Controls) // TODO - } else if (val_lower == QString::fromLatin1("positionfield") || - val_lower == QString::fromLatin1("positionslider")) { + } else if (val_lower == TQString::tqfromLatin1("positionfield") || + val_lower == TQString::tqfromLatin1("positionslider")) { setAutoControls (false); panel->positionSlider ()->show (); SET_FEAT_ON (Feat_Controls) - } else if ( val_lower == QString::fromLatin1("homectrl")) { + } else if ( val_lower == TQString::tqfromLatin1("homectrl")) { setAutoControls (false); panel->button (KMPlayer::ControlPanel::button_config)->show(); - } else if (val_lower == QString::fromLatin1("mutectrl") || - val_lower == QString::fromLatin1("mutevolume")) { + } else if (val_lower == TQString::tqfromLatin1("mutectrl") || + val_lower == TQString::tqfromLatin1("mutevolume")) { setAutoControls (false); - panel->volumeBar()->setMinimumSize (QSize (20, panel->volumeBar()->minimumSize ().height ())); + panel->volumeBar()->setMinimumSize (TQSize (20, panel->volumeBar()->tqminimumSize ().height ())); panel->volumeBar()->show (); SET_FEAT_ON (Feat_Controls) - } else if (val_lower == QString::fromLatin1("rwctrl")) { + } else if (val_lower == TQString::tqfromLatin1("rwctrl")) { setAutoControls (false); panel->button (KMPlayer::ControlPanel::button_back)->show (); // rewind ? SET_FEAT_ON (Feat_Controls) - } else if ( val_lower == QString::fromLatin1("ffctrl")) { + } else if ( val_lower == TQString::tqfromLatin1("ffctrl")) { setAutoControls (false); panel->button(KMPlayer::ControlPanel::button_forward)->show(); m_features = Feat_Controls; - } else if ( val_lower ==QString::fromLatin1("stopbutton")) { + } else if ( val_lower ==TQString::tqfromLatin1("stopbutton")) { setAutoControls (false); panel->button (KMPlayer::ControlPanel::button_stop)->show (); SET_FEAT_ON (Feat_Controls) - } else if (val_lower == QString::fromLatin1("playbutton") || - val_lower ==QString::fromLatin1("playonlybutton")) { + } else if (val_lower == TQString::tqfromLatin1("playbutton") || + val_lower ==TQString::tqfromLatin1("playonlybutton")) { setAutoControls (false); panel->button (KMPlayer::ControlPanel::button_play)->show (); SET_FEAT_ON (Feat_Controls) - } else if (val_lower ==QString::fromLatin1("pausebutton")) { + } else if (val_lower ==TQString::tqfromLatin1("pausebutton")) { setAutoControls (false); panel->button (KMPlayer::ControlPanel::button_pause)->show (); SET_FEAT_ON (Feat_Controls) - } else if (val_lower == QString::fromLatin1("statusbar") || - val_lower == QString::fromLatin1("statusfield")) { + } else if (val_lower == TQString::tqfromLatin1("statusbar") || + val_lower == TQString::tqfromLatin1("statusfield")) { SET_FEAT_ON (Feat_StatusBar) - } else if (val_lower == QString::fromLatin1("infopanel")) { + } else if (val_lower == TQString::tqfromLatin1("infopanel")) { SET_FEAT_ON (Feat_InfoPanel) - } else if (val_lower == QString::fromLatin1("playlist")) { + } else if (val_lower == TQString::tqfromLatin1("playlist")) { SET_FEAT_ON (Feat_PlayList) - } else if (val_lower==QString::fromLatin1("volumeslider")) { + } else if (val_lower==TQString::tqfromLatin1("volumeslider")) { SET_FEAT_ON (Feat_VolumeSlider) setAutoControls (false); panel->volumeBar()->show (); - panel->volumeBar()->setMinimumSize (QSize (20, panel->volumeBar()->minimumSize ().height ())); + panel->volumeBar()->setMinimumSize (TQSize (20, panel->volumeBar()->tqminimumSize ().height ())); } } - } else if (name == QString::fromLatin1("uimode")) { - QString val_lower (value.lower ()); - if (val_lower == QString::fromLatin1("full")) + } else if (name == TQString::tqfromLatin1("uimode")) { + TQString val_lower (value.lower ()); + if (val_lower == TQString::tqfromLatin1("full")) SET_FEAT_ON (Feat_All & ~(Feat_PlayList | Feat_ImageWindow)) // TODO: invisible, none, mini - } else if (name == QString::fromLatin1("nolabels")) { + } else if (name == TQString::tqfromLatin1("nolabels")) { SET_FEAT_OFF (Feat_Label) - } else if (name == QString::fromLatin1("nocontrols")) { + } else if (name == TQString::tqfromLatin1("nocontrols")) { SET_FEAT_OFF (Feat_Controls | Feat_VolumeSlider) - } else if (name == QString::fromLatin1("showdisplay")) { + } else if (name == TQString::tqfromLatin1("showdisplay")) { // the author name, the clip name, and the copyright information if (getBoolValue (value)) SET_FEAT_ON (Feat_InfoPanel) else SET_FEAT_OFF (Feat_InfoPanel) - } else if (name == QString::fromLatin1("showcontrols")) { + } else if (name == TQString::tqfromLatin1("showcontrols")) { if (getBoolValue (value)) SET_FEAT_ON (Feat_Viewer | Feat_Controls) else SET_FEAT_OFF (Feat_Controls | Feat_VolumeSlider) - } else if (name == QString::fromLatin1("showstatusbar")) { + } else if (name == TQString::tqfromLatin1("showstatusbar")) { if (getBoolValue (value)) SET_FEAT_ON (Feat_Viewer | Feat_StatusBar) else SET_FEAT_OFF (Feat_StatusBar) // else showcaptioning/showgotobar/showpositioncontrols/showtracker - } else if (name == QString::fromLatin1("console")) { - m_group = value.isEmpty() ? QString::fromLatin1("_anonymous") : value; - } else if (name == QString::fromLatin1("__khtml__pluginbaseurl")) { + } else if (name == TQString::tqfromLatin1("console")) { + m_group = value.isEmpty() ? TQString::tqfromLatin1("_anonymous") : value; + } else if (name == TQString::tqfromLatin1("__khtml__pluginbaseurl")) { m_docbase = KURL (value); - } else if (name == QString::fromLatin1("src")) { + } else if (name == TQString::tqfromLatin1("src")) { m_src_url = value; - } else if (name == QString::fromLatin1("filename")) { + } else if (name == TQString::tqfromLatin1("filename")) { m_file_name = value; - } else if (name == QString::fromLatin1 ("fullscreenmode")) { + } else if (name == TQString::tqfromLatin1 ("fullscreenmode")) { show_fullscreen = getBoolValue (value); - } else if (name == QString::fromLatin1 ("autostart")) { + } else if (name == TQString::tqfromLatin1 ("autostart")) { urlsource->setAutoPlay (getBoolValue (value)); } // volume/clicktoplay/transparentatstart/animationatstart // autorewind/displaysize/border - if (name.startsWith (QString::fromLatin1 ("__khtml__"))) + if (name.startsWith (TQString::tqfromLatin1 ("__khtml__"))) name = name.mid (9); convertNode (urlsource->document ())->setAttribute (name, value); } @@ -311,11 +311,11 @@ KDE_NO_CDTOR_EXPORT KMPlayerPart::KMPlayerPart (QWidget * wparent, const char *w //KParts::Part::setWidget (m_view); setXMLFile("kmplayerpartui.rc"); panel->zoomMenu ()->connectItem (KMPlayer::ControlPanel::menu_zoom50, - this, SLOT (setMenuZoom (int))); + this, TQT_SLOT (setMenuZoom (int))); panel->zoomMenu ()->connectItem (KMPlayer::ControlPanel::menu_zoom100, - this, SLOT (setMenuZoom (int))); + this, TQT_SLOT (setMenuZoom (int))); panel->zoomMenu ()->connectItem (KMPlayer::ControlPanel::menu_zoom150, - this, SLOT (setMenuZoom (int))); + this, TQT_SLOT (setMenuZoom (int))); m_view->setNoInfoMessages (m_features != Feat_InfoPanel); if (m_features == Feat_InfoPanel) @@ -332,7 +332,7 @@ KDE_NO_CDTOR_EXPORT KMPlayerPart::KMPlayerPart (QWidget * wparent, const char *w else m_view->setControlPanelMode (KMPlayer::View::CP_AutoHide); } - bool group_member = !m_group.isEmpty () && m_group != QString::fromLatin1("_unique") && m_features != Feat_Unknown; + bool group_member = !m_group.isEmpty () && m_group != TQString::tqfromLatin1("_unique") && m_features != Feat_Unknown; if (!group_member || m_features & Feat_Viewer) { // not part of a group or we're the viewer setProcess ("mplayer"); @@ -340,9 +340,9 @@ KDE_NO_CDTOR_EXPORT KMPlayerPart::KMPlayerPart (QWidget * wparent, const char *w connectPanel (m_view->controlPanel ()); if (m_features & Feat_StatusBar) { last_time_left = 0; - connect (this, SIGNAL (positioned (int, int)), - this, SLOT (statusPosition (int, int))); - m_view->statusBar ()->insertItem (QString ("--:--"), 1, 0, true); + connect (this, TQT_SIGNAL (positioned (int, int)), + this, TQT_SLOT (statusPosition (int, int))); + m_view->statusBar ()->insertItem (TQString ("--:--"), 1, 0, true); } } if (group_member) { @@ -362,7 +362,7 @@ KDE_NO_CDTOR_EXPORT KMPlayerPart::KMPlayerPart (QWidget * wparent, const char *w m_group.truncate (0); kmplayerpart_static->partlist.push_back (this); - QWidget *pwidget = view ()->parentWidget (); + TQWidget *pwidget = view ()->tqparentWidget (); if (pwidget) { m_view->viewArea()->setPaletteBackgroundColor(pwidget->paletteBackgroundColor ()); m_view->viewer()->setBackgroundColor(pwidget->paletteBackgroundColor()); @@ -397,7 +397,7 @@ KDE_NO_EXPORT void KMPlayerPart::setAutoControls (bool b) { m_view->controlPanel ()->setAutoControls (b); } -KDE_NO_EXPORT void KMPlayerPart::viewerPartDestroyed (QObject * o) { +KDE_NO_EXPORT void KMPlayerPart::viewerPartDestroyed (TQObject * o) { if (o == m_master) m_master = 0L; kdDebug () << "KMPlayerPart(" << this << ")::viewerPartDestroyed" << endl; @@ -434,16 +434,16 @@ KDE_NO_EXPORT bool KMPlayerPart::openURL (const KURL & _url) { url = KURL (m_docbase, m_file_name); // fix misdetected SRC attr else if (_url != m_docbase) { url = _url; - if (!m_file_name.isEmpty () && _url.url ().find (m_file_name) < 0) { + if (!m_file_name.isEmpty () && _url.url ().tqfind (m_file_name) < 0) { KURL u (m_file_name); - if ((u.protocol () == QString ("mms")) || + if ((u.protocol () == TQString ("mms")) || _url.protocol ().isEmpty ()) { // see if we somehow have to merge these int p = _url.port (); if (p > 0) u.setPort (p); if (u.path ().isEmpty ()) - u.setPath (QChar ('/') + _url.host ()); + u.setPath (TQChar ('/') + _url.host ()); if (allowRedir (u)) { url = u; kdDebug () << "KMPlayerPart::openURL compose " << m_file_name << " " << _url.url() << " ->" << u.url() << endl; @@ -469,7 +469,7 @@ KDE_NO_EXPORT bool KMPlayerPart::openURL (const KURL & _url) { if (url.isEmpty ()) { if (!m_master && !(m_features & Feat_Viewer)) // no master set, wait for a viewer to attach or timeout - QTimer::singleShot (50, this, SLOT (waitForImageWindowTimeOut ())); + TQTimer::singleShot (50, this, TQT_SLOT (waitForImageWindowTimeOut ())); return true; } if (!m_group.isEmpty () && !(m_features & Feat_Viewer)) { @@ -479,7 +479,7 @@ KDE_NO_EXPORT bool KMPlayerPart::openURL (const KURL & _url) { i = std::find_if (++i, e, pred)) if ((*i)->url ().isEmpty ()) // image window created w/o url return (*i)->openURL (_url); - QTimer::singleShot (50, this, SLOT (waitForImageWindowTimeOut ())); + TQTimer::singleShot (50, this, TQT_SLOT (waitForImageWindowTimeOut ())); //kdError () << "Not the ImageWindow and no ImageWindow found" << endl; return true; } @@ -549,17 +549,17 @@ KDE_NO_EXPORT void KMPlayerPart::connectToPart (KMPlayerPart * m) { if (m_features & Feat_InfoPanel) m->connectInfoPanel (m_view->infoPanel ()); connectSource (m_source, m->source ()); - connect (m, SIGNAL (destroyed (QObject *)), - this, SLOT (viewerPartDestroyed (QObject *))); - connect (m, SIGNAL (processChanged (const char *)), - this, SLOT (viewerPartProcessChanged (const char *))); - connect (m, SIGNAL (sourceChanged (KMPlayer::Source *, KMPlayer::Source *)), - this, SLOT (viewerPartSourceChanged (KMPlayer::Source *, KMPlayer::Source *))); + connect (m, TQT_SIGNAL (destroyed (TQObject *)), + this, TQT_SLOT (viewerPartDestroyed (TQObject *))); + connect (m, TQT_SIGNAL (processChanged (const char *)), + this, TQT_SLOT (viewerPartProcessChanged (const char *))); + connect (m, TQT_SIGNAL (sourceChanged (KMPlayer::Source *, KMPlayer::Source *)), + this, TQT_SLOT (viewerPartSourceChanged (KMPlayer::Source *, KMPlayer::Source *))); if (m_features & Feat_StatusBar) { last_time_left = 0; - connect (m, SIGNAL (positioned (int, int)), - this, SLOT (statusPosition (int, int))); - m_view->statusBar ()->insertItem (QString ("--:--"), 1, 0, true); + connect (m, TQT_SIGNAL (positioned (int, int)), + this, TQT_SLOT (statusPosition (int, int))); + m_view->statusBar ()->insertItem (TQString ("--:--"), 1, 0, true); } } @@ -568,7 +568,7 @@ KDE_NO_EXPORT void KMPlayerPart::setLoaded (int percentage) { if (percentage < 100) { m_browserextension->setLoadingProgress (percentage); m_browserextension->infoMessage - (QString::number (percentage) + i18n ("% Cache fill")); + (TQString::number (percentage) + i18n ("% Cache fill")); } } @@ -631,7 +631,7 @@ KDE_NO_EXPORT void KMPlayerPart::statusPosition (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; @@ -647,11 +647,11 @@ KDE_NO_EXPORT void KMPlayerPart::statusPosition (int pos, int length) { //--------------------------------------------------------------------- -KDE_NO_CDTOR_EXPORT KMPlayerBrowserExtension::KMPlayerBrowserExtension (KMPlayerPart * parent) - : KParts::BrowserExtension (parent, "KMPlayer Browser Extension") { +KDE_NO_CDTOR_EXPORT KMPlayerBrowserExtension::KMPlayerBrowserExtension (KMPlayerPart * tqparent) + : KParts::BrowserExtension (tqparent, "KMPlayer Browser Extension") { } -KDE_NO_EXPORT void KMPlayerBrowserExtension::urlChanged (const QString & url) { +KDE_NO_EXPORT void KMPlayerBrowserExtension::urlChanged (const TQString & url) { emit setLocationBarURL (url); } @@ -659,25 +659,25 @@ KDE_NO_EXPORT void KMPlayerBrowserExtension::setLoadingProgress (int percentage) emit loadingProgress (percentage); } -KDE_NO_EXPORT void KMPlayerBrowserExtension::saveState (QDataStream & stream) { - stream << static_cast (parent ())->url ().url (); +KDE_NO_EXPORT void KMPlayerBrowserExtension::saveState (TQDataStream & stream) { + stream << static_cast (tqparent ())->url ().url (); } -KDE_NO_EXPORT void KMPlayerBrowserExtension::restoreState (QDataStream & stream) { - QString url; +KDE_NO_EXPORT void KMPlayerBrowserExtension::restoreState (TQDataStream & stream) { + TQString url; stream >> url; - static_cast (parent ())->openURL (KURL(url)); + static_cast (tqparent ())->openURL (KURL(url)); } -KDE_NO_EXPORT void KMPlayerBrowserExtension::requestOpenURL (const KURL & url, const QString & target, const QString & service) { +KDE_NO_EXPORT void KMPlayerBrowserExtension::requestOpenURL (const KURL & url, const TQString & target, const TQString & service) { KParts::URLArgs args; args.frameName = target; args.serviceType = service; emit openURLRequest (url, args); } -KDE_NO_EXPORT void KMPlayerBrowserExtension::slotRequestOpenURL (const KURL &url, const QString &target) { - requestOpenURL (url, target, QString ()); +KDE_NO_EXPORT void KMPlayerBrowserExtension::slotRequestOpenURL (const KURL &url, const TQString &target) { + requestOpenURL (url, target, TQString ()); } //--------------------------------------------------------------------- @@ -746,14 +746,14 @@ static const JSCommandEntry JSCommandList [] = { { "GetEntryCopyright", notsupported, "(c)", KParts::LiveConnectExtension::TypeString }, { "GetEntryTitle", notsupported, "title", KParts::LiveConnectExtension::TypeString }, { "GetFullScreen", isfullscreen, 0L, KParts::LiveConnectExtension::TypeBool }, - { "GetImageStatus", notsupported, "false", KParts::LiveConnectExtension::TypeBool }, + { "GetImagetqStatus", notsupported, "false", KParts::LiveConnectExtension::TypeBool }, { "GetLastErrorMoreInfoURL", notsupported, "no error", KParts::LiveConnectExtension::TypeString }, { "GetLastErrorRMACode", notsupported, "0", KParts::LiveConnectExtension::TypeNumber }, { "GetLastErrorSeverity", notsupported, "6", KParts::LiveConnectExtension::TypeNumber }, { "GetLastErrorUserCode", notsupported, "0", KParts::LiveConnectExtension::TypeNumber }, { "GetLastErrorUserString", notsupported, "no error", KParts::LiveConnectExtension::TypeString }, { "GetLastMessage", notsupported, "no error", KParts::LiveConnectExtension::TypeString }, - { "GetLastStatus", notsupported, "no error", KParts::LiveConnectExtension::TypeString }, + { "GetLasttqStatus", notsupported, "no error", KParts::LiveConnectExtension::TypeString }, { "GetLength", length, 0L, KParts::LiveConnectExtension::TypeNumber }, { "GetLiveState", notsupported, "false", KParts::LiveConnectExtension::TypeBool }, { "GetLoop", isloop, 0L, KParts::LiveConnectExtension::TypeBool }, @@ -802,7 +802,7 @@ static const JSCommandEntry JSCommandList [] = { { "SetDoubleSize", notsupported, "true", KParts::LiveConnectExtension::TypeBool }, { "SetFileName", setsource, 0L, KParts::LiveConnectExtension::TypeBool }, { "SetFullScreen", notsupported, "true", KParts::LiveConnectExtension::TypeBool }, - { "SetImageStatus", notsupported, "true", KParts::LiveConnectExtension::TypeBool }, + { "SetImagetqStatus", notsupported, "true", KParts::LiveConnectExtension::TypeBool }, { "SetLoop", notsupported, "true", KParts::LiveConnectExtension::TypeBool }, { "SetMaintainAspect", notsupported, "true", KParts::LiveConnectExtension::TypeBool }, { "SetMute", notsupported, "true", KParts::LiveConnectExtension::TypeBool }, @@ -847,13 +847,13 @@ static const JSCommandEntry * getJSCommandEntry (const char * name, int start = return &JSCommandList[mid]; } -KDE_NO_CDTOR_EXPORT KMPlayerLiveConnectExtension::KMPlayerLiveConnectExtension (KMPlayerPart * parent) - : KParts::LiveConnectExtension (parent), player (parent), +KDE_NO_CDTOR_EXPORT KMPlayerLiveConnectExtension::KMPlayerLiveConnectExtension (KMPlayerPart * tqparent) + : KParts::LiveConnectExtension (tqparent), player (tqparent), lastJSCommandEntry (0L), m_started (false), m_enablefinish (false), m_evaluating (false) { - connect (parent, SIGNAL (started (KIO::Job *)), this, SLOT (started ())); + connect (tqparent, TQT_SIGNAL (started (KIO::Job *)), this, TQT_SLOT (started ())); } KDE_NO_CDTOR_EXPORT KMPlayerLiveConnectExtension::~KMPlayerLiveConnectExtension() { @@ -867,7 +867,7 @@ KDE_NO_EXPORT void KMPlayerLiveConnectExtension::started () { KDE_NO_EXPORT void KMPlayerLiveConnectExtension::finished () { if (m_started && m_enablefinish) { KParts::LiveConnectExtension::ArgList args; - args.push_back (qMakePair (KParts::LiveConnectExtension::TypeString, QString("if (window.onFinished) onFinished();"))); + args.push_back (qMakePair (KParts::LiveConnectExtension::TypeString, TQString("if (window.onFinished) onFinished();"))); emit partEvent (0, "eval", args); m_started = true; m_enablefinish = false; @@ -875,14 +875,14 @@ KDE_NO_EXPORT void KMPlayerLiveConnectExtension::finished () { } KDE_NO_EXPORT void KMPlayerLiveConnectExtension::evaluate ( - const QString & scr, QString & result) { - QString script (scr); + const TQString & scr, TQString & result) { + TQString script (scr); KParts::LiveConnectExtension::ArgList args; - script = script.replace ('\\', "\\\\"); - script = script.replace ('\n', "\\n"); - script = script.replace ('\r', ""); - script = script.replace ('"', "\\\""); - script = QString ("this.__kmplayer__res=eval(\"%1\")").arg (script); + script = script.tqreplace ('\\', "\\\\"); + script = script.tqreplace ('\n', "\\n"); + script = script.tqreplace ('\r', ""); + script = script.tqreplace ('"', "\\\""); + script = TQString ("this.__kmplayer__res=eval(\"%1\")").arg (script); args.push_back(qMakePair(KParts::LiveConnectExtension::TypeString, script)); script_result = "undefined"; @@ -893,9 +893,9 @@ KDE_NO_EXPORT void KMPlayerLiveConnectExtension::evaluate ( } KDE_NO_EXPORT bool KMPlayerLiveConnectExtension::get - (const unsigned long id, const QString & name, + (const unsigned long id, const TQString & name, KParts::LiveConnectExtension::Type & type, - unsigned long & rid, QString & rval) + unsigned long & rid, TQString & rval) { if (name.startsWith ("__kmplayer__obj_")) { if (m_evaluating) @@ -919,11 +919,11 @@ KDE_NO_EXPORT bool KMPlayerLiveConnectExtension::get break; case prop_volume: if (player->view ()) - rval = QString::number (player->process()->viewer ()->view()->controlPanel()->volumeBar()->value()); + rval = TQString::number (player->process()->viewer ()->view()->controlPanel()->volumeBar()->value()); break; case prop_error: type = KParts::LiveConnectExtension::TypeNumber; - rval = QString::number (0); + rval = TQString::number (0); break; default: lastJSCommandEntry = entry; @@ -933,7 +933,7 @@ KDE_NO_EXPORT bool KMPlayerLiveConnectExtension::get } KDE_NO_EXPORT bool KMPlayerLiveConnectExtension::put - (const unsigned long, const QString & name, const QString & val) { + (const unsigned long, const TQString & name, const TQString & val) { if (name == "__kmplayer__res") { script_result = val; return true; @@ -964,9 +964,9 @@ KDE_NO_EXPORT bool KMPlayerLiveConnectExtension::put } KDE_NO_EXPORT bool KMPlayerLiveConnectExtension::call - (const unsigned long id, const QString & name, - const QStringList & args, KParts::LiveConnectExtension::Type & type, - unsigned long & rid, QString & rval) { + (const unsigned long id, const TQString & name, + const TQStringList & args, KParts::LiveConnectExtension::Type & type, + unsigned long & rid, TQString & rval) { const JSCommandEntry * entry = lastJSCommandEntry; const char * str = name.ascii (); if (!entry || strcmp (entry->name, str)) @@ -1017,8 +1017,8 @@ KDE_NO_EXPORT bool KMPlayerLiveConnectExtension::call break; case showcontrolpanel: if (args.size () && - (args.first () == QString::fromLatin1 ("0") || - args.first () == QString::fromLatin1 ("false"))) + (args.first () == TQString::tqfromLatin1 ("0") || + args.first () == TQString::tqfromLatin1 ("false"))) static_cast (player->view ())->setControlPanelMode (KMPlayer::View::CP_Hide); else static_cast (player->view ())->setControlPanelMode (KMPlayer::View::CP_Show); @@ -1073,7 +1073,7 @@ KDE_NO_EXPORT bool KMPlayerLiveConnectExtension::call break; case volume: if (player->view ()) - rval = QString::number (player->process()->viewer ()->view()->controlPanel()->volumeBar()->value()); + rval = TQString::number (player->process()->viewer ()->view()->controlPanel()->volumeBar()->value()); break; default: return false; @@ -1088,7 +1088,7 @@ KDE_NO_EXPORT void KMPlayerLiveConnectExtension::setSize (int w, int h) { KMPlayer::View * view = static_cast (player->view ()); if (view->controlPanelMode () == KMPlayer::View::CP_Show) h += view->controlPanel()->height(); - QString jscode; + TQString jscode; jscode.sprintf("try { eval(\"this.setAttribute('WIDTH',%d);this.setAttribute('HEIGHT',%d)\"); } catch(e){}", w, h); KParts::LiveConnectExtension::ArgList args; args.push_back (qMakePair (KParts::LiveConnectExtension::TypeString, jscode)); @@ -1115,7 +1115,7 @@ KDE_NO_EXPORT bool KMPlayerHRefSource::hasLength () { return false; } -KDE_NO_EXPORT bool KMPlayerHRefSource::processOutput (const QString & /*str*/) { +KDE_NO_EXPORT bool KMPlayerHRefSource::processOutput (const TQString & /*str*/) { //return Source::processOutput (str); return true; } @@ -1131,7 +1131,7 @@ KDE_NO_EXPORT void KMPlayerHRefSource::setURL (const KURL & url) { KDE_NO_EXPORT void KMPlayerHRefSource::play () { kdDebug () << "KMPlayerHRefSource::play " << m_url.url() << endl; Source * src = m_player->sources () ["urlsource"]; - QString target = src->document ()->document ()-> + TQString target = src->document ()->document ()-> getAttribute (StringPool::attr_target); if (!target.isEmpty ()) { KMPlayer::Mrl * mrl = src->document ()->mrl (); @@ -1143,17 +1143,17 @@ KDE_NO_EXPORT void KMPlayerHRefSource::play () { KDE_NO_EXPORT void KMPlayerHRefSource::activate () { m_player->stop (); if (m_finished) { - QTimer::singleShot (0, this, SLOT (finished ())); + TQTimer::singleShot (0, this, TQT_SLOT (finished ())); return; } init (); m_player->setProcess ("mplayer"); if (m_player->process ()->grabPicture (m_url, 0)) - connect (m_player->process (), SIGNAL (grabReady (const QString &)), - this, SLOT (grabReady (const QString &))); + connect (m_player->process (), TQT_SIGNAL (grabReady (const TQString &)), + this, TQT_SLOT (grabReady (const TQString &))); else { setURL (KURL ()); - QTimer::singleShot (0, this, SLOT (play ())); + TQTimer::singleShot (0, this, TQT_SLOT (play ())); } } @@ -1161,7 +1161,7 @@ KDE_NO_EXPORT void KMPlayerHRefSource::clear () { setURL (KURL ()); } -KDE_NO_EXPORT void KMPlayerHRefSource::grabReady (const QString & path) { +KDE_NO_EXPORT void KMPlayerHRefSource::grabReady (const TQString & path) { kdDebug () << "KMPlayerHRefSource::grabReady(" << path << ")" << endl; m_finished = true; m_grabfile = path; @@ -1174,23 +1174,23 @@ KDE_NO_EXPORT void KMPlayerHRefSource::finished () { if (!view) return; if (!view->setPicture (m_grabfile)) { clear (); - QTimer::singleShot (0, this, SLOT (play ())); + TQTimer::singleShot (0, this, TQT_SLOT (play ())); return; } if (view->viewer ()) - connect (view, SIGNAL (pictureClicked ()), this, SLOT (play ())); + connect (view, TQT_SIGNAL (pictureClicked ()), this, TQT_SLOT (play ())); } KDE_NO_EXPORT void KMPlayerHRefSource::deactivate () { kdDebug () << "KMPlayerHRefSource::deactivate()" << endl; KMPlayer::View * view = static_cast (m_player->view ()); if (!view) return; - view->setPicture (QString ()); + view->setPicture (TQString ()); if (view->viewer ()) - disconnect (view, SIGNAL (pictureClicked ()), this, SLOT (play ())); + disconnect (view, TQT_SIGNAL (pictureClicked ()), this, TQT_SLOT (play ())); } -KDE_NO_EXPORT QString KMPlayerHRefSource::prettyName () { +KDE_NO_EXPORT TQString KMPlayerHRefSource::prettyName () { return i18n ("WEB"); } diff --git a/src/kmplayer_part.h b/src/kmplayer_part.h index e60d983..4bdba55 100644 --- a/src/kmplayer_part.h +++ b/src/kmplayer_part.h @@ -34,25 +34,26 @@ class JSCommandEntry; */ class KMPLAYER_NO_EXPORT KMPlayerHRefSource : public KMPlayer::Source { Q_OBJECT + TQ_OBJECT public: KMPlayerHRefSource (KMPlayer::PartBase * player); virtual ~KMPlayerHRefSource (); - virtual bool processOutput (const QString & line); + virtual bool processOutput (const TQString & line); virtual bool hasLength (); void setURL (const KURL &); void clear (); - virtual QString prettyName (); + virtual TQString prettyName (); public slots: virtual void init (); virtual void activate (); virtual void deactivate (); void finished (); private slots: - void grabReady (const QString & path); + void grabReady (const TQString & path); void play (); private: - QString m_grabfile; + TQString m_grabfile; bool m_finished; }; @@ -62,17 +63,18 @@ private: */ class KMPLAYER_NO_EXPORT KMPlayerBrowserExtension : public KParts::BrowserExtension { Q_OBJECT + TQ_OBJECT public: - KMPlayerBrowserExtension(KMPlayerPart *parent); + KMPlayerBrowserExtension(KMPlayerPart *tqparent); KDE_NO_CDTOR_EXPORT ~KMPlayerBrowserExtension () {} - void urlChanged (const QString & url); + void urlChanged (const TQString & url); void setLoadingProgress (int percentage); - void saveState (QDataStream & stream); - void restoreState (QDataStream & stream); - void requestOpenURL (const KURL & url, const QString & target, const QString & service); + void saveState (TQDataStream & stream); + void restoreState (TQDataStream & stream); + void requestOpenURL (const KURL & url, const TQString & target, const TQString & service); public slots: - void slotRequestOpenURL (const KURL & url, const QString & target); + void slotRequestOpenURL (const KURL & url, const TQString & target); }; /* @@ -80,34 +82,35 @@ public slots: */ class KMPLAYER_NO_EXPORT KMPlayerLiveConnectExtension : public KParts::LiveConnectExtension { Q_OBJECT + TQ_OBJECT public: - KMPlayerLiveConnectExtension (KMPlayerPart * parent); + KMPlayerLiveConnectExtension (KMPlayerPart * tqparent); ~KMPlayerLiveConnectExtension (); // LiveConnect interface - bool get (const unsigned long, const QString &, - KParts::LiveConnectExtension::Type &, unsigned long &, QString &); - bool put (const unsigned long, const QString &, const QString &); - bool call (const unsigned long, const QString &, - const QStringList &, KParts::LiveConnectExtension::Type &, - unsigned long &, QString &); + bool get (const unsigned long, const TQString &, + KParts::LiveConnectExtension::Type &, unsigned long &, TQString &); + bool put (const unsigned long, const TQString &, const TQString &); + bool call (const unsigned long, const TQString &, + const TQStringList &, KParts::LiveConnectExtension::Type &, + unsigned long &, TQString &); void unregister (const unsigned long); - void sendEvent(const unsigned long objid, const QString & event, const KParts::LiveConnectExtension::ArgList & args ) { + void sendEvent(const unsigned long objid, const TQString & event, const KParts::LiveConnectExtension::ArgList & args ) { emit partEvent(objid, event, args); } void enableFinishEvent (bool b = true) { m_enablefinish = b; } signals: - void partEvent (const unsigned long, const QString &, + void partEvent (const unsigned long, const TQString &, const KParts::LiveConnectExtension::ArgList &); public slots: void setSize (int w, int h); void started (); void finished (); - void evaluate (const QString & script, QString & result); + void evaluate (const TQString & script, TQString & result); private: KMPlayerPart * player; - QString script_result; + TQString script_result; const JSCommandEntry * lastJSCommandEntry; bool m_started; bool m_enablefinish; @@ -120,6 +123,7 @@ private: */ class KMPLAYER_NO_EXPORT KMPlayerPart : public KMPlayer::PartBase { Q_OBJECT + TQ_OBJECT friend struct GroupPredicate; public: enum Features { @@ -129,8 +133,8 @@ public: Feat_InfoPanel = 0x10, Feat_VolumeSlider = 0x20, Feat_PlayList = 0x40, Feat_ImageWindow = 0x80, Feat_All = 0xff }; - KMPlayerPart (QWidget * wparent, const char * wname, - QObject * parent, const char * name, const QStringList &args); + KMPlayerPart (TQWidget * wtqparent, const char * wname, + TQObject * tqparent, const char * name, const TQStringList &args); ~KMPlayerPart (); KDE_NO_EXPORT KMPlayerBrowserExtension * browserextension() const @@ -151,7 +155,7 @@ public slots: protected slots: virtual void playingStarted (); virtual void playingStopped (); - void viewerPartDestroyed (QObject *); + void viewerPartDestroyed (TQObject *); void viewerPartProcessChanged (const char *); void viewerPartSourceChanged (KMPlayer::Source *, KMPlayer::Source *); void waitForImageWindowTimeOut (); @@ -161,10 +165,10 @@ private: KMPlayerPart * m_master; KMPlayerBrowserExtension * m_browserextension; KMPlayerLiveConnectExtension * m_liveconnectextension; - QString m_group; + TQString m_group; KURL m_docbase; - QString m_src_url; - QString m_file_name; + TQString m_src_url; + TQString m_file_name; int m_features; int last_time_left; bool m_started_emited : 1; diff --git a/src/kmplayer_rp.cpp b/src/kmplayer_rp.cpp index c255e39..7b0b44f 100644 --- a/src/kmplayer_rp.cpp +++ b/src/kmplayer_rp.cpp @@ -18,9 +18,9 @@ #include -#include -#include -#include +#include +#include +#include #include @@ -162,7 +162,7 @@ KDE_NO_EXPORT Surface *RP::Imfl::surface () { return rp_surface.ptr (); } -KDE_NO_EXPORT NodePtr RP::Imfl::childFromTag (const QString & tag) { +KDE_NO_EXPORT NodePtr RP::Imfl::childFromTag (const TQString & tag) { const char * ctag = tag.latin1 (); if (!strcmp (ctag, "head")) return new DarkNode (m_doc, "head", RP::id_node_head); @@ -183,11 +183,11 @@ KDE_NO_EXPORT NodePtr RP::Imfl::childFromTag (const QString & tag) { return 0L; } -KDE_NO_EXPORT void RP::Imfl::repaint () { +KDE_NO_EXPORT void RP::Imfl::tqrepaint () { if (!active ()) - kdWarning () << "Spurious Imfl repaint" << endl; + kdWarning () << "Spurious Imfl tqrepaint" << endl; else if (surface () && width > 0 && height > 0) - rp_surface->repaint (SRect (0, 0, width, height)); + rp_surface->tqrepaint (SRect (0, 0, width, height)); } KDE_NO_CDTOR_EXPORT RP::Image::Image (NodePtr & doc) @@ -219,7 +219,7 @@ KDE_NO_EXPORT void RP::Image::begin () { } KDE_NO_EXPORT void RP::Image::deactivate () { - cached_img.setUrl (QString ()); + cached_img.setUrl (TQString ()); if (img_surface) { img_surface->remove (); img_surface = NULL; @@ -229,10 +229,10 @@ KDE_NO_EXPORT void RP::Image::deactivate () { } -KDE_NO_EXPORT void RP::Image::remoteReady (QByteArray & data) { +KDE_NO_EXPORT void RP::Image::remoteReady (TQByteArray & data) { kdDebug () << "RP::Image::remoteReady" << endl; if (!data.isEmpty () && cached_img.isEmpty ()) { - QImage * img = new QImage (data); + TQImage * img = new TQImage (data); if (!img->isNull ()) { cached_img.data->image = img; width = img->width (); @@ -252,7 +252,7 @@ KDE_NO_EXPORT bool RP::Image::isReady (bool postpone_if_not) { KDE_NO_EXPORT Surface *RP::Image::surface () { if (!img_surface && !cached_img.isEmpty ()) { - Node * p = parentNode ().ptr (); + Node * p = tqparentNode ().ptr (); if (p && p->id == RP::id_node_imfl) { Surface *ps = static_cast (p)->surface (); if (ps) @@ -272,7 +272,7 @@ KDE_NO_EXPORT void RP::TimingsBase::activate () { srcx = srcy = srcw = srch = 0; for (Attribute * a= attributes ()->first ().ptr (); a; a = a->nextSibling ().ptr ()) { if (a->name () == StringPool::attr_target) { - for (NodePtr n = parentNode()->firstChild(); n; n= n->nextSibling()) + for (NodePtr n = tqparentNode()->firstChild(); n; n= n->nextSibling()) if (convertNode (n)-> getAttribute ("handle") == a->value ()) target = n; @@ -351,9 +351,9 @@ KDE_NO_EXPORT void RP::TimingsBase::begin () { KDE_NO_EXPORT void RP::TimingsBase::update (int percentage) { progress = percentage; - Node * p = parentNode ().ptr (); + Node * p = tqparentNode ().ptr (); if (p->id == RP::id_node_imfl) - static_cast (p)->repaint (); + static_cast (p)->tqrepaint (); } KDE_NO_EXPORT void RP::TimingsBase::finish () { @@ -416,7 +416,7 @@ KDE_NO_EXPORT void RP::Fadein::accept (Visitor * v) { } KDE_NO_EXPORT void RP::Fadeout::activate () { - to_color = QColor (getAttribute ("color")).rgb (); + to_color = TQColor (getAttribute ("color")).rgb (); TimingsBase::activate (); } @@ -430,7 +430,7 @@ KDE_NO_EXPORT void RP::Fadeout::accept (Visitor * v) { } KDE_NO_EXPORT void RP::Fill::activate () { - color = QColor (getAttribute ("color")).rgb (); + color = TQColor (getAttribute ("color")).rgb (); TimingsBase::activate (); } @@ -445,13 +445,13 @@ KDE_NO_EXPORT void RP::Fill::accept (Visitor * v) { KDE_NO_EXPORT void RP::Wipe::activate () { //TODO implement 'type="push"' - QString dir = getAttribute ("direction").lower (); + TQString dir = getAttribute ("direction").lower (); direction = dir_right; - if (dir == QString::fromLatin1 ("left")) + if (dir == TQString::tqfromLatin1 ("left")) direction = dir_left; - else if (dir == QString::fromLatin1 ("up")) + else if (dir == TQString::tqfromLatin1 ("up")) direction = dir_up; - else if (dir == QString::fromLatin1 ("down")) + else if (dir == TQString::tqfromLatin1 ("down")) direction = dir_down; TimingsBase::activate (); } @@ -479,14 +479,14 @@ KDE_NO_EXPORT void RP::ViewChange::activate () { KDE_NO_EXPORT void RP::ViewChange::begin () { kdDebug () << "RP::ViewChange::begin" << endl; setState (state_began); - Node * p = parentNode ().ptr (); + Node * p = tqparentNode ().ptr (); if (p->id == RP::id_node_imfl) static_cast (p)->needs_scene_img++; update (0); } KDE_NO_EXPORT void RP::ViewChange::finish () { - Node * p = parentNode ().ptr (); + Node * p = tqparentNode ().ptr (); if (p && p->id == RP::id_node_imfl) static_cast (p)->needs_scene_img--; TimingsBase::finish (); diff --git a/src/kmplayer_rp.h b/src/kmplayer_rp.h index 5c43a0f..017086e 100644 --- a/src/kmplayer_rp.h +++ b/src/kmplayer_rp.h @@ -21,8 +21,8 @@ #ifndef _KMPLAYER_RP_H_ #define _KMPLAYER_RP_H_ -#include -#include +#include +#include #include "kmplayerplaylist.h" #include "kmplayer_smil.h" @@ -54,7 +54,7 @@ public: Imfl (NodePtr & d); ~Imfl (); KDE_NO_EXPORT virtual const char * nodeName () const { return "imfl"; } - virtual NodePtr childFromTag (const QString & tag); + virtual NodePtr childFromTag (const TQString & tag); virtual void closed (); virtual void defer (); // start loading the images if not yet done virtual void activate (); // start timings, handle paint events @@ -66,8 +66,8 @@ public: virtual bool handleEvent (EventPtr event); virtual void accept (Visitor *); Surface *surface (); - void repaint (); // called whenever something changes on image - Fit fit; // how to layout images + void tqrepaint (); // called whenever something changes on image + Fit fit; // how to tqlayout images unsigned int duration; // cached attributes of head TimerInfoPtrW duration_timer; SurfacePtrW rp_surface; @@ -182,7 +182,7 @@ public: CachedImage cached_img; bool expose () const { return false; } protected: - virtual void remoteReady (QByteArray & data); + virtual void remoteReady (TQByteArray & data); }; } // RP namespace diff --git a/src/kmplayer_rss.cpp b/src/kmplayer_rss.cpp index 133b4e8..174fe23 100644 --- a/src/kmplayer_rss.cpp +++ b/src/kmplayer_rss.cpp @@ -22,13 +22,13 @@ using namespace KMPlayer; -KDE_NO_EXPORT NodePtr RSS::Rss::childFromTag (const QString & tag) { +KDE_NO_EXPORT NodePtr RSS::Rss::childFromTag (const TQString & tag) { if (!strcmp (tag.latin1 (), "channel")) return new RSS::Channel (m_doc); return 0L; } -KDE_NO_EXPORT NodePtr RSS::Channel::childFromTag (const QString & tag) { +KDE_NO_EXPORT NodePtr RSS::Channel::childFromTag (const TQString & tag) { const char *ctag = tag.ascii (); if (!strcmp (ctag, "item")) return new RSS::Item (m_doc); @@ -50,7 +50,7 @@ KDE_NO_EXPORT bool RSS::Channel::expose () const { previousSibling () || nextSibling (); } -KDE_NO_EXPORT NodePtr RSS::Item::childFromTag (const QString & tag) { +KDE_NO_EXPORT NodePtr RSS::Item::childFromTag (const TQString & tag) { const char *ctag = tag.ascii (); if (!strcmp (ctag, "enclosure")) return new RSS::Enclosure (m_doc); @@ -92,7 +92,7 @@ KDE_NO_EXPORT void RSS::Item::activate () { if (n) { for (NodePtr c = firstChild (); c; c = c->nextSibling ()) if (c->id == id_node_description) { - QString s = c->innerText (); + TQString s = c->innerText (); n->setInfoMessage (s); if (!enclosure && !s.isEmpty ()) { setState (state_activated); @@ -113,7 +113,7 @@ KDE_NO_EXPORT void RSS::Item::deactivate () { } PlayListNotify * n = document()->notify_listener; if (n) - n->setInfoMessage (QString ()); + n->setInfoMessage (TQString ()); Mrl::deactivate (); } diff --git a/src/kmplayer_rss.h b/src/kmplayer_rss.h index 229610d..2a56781 100644 --- a/src/kmplayer_rss.h +++ b/src/kmplayer_rss.h @@ -21,7 +21,7 @@ #ifndef _KMPLAYER_RSS_H_ #define _KMPLAYER_RSS_H_ -#include +#include #include "kmplayerplaylist.h" @@ -42,7 +42,7 @@ const short id_node_enclosure = 205; class KMPLAYER_NO_EXPORT Rss : public Mrl { public: KDE_NO_CDTOR_EXPORT Rss (NodePtr & d) : Mrl (d, id_node_rss) {} - NodePtr childFromTag (const QString & tag); + NodePtr childFromTag (const TQString & tag); KDE_NO_EXPORT const char * nodeName () const { return "rss"; } bool expose () const { return false; } }; @@ -50,7 +50,7 @@ public: class KMPLAYER_NO_EXPORT Channel : public Mrl { public: KDE_NO_CDTOR_EXPORT Channel (NodePtr & d) : Mrl (d, id_node_channel) {} - NodePtr childFromTag (const QString & tag); + NodePtr childFromTag (const TQString & tag); KDE_NO_EXPORT const char * nodeName () const { return "channel"; } PlayType playType () { return play_type_none; } void closed (); @@ -60,7 +60,7 @@ public: class KMPLAYER_NO_EXPORT Item : public Mrl { public: KDE_NO_CDTOR_EXPORT Item (NodePtr & d) : Mrl (d, id_node_item) {} - NodePtr childFromTag (const QString & tag); + NodePtr childFromTag (const TQString & tag); KDE_NO_EXPORT const char * nodeName () const { return "item"; } PlayType playType () { return cached_play_type; } Mrl * linkNode (); diff --git a/src/kmplayer_smil.cpp b/src/kmplayer_smil.cpp index 467fbaa..2db8c34 100644 --- a/src/kmplayer_smil.cpp +++ b/src/kmplayer_smil.cpp @@ -20,16 +20,16 @@ #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -73,7 +73,7 @@ static const unsigned int trans_out_timer_id = (unsigned int) 7; */ //----------------------------------------------------------------------------- -KDE_NO_EXPORT bool KMPlayer::parseTime (const QString & vl, int & dur) { +KDE_NO_EXPORT bool KMPlayer::parseTime (const TQString & vl, int & dur) { const char * cval = vl.ascii (); if (!cval) { dur = 0; @@ -81,7 +81,7 @@ KDE_NO_EXPORT bool KMPlayer::parseTime (const QString & vl, int & dur) { } int sign = 1; bool fp_seen = false; - QString num; + TQString num; const char * p = cval; for ( ; *p; p++ ) { if (*p == '+') { @@ -95,12 +95,12 @@ KDE_NO_EXPORT bool KMPlayer::parseTime (const QString & vl, int & dur) { else sign = -1; } else if (*p >= '0' && *p <= '9') { - num += QChar (*p); + num += TQChar (*p); } else if (*p == '.') { if (fp_seen) break; else - num += QChar (*p); + num += TQChar (*p); fp_seen = true; } else if (*p == ' ') { if (!num.isEmpty ()) @@ -131,12 +131,12 @@ KDE_NO_EXPORT bool KMPlayer::parseTime (const QString & vl, int & dur) { return true; } -static SMIL::Region * findRegion (NodePtr p, const QString & id) { +static SMIL::Region * findRegion (NodePtr p, const TQString & id) { TrieString regionname_attr ("regionName"); for (NodePtr c = p->firstChild (); c; c = c->nextSibling ()) { if (c->id == SMIL::id_node_region) { SMIL::Region * r = convertNode (c); - QString a = r->getAttribute (regionname_attr); + TQString a = r->getAttribute (regionname_attr); if (a.isEmpty ()) a = r->getAttribute (StringPool::attr_id); if ((a.isEmpty () && id.isEmpty ()) || a == id) { @@ -151,7 +151,7 @@ static SMIL::Region * findRegion (NodePtr p, const QString & id) { return 0L; } -static SMIL::Transition * findTransition (NodePtr n, const QString & id) { +static SMIL::Transition * findTransition (NodePtr n, const TQString & id) { SMIL::Smil * s = SMIL::Smil::findSmilNode (n); if (s) { Node * head = s->firstChild ().ptr (); @@ -167,7 +167,7 @@ static SMIL::Transition * findTransition (NodePtr n, const QString & id) { return 0L; } -static NodePtr findLocalNodeById (NodePtr n, const QString & id) { +static NodePtr findLocalNodeById (NodePtr n, const TQString & id) { //kdDebug() << "findLocalNodeById " << id << endl; SMIL::Smil * s = SMIL::Smil::findSmilNode (n); if (s) @@ -223,15 +223,15 @@ KDE_NO_EXPORT void Runtime::reset () { } KDE_NO_EXPORT -void Runtime::setDurationItem (DurationTime item, const QString & val) { +void Runtime::setDurationItem (DurationTime item, const TQString & val) { int dur = -2; // also 0 for 'media' duration, so it will not update then - QString vs = val.stripWhiteSpace (); - QString vl = vs.lower (); + TQString vs = val.stripWhiteSpace (); + TQString vl = vs.lower (); const char * cval = vl.ascii (); int offset = 0; //kdDebug () << "setDuration1 " << vl << endl; if (cval && cval[0]) { - QString idref; + TQString idref; const char * p = cval; if (parseTime (vl, offset)) { dur = dur_timer; @@ -259,14 +259,14 @@ void Runtime::setDurationItem (DurationTime item, const QString & val) { for ( ; *q; q++) { if (*q == '\\') { if (last_esc) { - idref += QChar ('\\'); + idref += TQChar ('\\'); last_esc = false; } else last_esc = true; } else if (*q == '.' && !last_esc) { break; } else - idref += QChar (*q); + idref += TQChar (*q); } if (!*q) idref = vs.mid (p - cval); @@ -370,7 +370,7 @@ KDE_NO_EXPORT void Runtime::beginAndStart () { } KDE_NO_EXPORT -bool Runtime::parseParam (const TrieString & name, const QString & val) { +bool Runtime::parseParam (const TrieString & name, const TQString & val) { //kdDebug () << "Runtime::parseParam " << name << "=" << val << endl; if (name == StringPool::attr_begin) { setDurationItem (begin_time, val); @@ -410,7 +410,7 @@ bool Runtime::parseParam (const TrieString & name, const QString & val) { } } } else if (name.startsWith ("repeat")) { - if (val.find ("indefinite") > -1) + if (val.tqfind ("indefinite") > -1) repeat_count = dur_infinite; else repeat_count = val.toInt (); @@ -544,7 +544,7 @@ KDE_NO_CDTOR_EXPORT SizeType::SizeType () { reset (); } -KDE_NO_CDTOR_EXPORT SizeType::SizeType (const QString & s) { +KDE_NO_CDTOR_EXPORT SizeType::SizeType (const TQString & s) { *this = s; } @@ -554,9 +554,9 @@ void SizeType::reset () { isset = false; } -SizeType & SizeType::operator = (const QString & s) { - QString strval (s); - int p = strval.find (QChar ('%')); +SizeType & SizeType::operator = (const TQString & s) { + TQString strval (s); + int p = strval.tqfind (TQChar ('%')); if (p > -1) { strval.truncate (p); perc_size = strval.toDouble (&isset); @@ -635,11 +635,11 @@ KDE_NO_EXPORT void CalculatedSizer::resetSizes () { right.reset (); bottom.reset (); reg_point.truncate (0); - reg_align = QString::fromLatin1 ("topLeft"); + reg_align = TQString::tqfromLatin1 ("topLeft"); } -static bool regPoints (const QString & str, Single & x, Single & y) { - QString lower = str.lower (); +static bool regPoints (const TQString & str, Single & x, Single & y) { + TQString lower = str.lower (); const char * rp = lower.ascii (); if (!rp) return false; @@ -680,7 +680,7 @@ bool CalculatedSizer::applyRegPoints (Node * node, Single w, Single h, node = SMIL::Smil::findSmilNode (node); if (!node) return false; - node = static_cast (node)->layout_node.ptr (); + node = static_cast (node)->tqlayout_node.ptr (); if (!node) return false; NodePtr c = node->firstChild (); @@ -691,7 +691,7 @@ bool CalculatedSizer::applyRegPoints (Node * node, Single w, Single h, Single i1, i2; // dummies SMIL::RegPoint *rp_elm = static_cast(c.ptr()); rp_elm->sizes.calcSizes (0L, 100, 100, rpx, rpy, i1, i2); - QString ra = rp_elm->getAttribute ("regAlign"); + TQString ra = rp_elm->getAttribute ("regAlign"); if (!ra.isEmpty () && reg_align.isEmpty ()) reg_align = ra; break; @@ -755,7 +755,7 @@ KDE_NO_EXPORT void CalculatedSizer::calcSizes (Node * node, Single w, Single h, } KDE_NO_EXPORT -bool CalculatedSizer::setSizeParam(const TrieString &name, const QString &val, bool &dim_changed) { +bool CalculatedSizer::setSizeParam(const TrieString &name, const TQString &val, bool &dim_changed) { dim_changed = true; if (name == StringPool::attr_left) { left = val; @@ -815,7 +815,7 @@ CalculatedSizer::move (const SizeType &x, const SizeType &y) { KDE_NO_CDTOR_EXPORT AnimateGroupData::AnimateGroupData (NodePtr e) : Runtime (e), modification_id (-1) {} -bool AnimateGroupData::parseParam (const TrieString &name, const QString &val) { +bool AnimateGroupData::parseParam (const TrieString &name, const TQString &val) { //kdDebug () << "AnimateGroupData::parseParam " << name << "=" << val << endl; if (name == StringPool::attr_target || name == "targetElement") { if (element) @@ -920,7 +920,7 @@ KDE_NO_EXPORT void AnimateData::reset () { } else anim_timer = 0; accumulate = acc_none; - additive = add_replace; + additive = add_tqreplace; change_by = 0; calcMode = calc_linear; change_from.truncate (0); @@ -930,20 +930,20 @@ KDE_NO_EXPORT void AnimateData::reset () { change_from_unit.truncate (0); } -bool AnimateData::parseParam (const TrieString & name, const QString & val) { +bool AnimateData::parseParam (const TrieString & name, const TQString & val) { //kdDebug () << "AnimateData::parseParam " << name << "=" << val << endl; if (name == "change_by") { change_by = val.toInt (); } else if (name == "from") { change_from = val; } else if (name == "values") { - change_values = QStringList::split (QString (";"), val); + change_values = TQStringList::split (TQString (";"), val); } else if (name == "calcMode") { - if (val == QString::fromLatin1 ("discrete")) + if (val == TQString::tqfromLatin1 ("discrete")) calcMode = calc_discrete; - else if (val == QString::fromLatin1 ("linear")) + else if (val == TQString::tqfromLatin1 ("linear")) calcMode = calc_linear; - else if (val == QString::fromLatin1 ("paced")) + else if (val == TQString::tqfromLatin1 ("paced")) calcMode = calc_paced; } else return AnimateGroupData::parseParam (name, val); @@ -973,7 +973,7 @@ KDE_NO_EXPORT void AnimateData::started () { break; } if (calcMode == calc_linear) { - QRegExp reg ("^\\s*(-?[0-9\\.]+)(\\s*[%a-z]*)?"); + TQRegExp reg ("^\\s*(-?[0-9\\.]+)(\\s*[%a-z]*)?"); if (change_from.isEmpty ()) { if (change_values.size () > 0) // check 'values' attribute change_from = change_values.first (); @@ -1052,8 +1052,8 @@ KDE_NO_EXPORT void AnimateData::stopped () { KDE_NO_EXPORT void AnimateData::applyStep () { Element * target = convertNode (target_element); if (target && calcMode == calc_linear) - target->setParam (changed_attribute, QString ("%1%2").arg ( - change_from_val).arg(change_from_unit), + target->setParam (changed_attribute, TQString ("%1%2").tqarg ( + change_from_val).tqarg(change_from_unit), &modification_id); else if (target && calcMode == calc_discrete) target->setParam (changed_attribute, @@ -1114,7 +1114,7 @@ KDE_NO_EXPORT void AnimateMotionData::reset () { } else anim_timer = 0; accumulate = acc_none; - additive = add_replace; + additive = add_tqreplace; calcMode = calc_linear; change_from.truncate (0); change_by.truncate (0); @@ -1127,16 +1127,16 @@ KDE_NO_EXPORT void AnimateMotionData::reset () { cur_x = cur_y = delta_x = delta_y = SizeType(); } -bool AnimateMotionData::parseParam (const TrieString & name, const QString & val) { +bool AnimateMotionData::parseParam (const TrieString & name, const TQString & val) { //kdDebug () << "AnimateMotionData::parseParam " << name << "=" << val << endl; if (name == "from") { change_from = val; } else if (name == "by") { change_by = val; } else if (name == "values") { - values = QStringList::split (QString (";"), val); + values = TQStringList::split (TQString (";"), val); } else if (name == "keyTimes") { - QStringList kts = QStringList::split (QString (";"), val); + TQStringList kts = TQStringList::split (TQString (";"), val); delete keytimes; keytime_count = kts.size (); keytimes = new float [keytime_count]; @@ -1154,23 +1154,23 @@ bool AnimateMotionData::parseParam (const TrieString & name, const QString & val return true; } } else if (name == "keySplines") { - splines = QStringList::split (QString (";"), val); + splines = TQStringList::split (TQString (";"), val); } else if (name == "calcMode") { - if (val == QString::fromLatin1 ("discrete")) + if (val == TQString::tqfromLatin1 ("discrete")) calcMode = calc_discrete; - else if (val == QString::fromLatin1 ("linear")) + else if (val == TQString::tqfromLatin1 ("linear")) calcMode = calc_linear; - else if (val == QString::fromLatin1 ("paced")) + else if (val == TQString::tqfromLatin1 ("paced")) calcMode = calc_paced; - else if (val == QString::fromLatin1 ("spline")) + else if (val == TQString::tqfromLatin1 ("spline")) calcMode = calc_spline; } else return AnimateGroupData::parseParam (name, val); return true; } -bool AnimateMotionData::getCoordinates (const QString &coord, SizeType &x, SizeType &y) { - int p = coord.find (QChar (',')); +bool AnimateMotionData::getCoordinates (const TQString &coord, SizeType &x, SizeType &y) { + int p = coord.tqfind (TQChar (',')); if (p > 0) { x = coord.left (p).stripWhiteSpace (); y = coord.mid (p + 1).stripWhiteSpace (); @@ -1207,8 +1207,8 @@ bool AnimateMotionData::setInterval () { break; case calc_spline: if (splines.size () > interval) { - QStringList kss = QStringList::split ( - QString (" "), splines[interval]); + TQStringList kss = TQStringList::split ( + TQString (" "), splines[interval]); control_point[0] = control_point[1] = 0; control_point[2] = control_point[3] = 1; if (kss.size () == 4) { @@ -1403,7 +1403,7 @@ KDE_NO_EXPORT void KMPlayer::MediaTypeRuntime::reset () { } /** - * will request a repaint of attached region + * will request a tqrepaint of attached region */ KDE_NO_EXPORT void MediaTypeRuntime::stopped () { clipStop (); @@ -1492,7 +1492,7 @@ KDE_NO_EXPORT void AudioVideoData::clipStop () { } KDE_NO_EXPORT -bool AudioVideoData::parseParam(const TrieString &name, const QString &val) { +bool AudioVideoData::parseParam(const TrieString &name, const TQString &val) { //kdDebug () << "AudioVideoData::parseParam " << name << "=" << val << endl; if (name == StringPool::attr_src) { NodePtr element_protect = element; // note element is weak @@ -1541,7 +1541,7 @@ NodeRefListPtr MouseListeners::listeners (unsigned int eid) { //----------------------------------------------------------------------------- -static Element * fromScheduleGroup (NodePtr & d, const QString & tag) { +static Element * fromScheduleGroup (NodePtr & d, const TQString & tag) { const char * ctag = tag.ascii (); if (!strcmp (ctag, "par")) return new SMIL::Par (d); @@ -1552,7 +1552,7 @@ static Element * fromScheduleGroup (NodePtr & d, const QString & tag) { return 0L; } -static Element * fromParamGroup (NodePtr & d, const QString & tag) { +static Element * fromParamGroup (NodePtr & d, const TQString & tag) { const char * ctag = tag.ascii (); if (!strcmp (ctag, "param")) return new SMIL::Param (d); @@ -1561,7 +1561,7 @@ static Element * fromParamGroup (NodePtr & d, const QString & tag) { return 0L; } -static Element * fromAnimateGroup (NodePtr & d, const QString & tag) { +static Element * fromAnimateGroup (NodePtr & d, const TQString & tag) { const char * ctag = tag.ascii (); if (!strcmp (ctag, "set")) return new SMIL::Set (d); @@ -1572,7 +1572,7 @@ static Element * fromAnimateGroup (NodePtr & d, const QString & tag) { return 0L; } -static Element * fromMediaContentGroup (NodePtr & d, const QString & tag) { +static Element * fromMediaContentGroup (NodePtr & d, const TQString & tag) { const char * taglatin = tag.latin1 (); if (!strcmp (taglatin, "video") || !strcmp (taglatin, "audio")) return new SMIL::AVMediaType (d, tag); @@ -1590,7 +1590,7 @@ static Element * fromMediaContentGroup (NodePtr & d, const QString & tag) { return 0L; } -static Element * fromContentControlGroup (NodePtr & d, const QString & tag) { +static Element * fromContentControlGroup (NodePtr & d, const TQString & tag) { if (!strcmp (tag.latin1 (), "switch")) return new SMIL::Switch (d); return 0L; @@ -1598,7 +1598,7 @@ static Element * fromContentControlGroup (NodePtr & d, const QString & tag) { //----------------------------------------------------------------------------- -KDE_NO_EXPORT NodePtr SMIL::Smil::childFromTag (const QString & tag) { +KDE_NO_EXPORT NodePtr SMIL::Smil::childFromTag (const TQString & tag) { const char * ctag = tag.ascii (); if (!strcmp (ctag, "body")) return new SMIL::Body (m_doc); @@ -1611,27 +1611,27 @@ KDE_NO_EXPORT void SMIL::Smil::activate () { //kdDebug () << "Smil::activate" << endl; current_av_media_type = NodePtr (); resolved = true; - SMIL::Layout * layout = convertNode (layout_node); - if (layout && layout->region_surface) { + SMIL::Layout * tqlayout = convertNode (tqlayout_node); + if (tqlayout && tqlayout->region_surface) { kdError() << "Layout already has a surface" << endl; } - if (layout) + if (tqlayout) Element::activate (); else - Element::deactivate(); // some unfortunate reset in parent doc + Element::deactivate(); // some unfortunate reset in tqparent doc } KDE_NO_EXPORT void SMIL::Smil::deactivate () { - if (layout_node) - convertNode (layout_node)->repaint (); - if (layout_node) - convertNode (layout_node)->region_surface = NULL; + if (tqlayout_node) + convertNode (tqlayout_node)->tqrepaint (); + if (tqlayout_node) + convertNode (tqlayout_node)->region_surface = NULL; Mrl::getSurface(0L); Mrl::deactivate (); } KDE_NO_EXPORT bool SMIL::Smil::handleEvent (EventPtr event) { - return layout_node ? layout_node->handleEvent (event) : false; + return tqlayout_node ? tqlayout_node->handleEvent (event) : false; } KDE_NO_EXPORT void SMIL::Smil::closed () { @@ -1650,21 +1650,21 @@ KDE_NO_EXPORT void SMIL::Smil::closed () { } for (NodePtr e = head->firstChild (); e; e = e->nextSibling ()) { if (e->id == id_node_layout) { - layout_node = e; + tqlayout_node = e; } else if (e->id == id_node_title) { - QString str = e->innerText (); - pretty_name = str.left (str.find (QChar ('\n'))); + TQString str = e->innerText (); + pretty_name = str.left (str.tqfind (TQChar ('\n'))); } else if (e->id == id_node_meta) { Element * elm = convertNode (e); - const QString name = elm->getAttribute (StringPool::attr_name); - if (name == QString::fromLatin1 ("title")) + const TQString name = elm->getAttribute (StringPool::attr_name); + if (name == TQString::tqfromLatin1 ("title")) pretty_name = elm->getAttribute ("content"); - else if (name == QString::fromLatin1 ("base")) + else if (name == TQString::tqfromLatin1 ("base")) src = elm->getAttribute ("content"); } } - if (!layout_node) { - kdError () << "no " << endl; + if (!tqlayout_node) { + kdError () << "no " << endl; return; } } @@ -1692,17 +1692,17 @@ KDE_NO_EXPORT bool SMIL::Smil::expose () const { } KDE_NO_EXPORT void SMIL::Smil::accept (Visitor * v) { - if (active () && layout_node) - layout_node->accept( v ); + if (active () && tqlayout_node) + tqlayout_node->accept( v ); } -void SMIL::Smil::jump (const QString & id) { +void SMIL::Smil::jump (const TQString & id) { NodePtr n = document ()->getElementById (this, id, false); if (n) { if (n->unfinished ()) kdDebug() << "Smil::jump node is unfinished " << id << endl; else { - for (NodePtr p = n; p; p = p->parentNode ()) { + for (NodePtr p = n; p; p = p->tqparentNode ()) { if (p->unfinished () && p->id >= id_node_first_group && p->id <= id_node_last_group) { @@ -1719,7 +1719,7 @@ void SMIL::Smil::jump (const QString & id) { } SMIL::Smil * SMIL::Smil::findSmilNode (Node * node) { - for (Node * e = node; e; e = e->parentNode ().ptr ()) + for (Node * e = node; e; e = e->tqparentNode ().ptr ()) if (e->id == SMIL::id_node_smil) return static_cast (e); return 0L; @@ -1736,9 +1736,9 @@ static void headChildDone (NodePtr node, NodePtr child) { } } -KDE_NO_EXPORT NodePtr SMIL::Head::childFromTag (const QString & tag) { +KDE_NO_EXPORT NodePtr SMIL::Head::childFromTag (const TQString & tag) { const char * ctag = tag.ascii (); - if (!strcmp (ctag, "layout")) + if (!strcmp (ctag, "tqlayout")) return new SMIL::Layout (m_doc); else if (!strcmp (ctag, "title")) return new DarkNode (m_doc, tag, id_node_title); @@ -1757,10 +1757,10 @@ KDE_NO_EXPORT void SMIL::Head::closed () { for (NodePtr e = firstChild (); e; e = e->nextSibling ()) if (e->id == id_node_layout) return; - SMIL::Layout * layout = new SMIL::Layout (m_doc); - appendChild (layout); - layout->setAuxiliaryNode (true); - layout->closed (); // add root-layout and a region + SMIL::Layout * tqlayout = new SMIL::Layout (m_doc); + appendChild (tqlayout); + tqlayout->setAuxiliaryNode (true); + tqlayout->closed (); // add root-tqlayout and a region } KDE_NO_EXPORT void SMIL::Head::childDone (NodePtr child) { @@ -1772,9 +1772,9 @@ KDE_NO_EXPORT void SMIL::Head::childDone (NodePtr child) { KDE_NO_CDTOR_EXPORT SMIL::Layout::Layout (NodePtr & d) : RegionBase (d, id_node_layout) {} -KDE_NO_EXPORT NodePtr SMIL::Layout::childFromTag (const QString & tag) { +KDE_NO_EXPORT NodePtr SMIL::Layout::childFromTag (const TQString & tag) { const char * ctag = tag.ascii (); - if (!strcmp (ctag, "root-layout")) { + if (!strcmp (ctag, "root-tqlayout")) { NodePtr e = new SMIL::RootLayout (m_doc); rootLayout = e; return e; @@ -1812,11 +1812,11 @@ KDE_NO_EXPORT void SMIL::Layout::closed () { appendChild (r); r->setAuxiliaryNode (true); } - rl->setAttribute(StringPool::attr_width, QString::number(w_root)); - rl->setAttribute(StringPool::attr_height,QString::number(h_root)); + rl->setAttribute(StringPool::attr_width, TQString::number(w_root)); + rl->setAttribute(StringPool::attr_height,TQString::number(h_root)); insertBefore (sr, firstChild ()); } else { - if (childNodes ()->length () < 2) { // only a root-layout + if (childNodes ()->length () < 2) { // only a root-tqlayout SMIL::Region * r = new SMIL::Region (m_doc); appendChild (r); r->setAuxiliaryNode (true); @@ -1834,7 +1834,7 @@ KDE_NO_EXPORT void SMIL::Layout::activate () { RegionBase::activate (); if (surface ()) { updateDimensions (); - repaint (); + tqrepaint (); } finish (); // proceed and allow 'head' to finish } @@ -1861,10 +1861,10 @@ KDE_NO_EXPORT Surface *SMIL::Layout::surface () { if (rl && auxiliaryNode ()) { w = rect.width (); h = rect.height (); - rl->setAttribute (StringPool::attr_width, QString::number ((int)w)); - rl->setAttribute (StringPool::attr_height, QString::number ((int)h)); - rl->setParam (StringPool::attr_width, QString::number((int)w)); - rl->setParam (StringPool::attr_height,QString::number((int)h)); + rl->setAttribute (StringPool::attr_width, TQString::number ((int)w)); + rl->setAttribute (StringPool::attr_height, TQString::number ((int)h)); + rl->setParam (StringPool::attr_width, TQString::number((int)w)); + rl->setParam (StringPool::attr_height,TQString::number((int)h)); } else if (region_surface && w > 0 && h > 0) { updateDimensions (); } @@ -1909,15 +1909,15 @@ KDE_NO_EXPORT void SMIL::RegionBase::deactivate () { background_image.truncate (0); if (region_surface) region_surface->background_color = 0; - cached_img.setUrl (QString ()); + cached_img.setUrl (TQString ()); postpone_lock = NULL; killWGet (); sizes.resetSizes (); Element::deactivate (); } -KDE_NO_EXPORT void SMIL::RegionBase::remoteReady (QByteArray & data) { - QImage *pix = new QImage (data); +KDE_NO_EXPORT void SMIL::RegionBase::remoteReady (TQByteArray & data) { + TQImage *pix = new TQImage (data); if (!pix->isNull ()) { cached_img.data->image = pix; if (region_surface) @@ -1928,14 +1928,14 @@ KDE_NO_EXPORT void SMIL::RegionBase::remoteReady (QByteArray & data) { postpone_lock = 0L; } -KDE_NO_EXPORT void SMIL::RegionBase::repaint () { +KDE_NO_EXPORT void SMIL::RegionBase::tqrepaint () { if (surface ()) - region_surface->repaint (SRect (0, 0, w, h)); + region_surface->tqrepaint (SRect (0, 0, w, h)); } -KDE_NO_EXPORT void SMIL::RegionBase::repaint (const SRect & rect) { +KDE_NO_EXPORT void SMIL::RegionBase::tqrepaint (const SRect & rect) { if (surface ()) - region_surface->repaint (SRect (0, 0, w, h).intersect (rect)); + region_surface->tqrepaint (SRect (0, 0, w, h).intersect (rect)); } KDE_NO_EXPORT void SMIL::RegionBase::updateDimensions () { @@ -1949,8 +1949,8 @@ KDE_NO_EXPORT void SMIL::RegionBase::updateDimensions () { } KDE_NO_EXPORT void SMIL::RegionBase::boundsUpdate () { - // if there is a region_surface and it's moved, do a limit repaint - NodePtr p = parentNode (); + // if there is a region_surface and it's moved, do a limit tqrepaint + NodePtr p = tqparentNode (); if (p && (p->id==SMIL::id_node_region || p->id==SMIL::id_node_layout) && region_surface) { RegionBase *pr = convertNode (p); @@ -1958,13 +1958,13 @@ KDE_NO_EXPORT void SMIL::RegionBase::boundsUpdate () { w = 0; h = 0; sizes.calcSizes (this, pr->w, pr->h, x, y, w, h); region_surface->bounds = SRect (x, y, w, h); - pr->repaint (region_surface->bounds.unite (old_bounds)); + pr->tqrepaint (region_surface->bounds.unite (old_bounds)); } } KDE_NO_EXPORT Surface *SMIL::RegionBase::surface () { if (!region_surface) { - Node *n = parentNode ().ptr (); + Node *n = tqparentNode ().ptr (); if (n && (SMIL::id_node_region == n->id || SMIL::id_node_layout == n->id)) { @@ -1979,22 +1979,22 @@ KDE_NO_EXPORT Surface *SMIL::RegionBase::surface () { } KDE_NO_EXPORT -void SMIL::RegionBase::parseParam (const TrieString & name, const QString & val) { +void SMIL::RegionBase::parseParam (const TrieString & name, const TQString & val) { //kdDebug () << "RegionBase::parseParam " << getAttribute ("id") << " " << name << "=" << val << " active:" << active() << endl; - bool need_repaint = false; + bool need_tqrepaint = false; SRect rect = SRect (x, y, w, h); bool dim_changed; if (name == "background-color" || name == "backgroundColor") { if (val.isEmpty ()) background_color = 0; else - background_color = 0xff000000 | QColor (val).rgb (); + background_color = 0xff000000 | TQColor (val).rgb (); if (region_surface || (active () && surface ())) region_surface->background_color = background_color; - need_repaint = true; + need_tqrepaint = true; } else if (name == "z-index") { z_order = val.toInt (); - need_repaint = true; + need_tqrepaint = true; } else if (sizes.setSizeParam (name, val, dim_changed)) { if (active ()) { if (region_surface) { @@ -2005,37 +2005,37 @@ void SMIL::RegionBase::parseParam (const TrieString & name, const QString & val) return; // smart update of old bounds to new moved one } } - NodePtr p = parentNode (); + NodePtr p = tqparentNode (); if (p &&(p->id==SMIL::id_node_region ||p->id==SMIL::id_node_layout)) convertNode (p)->updateDimensions (); rect = rect.unite (SRect (x, y, w, h)); - need_repaint = true; + need_tqrepaint = true; } } else if (name == "showBackground") { if (val == "whenActive") show_background = ShowWhenActive; else show_background = ShowAlways; - need_repaint = true; + need_tqrepaint = true; } else if (name == "backgroundImage") { background_image = val; Smil * s = SMIL::Smil::findSmilNode (this); if (s) { killWGet (); - need_repaint = !cached_img.isEmpty (); - Mrl *mrl = s->parentNode () ? s->parentNode ()->mrl () : NULL; - QString url = mrl ? KURL (mrl->absolutePath (), val).url () : val; + need_tqrepaint = !cached_img.isEmpty (); + Mrl *mrl = s->tqparentNode () ? s->tqparentNode ()->mrl () : NULL; + TQString url = mrl ? KURL (mrl->absolutePath (), val).url () : val; cached_img.setUrl (url); if (cached_img.isEmpty ()) { postpone_lock = document ()->postpone (); wget (url); } else { - need_repaint = true; + need_tqrepaint = true; } } } - if (need_repaint && active () && surface() && region_surface->parentNode ()) - region_surface->parentNode ()->repaint (rect); + if (need_tqrepaint && active () && surface() && region_surface->tqparentNode ()) + region_surface->tqparentNode ()->tqrepaint (rect); Element::parseParam (name, val); } @@ -2044,7 +2044,7 @@ KDE_NO_CDTOR_EXPORT SMIL::Region::Region (NodePtr & d) has_mouse (false), m_AttachedMediaTypes (new NodeRefList) {} -KDE_NO_EXPORT NodePtr SMIL::Region::childFromTag (const QString & tag) { +KDE_NO_EXPORT NodePtr SMIL::Region::childFromTag (const TQString & tag) { if (!strcmp (tag.latin1 (), "region")) return new SMIL::Region (m_doc); return NodePtr (); @@ -2052,7 +2052,7 @@ KDE_NO_EXPORT NodePtr SMIL::Region::childFromTag (const QString & tag) { /** * calculates dimensions of this regions with _w and _h as width and height - * of parent Region (representing 100%) + * of tqparent Region (representing 100%) */ KDE_NO_EXPORT void SMIL::Region::calculateBounds (Single pw, Single ph) { @@ -2060,7 +2060,7 @@ void SMIL::Region::calculateBounds (Single pw, Single ph) { sizes.calcSizes (this, pw, ph, x, y, w, h); if (surface ()) region_surface->bounds = SRect (x, y, w, h); - //kdDebug () << "Region::calculateBounds parent:" << pw << "x" << ph << " this:" << x << "," << y << " " << w << "x" << h << endl; + //kdDebug () << "Region::calculateBounds tqparent:" << pw << "x" << ph << " this:" << x << "," << y << " " << w << "x" << h << endl; } NodeRefListPtr SMIL::Region::listeners (unsigned int eid) { @@ -2081,9 +2081,9 @@ KDE_NO_EXPORT void SMIL::Region::accept (Visitor * v) { //----------------------------------------------------------------------------- KDE_NO_EXPORT -void SMIL::RegPoint::parseParam (const TrieString & p, const QString & v) { +void SMIL::RegPoint::parseParam (const TrieString & p, const TQString & v) { bool b; - sizes.setSizeParam (p, v, b); // TODO: if dynamic, make sure to repaint + sizes.setSizeParam (p, v, b); // TODO: if dynamic, make sure to tqrepaint Element::parseParam (p, v); } @@ -2136,7 +2136,7 @@ KDE_NO_EXPORT void SMIL::Transition::activate () { } KDE_NO_EXPORT -void SMIL::Transition::parseParam (const TrieString & para, const QString & val) { +void SMIL::Transition::parseParam (const TrieString & para, const TQString & val) { if (para == StringPool::attr_type) { type_info = transInfoFromString (val.ascii ()); if (type_info) { @@ -2163,7 +2163,7 @@ void SMIL::Transition::parseParam (const TrieString & para, const QString & val) sub_type = type_info->sub_type[0]; } } else if (para == "fadeColor") { - fade_color = QColor (getAttribute (val)).rgb (); + fade_color = TQColor (getAttribute (val)).rgb (); } else if (para == "direction") { direction = val == "reverse" ? dir_reverse : dir_forward; } else if (para == "startProgress") { @@ -2342,7 +2342,7 @@ KDE_NO_EXPORT Runtime * SMIL::TimedMrl::getNewRuntime () { } KDE_NO_EXPORT -void SMIL::TimedMrl::parseParam (const TrieString ¶, const QString &value) { +void SMIL::TimedMrl::parseParam (const TrieString ¶, const TQString &value) { if (para.startsWith (StringPool::attr_fill)) { Fill * f = &fill; if (para != StringPool::attr_fill) { @@ -2389,18 +2389,18 @@ KDE_NO_EXPORT bool SMIL::TimedMrl::keepContent (Node *n) { TimedMrl * tm = convertNode (n); if (tm->runtime ()->timingstate == Runtime::timings_started) return true; - Node *p = n->parentNode (); + Node *p = n->tqparentNode (); Node *np = tm; while (p && id_node_body != p->id && !isTimedMrl (p)) { np = p; - p = p->parentNode ().ptr (); // skip anchors + p = p->tqparentNode ().ptr (); // skip anchors } if (tm->m_runtime && p && p->active ()) { if (tm->runtime ()->timingstate == Runtime::timings_stopped) switch (tm->fill_active) { - case fill_hold: // keep while parent active + case fill_hold: // keep while tqparent active return true; - case fill_freeze: // keep in parent duration + case fill_freeze: // keep in tqparent duration if (p->unfinished() && (p->id == SMIL::id_node_par || p->id == SMIL::id_node_excl || @@ -2409,7 +2409,7 @@ KDE_NO_EXPORT bool SMIL::TimedMrl::keepContent (Node *n) { return true; // else fall through case fill_default: // as freeze when no duration is set - case fill_auto: // or when parent finished w/o duration + case fill_auto: // or when tqparent finished w/o duration return keepContent (p) && (p->id == SMIL::id_node_par || p->id == SMIL::id_node_excl || @@ -2427,13 +2427,13 @@ KDE_NO_EXPORT bool SMIL::TimedMrl::keepContent (Node *n) { } KDE_NO_EXPORT SMIL::TimedMrl::Fill SMIL::TimedMrl::getDefaultFill (NodePtr n) { - for (NodePtr p = n->parentNode (); p; p = p->parentNode ()) + for (NodePtr p = n->tqparentNode (); p; p = p->tqparentNode ()) if (isTimedMrl (p)) { SMIL::TimedMrl * tm = convertNode(p); if (tm->fill_def != fill_inherit) return tm->fill_def; else if (tm->fill == fill_default) - return tm->fill_active; // assume parent figured out this + return tm->fill_active; // assume tqparent figured out this } else if (p->id == SMIL::id_node_smil) break; return fill_auto; @@ -2441,7 +2441,7 @@ KDE_NO_EXPORT SMIL::TimedMrl::Fill SMIL::TimedMrl::getDefaultFill (NodePtr n) { //----------------------------------------------------------------------------- -KDE_NO_EXPORT NodePtr SMIL::GroupBase::childFromTag (const QString & tag) { +KDE_NO_EXPORT NodePtr SMIL::GroupBase::childFromTag (const TQString & tag) { Element * elm = fromScheduleGroup (m_doc, tag); if (!elm) elm = fromMediaContentGroup (m_doc, tag); if (!elm) elm = fromContentControlGroup (m_doc, tag); @@ -2476,7 +2476,7 @@ KDE_NO_EXPORT void SMIL::GroupBase::setJumpNode (NodePtr n) { for (NodePtr c = firstChild (); c; c = c->nextSibling ()) if (c->active ()) c->reset (); - for (NodePtr c = n->parentNode (); c; c = c->parentNode ()) { + for (NodePtr c = n->tqparentNode (); c; c = c->tqparentNode ()) { if (c.ptr () == this || c->id == id_node_body) break; if (c->id >= id_node_first_group && c->id <= id_node_last_group) @@ -2570,7 +2570,7 @@ KDE_NO_EXPORT void SMIL::Excl::begin () { for (NodePtr e = firstChild (); e; e = e->nextSibling ()) if (isTimedMrl (e)) { SMIL::TimedMrl * tm = static_cast (e.ptr ()); - if (tm) { // make aboutToStart connection with TimedMrl children + if (tm) { // make aboutToStart connection with TimedMrl tqchildren ConnectionPtr c = tm->connectTo (this, event_to_be_started); started_event_list.append (new ConnectionStoreItem (c)); } @@ -2628,14 +2628,14 @@ KDE_NO_EXPORT void SMIL::Switch::begin () { for (NodePtr e = firstChild (); e; e = e->nextSibling ()) if (e->isElementNode ()) { Element *elm = convertNode (e); - QString lang = elm->getAttribute ("systemLanguage"); + TQString lang = elm->getAttribute ("systemLanguage"); if (!lang.isEmpty ()) { - lang = lang.replace (QChar ('-'), QChar ('_')); + lang = lang.tqreplace (TQChar ('-'), TQChar ('_')); char *clang = getenv ("LANG"); if (!clang) { if (!fallback) fallback = e; - } else if (QString (clang).lower ().startsWith (lang)) { + } else if (TQString (clang).lower ().startsWith (lang)) { chosenOne = e; } else if (!fallback) { fallback = e->nextSibling (); @@ -2691,7 +2691,7 @@ KDE_NO_EXPORT void SMIL::Switch::childDone (NodePtr child) { //----------------------------------------------------------------------------- KDE_NO_CDTOR_EXPORT SMIL::LinkingBase::LinkingBase (NodePtr & d, short id) - : Element(d, id), show (show_replace) {} + : Element(d, id), show (show_tqreplace) {} KDE_NO_EXPORT void SMIL::LinkingBase::deactivate () { mediatype_activated = 0L; @@ -2700,7 +2700,7 @@ KDE_NO_EXPORT void SMIL::LinkingBase::deactivate () { } KDE_NO_EXPORT -void SMIL::LinkingBase::parseParam(const TrieString ¶, const QString &val) { +void SMIL::LinkingBase::parseParam(const TrieString ¶, const TQString &val) { if (para == StringPool::attr_href) { href = val; } @@ -2731,13 +2731,13 @@ KDE_NO_EXPORT void SMIL::Anchor::childDone (NodePtr child) { } } -NodePtr SMIL::Anchor::childFromTag (const QString & tag) { +NodePtr SMIL::Anchor::childFromTag (const TQString & tag) { return fromMediaContentGroup (m_doc, tag); } //----------------------------------------------------------------------------- -KDE_NO_CDTOR_EXPORT SMIL::Area::Area (NodePtr & d, const QString & t) +KDE_NO_CDTOR_EXPORT SMIL::Area::Area (NodePtr & d, const TQString & t) : LinkingBase (d, id_node_area), coords (0L), nr_coords (0), tag (t) {} KDE_NO_CDTOR_EXPORT SMIL::Area::~Area () { @@ -2746,20 +2746,20 @@ KDE_NO_CDTOR_EXPORT SMIL::Area::~Area () { KDE_NO_EXPORT void SMIL::Area::activate () { init (); - if (parentNode () && - parentNode ()->id >= id_node_first_mediatype && - parentNode ()->id <= id_node_last_mediatype) { - mediatype_activated = parentNode ()->connectTo (this, event_activated); - mediatype_attach = parentNode ()->connectTo (this, mediatype_attached); + if (tqparentNode () && + tqparentNode ()->id >= id_node_first_mediatype && + tqparentNode ()->id <= id_node_last_mediatype) { + mediatype_activated = tqparentNode ()->connectTo (this, event_activated); + mediatype_attach = tqparentNode ()->connectTo (this, mediatype_attached); } Element::activate (); } KDE_NO_EXPORT -void SMIL::Area::parseParam (const TrieString & para, const QString & val) { +void SMIL::Area::parseParam (const TrieString & para, const TQString & val) { if (para == "coords") { delete [] coords; - QStringList clist = QStringList::split (QString (","), val); + TQStringList clist = TQStringList::split (TQString (","), val); nr_coords = clist.count (); coords = new SizeType [nr_coords]; for (int i = 0; i < nr_coords; ++i) @@ -2777,14 +2777,14 @@ KDE_NO_EXPORT NodeRefListPtr SMIL::Area::listeners (unsigned int id) { //----------------------------------------------------------------------------- -KDE_NO_CDTOR_EXPORT SMIL::MediaType::MediaType (NodePtr &d, const QString &t, short id) +KDE_NO_CDTOR_EXPORT SMIL::MediaType::MediaType (NodePtr &d, const TQString &t, short id) : TimedMrl (d, id), m_type (t), bitrate (0), trans_step (0), trans_steps (0), sensitivity (sens_opaque), trans_out_active (false), m_MediaAttached (new NodeRefList) { view_mode = Mrl::WindowMode; } -KDE_NO_EXPORT NodePtr SMIL::MediaType::childFromTag (const QString & tag) { +KDE_NO_EXPORT NodePtr SMIL::MediaType::childFromTag (const TQString & tag) { Element * elm = fromContentControlGroup (m_doc, tag); if (!elm) elm = fromParamGroup (m_doc, tag); if (!elm) elm = fromAnimateGroup (m_doc, tag); @@ -2804,7 +2804,7 @@ KDE_NO_EXPORT void SMIL::MediaType::closed () { } KDE_NO_EXPORT -void SMIL::MediaType::parseParam (const TrieString ¶, const QString & val) { +void SMIL::MediaType::parseParam (const TrieString ¶, const TQString & val) { bool update_surface = true; if (para == "fit") { const char * cval = val.ascii (); @@ -2857,19 +2857,19 @@ void SMIL::MediaType::parseParam (const TrieString ¶, const QString & val) { TimedMrl::parseParam (para, val); } if (sub_surface) - sub_surface->repaint (); + sub_surface->tqrepaint (); resetSurface (); if (surface ()) - sub_surface->repaint (); + sub_surface->tqrepaint (); } KDE_NO_EXPORT void SMIL::MediaType::boundsUpdate () { SMIL::RegionBase *rb = convertNode (region_node); if (rb && sub_surface) { SRect new_bounds = calculateBounds (); - SRect repaint_rect = sub_surface->bounds.unite (new_bounds); + SRect tqrepaint_rect = sub_surface->bounds.unite (new_bounds); sub_surface->bounds = new_bounds; - rb->repaint (repaint_rect); + rb->tqrepaint (tqrepaint_rect); } } @@ -2881,7 +2881,7 @@ KDE_NO_EXPORT void SMIL::MediaType::activate () { setState (state_activated); for (NodePtr c = firstChild (); c; c = c->nextSibling ()) if (c != external_tree) { - // activate param/set/animate.. children + // activate param/set/animate.. tqchildren c->activate (); break; // childDone will handle next siblings } @@ -2896,7 +2896,7 @@ KDE_NO_EXPORT void SMIL::MediaType::deactivate () { region_attach = 0L; trans_step = trans_steps = 0; if (region_node) - convertNode (region_node)->repaint (); + convertNode (region_node)->tqrepaint (); if (trans_timer) document ()->cancelTimer (trans_timer); if (trans_out_timer) @@ -2906,9 +2906,9 @@ KDE_NO_EXPORT void SMIL::MediaType::deactivate () { } KDE_NO_EXPORT void SMIL::MediaType::begin () { - SMIL::Smil * s = Smil::findSmilNode (parentNode ().ptr ()); + SMIL::Smil * s = Smil::findSmilNode (tqparentNode ().ptr ()); SMIL::Region * r = s ? - findRegion (s->layout_node, param (StringPool::attr_region)) : 0L; + findRegion (s->tqlayout_node, param (StringPool::attr_region)) : 0L; MediaTypeRuntime *tr = static_cast(runtime ()); if (trans_timer) // eg transOut and we're repeating document ()->cancelTimer (trans_timer); @@ -2918,7 +2918,7 @@ KDE_NO_EXPORT void SMIL::MediaType::begin () { region_mouse_leave = r->connectTo (this, event_outbounds); region_mouse_click = r->connectTo (this, event_activated); region_attach = r->connectTo (this, mediatype_attached); - r->repaint (); + r->tqrepaint (); tr->clipStart (); Transition * trans = convertNode (trans_in); if (trans && trans->supported ()) { @@ -2955,13 +2955,13 @@ KDE_NO_EXPORT void SMIL::MediaType::finish () { ASSERT(!trans_timer); } if (region_node) - convertNode (region_node)->repaint (); + convertNode (region_node)->tqrepaint (); TimedMrl::finish (); static_cast (runtime ())->clipStop (); } /** - * Re-implement from TimedMrl, because we may have children like + * Re-implement from TimedMrl, because we may have tqchildren like * param/set/animatie that should all be activate, but also other smil or imfl * documents, that should only be activated if the runtime has started */ @@ -2969,7 +2969,7 @@ KDE_NO_EXPORT void SMIL::MediaType::childDone (NodePtr child) { bool child_doc = child->mrl () && child->mrl ()->opener.ptr () == this; if (child_doc) { child->deactivate (); // should only if fill not is freeze or hold - } else if (active ()) { // traverse param or area children + } else if (active ()) { // traverse param or area tqchildren for (NodePtr c = child->nextSibling(); c; c = c->nextSibling ()) if (!c->mrl () || c->mrl ()->opener.ptr () != this ) { c->activate (); @@ -3085,8 +3085,8 @@ bool SMIL::MediaType::handleEvent (EventPtr event) { active_trans = NULL; else te->interval = trans_step++ < trans_steps; - if (s && s->parentNode()) - s->parentNode()->repaint (s->bounds); + if (s && s->tqparentNode()) + s->tqparentNode()->tqrepaint (s->bounds); return true; } else if (te->timer_info->event_id == trans_out_timer_id) { active_trans = trans_out; @@ -3104,7 +3104,7 @@ bool SMIL::MediaType::handleEvent (EventPtr event) { } trans_out_active = true; if (s) - s->repaint (); + s->tqrepaint (); } return true; } @@ -3129,10 +3129,10 @@ KDE_NO_EXPORT NodeRefListPtr SMIL::MediaType::listeners (unsigned int id) { //----------------------------------------------------------------------------- KDE_NO_CDTOR_EXPORT -SMIL::AVMediaType::AVMediaType (NodePtr & d, const QString & t) +SMIL::AVMediaType::AVMediaType (NodePtr & d, const TQString & t) : SMIL::MediaType (d, t, id_node_audio_video) {} -KDE_NO_EXPORT NodePtr SMIL::AVMediaType::childFromTag (const QString & tag) { +KDE_NO_EXPORT NodePtr SMIL::AVMediaType::childFromTag (const TQString & tag) { return fromXMLDocumentTag (m_doc, tag); } @@ -3182,7 +3182,7 @@ KDE_NO_EXPORT Runtime * SMIL::ImageMediaType::getNewRuntime () { return new ImageRuntime (this); } -KDE_NO_EXPORT NodePtr SMIL::ImageMediaType::childFromTag (const QString & tag) { +KDE_NO_EXPORT NodePtr SMIL::ImageMediaType::childFromTag (const TQString & tag) { if (!strcmp (tag.latin1 (), "imfl")) return new RP::Imfl (m_doc); return SMIL::MediaType::childFromTag (tag); @@ -3281,10 +3281,10 @@ KDE_NO_EXPORT bool SMIL::AnimateMotion::handleEvent (EventPtr event) { KDE_NO_EXPORT void SMIL::Param::activate () { setState (state_activated); - QString name = getAttribute (StringPool::attr_name); - Node * parent = parentNode ().ptr (); - if (!name.isEmpty () && parent && parent->isElementNode ()) - static_cast(parent)->setParam (name, + TQString name = getAttribute (StringPool::attr_name); + Node * tqparent = tqparentNode ().ptr (); + if (!name.isEmpty () && tqparent && tqparent->isElementNode ()) + static_cast(tqparent)->setParam (name, getAttribute (StringPool::attr_value)); Element::activate (); //finish (); // no livetime of itself, will deactivate } @@ -3350,7 +3350,7 @@ KDE_NO_CDTOR_EXPORT ImageRuntime::~ImageRuntime () { } KDE_NO_EXPORT -bool ImageRuntime::parseParam (const TrieString & name, const QString & val) { +bool ImageRuntime::parseParam (const TrieString & name, const TQString & val) { //kdDebug () << "ImageRuntime::param " << name << "=" << val << endl; if (name == StringPool::attr_src) { killWGet (); @@ -3362,7 +3362,7 @@ bool ImageRuntime::parseParam (const TrieString & name, const QString & val) { mt->removeChild (mt->external_tree); mt->src = val; if (!val.isEmpty ()) { - QString abs = mt->absolutePath (); + TQString abs = mt->absolutePath (); cached_img.setUrl (abs); if (cached_img.isEmpty ()) { wget (abs); @@ -3377,7 +3377,7 @@ bool ImageRuntime::parseParam (const TrieString & name, const QString & val) { } /** - * start_timer timer expired, repaint if we have an image + * start_timer timer expired, tqrepaint if we have an image */ KDE_NO_EXPORT void ImageRuntime::started () { if (element && downloading ()) { @@ -3402,16 +3402,16 @@ KDE_NO_EXPORT void ImageRuntime::clipStop () { MediaTypeRuntime::clipStop (); } -KDE_NO_EXPORT void ImageRuntime::remoteReady (QByteArray & data) { +KDE_NO_EXPORT void ImageRuntime::remoteReady (TQByteArray & data) { NodePtr element_protect = element; // note element is weak SMIL::MediaType * mt = convertNode (element); if (data.size () && mt) { mt->resetSurface (); - QString mime = mimetype (); + TQString mime = mimetype (); kdDebug () << "ImageRuntime::remoteReady " << mime << " empty:" << cached_img.isEmpty () << " " << mt->src << endl; - if (mime.startsWith (QString::fromLatin1 ("text/"))) { - QTextStream ts (data, IO_ReadOnly); - readXML (element, ts, QString ()); + if (mime.startsWith (TQString::tqfromLatin1 ("text/"))) { + TQTextStream ts (data, IO_ReadOnly); + readXML (element, ts, TQString ()); Mrl *mrl = mt->external_tree ? mt->external_tree->mrl () : NULL; if (mrl) { mt->width = mrl->width; @@ -3421,18 +3421,18 @@ KDE_NO_EXPORT void ImageRuntime::remoteReady (QByteArray & data) { if (!mt->external_tree && cached_img.isEmpty ()) { delete img_movie; img_movie = 0L; - QImage *pix = new QImage (data); + TQImage *pix = new TQImage (data); if (!pix->isNull ()) { cached_img.data->image = pix; - img_movie = new QMovie (data, data.size ()); - img_movie->connectUpdate(this,SLOT(movieUpdated(const QRect&))); - img_movie->connectStatus (this, SLOT (movieStatus (int))); - img_movie->connectResize(this,SLOT (movieResize(const QSize&))); + img_movie = new TQMovie (data, data.size ()); + img_movie->connectUpdate(this,TQT_SLOT(movieUpdated(const TQRect&))); + img_movie->connectStatus (this, TQT_SLOT (movietqStatus (int))); + img_movie->connectResize(this,TQT_SLOT (movieResize(const TQSize&))); frame_nr = 0; mt->width = pix->width (); mt->height = pix->height (); if (mt->surface ()) - mt->sub_surface->repaint (); + mt->sub_surface->tqrepaint (); } else delete pix; } @@ -3442,34 +3442,34 @@ KDE_NO_EXPORT void ImageRuntime::remoteReady (QByteArray & data) { started (); } -KDE_NO_EXPORT void ImageRuntime::movieUpdated (const QRect &) { +KDE_NO_EXPORT void ImageRuntime::movieUpdated (const TQRect &) { SMIL::MediaType * mt = convertNode (element); if (mt && frame_nr++) { mt->resetSurface (); - cached_img.setUrl (QString ()); + cached_img.setUrl (TQString ()); ASSERT (cached_img.data && cached_img.isEmpty ()); - cached_img.data->image = new QImage; + cached_img.data->image = new TQImage; *cached_img.data->image = (img_movie->framePixmap ()); if (mt->surface()) - mt->sub_surface->repaint (); + mt->sub_surface->tqrepaint (); } if (timingstate != timings_started && img_movie) img_movie->pause (); } -KDE_NO_EXPORT void ImageRuntime::movieStatus (int s) { +KDE_NO_EXPORT void ImageRuntime::movietqStatus (int s) { if (element && element->state >= Node::state_began && SMIL::TimedMrl::keepContent (element)) { - if (s == QMovie::EndOfMovie) { + if (s == TQMovie::EndOfMovie) { propagateStop (false); } } } -KDE_NO_EXPORT void ImageRuntime::movieResize (const QSize &) { +KDE_NO_EXPORT void ImageRuntime::movieResize (const TQSize &) { SMIL::MediaType * mt = convertNode (element); if (mt->surface ()) - mt->sub_surface->repaint (); + mt->sub_surface->tqrepaint (); //kdDebug () << "movieResize" << endl; } @@ -3493,12 +3493,12 @@ namespace KMPlayer { } void reset () { codec = 0L; - font = QApplication::font (); + font = TQApplication::font (); data.truncate (0); } - QByteArray data; - QTextCodec * codec; - QFont font; + TQByteArray data; + TQTextCodec * codec; + TQFont font; }; } @@ -3522,7 +3522,7 @@ KDE_NO_EXPORT void TextRuntime::reset () { } KDE_NO_EXPORT -bool TextRuntime::parseParam (const TrieString & name, const QString & val) { +bool TextRuntime::parseParam (const TrieString & name, const TQString & val) { //kdDebug () << "TextRuntime::parseParam " << name << "=" << val << endl; SMIL::MediaType * mt = convertNode (element); if (!mt) @@ -3536,11 +3536,11 @@ bool TextRuntime::parseParam (const TrieString & name, const QString & val) { return true; } if (name == "backgroundColor" || name == "background-color") { - background_color = val.isEmpty () ? 0xffffff : QColor (val).rgb (); + background_color = val.isEmpty () ? 0xffffff : TQColor (val).rgb (); } else if (name == "fontColor") { - font_color = val.isEmpty () ? 0 : QColor (val).rgb (); + font_color = val.isEmpty () ? 0 : TQColor (val).rgb (); } else if (name == "charset") { - d->codec = QTextCodec::codecForName (val.ascii ()); + d->codec = TQTextCodec::codecForName (val.ascii ()); } else if (name == "fontFace") { ; //FIXME } else if (name == "fontPtSize") { @@ -3564,12 +3564,12 @@ bool TextRuntime::parseParam (const TrieString & name, const QString & val) { return MediaTypeRuntime::parseParam (name, val); mt->resetSurface (); if (mt->surface ()) - mt->sub_surface->repaint (); + mt->sub_surface->tqrepaint (); return true; } /** - * start_timer timer expired, repaint if we have text + * start_timer timer expired, tqrepaint if we have text */ KDE_NO_EXPORT void TextRuntime::started () { if (element && downloading ()) { @@ -3579,20 +3579,20 @@ KDE_NO_EXPORT void TextRuntime::started () { MediaTypeRuntime::started (); } -KDE_NO_EXPORT void TextRuntime::remoteReady (QByteArray & data) { - QString str (data); +KDE_NO_EXPORT void TextRuntime::remoteReady (TQByteArray & data) { + TQString str (data); SMIL::MediaType * mt = convertNode (element); if (mt && data.size ()) { d->data = data; mt->resetSurface (); if (d->data.size () > 0 && !d->data [d->data.size () - 1]) d->data.resize (d->data.size () - 1); // strip zero terminate char - QTextStream ts (d->data, IO_ReadOnly); + TQTextStream ts (d->data, IO_ReadOnly); if (d->codec) ts.setCodec (d->codec); text = ts.read (); if (mt->surface ()) - mt->sub_surface->repaint (); + mt->sub_surface->tqrepaint (); } postpone_lock = 0L; if (timingstate == timings_started) diff --git a/src/kmplayer_smil.h b/src/kmplayer_smil.h index 3ecfd18..2e84e09 100644 --- a/src/kmplayer_smil.h +++ b/src/kmplayer_smil.h @@ -22,15 +22,15 @@ #define _KMPLAYER_SMILL_H_ #include -#include -#include -#include +#include +#include +#include #include "kmplayerplaylist.h" -class QTextStream; -class QImage; -class QPainter; +class TQTextStream; +class TQImage; +class TQPainter; namespace KIO { class Job; @@ -41,18 +41,18 @@ struct TransTypeInfo; namespace KMPlayer { struct KMPLAYER_NO_EXPORT ImageData { - ImageData( const QString & img); + ImageData( const TQString & img); ~ImageData(); - QImage *image; + TQImage *image; private: - QString url; + TQString url; }; typedef SharedPtr ImageDataPtr; typedef WeakPtr ImageDataPtrW; struct KMPLAYER_NO_EXPORT CachedImage { - void setUrl (const QString & url); + void setUrl (const TQString & url); bool isEmpty (); ImageDataPtr data; }; @@ -61,7 +61,7 @@ class TextRuntimePrivate; /* * Event signaled before the actual starting takes place. Use by SMIL::Excl - * to stop possible other children + * to stop possible other tqchildren */ class ToBeStartedEvent : public Event { public: @@ -75,9 +75,9 @@ public: class KMPLAYER_NO_EXPORT SizeType { public: SizeType (); - SizeType (const QString & s); + SizeType (const TQString & s); void reset (); - SizeType & operator = (const QString & s); + SizeType & operator = (const TQString & s); SizeType & operator += (const SizeType & s); SizeType & operator -= (const SizeType & s); SizeType & operator /= (const int i) @@ -106,8 +106,8 @@ public: bool applyRegPoints (Node *, Single w, Single h, Single & xoff, Single & yoff, Single & w1, Single & h1); SizeType left, top, width, height, right, bottom; - QString reg_point, reg_align; - bool setSizeParam (const TrieString &name, const QString &value, bool &dim); + TQString reg_point, reg_align; + bool setSizeParam (const TrieString &name, const TQString &value, bool &dim); void move (const SizeType &x, const SizeType &y); }; @@ -136,7 +136,7 @@ public: * Reset all data, called from end() and init() */ virtual void reset (); - virtual bool parseParam (const TrieString & name, const QString & value); + virtual bool parseParam (const TrieString & name, const TQString & value); TimingState state () const { return timingstate; } void propagateStop (bool forced); void propagateStart (); @@ -156,7 +156,7 @@ public: KDE_NO_EXPORT DurationItem & durTime () { return durations[duration_time]; } KDE_NO_EXPORT DurationItem & endTime () { return durations [end_time]; } private: - void setDurationItem (DurationTime item, const QString & val); + void setDurationItem (DurationTime item, const TQString & val); public: TimingState timingstate; protected: @@ -190,32 +190,33 @@ class KMPLAYER_NO_EXPORT AudioVideoData : public MediaTypeRuntime { public: AudioVideoData (NodePtr e); virtual bool isAudioVideo (); - virtual bool parseParam (const TrieString & name, const QString & value); + virtual bool parseParam (const TrieString & name, const TQString & value); virtual void started (); virtual void postpone (bool b); virtual void clipStart (); virtual void clipStop (); }; -class KMPLAYER_NO_EXPORT ImageRuntime : public QObject,public MediaTypeRuntime { +class KMPLAYER_NO_EXPORT ImageRuntime : public TQObject,public MediaTypeRuntime { Q_OBJECT + TQ_OBJECT public: ImageRuntime (NodePtr e); ~ImageRuntime (); - virtual bool parseParam (const TrieString & name, const QString & value); + virtual bool parseParam (const TrieString & name, const TQString & value); virtual void postpone (bool b); virtual void clipStart (); virtual void clipStop (); - QMovie * img_movie; + TQMovie * img_movie; CachedImage cached_img; int frame_nr; protected: virtual void started (); - virtual void remoteReady (QByteArray &); + virtual void remoteReady (TQByteArray &); private slots: - void movieUpdated (const QRect &); - void movieStatus (int); - void movieResize (const QSize &); + void movieUpdated (const TQRect &); + void movietqStatus (int); + void movieResize (const TQSize &); }; /** @@ -226,17 +227,17 @@ public: TextRuntime (NodePtr e); ~TextRuntime (); void reset (); - virtual bool parseParam (const TrieString & name, const QString & value); + virtual bool parseParam (const TrieString & name, const TQString & value); int font_size; unsigned int font_color; unsigned int background_color; int bg_opacity; enum { align_left, align_center, align_right } halign; - QString text; + TQString text; TextRuntimePrivate * d; protected: virtual void started (); - virtual void remoteReady (QByteArray &); + virtual void remoteReady (TQByteArray &); }; /** @@ -245,14 +246,14 @@ protected: class KMPLAYER_NO_EXPORT AnimateGroupData : public Runtime { public: KDE_NO_CDTOR_EXPORT ~AnimateGroupData () {} - virtual bool parseParam (const TrieString & name, const QString & value); + virtual bool parseParam (const TrieString & name, const TQString & value); virtual void reset (); protected: void restoreModification (); AnimateGroupData (NodePtr e); NodePtrW target_element; TrieString changed_attribute; - QString change_to; + TQString change_to; int modification_id; protected: virtual void stopped (); @@ -276,7 +277,7 @@ class KMPLAYER_NO_EXPORT AnimateData : public AnimateGroupData { public: AnimateData (NodePtr e); KDE_NO_CDTOR_EXPORT ~AnimateData () {} - virtual bool parseParam (const TrieString & name, const QString & value); + virtual bool parseParam (const TrieString & name, const TQString & value); virtual void reset (); virtual void started (); virtual void stopped (); @@ -285,14 +286,14 @@ private: void applyStep (); TimerInfoPtrW anim_timer; enum { acc_none, acc_sum } accumulate; - enum { add_replace, add_sum } additive; + enum { add_tqreplace, add_sum } additive; int change_by; enum { calc_discrete, calc_linear, calc_paced, calc_spline } calcMode; - QString change_from; - QStringList change_values; + TQString change_from; + TQStringList change_values; int steps; float change_delta, change_to_val, change_from_val; - QString change_from_unit; + TQString change_from_unit; }; /** @@ -302,7 +303,7 @@ class KMPLAYER_NO_EXPORT AnimateMotionData : public AnimateGroupData { public: AnimateMotionData (NodePtr e); ~AnimateMotionData (); - virtual bool parseParam (const TrieString & name, const QString & value); + virtual bool parseParam (const TrieString & name, const TQString & value); virtual void reset (); virtual void started (); virtual void stopped (); @@ -311,17 +312,17 @@ private: bool checkTarget (Node *n); bool setInterval (); void applyStep (); - bool getCoordinates (const QString &coord, SizeType &x, SizeType &y); + bool getCoordinates (const TQString &coord, SizeType &x, SizeType &y); TimerInfoPtrW anim_timer; enum { acc_none, acc_sum } accumulate; - enum { add_replace, add_sum } additive; + enum { add_tqreplace, add_sum } additive; enum { calc_discrete, calc_linear, calc_paced, calc_spline } calcMode; - QString change_from; - QString change_by; - QStringList values; + TQString change_from; + TQString change_by; + TQStringList values; float *keytimes; int keytime_count; - QStringList splines; + TQStringList splines; float control_point[4]; unsigned int steps; unsigned int cur_step; @@ -347,7 +348,7 @@ public: /** * Translates string to deci-seconds or 'special' high number */ -bool parseTime (const QString & val, int & dur /*,const QString & dateformat*/); +bool parseTime (const TQString & val, int & dur /*,const TQString & dateformat*/); //----------------------------------------------------------------------------- @@ -392,7 +393,7 @@ const short id_node_last = 200; // reserve 100 ids class Smil : public Mrl { public: KDE_NO_CDTOR_EXPORT Smil (NodePtr & d) : Mrl (d, id_node_smil) {} - NodePtr childFromTag (const QString & tag); + NodePtr childFromTag (const TQString & tag); KDE_NO_EXPORT const char * nodeName () const { return "smil"; } PlayType playType () { return play_type_video; } void activate (); @@ -402,7 +403,7 @@ public: bool expose () const; bool handleEvent (EventPtr event); void accept (Visitor *); - void jump (const QString & id); + void jump (const TQString & id); static Smil * findSmilNode (Node * node); /** * Hack to mark the currently playing MediaType as finished @@ -410,7 +411,7 @@ public: */ Mrl * linkNode (); NodePtrW current_av_media_type; - NodePtrW layout_node; + NodePtrW tqlayout_node; }; /** @@ -420,7 +421,7 @@ public: class KMPLAYER_NO_EXPORT Head : public Element { public: KDE_NO_CDTOR_EXPORT Head (NodePtr & d) : Element (d, id_node_head) {} - NodePtr childFromTag (const QString & tag); + NodePtr childFromTag (const TQString & tag); KDE_NO_EXPORT const char * nodeName () const { return "head"; } void closed (); void childDone (NodePtr child); @@ -439,19 +440,19 @@ public: void activate (); void childDone (NodePtr child); void deactivate (); - virtual void parseParam (const TrieString & name, const QString & value); + virtual void parseParam (const TrieString & name, const TQString & value); /** - * repaints region, calls scheduleRepaint(x,y,w,h) on view + * tqrepaints region, calls scheduleRepaint(x,y,w,h) on view */ - void repaint (); - void repaint (const SRect & rect); + void tqrepaint (); + void tqrepaint (const SRect & rect); /** * calculate the relative x,y,w,h on the child region elements * given this element's w and h value * and child's left/top/right/width/height/bottom attributes */ virtual void updateDimensions (); - void boundsUpdate (); // recalculates and repaint old and new bounds + void boundsUpdate (); // recalculates and tqrepaint old and new bounds virtual Surface *surface (); SurfacePtrW region_surface; @@ -461,22 +462,22 @@ public: Single x, y, w, h; // unscaled values int z_order; unsigned int background_color; - QString background_image; + TQString background_image; ShowBackground show_background; protected: RegionBase (NodePtr & d, short id); PostponePtr postpone_lock; // pause while loading bg image - virtual void remoteReady (QByteArray &); // image downloaded + virtual void remoteReady (TQByteArray &); // image downloaded }; /** - * Defines region layout, should reside below 'head' element + * Defines region tqlayout, should reside below 'head' element */ class KMPLAYER_NO_EXPORT Layout : public RegionBase { public: Layout (NodePtr & d); - NodePtr childFromTag (const QString & tag); - KDE_NO_EXPORT const char * nodeName () const { return "layout"; } + NodePtr childFromTag (const TQString & tag); + KDE_NO_EXPORT const char * nodeName () const { return "tqlayout"; } void activate (); void closed (); virtual void accept (Visitor *); @@ -496,7 +497,7 @@ class KMPLAYER_NO_EXPORT Region : public RegionBase { public: Region (NodePtr & d); KDE_NO_EXPORT const char * nodeName () const { return "region"; } - NodePtr childFromTag (const QString & tag); + NodePtr childFromTag (const TQString & tag); void calculateBounds (Single w, Single h); virtual NodeRefListPtr listeners (unsigned int event_id); virtual void accept (Visitor *); @@ -516,11 +517,11 @@ class KMPLAYER_NO_EXPORT RootLayout : public RegionBase { public: KDE_NO_CDTOR_EXPORT RootLayout (NodePtr & d) : RegionBase (d, id_node_root_layout) {} - KDE_NO_EXPORT const char * nodeName () const { return "root-layout"; } + KDE_NO_EXPORT const char * nodeName () const { return "root-tqlayout"; } }; /** - * Represents a regPoint element for alignment inside regions + * Represents a regPoint element for tqalignment inside regions */ class KMPLAYER_NO_EXPORT RegPoint : public Element { public: @@ -528,7 +529,7 @@ public: KDE_NO_CDTOR_EXPORT ~RegPoint () {} KDE_NO_EXPORT const char * nodeName () const { return "regPoint"; } KDE_NO_EXPORT bool expose () const { return false; } - void parseParam (const TrieString & name, const QString & value); + void parseParam (const TrieString & name, const TQString & value); CalculatedSizer sizes; }; @@ -570,7 +571,7 @@ public: void activate (); KDE_NO_EXPORT void accept (Visitor * v) { v->visit (this); } KDE_NO_EXPORT const char * nodeName () const { return "transition"; } - void parseParam (const TrieString & name, const QString & value); + void parseParam (const TrieString & name, const TQString & value); KDE_NO_EXPORT bool expose () const { return false; } bool supported (); TransType type; @@ -605,7 +606,7 @@ public: virtual NodeRefListPtr listeners (unsigned int event_id); KDE_NO_EXPORT void accept (Visitor * v) { v->visit (this); } void init (); - virtual void parseParam (const TrieString &, const QString &); + virtual void parseParam (const TrieString &, const TQString &); Runtime * runtime (); static Runtime::DurationItem * getDuration (NodePtr n); static bool isTimedMrl (const Node *n); @@ -644,7 +645,7 @@ KDE_NO_EXPORT inline bool TimedMrl::isTimedMrl (const Node *n) { class KMPLAYER_NO_EXPORT GroupBase : public TimedMrl { public: KDE_NO_CDTOR_EXPORT ~GroupBase () {} - NodePtr childFromTag (const QString & tag); + NodePtr childFromTag (const TQString & tag); PlayType playType () { return play_type_none; } void finish (); void deactivate (); @@ -655,7 +656,7 @@ protected: }; /** - * A Par represents parallel processing of all its children + * A Par represents parallel processing of all its tqchildren */ class KMPLAYER_NO_EXPORT Par : public GroupBase { public: @@ -667,7 +668,7 @@ public: }; /** - * A Seq represents sequential processing of all its children + * A Seq represents sequential processing of all its tqchildren */ class KMPLAYER_NO_EXPORT Seq : public GroupBase { public: @@ -690,7 +691,7 @@ public: }; /** - * An Excl represents exclusive processing of one of its children + * An Excl represents exclusive processing of one of its tqchildren */ class KMPLAYER_NO_EXPORT Excl : public GroupBase { public: @@ -725,11 +726,11 @@ public: KDE_NO_CDTOR_EXPORT ~LinkingBase () {} void deactivate (); KDE_NO_EXPORT bool expose () const { return false; } - void parseParam (const TrieString & name, const QString & value); + void parseParam (const TrieString & name, const TQString & value); ConnectionPtr mediatype_activated; ConnectionPtr mediatype_attach; - QString href; - enum { show_new, show_replace } show; + TQString href; + enum { show_new, show_tqreplace } show; protected: LinkingBase (NodePtr & d, short id); }; @@ -741,22 +742,22 @@ public: void activate (); void childDone (NodePtr child); KDE_NO_EXPORT const char * nodeName () const { return "a"; } - NodePtr childFromTag (const QString & tag); + NodePtr childFromTag (const TQString & tag); KDE_NO_EXPORT void accept (Visitor * v) { v->visit (this); } }; class KMPLAYER_NO_EXPORT Area : public LinkingBase { public: - Area (NodePtr & d, const QString & tag); + Area (NodePtr & d, const TQString & tag); ~Area (); void activate (); KDE_NO_EXPORT const char * nodeName () const { return tag.ascii (); } KDE_NO_EXPORT void accept (Visitor * v) { v->visit (this); } - void parseParam (const TrieString & name, const QString & value); + void parseParam (const TrieString & name, const TQString & value); NodeRefListPtr listeners (unsigned int event_id); SizeType * coords; int nr_coords; - const QString tag; + const TQString tag; MouseListeners mouse_listeners; }; @@ -765,8 +766,8 @@ public: */ class KMPLAYER_NO_EXPORT MediaType : public TimedMrl { public: - MediaType (NodePtr & d, const QString & t, short id); - NodePtr childFromTag (const QString & tag); + MediaType (NodePtr & d, const TQString & t, short id); + NodePtr childFromTag (const TQString & tag); KDE_NO_EXPORT const char * nodeName () const { return m_type.latin1 (); } void closed (); void activate (); @@ -779,8 +780,8 @@ public: Surface *surface (); void resetSurface (); SRect calculateBounds (); - void boundsUpdate (); // recalculates and repaint old and new bounds - virtual void parseParam (const TrieString & name, const QString & value); + void boundsUpdate (); // recalculates and tqrepaint old and new bounds + virtual void parseParam (const TrieString & name, const TQString & value); virtual bool handleEvent (EventPtr event); NodeRefListPtr listeners (unsigned int event_id); bool needsVideoWidget (); // for 'video' and 'ref' nodes @@ -790,7 +791,7 @@ public: NodePtrW trans_out; NodePtrW active_trans; NodePtrW region_node; - QString m_type; + TQString m_type; CalculatedSizer sizes; Fit fit; int opacity; @@ -813,8 +814,8 @@ protected: class KMPLAYER_NO_EXPORT AVMediaType : public MediaType { public: - AVMediaType (NodePtr & d, const QString & t); - NodePtr childFromTag (const QString & tag); + AVMediaType (NodePtr & d, const TQString & t); + NodePtr childFromTag (const TQString & tag); virtual Runtime * getNewRuntime (); virtual void defer (); virtual void undefer (); @@ -827,7 +828,7 @@ class KMPLAYER_NO_EXPORT ImageMediaType : public MediaType { public: ImageMediaType (NodePtr & d); Runtime * getNewRuntime (); - NodePtr childFromTag (const QString & tag); + NodePtr childFromTag (const TQString & tag); PlayType playType () { return play_type_image; } virtual void accept (Visitor *); }; diff --git a/src/kmplayer_xspf.cpp b/src/kmplayer_xspf.cpp index c7fbce3..c8c4470 100644 --- a/src/kmplayer_xspf.cpp +++ b/src/kmplayer_xspf.cpp @@ -25,7 +25,7 @@ using namespace KMPlayer; -KDE_NO_EXPORT NodePtr XSPF::Playlist::childFromTag (const QString & tag) { +KDE_NO_EXPORT NodePtr XSPF::Playlist::childFromTag (const TQString & tag) { const char * name = tag.latin1 (); if (!strcasecmp (name, "tracklist")) return new Tracklist (m_doc); @@ -69,7 +69,7 @@ KDE_NO_EXPORT void XSPF::Playlist::closed () { //----------------------------------------------------------------------------- -KDE_NO_EXPORT NodePtr XSPF::Tracklist::childFromTag (const QString & tag) { +KDE_NO_EXPORT NodePtr XSPF::Tracklist::childFromTag (const TQString & tag) { const char * name = tag.latin1 (); if (!strcasecmp (name, "track")) return new XSPF::Track (m_doc); @@ -78,7 +78,7 @@ KDE_NO_EXPORT NodePtr XSPF::Tracklist::childFromTag (const QString & tag) { //----------------------------------------------------------------------------- -KDE_NO_EXPORT NodePtr XSPF::Track::childFromTag (const QString & tag) { +KDE_NO_EXPORT NodePtr XSPF::Track::childFromTag (const TQString & tag) { const char * name = tag.latin1 (); if (!strcasecmp (name, "location")) return new Location (m_doc); diff --git a/src/kmplayer_xspf.h b/src/kmplayer_xspf.h index 83463e0..47cf745 100644 --- a/src/kmplayer_xspf.h +++ b/src/kmplayer_xspf.h @@ -21,7 +21,7 @@ #ifndef _KMPLAYER_XSPF_H_ #define _KMPLAYER_XSPF_H_ -#include +#include #include "kmplayerplaylist.h" @@ -52,7 +52,7 @@ const short id_node_link = 518; class KMPLAYER_NO_EXPORT Playlist : public Mrl { public: KDE_NO_CDTOR_EXPORT Playlist (NodePtr & d) : Mrl (d, id_node_playlist) {} - NodePtr childFromTag (const QString & tag); + NodePtr childFromTag (const TQString & tag); KDE_NO_EXPORT const char * nodeName () const { return "playlist"; } bool expose () const { return !pretty_name.isEmpty (); } void closed (); @@ -61,7 +61,7 @@ public: class KMPLAYER_NO_EXPORT Tracklist : public Element { public: KDE_NO_CDTOR_EXPORT Tracklist (NodePtr & d) : Element (d, id_node_tracklist) {} - NodePtr childFromTag (const QString & tag); + NodePtr childFromTag (const TQString & tag); KDE_NO_EXPORT const char * nodeName () const { return "tracklist"; } bool expose () const { return false; } }; @@ -74,7 +74,7 @@ public: PlayType playType (); Mrl * linkNode (); KDE_NO_EXPORT const char * nodeName () const { return "track"; } - NodePtr childFromTag (const QString & tag); + NodePtr childFromTag (const TQString & tag); NodePtrW location; }; 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 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // include files for KDE #include @@ -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 (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 (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 (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 (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 ( - "" - "" + TQString smil = TQString::tqfromLatin1 ( + "" + "" "" "" "" "" - "" + "" "" "" "" @@ -882,9 +882,9 @@ KDE_NO_EXPORT void IntroSource::activate () { "" "" "" - ).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.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 (m_player->sources () ["pipesource"])->setCommand (config->readEntry ("Command1", "")); @@ -1165,7 +1165,7 @@ KDE_NO_EXPORT void KMPlayerApp::readOptions() { #include #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 ("" - "" + TQString smil = TQString::tqfromLatin1 ("" + "" "" "" - "" + "" "" "" "" //"" "" "" - "").arg (KGlobal::iconLoader()->iconPath (QString::fromLatin1 ("kmplayer"), -64)); - QTextStream ts (smil.utf8 (), IO_ReadOnly); - KMPlayer::readXML (m_document, ts, QString (), false); + "").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 (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 ("\n"); + TQTextStream ts (&file); + ts.setEncoding (TQTextStream::UnicodeUTF8); + ts << TQString ("\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(sender ()))->tqmetaObject ()->inherits ("KAction")) + if (TQT_TQOBJECT(const_cast(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 (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(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 (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 (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 (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 (m_player->players () ["mplayer"])->configPage ()->m_patterns; - QRegExp & trackRegExp = patterns [KMPlayer::MPlayerPreferencesPage::pat_vcdtrack]; + TQRegExp * patterns = static_cast (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 (m_player->players () ["mplayer"])->configPage ()->m_patterns; - QRegExp & trackRegExp = patterns [KMPlayer::MPlayerPreferencesPage::pat_cdromtracks]; + TQRegExp * patterns = static_cast (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; diff --git a/src/kmplayerappsource.h b/src/kmplayerappsource.h index 86378f3..63f54a1 100644 --- a/src/kmplayerappsource.h +++ b/src/kmplayerappsource.h @@ -23,7 +23,7 @@ #include #endif -#include +#include #include @@ -33,10 +33,10 @@ class KMPlayerApp; class KURLRequester; -class QPopupMenu; -class QMenuItem; -class QCheckBox; -class QLineEdit; +class TQPopupMenu; +class TQMenuItem; +class TQCheckBox; +class TQLineEdit; class TVInput; class TVChannel; @@ -45,25 +45,27 @@ class TVChannel; */ class KMPLAYER_NO_EXPORT KMPlayerMenuSource : public KMPlayer::Source { Q_OBJECT + TQ_OBJECT public: - KMPlayerMenuSource (const QString & n, KMPlayerApp * app, QPopupMenu * m, const char * src); + KMPlayerMenuSource (const TQString & n, KMPlayerApp * app, TQPopupMenu * m, const char * src); virtual ~KMPlayerMenuSource (); protected: - void menuItemClicked (QPopupMenu * menu, int id); - QPopupMenu * m_menu; + void menuItemClicked (TQPopupMenu * menu, int id); + TQPopupMenu * m_menu; KMPlayerApp * m_app; }; /* * Preference page for DVD */ -class KMPLAYER_NO_EXPORT KMPlayerPrefSourcePageDVD : public QFrame { +class KMPLAYER_NO_EXPORT KMPlayerPrefSourcePageDVD : public TQFrame { Q_OBJECT + TQ_OBJECT public: - KMPlayerPrefSourcePageDVD (QWidget * parent); + KMPlayerPrefSourcePageDVD (TQWidget * tqparent); ~KMPlayerPrefSourcePageDVD () {} - QCheckBox * autoPlayDVD; + TQCheckBox * autoPlayDVD; KURLRequester * dvddevice; }; @@ -72,18 +74,19 @@ public: */ class KMPLAYER_NO_EXPORT KMPlayerDVDSource : public KMPlayerMenuSource, public KMPlayer::PreferencesPage { Q_OBJECT + TQ_OBJECT public: - KMPlayerDVDSource (KMPlayerApp * app, QPopupMenu * m); + KMPlayerDVDSource (KMPlayerApp * app, TQPopupMenu * m); virtual ~KMPlayerDVDSource (); - virtual bool processOutput (const QString & line); - virtual QString filterOptions (); + virtual bool processOutput (const TQString & line); + virtual TQString filterOptions (); virtual void setIdentified (bool b = true); - virtual QString prettyName (); + virtual TQString prettyName (); virtual void write (KConfig *); virtual void read (KConfig *); virtual void sync (bool); - virtual void prefLocation (QString & item, QString & icon, QString & tab); - virtual QFrame * prefPage (QWidget * parent); + virtual void prefLocation (TQString & item, TQString & icon, TQString & tab); + virtual TQFrame * prefPage (TQWidget * tqparent); public slots: virtual void activate (); virtual void deactivate (); @@ -95,10 +98,10 @@ public slots: private: void buildArguments (); void play (); - QPopupMenu * m_dvdtitlemenu; - QPopupMenu * m_dvdchaptermenu; - QPopupMenu * m_dvdlanguagemenu; - QPopupMenu * m_dvdsubtitlemenu; + TQPopupMenu * m_dvdtitlemenu; + TQPopupMenu * m_dvdchaptermenu; + TQPopupMenu * m_dvdlanguagemenu; + TQPopupMenu * m_dvdsubtitlemenu; KMPlayer::NodePtr disks; KMPlayerPrefSourcePageDVD * m_configpage; int m_current_title; @@ -111,10 +114,11 @@ private: */ class KMPLAYER_NO_EXPORT KMPlayerDVDNavSource : public KMPlayerMenuSource { Q_OBJECT + TQ_OBJECT public: - KMPlayerDVDNavSource (KMPlayerApp * app, QPopupMenu * m); + KMPlayerDVDNavSource (KMPlayerApp * app, TQPopupMenu * m); virtual ~KMPlayerDVDNavSource (); - virtual QString prettyName (); + virtual TQString prettyName (); public slots: virtual void activate (); virtual void deactivate (); @@ -128,13 +132,14 @@ public slots: /* * Preference page for VCD */ -class KMPLAYER_NO_EXPORT KMPlayerPrefSourcePageVCD : public QFrame { +class KMPLAYER_NO_EXPORT KMPlayerPrefSourcePageVCD : public TQFrame { Q_OBJECT + TQ_OBJECT public: - KMPlayerPrefSourcePageVCD (QWidget * parent); + KMPlayerPrefSourcePageVCD (TQWidget * tqparent); ~KMPlayerPrefSourcePageVCD () {} KURLRequester * vcddevice; - QCheckBox *autoPlayVCD; + TQCheckBox *autoPlayVCD; }; @@ -143,17 +148,18 @@ public: */ class KMPLAYER_NO_EXPORT KMPlayerVCDSource : public KMPlayerMenuSource, public KMPlayer::PreferencesPage { Q_OBJECT + TQ_OBJECT public: - KMPlayerVCDSource (KMPlayerApp * app, QPopupMenu * m); + KMPlayerVCDSource (KMPlayerApp * app, TQPopupMenu * m); virtual ~KMPlayerVCDSource (); - virtual bool processOutput (const QString & line); + virtual bool processOutput (const TQString & line); virtual void setIdentified (bool b = true); - virtual QString prettyName (); + virtual TQString prettyName (); virtual void write (KConfig *); virtual void read (KConfig *); virtual void sync (bool); - virtual void prefLocation (QString & item, QString & icon, QString & tab); - virtual QFrame * prefPage (QWidget * parent); + virtual void prefLocation (TQString & item, TQString & icon, TQString & tab); + virtual TQFrame * prefPage (TQWidget * tqparent); public slots: virtual void activate (); virtual void deactivate (); @@ -169,12 +175,13 @@ private: */ class KMPLAYER_NO_EXPORT KMPlayerAudioCDSource : public KMPlayerMenuSource { Q_OBJECT + TQ_OBJECT public: - KMPlayerAudioCDSource (KMPlayerApp * app, QPopupMenu * m); + KMPlayerAudioCDSource (KMPlayerApp * app, TQPopupMenu * m); virtual ~KMPlayerAudioCDSource (); - virtual bool processOutput (const QString & line); + virtual bool processOutput (const TQString & line); virtual void setIdentified (bool b = true); - virtual QString prettyName (); + virtual TQString prettyName (); public slots: virtual void activate (); virtual void deactivate (); @@ -188,13 +195,14 @@ private: */ class KMPLAYER_NO_EXPORT KMPlayerPipeSource : public KMPlayer::Source { Q_OBJECT + TQ_OBJECT public: KMPlayerPipeSource (KMPlayerApp * app); virtual ~KMPlayerPipeSource (); virtual bool hasLength (); virtual bool isSeekable (); - void setCommand (const QString & cmd); - virtual QString prettyName (); + void setCommand (const TQString & cmd); + virtual TQString prettyName (); public slots: virtual void activate (); virtual void deactivate (); diff --git a/src/kmplayerbroadcast.cpp b/src/kmplayerbroadcast.cpp index 34045e2..470f9c1 100644 --- a/src/kmplayerbroadcast.cpp +++ b/src/kmplayerbroadcast.cpp @@ -18,20 +18,20 @@ */ #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -58,17 +58,17 @@ static const char * strFFServerCustomSetting = "Custom Setting"; static const char * strFFServerProfiles = "Profiles"; -KDE_NO_CDTOR_EXPORT FFServerSetting::FFServerSetting (int i, const QString & n, const QString & f, const QString & ac, int abr, int asr, const QString & vc, int vbr, int q, int fr, int gs, int w, int h) +KDE_NO_CDTOR_EXPORT FFServerSetting::FFServerSetting (int i, const TQString & n, const TQString & f, const TQString & ac, int abr, int asr, const TQString & vc, int vbr, int q, int fr, int gs, int w, int h) : index (i), name (n), format (f), audiocodec (ac), - audiobitrate (abr > 0 ? QString::number (abr) : QString ()), - audiosamplerate (asr > 0 ? QString::number (asr) : QString ()), + audiobitrate (abr > 0 ? TQString::number (abr) : TQString ()), + audiosamplerate (asr > 0 ? TQString::number (asr) : TQString ()), videocodec (vc), - videobitrate (vbr > 0 ? QString::number (vbr) : QString ()), - quality (q > 0 ? QString::number (q) : QString ()), - framerate (fr > 0 ? QString::number (fr) : QString ()), - gopsize (gs > 0 ? QString::number (gs) : QString ()), - width (w > 0 ? QString::number (w) : QString ()), - height (h > 0 ? QString::number (h) : QString ()) {} + videobitrate (vbr > 0 ? TQString::number (vbr) : TQString ()), + quality (q > 0 ? TQString::number (q) : TQString ()), + framerate (fr > 0 ? TQString::number (fr) : TQString ()), + gopsize (gs > 0 ? TQString::number (gs) : TQString ()), + width (w > 0 ? TQString::number (w) : TQString ()), + height (h > 0 ? TQString::number (h) : TQString ()) {} KDE_NO_EXPORT FFServerSetting & FFServerSetting::operator = (const FFServerSetting & fs) { format = fs.format; @@ -85,11 +85,11 @@ KDE_NO_EXPORT FFServerSetting & FFServerSetting::operator = (const FFServerSetti return *this; } -KDE_NO_EXPORT FFServerSetting & FFServerSetting::operator = (const QStringList & sl) { +KDE_NO_EXPORT FFServerSetting & FFServerSetting::operator = (const TQStringList & sl) { if (sl.count () < 11) { return *this; } - QStringList::const_iterator it = sl.begin (); + TQStringList::const_iterator it = sl.begin (); format = *it++; audiocodec = *it++; audiobitrate = *it++; @@ -102,38 +102,38 @@ KDE_NO_EXPORT FFServerSetting & FFServerSetting::operator = (const QStringList & width = *it++; height = *it++; acl.clear (); - QStringList::const_iterator end( sl.end() ); + TQStringList::const_iterator end( sl.end() ); for (; it != end; ++it) acl.push_back (*it); return *this; } -KDE_NO_EXPORT QString & FFServerSetting::ffconfig (QString & buf) { - QString nl ("\n"); - buf = QString ("Format ") + format + nl; +KDE_NO_EXPORT TQString & FFServerSetting::ffconfig (TQString & buf) { + TQString nl ("\n"); + buf = TQString ("Format ") + format + nl; if (!audiocodec.isEmpty ()) - buf += QString ("AudioCodec ") + audiocodec + nl; + buf += TQString ("AudioCodec ") + audiocodec + nl; if (!audiobitrate.isEmpty ()) - buf += QString ("AudioBitRate ") + audiobitrate + nl; + buf += TQString ("AudioBitRate ") + audiobitrate + nl; if (!audiosamplerate.isEmpty () > 0) - buf += QString ("AudioSampleRate ") + audiosamplerate + nl; + buf += TQString ("AudioSampleRate ") + audiosamplerate + nl; if (!videocodec.isEmpty ()) - buf += QString ("VideoCodec ") + videocodec + nl; + buf += TQString ("VideoCodec ") + videocodec + nl; if (!videobitrate.isEmpty ()) - buf += QString ("VideoBitRate ") + videobitrate + nl; + buf += TQString ("VideoBitRate ") + videobitrate + nl; if (!quality.isEmpty ()) - buf += QString ("VideoQMin ") + quality + nl; + buf += TQString ("VideoTQMin ") + quality + nl; if (!framerate.isEmpty ()) - buf += QString ("VideoFrameRate ") + framerate + nl; + buf += TQString ("VideoFrameRate ") + framerate + nl; if (!gopsize.isEmpty ()) - buf += QString ("VideoGopSize ") + gopsize + nl; + buf += TQString ("VideoGopSize ") + gopsize + nl; if (!width.isEmpty () && !height.isEmpty ()) - buf += QString ("VideoSize ") + width + QString ("x") + height + nl; + buf += TQString ("VideoSize ") + width + TQString ("x") + height + nl; return buf; } -KDE_NO_EXPORT const QStringList FFServerSetting::list () { - QStringList sl; +KDE_NO_EXPORT const TQStringList FFServerSetting::list () { + TQStringList sl; sl.push_back (format); sl.push_back (audiocodec); sl.push_back (audiobitrate); @@ -145,8 +145,8 @@ KDE_NO_EXPORT const QStringList FFServerSetting::list () { sl.push_back (gopsize); sl.push_back (width); sl.push_back (height); - QStringList::const_iterator it = acl.begin (); - QStringList::const_iterator end( acl.end () ); + TQStringList::const_iterator it = acl.begin (); + TQStringList::const_iterator end( acl.end () ); for (; it != end; ++it) sl.push_back (*it); return sl; @@ -154,134 +154,130 @@ KDE_NO_EXPORT const QStringList FFServerSetting::list () { //----------------------------------------------------------------------------- -KDE_NO_CDTOR_EXPORT KMPlayerPrefBroadcastPage::KMPlayerPrefBroadcastPage (QWidget *parent) : QFrame (parent) { - QVBoxLayout *layout = new QVBoxLayout (this, 5); - QGridLayout *gridlayout = new QGridLayout (layout, 6, 2, 2); - QLabel *label = new QLabel (i18n ("Bind address:"), this); - bindaddress = new QLineEdit ("", this); - QWhatsThis::add (bindaddress, i18n ("If you have multiple network devices, you can limit access")); - gridlayout->addWidget (label, 0, 0); - gridlayout->addWidget (bindaddress, 0, 1); - label = new QLabel (i18n ("Listen port:"), this); - port = new QLineEdit ("", this); - gridlayout->addWidget (label, 1, 0); - gridlayout->addWidget (port, 1, 1); - label = new QLabel (i18n ("Maximum connections:"), this); - maxclients = new QLineEdit ("", this); - gridlayout->addWidget (label, 2, 0); - gridlayout->addWidget (maxclients, 2, 1); - label = new QLabel (i18n ("Maximum bandwidth (kbit):"), this); - maxbandwidth = new QLineEdit ("", this); - gridlayout->addWidget (label, 3, 0); - gridlayout->addWidget (maxbandwidth, 3, 1); - label = new QLabel (i18n ("Temporary feed file:"), this); - feedfile = new QLineEdit ("", this); - gridlayout->addWidget (label, 4, 0); - gridlayout->addWidget (feedfile, 4, 1); - label = new QLabel (i18n ("Feed file size (kB):"), this); - feedfilesize = new QLineEdit ("", this); - gridlayout->addWidget (label, 5, 0); - gridlayout->addWidget (feedfilesize, 5, 1); - layout->addItem (new QSpacerItem (0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding)); +KDE_NO_CDTOR_EXPORT KMPlayerPrefBroadcastPage::KMPlayerPrefBroadcastPage (TQWidget *tqparent) : TQFrame (tqparent) { + TQVBoxLayout *tqlayout = new TQVBoxLayout (this, 5); + TQGridLayout *gridtqlayout = new TQGridLayout (tqlayout, 6, 2, 2); + TQLabel *label = new TQLabel (i18n ("Bind address:"), this); + bindaddress = new TQLineEdit ("", this); + TQWhatsThis::add (bindaddress, i18n ("If you have multiple network devices, you can limit access")); + gridtqlayout->addWidget (label, 0, 0); + gridtqlayout->addWidget (bindaddress, 0, 1); + label = new TQLabel (i18n ("Listen port:"), this); + port = new TQLineEdit ("", this); + gridtqlayout->addWidget (label, 1, 0); + gridtqlayout->addWidget (port, 1, 1); + label = new TQLabel (i18n ("Maximum connections:"), this); + maxclients = new TQLineEdit ("", this); + gridtqlayout->addWidget (label, 2, 0); + gridtqlayout->addWidget (maxclients, 2, 1); + label = new TQLabel (i18n ("Maximum bandwidth (kbit):"), this); + maxbandwidth = new TQLineEdit ("", this); + gridtqlayout->addWidget (label, 3, 0); + gridtqlayout->addWidget (maxbandwidth, 3, 1); + label = new TQLabel (i18n ("Temporary feed file:"), this); + feedfile = new TQLineEdit ("", this); + gridtqlayout->addWidget (label, 4, 0); + gridtqlayout->addWidget (feedfile, 4, 1); + label = new TQLabel (i18n ("Feed file size (kB):"), this); + feedfilesize = new TQLineEdit ("", this); + gridtqlayout->addWidget (label, 5, 0); + gridtqlayout->addWidget (feedfilesize, 5, 1); + tqlayout->addItem (new TQSpacerItem (0, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding)); } //----------------------------------------------------------------------------- #undef ADDPROPERTY -#define ADDPROPERTY(label,qedit,gridlayout,row,parent) \ - qedit = new QLineEdit ("", parent); \ - gridlayout->addWidget (new QLabel (qedit, label, parent), row, 0); \ - gridlayout->addWidget (qedit, row, 1); +#define ADDPROPERTY(label,qedit,gridtqlayout,row,tqparent) \ + qedit = new TQLineEdit ("", tqparent); \ + gridtqlayout->addWidget (new TQLabel (qedit, label, tqparent), row, 0); \ + gridtqlayout->addWidget (qedit, row, 1); -KDE_NO_CDTOR_EXPORT KMPlayerPrefBroadcastFormatPage::KMPlayerPrefBroadcastFormatPage (QWidget *parent, FFServerSettingList & ffs) : QFrame (parent, "BroadcastPage"), profiles (ffs) +KDE_NO_CDTOR_EXPORT KMPlayerPrefBroadcastFormatPage::KMPlayerPrefBroadcastFormatPage (TQWidget *tqparent, FFServerSettingList & ffs) : TQFrame (tqparent, "BroadcastPage"), profiles (ffs) { - QHBoxLayout *layout = new QHBoxLayout (this, 5); - QGridLayout *formatlayout = new QGridLayout (11, 2, 2); - formatlayout->setAlignment (Qt::AlignTop); - QVBoxLayout *leftlayout = new QVBoxLayout (15); - QHBoxLayout *ledlayout = new QHBoxLayout (5); - format = new QComboBox (this); - QLabel * label = new QLabel (format, i18n ("Format:"), this); + TQHBoxLayout *tqlayout = new TQHBoxLayout (this, 5); + TQGridLayout *formattqlayout = new TQGridLayout (11, 2, 2); + formattqlayout->tqsetAlignment (TQt::AlignTop); + TQVBoxLayout *lefttqlayout = new TQVBoxLayout (15); + TQHBoxLayout *ledtqlayout = new TQHBoxLayout (5); + format = new TQComboBox (this); + TQLabel * label = new TQLabel (format, i18n ("Format:"), this); format->clear (); - format->insertItem (QString ("asf")); - format->insertItem (QString ("avi")); - format->insertItem (QString ("mpjpeg")); - format->insertItem (QString ("mpeg")); - format->insertItem (QString ("rm")); - format->insertItem (QString ("swf")); - QWhatsThis::add (format, i18n ("Only avi, mpeg and rm work for mplayer playback")); - formatlayout->addWidget (label, 0, 0); - formatlayout->addWidget (format, 0, 1); - ADDPROPERTY (i18n ("Audio codec:"), audiocodec, formatlayout, 1, this); - ADDPROPERTY (i18n ("Audio bit rate (kbit):"), audiobitrate, formatlayout, 2, this); - ADDPROPERTY (i18n ("Audio sample rate (Hz):"), audiosamplerate, formatlayout, 3, this); - ADDPROPERTY (i18n ("Video codec:"), videocodec, formatlayout, 4, this); - ADDPROPERTY (i18n ("Video bit rate (kbit):"), videobitrate, formatlayout, 5, this); - ADDPROPERTY (i18n ("Quality (1-31):"), quality, formatlayout, 6, this); - ADDPROPERTY (i18n ("Frame rate (Hz):"), framerate, formatlayout, 7, this); - ADDPROPERTY (i18n ("Gop size:"), gopsize, formatlayout, 8, this); - ADDPROPERTY (i18n ("Width (pixels):"), moviewidth, formatlayout, 9, this); - ADDPROPERTY (i18n ("Height (pixels):"), movieheight, formatlayout, 10, this); - label = new QLabel (i18n ("Allow access from:"), this); - accesslist = new QTable (40, 1, this); + format->insertItem (TQString ("asf")); + format->insertItem (TQString ("avi")); + format->insertItem (TQString ("mpjpeg")); + format->insertItem (TQString ("mpeg")); + format->insertItem (TQString ("rm")); + format->insertItem (TQString ("swf")); + TQWhatsThis::add (format, i18n ("Only avi, mpeg and rm work for mplayer playback")); + formattqlayout->addWidget (label, 0, 0); + formattqlayout->addWidget (format, 0, 1); + ADDPROPERTY (i18n ("Audio codec:"), audiocodec, formattqlayout, 1, this); + ADDPROPERTY (i18n ("Audio bit rate (kbit):"), audiobitrate, formattqlayout, 2, this); + ADDPROPERTY (i18n ("Audio sample rate (Hz):"), audiosamplerate, formattqlayout, 3, this); + ADDPROPERTY (i18n ("Video codec:"), videocodec, formattqlayout, 4, this); + ADDPROPERTY (i18n ("Video bit rate (kbit):"), videobitrate, formattqlayout, 5, this); + ADDPROPERTY (i18n ("Quality (1-31):"), quality, formattqlayout, 6, this); + ADDPROPERTY (i18n ("Frame rate (Hz):"), framerate, formattqlayout, 7, this); + ADDPROPERTY (i18n ("Gop size:"), gopsize, formattqlayout, 8, this); + ADDPROPERTY (i18n ("Width (pixels):"), moviewidth, formattqlayout, 9, this); + ADDPROPERTY (i18n ("Height (pixels):"), movieheight, formattqlayout, 10, this); + label = new TQLabel (i18n ("Allow access from:"), this); + accesslist = new TQTable (40, 1, this); accesslist->verticalHeader ()->hide (); accesslist->setLeftMargin (0); accesslist->setColumnWidth (0, 250); - QWhatsThis::add (accesslist, i18n ("'Single IP' or 'start-IP end-IP' for IP ranges")); - QHeader *header = accesslist->horizontalHeader (); + TQWhatsThis::add (accesslist, i18n ("'Single IP' or 'start-IP end-IP' for IP ranges")); + TQHeader *header = accesslist->horizontalHeader (); header->setLabel (0, i18n ("Host/IP or IP Range")); - QFrame *profileframe = new QFrame (this); - QGridLayout *profileslayout = new QGridLayout (profileframe, 5, 2, 2); - profile = new QLineEdit ("", profileframe); - connect (profile, SIGNAL(textChanged (const QString &)), - this, SLOT (slotTextChanged (const QString &))); - profilelist = new QListBox (profileframe); + TQFrame *profileframe = new TQFrame (this); + TQGridLayout *profilestqlayout = new TQGridLayout (profileframe, 5, 2, 2); + profile = new TQLineEdit ("", profileframe); + connect (profile, TQT_SIGNAL(textChanged (const TQString &)), + this, TQT_SLOT (slotTextChanged (const TQString &))); + profilelist = new TQListBox (profileframe); for (int i = 0; i < (int) profiles.size (); i++) profilelist->insertItem (profiles[i]->name, i); - connect (profilelist, SIGNAL (selected (int)), - this, SLOT (slotIndexChanged (int))); - connect (profilelist, SIGNAL (highlighted (int)), - this, SLOT (slotItemHighlighted (int))); - load = new QPushButton (i18n ("Load"), profileframe); - save = new QPushButton (i18n ("Save"), profileframe); - del = new QPushButton (i18n ("Delete"), profileframe); + connect (profilelist, TQT_SIGNAL (selected (int)), + this, TQT_SLOT (slotIndexChanged (int))); + connect (profilelist, TQT_SIGNAL (highlighted (int)), + this, TQT_SLOT (slotItemHighlighted (int))); + load = new TQPushButton (i18n ("Load"), profileframe); + save = new TQPushButton (i18n ("Save"), profileframe); + del = new TQPushButton (i18n ("Delete"), profileframe); load->setEnabled (false); save->setEnabled (false); del->setEnabled (false); - connect (load, SIGNAL (clicked ()), this, SLOT (slotLoad ())); - connect (save, SIGNAL (clicked ()), this, SLOT (slotSave ())); - connect (del, SIGNAL (clicked ()), this, SLOT (slotDelete ())); - profileslayout->addWidget (profile, 0, 0); -#if (QT_VERSION < 0x030200) - profileslayout->addRowSpacing (4, 60); -#else - profileslayout->setRowSpacing (4, 60); -#endif - profileslayout->addMultiCellWidget (profilelist, 1, 4, 0, 0); - profileslayout->addWidget (load, 1, 1); - profileslayout->addWidget (save, 2, 1); - profileslayout->addWidget (del, 3, 1); - leftlayout->addWidget (profileframe); - startbutton = new QPushButton (i18n ("Start"), this); - serverled = new KLed (Qt::green, KLed::Off, KLed::Raised, KLed::Circular, this); - feedled = new KLed (Qt::green, KLed::Off, KLed::Raised, KLed::Circular, this); - ledlayout->addWidget (startbutton); - ledlayout->addItem (new QSpacerItem (0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum)); - ledlayout->addWidget (serverled); - ledlayout->addWidget (feedled); - leftlayout->addLayout (ledlayout); - QFrame * line = new QFrame (this); - line->setFrameShape (QFrame::HLine); - leftlayout->addWidget (line); - leftlayout->addWidget (label); - leftlayout->addWidget (accesslist); - leftlayout->addItem (new QSpacerItem (0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding)); - layout->addLayout (leftlayout); - line = new QFrame (this); - line->setFrameShape (QFrame::VLine); - layout->addWidget (line); - layout->addLayout (formatlayout); - layout->addItem (new QSpacerItem (0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding)); + connect (load, TQT_SIGNAL (clicked ()), this, TQT_SLOT (slotLoad ())); + connect (save, TQT_SIGNAL (clicked ()), this, TQT_SLOT (slotSave ())); + connect (del, TQT_SIGNAL (clicked ()), this, TQT_SLOT (slotDelete ())); + profilestqlayout->addWidget (profile, 0, 0); + profilestqlayout->setRowSpacing (4, 60); + profilestqlayout->addMultiCellWidget (profilelist, 1, 4, 0, 0); + profilestqlayout->addWidget (load, 1, 1); + profilestqlayout->addWidget (save, 2, 1); + profilestqlayout->addWidget (del, 3, 1); + lefttqlayout->addWidget (profileframe); + startbutton = new TQPushButton (i18n ("Start"), this); + serverled = new KLed (TQt::green, KLed::Off, KLed::Raised, KLed::Circular, this); + feedled = new KLed (TQt::green, KLed::Off, KLed::Raised, KLed::Circular, this); + ledtqlayout->addWidget (startbutton); + ledtqlayout->addItem (new TQSpacerItem (0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum)); + ledtqlayout->addWidget (serverled); + ledtqlayout->addWidget (feedled); + lefttqlayout->addLayout (ledtqlayout); + TQFrame * line = new TQFrame (this); + line->setFrameShape (TQFrame::HLine); + lefttqlayout->addWidget (line); + lefttqlayout->addWidget (label); + lefttqlayout->addWidget (accesslist); + lefttqlayout->addItem (new TQSpacerItem (0, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding)); + tqlayout->addLayout (lefttqlayout); + line = new TQFrame (this); + line->setFrameShape (TQFrame::VLine); + tqlayout->addWidget (line); + tqlayout->addLayout (formattqlayout); + tqlayout->addItem (new TQSpacerItem (0, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding)); } #undef ADDPROPERTY @@ -301,10 +297,10 @@ KDE_NO_EXPORT void KMPlayerPrefBroadcastFormatPage::setSettings (const FFServerS movieheight->setText (fs.height); accesslist->setNumRows (0); accesslist->setNumRows (50); - QStringList::const_iterator it = fs.acl.begin (); - QStringList::const_iterator end( fs.acl.end () ); + TQStringList::const_iterator it = fs.acl.begin (); + TQStringList::const_iterator end( fs.acl.end () ); for (int i = 0; it != end; ++i, ++it) - accesslist->setItem (i, 0, new QTableItem (accesslist, QTableItem::Always, *it)); + accesslist->setItem (i, 0, new TQTableItem (accesslist, TQTableItem::Always, *it)); } KDE_NO_EXPORT void KMPlayerPrefBroadcastFormatPage::getSettings (FFServerSetting & fs) { @@ -332,7 +328,7 @@ KDE_NO_EXPORT void KMPlayerPrefBroadcastFormatPage::slotIndexChanged (int index) setSettings (*profiles[index]); } -KDE_NO_EXPORT void KMPlayerPrefBroadcastFormatPage::slotTextChanged (const QString & txt) { +KDE_NO_EXPORT void KMPlayerPrefBroadcastFormatPage::slotTextChanged (const TQString & txt) { save->setEnabled (txt.length ()); } @@ -419,10 +415,10 @@ KDE_NO_CDTOR_EXPORT KMPlayerBroadcastConfig::~KMPlayerBroadcastConfig () { KDE_NO_EXPORT void KMPlayerBroadcastConfig::write (KConfig * config) { config->setGroup (strBroadcast); config->writeEntry (strFFServerCustomSetting, ffserversettings.list (), ';'); - QStringList sl; + TQStringList sl; for (int i = 0; i < (int) ffserversettingprofiles.size (); i++) { sl.push_back (ffserversettingprofiles[i]->name); - config->writeEntry (QString ("Profile_") + ffserversettingprofiles[i]->name, ffserversettingprofiles[i]->list(), ';'); + config->writeEntry (TQString ("Profile_") + ffserversettingprofiles[i]->name, ffserversettingprofiles[i]->list(), ';'); } config->writeEntry (strFFServerProfiles, sl, ';'); } @@ -432,11 +428,11 @@ KDE_NO_EXPORT void KMPlayerBroadcastConfig::read (KConfig * config) { ffserversettingprofiles.clear (); config->setGroup (strBroadcast); ffserversettings = config->readListEntry (strFFServerCustomSetting, ';'); - QStringList profiles = config->readListEntry (strFFServerProfiles, ';'); - QStringList::iterator pr_it = profiles.begin (); - QStringList::iterator pr_end( profiles.end () ); + TQStringList profiles = config->readListEntry (strFFServerProfiles, ';'); + TQStringList::iterator pr_it = profiles.begin (); + TQStringList::iterator pr_end( profiles.end () ); for (; pr_it != pr_end; ++pr_it) { - QStringList sl = config->readListEntry (QString ("Profile_") + *pr_it, ';'); + TQStringList sl = config->readListEntry (TQString ("Profile_") + *pr_it, ';'); if (sl.size () > 10) { FFServerSetting * ffs = new FFServerSetting (sl); ffs->name = *pr_it; @@ -450,21 +446,21 @@ KDE_NO_EXPORT void KMPlayerBroadcastConfig::sync (bool fromUI) { m_configpage->getSettings(ffserversettings); } else { m_configpage->setSettings (ffserversettings); - m_configpage->profile->setText (QString ()); + m_configpage->profile->setText (TQString ()); } } -KDE_NO_EXPORT void KMPlayerBroadcastConfig::prefLocation (QString & item, QString & icon, QString & tab) { +KDE_NO_EXPORT void KMPlayerBroadcastConfig::prefLocation (TQString & item, TQString & icon, TQString & tab) { item = i18n ("Broadcasting"); - icon = QString ("share"); + icon = TQString ("share"); tab = i18n ("Profiles"); } -QFrame * KMPlayerBroadcastConfig::prefPage (QWidget * parent) { +TQFrame * KMPlayerBroadcastConfig::prefPage (TQWidget * tqparent) { if (!m_configpage) { - m_configpage = new KMPlayerPrefBroadcastFormatPage (parent, ffserversettingprofiles); - connect (m_configpage->startbutton, SIGNAL (clicked ()), this, SLOT (startServer ())); - connect (m_player, SIGNAL (sourceChanged (KMPlayer::Source *, KMPlayer::Source *)), this, SLOT (sourceChanged (KMPlayer::Source *,KMPlayer::Source *))); + m_configpage = new KMPlayerPrefBroadcastFormatPage (tqparent, ffserversettingprofiles); + connect (m_configpage->startbutton, TQT_SIGNAL (clicked ()), this, TQT_SLOT (startServer ())); + connect (m_player, TQT_SIGNAL (sourceChanged (KMPlayer::Source *, KMPlayer::Source *)), this, TQT_SLOT (sourceChanged (KMPlayer::Source *,KMPlayer::Source *))); m_configpage->startbutton->setEnabled (!m_player->source ()->videoDevice ().isEmpty ()); } @@ -489,25 +485,25 @@ KDE_NO_EXPORT void KMPlayerBroadcastConfig::startServer () { stopServer (); return; } - m_configpage->setCursor (QCursor (Qt::WaitCursor)); + m_configpage->setCursor (TQCursor (TQt::WaitCursor)); m_ffserver_process = new KProcess; m_ffserver_process->setUseShell (true); - connect (m_ffserver_process, SIGNAL (processExited (KProcess *)), - this, SLOT (processStopped (KProcess *))); - QString conffile = locateLocal ("data", "kmplayer/ffserver.conf"); + connect (m_ffserver_process, TQT_SIGNAL (processExited (KProcess *)), + this, TQT_SLOT (processStopped (KProcess *))); + TQString conffile = locateLocal ("data", "kmplayer/ffserver.conf"); const char * noaudio = m_player->source ()->audioDevice ().isEmpty () ? "NoAudio" : ""; FFServerSetting ffs; m_configpage->getSettings (ffs); - QString acl; - QStringList::iterator it = ffs.acl.begin (); - QStringList::iterator end( ffs.acl.end () ); + TQString acl; + TQStringList::iterator it = ffs.acl.begin (); + TQStringList::iterator end( ffs.acl.end () ); for (; it != end; ++it) - acl += QString ("ACL allow ") + *it + QString ("\n"); + acl += TQString ("ACL allow ") + *it + TQString ("\n"); unlink (m_ffserverconfig->feedfile.ascii ()); - QFile qfile (conffile); + TQFile qfile (conffile); qfile.open (IO_WriteOnly); - QString configdata; - QString buf; + TQString configdata; + TQString buf; configdata.sprintf (ffserverconf, m_ffserverconfig->ffserverport, m_ffserverconfig->bindaddress.ascii (), m_ffserverconfig->maxclients, m_ffserverconfig->maxbandwidth, m_ffserverconfig->feedfile.ascii (), m_ffserverconfig->feedfilesize, ffs.format.ascii (), acl.ascii (), ffs.ffconfig (buf).ascii (), noaudio); qfile.writeBlock (configdata.ascii (), configdata.length ()); qfile.close (); @@ -516,15 +512,15 @@ KDE_NO_EXPORT void KMPlayerBroadcastConfig::startServer () { *m_ffserver_process << "ffserver -f " << conffile; m_ffserver_out.truncate (0); connect (m_ffserver_process, - SIGNAL (receivedStderr (KProcess *, char *, int)), - this, SLOT (processOutput (KProcess *, char *, int))); + TQT_SIGNAL (receivedStderr (KProcess *, char *, int)), + this, TQT_SLOT (processOutput (KProcess *, char *, int))); m_ffserver_process->start (KProcess::NotifyOnExit, KProcess::Stderr); if (m_ffserver_process->isRunning ()) { m_configpage->startbutton->setText (i18n ("Stop")); m_configpage->serverled->setState (KLed::On); emit broadcastStarted (); } - QTimer::singleShot (500, this, SLOT (startFeed ())); + TQTimer::singleShot (500, this, TQT_SLOT (startFeed ())); } KDE_NO_EXPORT void KMPlayerBroadcastConfig::stopServer () { @@ -537,7 +533,7 @@ KDE_NO_EXPORT void KMPlayerBroadcastConfig::stopServer () { KDE_NO_EXPORT void KMPlayerBroadcastConfig::processOutput (KProcess * p, char * s, int) { if (p == m_ffserver_process) - m_ffserver_out += QString (s); + m_ffserver_out += TQString (s); } KDE_NO_EXPORT void KMPlayerBroadcastConfig::startFeed () { @@ -547,18 +543,18 @@ KDE_NO_EXPORT void KMPlayerBroadcastConfig::startFeed () { } FFServerSetting ffs; m_configpage->getSettings (ffs); - QString ffurl; + TQString ffurl; if (!m_ffserver_process || !m_ffserver_process->isRunning ()) { KMessageBox::error (m_configpage, i18n ("Failed to start ffserver.\n") + m_ffserver_out, i18n ("Error")); goto bail_out; } - disconnect (m_ffserver_process, SIGNAL (receivedStderr (KProcess *, char *, int)), - this, SLOT (processOutput (KProcess *, char *, int))); + disconnect (m_ffserver_process, TQT_SIGNAL (receivedStderr (KProcess *, char *, int)), + this, TQT_SLOT (processOutput (KProcess *, char *, int))); if (m_ffmpeg_process) m_ffmpeg_process->stop (); delete m_ffmpeg_process; m_ffmpeg_process = new KMPlayer::FFMpeg (m_player, m_player->settings ()); - connect (m_ffmpeg_process, SIGNAL (stateChange (KMPlayer::Process::State, KMPlayer::Process::State)), this, SLOT (stateChange (KMPlayer::Process::State, KMPlayer::Process::State))); + connect (m_ffmpeg_process, TQT_SIGNAL (stateChange (KMPlayer::Process::State, KMPlayer::Process::State)), this, TQT_SLOT (stateChange (KMPlayer::Process::State, KMPlayer::Process::State))); ffurl.sprintf ("http://localhost:%d/kmplayer.ffm", m_ffserverconfig->ffserverport); m_ffmpeg_process->setURL (KURL(ffurl)); if (!m_ffmpeg_process->play (m_player->source (), KMPlayer::NodePtr())) { @@ -574,7 +570,7 @@ KDE_NO_EXPORT void KMPlayerBroadcastConfig::startFeed () { } else stopServer (); bail_out: - m_configpage->setCursor (QCursor (Qt::ArrowCursor)); + m_configpage->setCursor (TQCursor (TQt::ArrowCursor)); } KDE_NO_EXPORT void KMPlayerBroadcastConfig::stateChange (KMPlayer::Process::State old, KMPlayer::Process::State state) { @@ -586,8 +582,8 @@ KDE_NO_EXPORT void KMPlayerBroadcastConfig::stateChange (KMPlayer::Process::Stat kdDebug () << "ffmpeg process stopped " << m_endserver << endl; if (m_endserver && !stopProcess (m_ffserver_process)) { disconnect (m_ffserver_process, - SIGNAL (receivedStderr (KProcess *, char *, int)), - this, SLOT (processOutput (KProcess *, char *, int))); + TQT_SIGNAL (receivedStderr (KProcess *, char *, int)), + this, TQT_SLOT (processOutput (KProcess *, char *, int))); KMessageBox::error (m_configpage, i18n ("Failed to end ffserver process."), i18n ("Error")); processStopped (0L); } @@ -646,23 +642,23 @@ KDE_NO_EXPORT void KMPlayerFFServerConfig::sync (bool fromUI) { feedfilesize = m_configpage->feedfilesize->text ().toInt(); } else { m_configpage->bindaddress->setText (bindaddress); - m_configpage->port->setText (QString::number (ffserverport)); - m_configpage->maxclients->setText (QString::number (maxclients)); - m_configpage->maxbandwidth->setText (QString::number (maxbandwidth)); + m_configpage->port->setText (TQString::number (ffserverport)); + m_configpage->maxclients->setText (TQString::number (maxclients)); + m_configpage->maxbandwidth->setText (TQString::number (maxbandwidth)); m_configpage->feedfile->setText (feedfile); - m_configpage->feedfilesize->setText (QString::number (feedfilesize)); + m_configpage->feedfilesize->setText (TQString::number (feedfilesize)); } } -KDE_NO_EXPORT void KMPlayerFFServerConfig::prefLocation (QString & item, QString & icon, QString & tab) { +KDE_NO_EXPORT void KMPlayerFFServerConfig::prefLocation (TQString & item, TQString & icon, TQString & tab) { item = i18n ("Broadcasting"); - icon = QString ("share"); + icon = TQString ("share"); tab = i18n ("FFServer"); } -KDE_NO_EXPORT QFrame *KMPlayerFFServerConfig::prefPage (QWidget * parent) { +KDE_NO_EXPORT TQFrame *KMPlayerFFServerConfig::prefPage (TQWidget * tqparent) { if (!m_configpage) - m_configpage = new KMPlayerPrefBroadcastPage (parent); + m_configpage = new KMPlayerPrefBroadcastPage (tqparent); return m_configpage; } diff --git a/src/kmplayerbroadcast.h b/src/kmplayerbroadcast.h index 2b763db..fbd40a2 100644 --- a/src/kmplayerbroadcast.h +++ b/src/kmplayerbroadcast.h @@ -23,8 +23,8 @@ #include #include -#include -#include +#include +#include #include "kmplayerappsource.h" #include "kmplayerprocess.h" @@ -32,11 +32,11 @@ class KMPlayerPrefBroadcastPage; // broadcast class KMPlayerPrefBroadcastFormatPage; // broadcast format -class QListBox; -class QComboBox; -class QLineEdit; -class QTable; -class QPushButton; +class TQListBox; +class TQComboBox; +class TQLineEdit; +class TQTable; +class TQPushButton; class KLed; namespace KMPlayer { @@ -46,66 +46,68 @@ namespace KMPlayer { class KMPLAYER_NO_EXPORT FFServerSetting { public: KDE_NO_CDTOR_EXPORT FFServerSetting () {} - FFServerSetting (int i, const QString & n, const QString & f, const QString & ac, int abr, int asr, const QString & vc, int vbr, int q, int fr, int gs, int w, int h); - KDE_NO_CDTOR_EXPORT FFServerSetting (const QStringList & sl) { *this = sl; } + FFServerSetting (int i, const TQString & n, const TQString & f, const TQString & ac, int abr, int asr, const TQString & vc, int vbr, int q, int fr, int gs, int w, int h); + KDE_NO_CDTOR_EXPORT FFServerSetting (const TQStringList & sl) { *this = sl; } KDE_NO_CDTOR_EXPORT ~FFServerSetting () {} int index; - QString name; - QString format; - QString audiocodec; - QString audiobitrate; - QString audiosamplerate; - QString videocodec; - QString videobitrate; - QString quality; - QString framerate; - QString gopsize; - QString width; - QString height; - QStringList acl; - FFServerSetting & operator = (const QStringList &); + TQString name; + TQString format; + TQString audiocodec; + TQString audiobitrate; + TQString audiosamplerate; + TQString videocodec; + TQString videobitrate; + TQString quality; + TQString framerate; + TQString gopsize; + TQString width; + TQString height; + TQStringList acl; + FFServerSetting & operator = (const TQStringList &); FFServerSetting & operator = (const FFServerSetting & fs); - const QStringList list (); - QString & ffconfig (QString & buf); + const TQStringList list (); + TQString & ffconfig (TQString & buf); }; typedef std::vector FFServerSettingList; -class KMPLAYER_NO_EXPORT KMPlayerPrefBroadcastPage : public QFrame { +class KMPLAYER_NO_EXPORT KMPlayerPrefBroadcastPage : public TQFrame { Q_OBJECT + TQ_OBJECT public: - KMPlayerPrefBroadcastPage (QWidget * parent); + KMPlayerPrefBroadcastPage (TQWidget * tqparent); KDE_NO_CDTOR_EXPORT ~KMPlayerPrefBroadcastPage () {} - QLineEdit * bindaddress; - QLineEdit * port; - QLineEdit * maxclients; - QLineEdit * maxbandwidth; - QLineEdit * feedfile; - QLineEdit * feedfilesize; + TQLineEdit * bindaddress; + TQLineEdit * port; + TQLineEdit * maxclients; + TQLineEdit * maxbandwidth; + TQLineEdit * feedfile; + TQLineEdit * feedfilesize; }; -class KMPLAYER_NO_EXPORT KMPlayerPrefBroadcastFormatPage : public QFrame { +class KMPLAYER_NO_EXPORT KMPlayerPrefBroadcastFormatPage : public TQFrame { Q_OBJECT + TQ_OBJECT public: - KMPlayerPrefBroadcastFormatPage (QWidget * parent, FFServerSettingList &); + KMPlayerPrefBroadcastFormatPage (TQWidget * tqparent, FFServerSettingList &); KDE_NO_CDTOR_EXPORT ~KMPlayerPrefBroadcastFormatPage () {} - QListBox * profilelist; - QComboBox * format; - QLineEdit * audiocodec; - QLineEdit * audiobitrate; - QLineEdit * audiosamplerate; - QLineEdit * videocodec; - QLineEdit * videobitrate; - QLineEdit * quality; - QLineEdit * framerate; - QLineEdit * gopsize; - QLineEdit * moviewidth; - QLineEdit * movieheight; - QLineEdit * profile; - QPushButton * startbutton; + TQListBox * profilelist; + TQComboBox * format; + TQLineEdit * audiocodec; + TQLineEdit * audiobitrate; + TQLineEdit * audiosamplerate; + TQLineEdit * videocodec; + TQLineEdit * videobitrate; + TQLineEdit * quality; + TQLineEdit * framerate; + TQLineEdit * gopsize; + TQLineEdit * moviewidth; + TQLineEdit * movieheight; + TQLineEdit * profile; + TQPushButton * startbutton; KLed * serverled; KLed * feedled; void setSettings (const FFServerSetting &); @@ -113,15 +115,15 @@ public: private slots: void slotIndexChanged (int index); void slotItemHighlighted (int index); - void slotTextChanged (const QString &); + void slotTextChanged (const TQString &); void slotLoad (); void slotSave (); void slotDelete (); private: - QTable * accesslist; - QPushButton * load; - QPushButton * save; - QPushButton * del; + TQTable * accesslist; + TQPushButton * load; + TQPushButton * save; + TQPushButton * del; FFServerSettingList & profiles; }; @@ -136,23 +138,24 @@ public: virtual void write (KConfig *); virtual void read (KConfig *); virtual void sync (bool fromUI); - virtual void prefLocation (QString & item, QString & icon, QString & tab); - virtual QFrame * prefPage (QWidget * parent); + virtual void prefLocation (TQString & item, TQString & icon, TQString & tab); + virtual TQFrame * prefPage (TQWidget * tqparent); int ffserverport; int maxclients; int maxbandwidth; - QString feedfile; + TQString feedfile; int feedfilesize; - QString bindaddress; + TQString bindaddress; private: - QGuardedPtr m_configpage; + TQGuardedPtr m_configpage; }; /* * Preference page for ffserver */ -class KMPLAYER_NO_EXPORT KMPlayerBroadcastConfig : public QObject, public KMPlayer::PreferencesPage { +class KMPLAYER_NO_EXPORT KMPlayerBroadcastConfig : public TQObject, public KMPlayer::PreferencesPage { Q_OBJECT + TQ_OBJECT public: KMPlayerBroadcastConfig (KMPlayer::PartBase * player, KMPlayerFFServerConfig * fsc); KDE_NO_CDTOR_EXPORT ~KMPlayerBroadcastConfig (); @@ -160,12 +163,12 @@ public: virtual void write (KConfig *); virtual void read (KConfig *); virtual void sync (bool fromUI); - virtual void prefLocation (QString & item, QString & icon, QString & tab); - virtual QFrame * prefPage (QWidget * parent); + virtual void prefLocation (TQString & item, TQString & icon, TQString & tab); + virtual TQFrame * prefPage (TQWidget * tqparent); bool broadcasting () const; void stopServer (); - KDE_NO_EXPORT const QString & serverURL () const { return m_ffserver_url; } + KDE_NO_EXPORT const TQString & serverURL () const { return m_ffserver_url; } FFServerSetting ffserversettings; FFServerSettingList ffserversettingprofiles; @@ -182,12 +185,12 @@ private slots: private: KMPlayer::PartBase * m_player; KMPlayerFFServerConfig * m_ffserverconfig; - QGuardedPtr m_configpage; + TQGuardedPtr m_configpage; KMPlayer::FFMpeg * m_ffmpeg_process; KProcess * m_ffserver_process; bool m_endserver; - QString m_ffserver_out; - QString m_ffserver_url; + TQString m_ffserver_out; + TQString m_ffserver_url; }; diff --git a/src/kmplayerconfig.cpp b/src/kmplayerconfig.cpp index bbc13b1..0bdaa5c 100644 --- a/src/kmplayerconfig.cpp +++ b/src/kmplayerconfig.cpp @@ -19,16 +19,16 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -65,7 +65,7 @@ static OutputDriver _ads[] = { { "alsa5", i18n ("Advanced Linux Sound Architecture v0.5") }, { "alsa9", i18n ("Advanced Linux Sound Architecture v0.9") }, { "", i18n ("Use back-end defaults") }, - { 0, QString () } + { 0, TQString () } }; static OutputDriver _vds [] = { @@ -77,7 +77,7 @@ static OutputDriver _vds [] = { { "gl", i18n ("OpenGL") }, { "gl2", i18n ("OpenGL MT") }, { "xv", i18n ("XVideo") }, - { 0, QString () } + { 0, TQString () } }; static const int ADRIVER_ARTS_INDEX = 4; @@ -98,16 +98,16 @@ KDE_NO_CDTOR_EXPORT Settings::Settings (PartBase * player, KConfig * config) colors [ColorSetting::playlist_active].option = "PlaylistActive"; colors [ColorSetting::playlist_active].color = KGlobalSettings::linkColor(); colors [ColorSetting::console_background].option = "ConsoleBackground"; - colors [ColorSetting::console_background].color = QColor (0, 0, 0); + colors [ColorSetting::console_background].color = TQColor (0, 0, 0); colors [ColorSetting::console_foreground].title = i18n ("Console foreground"); colors [ColorSetting::console_foreground].option = "ConsoleForeground"; - colors [ColorSetting::console_foreground].color = QColor (0xB2, 0xB2, 0xB2); + colors [ColorSetting::console_foreground].color = TQColor (0xB2, 0xB2, 0xB2); colors [ColorSetting::video_background].title = i18n ("Video background"); colors [ColorSetting::video_background].option = "VideoBackground"; - colors [ColorSetting::video_background].color = QColor (0, 0, 0); + colors [ColorSetting::video_background].color = TQColor (0, 0, 0); colors [ColorSetting::area_background].title = i18n ("Viewing area background"); colors [ColorSetting::area_background].option = "ViewingAreaBackground"; - colors [ColorSetting::area_background].color = QColor (0, 0, 0); + colors [ColorSetting::area_background].color = TQColor (0, 0, 0); colors [ColorSetting::infowindow_background].title = i18n ("Info window background"); colors [ColorSetting::infowindow_background].option ="InfoWindowBackground"; colors [ColorSetting::infowindow_background].color = KGlobalSettings::baseColor (); @@ -223,7 +223,7 @@ KDE_NO_EXPORT void Settings::applyColorSetting (bool only_changed_ones) { view->playList()->setActiveForegroundColor (colors[i].color); break; case ColorSetting::console_background: - view->console()->setPaper (QBrush (colors[i].color)); + view->console()->setPaper (TQBrush (colors[i].color)); break; case ColorSetting::console_foreground: view->console()->setColor(colors[i].color); @@ -235,7 +235,7 @@ KDE_NO_EXPORT void Settings::applyColorSetting (bool only_changed_ones) { view->viewArea()->setPaletteBackgroundColor(colors[i].color); break; case ColorSetting::infowindow_background: - view->infoPanel ()->setPaper (QBrush (colors[i].color)); + view->infoPanel ()->setPaper (TQBrush (colors[i].color)); break; case ColorSetting::infowindow_foreground: view->infoPanel()->setPaletteForegroundColor(colors[i].color); @@ -277,8 +277,8 @@ KDE_NO_EXPORT void Settings::readConfig () { brightness = m_config->readNumEntry (strBrightness, 0); hue = m_config->readNumEntry (strHue, 0); saturation = m_config->readNumEntry (strSaturation, 0); - const QMap ::const_iterator e = m_player->sources ().end (); - QMap ::const_iterator i = m_player->sources().begin (); + const TQMap ::const_iterator e = m_player->sources ().end (); + TQMap ::const_iterator i = m_player->sources().begin (); for (; i != e; ++i) backends[i.data()->name ()] = m_config->readEntry (i.data()->name ()); for (int i = 0; i < int (ColorSetting::last_target); i++) @@ -311,7 +311,7 @@ KDE_NO_EXPORT void Settings::readConfig () { m_config->setGroup (strRecordingGroup); mencoderarguments = m_config->readEntry (strMencoderArgs, "-oac mp3lame -ovc lavc"); ffmpegarguments = m_config->readEntry (strFFMpegArgs, "-f avi -acodec mp3 -vcodec mpeg4"); - recordfile = m_config->readPathEntry(strRecordingFile, QDir::homeDirPath () + "/record.avi"); + recordfile = m_config->readPathEntry(strRecordingFile, TQDir::homeDirPath () + "/record.avi"); recorder = Recorder (m_config->readNumEntry (strRecorder, int (MEncoder))); replayoption = ReplayOption (m_config->readNumEntry (strAutoPlayAfterRecording, ReplayFinished)); replaytime = m_config->readNumEntry (strAutoPlayAfterTime, 60); @@ -363,15 +363,15 @@ KDE_NO_EXPORT bool Settings::createDialog () { for (PartBase::ProcessMap::const_iterator i = m_player->players ().begin(); i != e; ++i) { Process * p = i.data (); if (p->supports ("urlsource")) - configdialog->m_SourcePageURL->backend->insertItem (p->menuName ().remove (QChar ('&')), id++); + configdialog->m_SourcePageURL->backend->insertItem (p->menuName ().remove (TQChar ('&')), id++); } - connect (configdialog, SIGNAL (okClicked ()), - this, SLOT (okPressed ())); - connect (configdialog, SIGNAL (applyClicked ()), - this, SLOT (okPressed ())); + connect (configdialog, TQT_SIGNAL (okClicked ()), + this, TQT_SLOT (okPressed ())); + connect (configdialog, TQT_SIGNAL (applyClicked ()), + this, TQT_SLOT (okPressed ())); if (KApplication::kApplication()) - connect (configdialog, SIGNAL (helpClicked ()), - this, SLOT (getHelp ())); + connect (configdialog, TQT_SIGNAL (helpClicked ()), + this, TQT_SLOT (getHelp ())); return true; } @@ -429,18 +429,18 @@ void Settings::show (const char * pagename) { configdialog->m_SourcePageURL->sub_urllist->insertStringList (sub_urllist); configdialog->m_SourcePageURL->sub_urllist->setCurrentText (m_player->source ()->subUrl ().prettyURL ()); configdialog->m_SourcePageURL->changed = false; - configdialog->m_SourcePageURL->prefBitRate->setText (QString::number (prefbitrate)); - configdialog->m_SourcePageURL->maxBitRate->setText (QString::number (maxbitrate)); + configdialog->m_SourcePageURL->prefBitRate->setText (TQString::number (prefbitrate)); + configdialog->m_SourcePageURL->maxBitRate->setText (TQString::number (maxbitrate)); configdialog->m_GeneralPageOutput->videoDriver->setCurrentItem (videodriver); configdialog->m_GeneralPageOutput->audioDriver->setCurrentItem (audiodriver); - configdialog->m_SourcePageURL->backend->setCurrentItem (configdialog->m_SourcePageURL->backend->findItem (backends["urlsource"])); + configdialog->m_SourcePageURL->backend->setCurrentItem (configdialog->m_SourcePageURL->backend->tqfindItem (backends["urlsource"])); int id = 0; const PartBase::ProcessMap::const_iterator e = m_player->players ().end (); for (PartBase::ProcessMap::const_iterator i = m_player->players ().begin(); i != e; ++i) { Process * p = i.data (); if (p->supports ("urlsource")) { - if (backends["urlsource"] == QString (p->name())) + if (backends["urlsource"] == TQString (p->name())) configdialog->m_SourcePageURL->backend->setCurrentItem (id); id++; } @@ -484,7 +484,7 @@ void Settings::show (const char * pagename) { configdialog->m_RecordPage->recorder->setButton (int (recorder)); configdialog->m_RecordPage->replayClicked (int (replayoption)); configdialog->m_RecordPage->recorderClicked (int (recorder)); - configdialog->m_RecordPage->replaytime->setText (QString::number (replaytime)); + configdialog->m_RecordPage->replaytime->setText (TQString::number (replaytime)); configdialog->m_MEncoderPage->arguments->setText (mencoderarguments); configdialog->m_MEncoderPage->format->setButton (recordcopy ? 0 : 1); configdialog->m_MEncoderPage->formatClicked (recordcopy ? 0 : 1); @@ -497,7 +497,7 @@ void Settings::show (const char * pagename) { if (pagename) configDialog ()->setPage (pagename); if (created) - configdialog->resize (configdialog->minimumSize ()); + configdialog->resize (configdialog->tqminimumSize ()); configdialog->show (); } @@ -512,8 +512,8 @@ void Settings::writeConfig () { m_config->writeEntry (strBrightness, brightness); m_config->writeEntry (strHue, hue); m_config->writeEntry (strSaturation, saturation); - const QMap::iterator b_end = backends.end (); - for (QMap::iterator i = backends.begin(); i != b_end; ++i) + const TQMap::iterator b_end = backends.end (); + for (TQMap::iterator i = backends.begin(); i != b_end; ++i) m_config->writeEntry (i.key (), i.data ()); for (int i = 0; i < int (ColorSetting::last_target); i++) m_config->writeEntry (colors[i].option, colors[i].color); @@ -598,13 +598,13 @@ void Settings::okPressed () { else { if (KURL::fromPathOrURL (configdialog->m_SourcePageURL->url->url ()).isLocalFile () || KURL::isRelativeURL (configdialog->m_SourcePageURL->url->url ())) { - QFileInfo fi (configdialog->m_SourcePageURL->url->url ()); - int hpos = configdialog->m_SourcePageURL->url->url ().findRev ('#'); - QString xine_directives (""); + TQFileInfo fi (configdialog->m_SourcePageURL->url->url ()); + int hpos = configdialog->m_SourcePageURL->url->url ().tqfindRev ('#'); + TQString xine_directives (""); while (!fi.exists () && hpos > -1) { xine_directives = configdialog->m_SourcePageURL->url->url ().mid (hpos); fi.setFile (configdialog->m_SourcePageURL->url->url ().left (hpos)); - hpos = configdialog->m_SourcePageURL->url->url ().findRev ('#', hpos-1); + hpos = configdialog->m_SourcePageURL->url->url ().tqfindRev ('#', hpos-1); } if (!fi.exists ()) { urlchanged = false; @@ -616,10 +616,10 @@ void Settings::okPressed () { !configdialog->m_SourcePageURL->sub_url->url ().isEmpty () && (KURL::fromPathOrURL (configdialog->m_SourcePageURL->sub_url->url ()).isLocalFile () || KURL::isRelativeURL (configdialog->m_SourcePageURL->sub_url->url ()))) { - QFileInfo sfi (configdialog->m_SourcePageURL->sub_url->url ()); + TQFileInfo sfi (configdialog->m_SourcePageURL->sub_url->url ()); if (!sfi.exists ()) { KMessageBox::error (m_player->view (), i18n ("Sub title file %1 does not exist.").arg (configdialog->m_SourcePageURL->sub_url->url ()), i18n ("Error")); - configdialog->m_SourcePageURL->sub_url->setURL (QString ()); + configdialog->m_SourcePageURL->sub_url->setURL (TQString ()); } else configdialog->m_SourcePageURL->sub_url->setURL (sfi.absFilePath ()); } @@ -628,10 +628,10 @@ void Settings::okPressed () { if (urlchanged) { KURL url = KURL::fromPathOrURL (configdialog->m_SourcePageURL->url->url ()); m_player->setURL (url); - if (urllist.find (url.prettyURL ()) == urllist.end ()) + if (urllist.tqfind (url.prettyURL ()) == urllist.end ()) configdialog->m_SourcePageURL->urllist->insertItem (url.prettyURL (), 0); KURL sub_url = KURL::fromPathOrURL (configdialog->m_SourcePageURL->sub_url->url ()); - if (sub_urllist.find (sub_url.prettyURL ()) == sub_urllist.end ()) + if (sub_urllist.tqfind (sub_url.prettyURL ()) == sub_urllist.end ()) configdialog->m_SourcePageURL->sub_urllist->insertItem (sub_url.prettyURL (), 0); } urllist.clear (); @@ -709,21 +709,13 @@ void Settings::okPressed () { pp_med_int = configdialog->m_OPPagePostproc->MedianDeinterlacer->isChecked(); pp_ffmpeg_int = configdialog->m_OPPagePostproc->FfmpegDeinterlacer->isChecked(); // recording -#if (QT_VERSION < 0x030200) - recorder = Recorder (configdialog->m_RecordPage->recorder->id (configdialog->m_RecordPage->recorder->selected ())); -#else recorder = Recorder (configdialog->m_RecordPage->recorder->selectedId ()); -#endif replaytime = configdialog->m_RecordPage->replaytime->text ().toInt (); - configdialog->m_RecordPage->replaytime->setText (QString::number (replaytime)); + configdialog->m_RecordPage->replaytime->setText (TQString::number (replaytime)); recordfile = configdialog->m_RecordPage->url->lineEdit()->text (); mencoderarguments = configdialog->m_MEncoderPage->arguments->text (); ffmpegarguments = configdialog->m_FFMpegPage->arguments->text (); -#if (QT_VERSION < 0x030200) - recordcopy = !configdialog->m_MEncoderPage->format->id (configdialog->m_MEncoderPage->format->selected ()); -#else recordcopy = !configdialog->m_MEncoderPage->format->selectedId (); -#endif //dynamic stuff for (PreferencesPage * p = pagelist; p; p = p->next) diff --git a/src/kmplayerconfig.h b/src/kmplayerconfig.h index 784c1c6..4520903 100644 --- a/src/kmplayerconfig.h +++ b/src/kmplayerconfig.h @@ -23,9 +23,9 @@ #include #endif -#include -#include -#include +#include +#include +#include #include @@ -40,15 +40,15 @@ class View; class OutputDriver { public: const char * driver; - const QString description; + const TQString description; }; class ColorSetting { public: - QString title; - QString option; - QColor color; - QColor newcolor; + TQString title; + TQString option; + TQColor color; + TQColor newcolor; enum Target { playlist_background = 0, playlist_foreground, playlist_active, console_background, console_foreground, @@ -60,10 +60,10 @@ public: class FontSetting { public: - QString title; - QString option; // for ini file - QFont font; - QFont newfont; + TQString title; + TQString option; // for ini file + TQFont font; + TQFont newfont; enum Target { playlist, infowindow, last_target } target; @@ -85,16 +85,17 @@ public: virtual void write (KConfig *) = 0; virtual void read (KConfig *) = 0; virtual void sync (bool fromUI) = 0; - virtual void prefLocation (QString & item, QString & icon, QString & tab) = 0; - virtual QFrame * prefPage (QWidget * parent) = 0; + virtual void prefLocation (TQString & item, TQString & icon, TQString & tab) = 0; + virtual TQFrame * prefPage (TQWidget * tqparent) = 0; PreferencesPage * next; }; /* * Class for storing all actual settings and reading/writing them */ -class KMPLAYER_EXPORT Settings : public QObject { +class KMPLAYER_EXPORT Settings : public TQObject { Q_OBJECT + TQ_OBJECT public: Settings (PartBase *, KConfig * part); ~Settings (); @@ -107,8 +108,8 @@ public: View * defaultView (); KConfig * kconfig () { return m_config; } - QStringList urllist; - QStringList sub_urllist; + TQStringList urllist; + TQStringList sub_urllist; int volume; int contrast; int brightness; @@ -171,9 +172,9 @@ public: enum ReplayOption { ReplayNo = 0, ReplayFinished, ReplayAfter }; ReplayOption replayoption; int replaytime; - QString mencoderarguments; - QString ffmpegarguments; - QString recordfile; + TQString mencoderarguments; + TQString ffmpegarguments; + TQString recordfile; int seektime; int videodriver; int audiodriver; @@ -181,9 +182,9 @@ public: OutputDriver * videodrivers; ColorSetting colors [ColorSetting::last_target]; FontSetting fonts [FontSetting::last_target]; - QString dvddevice; - QString vcddevice; - QMap backends; + TQString dvddevice; + TQString vcddevice; + TQMap backends; PreferencesPage * pagelist; signals: void configChanged (); diff --git a/src/kmplayercontrolpanel.cpp b/src/kmplayercontrolpanel.cpp index ce5d617..7f9a171 100644 --- a/src/kmplayercontrolpanel.cpp +++ b/src/kmplayercontrolpanel.cpp @@ -16,13 +16,13 @@ * Boston, MA 02110-1301, USA. **/ -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -255,46 +255,46 @@ static const char * blue_xpm[] = { //----------------------------------------------------------------------------- -static QPushButton * ctrlButton (QWidget * w, QBoxLayout * l, const char ** p, int key = 0) { - QPushButton * b = new QPushButton (QIconSet (QPixmap(p)), QString (), w); - b->setFocusPolicy (QWidget::NoFocus); +static TQPushButton * ctrlButton (TQWidget * w, TQBoxLayout * l, const char ** p, int key = 0) { + TQPushButton * b = new TQPushButton (TQIconSet (TQPixmap(p)), TQString (), w); + b->setFocusPolicy (TQ_NoFocus); b->setFlat (true); if (key) - b->setAccel (QKeySequence (key)); + b->setAccel (TQKeySequence (key)); l->addWidget (b); return b; } KDE_NO_CDTOR_EXPORT -KMPlayerMenuButton::KMPlayerMenuButton (QWidget * parent, QBoxLayout * l, const char ** p, int key) - : QPushButton (QIconSet (QPixmap(p)), QString (), parent, "kde_kmplayer_control_button") { - setFocusPolicy (QWidget::NoFocus); +KMPlayerMenuButton::KMPlayerMenuButton (TQWidget * tqparent, TQBoxLayout * l, const char ** p, int key) + : TQPushButton (TQIconSet (TQPixmap(p)), TQString (), tqparent, "kde_kmplayer_control_button") { + setFocusPolicy (TQ_NoFocus); setFlat (true); if (key) - setAccel (QKeySequence (key)); + setAccel (TQKeySequence (key)); l->addWidget (this); } -KDE_NO_EXPORT void KMPlayerMenuButton::enterEvent (QEvent *) { +KDE_NO_EXPORT void KMPlayerMenuButton::enterEvent (TQEvent *) { emit mouseEntered (); } //----------------------------------------------------------------------------- -KDE_NO_CDTOR_EXPORT KMPlayerPopupMenu::KMPlayerPopupMenu (QWidget * parent) - : KPopupMenu (parent, "kde_kmplayer_popupmenu") {} +KDE_NO_CDTOR_EXPORT KMPlayerPopupMenu::KMPlayerPopupMenu (TQWidget * tqparent) + : KPopupMenu (tqparent, "kde_kmplayer_popupmenu") {} -KDE_NO_EXPORT void KMPlayerPopupMenu::leaveEvent (QEvent *) { +KDE_NO_EXPORT void KMPlayerPopupMenu::leaveEvent (TQEvent *) { emit mouseLeft (); } //----------------------------------------------------------------------------- -KDE_NO_CDTOR_EXPORT VolumeBar::VolumeBar (QWidget * parent, View * view) - : QWidget (parent), m_view (view), m_value (100) { - setSizePolicy( QSizePolicy (QSizePolicy::Minimum, QSizePolicy::Fixed)); - setMinimumSize (QSize (51, button_height_only_buttons + 2)); - QToolTip::add (this, i18n ("Volume is %1").arg (m_value)); +KDE_NO_CDTOR_EXPORT VolumeBar::VolumeBar (TQWidget * tqparent, View * view) + : TQWidget (tqparent), m_view (view), m_value (100) { + tqsetSizePolicy( TQSizePolicy (TQSizePolicy::Minimum, TQSizePolicy::Fixed)); + setMinimumSize (TQSize (51, button_height_only_buttons + 2)); + TQToolTip::add (this, i18n ("Volume is %1").arg (m_value)); } KDE_NO_CDTOR_EXPORT VolumeBar::~VolumeBar () { @@ -304,22 +304,22 @@ void VolumeBar::setValue (int v) { m_value = v; if (m_value < 0) m_value = 0; if (m_value > 100) m_value = 100; - QToolTip::remove (this); - QToolTip::add (this, i18n ("Volume is %1").arg (m_value)); - repaint (true); + TQToolTip::remove (this); + TQToolTip::add (this, i18n ("Volume is %1").arg (m_value)); + tqrepaint (true); emit volumeChanged (m_value); } -void VolumeBar::wheelEvent (QWheelEvent * e) { +void VolumeBar::wheelEvent (TQWheelEvent * e) { setValue (m_value + (e->delta () > 0 ? 2 : -2)); e->accept (); } -void VolumeBar::paintEvent (QPaintEvent * e) { - QWidget::paintEvent (e); - QPainter p; +void VolumeBar::paintEvent (TQPaintEvent * e) { + TQWidget::paintEvent (e); + TQPainter p; p.begin (this); - QColor color = paletteForegroundColor (); + TQColor color = paletteForegroundColor (); p.setPen (color); int w = width () - 6; int vx = m_value * w / 100; @@ -329,20 +329,20 @@ void VolumeBar::paintEvent (QPaintEvent * e) { //kdDebug () << "w=" << w << " vx=" << vx << endl; } -void VolumeBar::mousePressEvent (QMouseEvent * e) { +void VolumeBar::mousePressEvent (TQMouseEvent * e) { setValue (100 * (e->x () - 3) / (width () - 6)); e->accept (); } -void VolumeBar::mouseMoveEvent (QMouseEvent * e) { +void VolumeBar::mouseMoveEvent (TQMouseEvent * e) { setValue (100 * (e->x () - 3) / (width () - 6)); e->accept (); } //----------------------------------------------------------------------------- -KDE_NO_CDTOR_EXPORT ControlPanel::ControlPanel(QWidget * parent, View * view) - : QWidget (parent), +KDE_NO_CDTOR_EXPORT ControlPanel::ControlPanel(TQWidget * tqparent, View * view) + : TQWidget (tqparent), m_progress_mode (progress_playing), m_progress_length (0), m_popup_timer (0), @@ -350,17 +350,17 @@ KDE_NO_CDTOR_EXPORT ControlPanel::ControlPanel(QWidget * parent, View * view) m_view (view), m_auto_controls (true), m_popup_clicked (false) { - m_buttonbox = new QHBoxLayout (this, 5, 4); - QColor c = paletteForegroundColor (); - strncpy (xpm_fg_color, QString().sprintf(". c #%02x%02x%02x", c.red(), c.green(),c.blue()).ascii(), 31); + m_buttonbox = new TQHBoxLayout (this, 5, 4); + TQColor c = paletteForegroundColor (); + strncpy (xpm_fg_color, TQString(TQString().sprintf(". c #%02x%02x%02x", c.red(), c.green(),c.blue())).ascii(), 31); xpm_fg_color[31] = 0; m_buttons[button_config] = new KMPlayerMenuButton (this, m_buttonbox, config_xpm); m_buttons[button_playlist] = ctrlButton (this, m_buttonbox, playlist_xpm); m_buttons[button_back] = ctrlButton (this, m_buttonbox, back_xpm); - m_buttons[button_play] = ctrlButton(this, m_buttonbox, play_xpm, Qt::Key_R); + m_buttons[button_play] = ctrlButton(this, m_buttonbox, play_xpm, TQt::Key_R); m_buttons[button_forward] = ctrlButton (this, m_buttonbox, forward_xpm); - m_buttons[button_stop] = ctrlButton(this, m_buttonbox, stop_xpm, Qt::Key_S); - m_buttons[button_pause]=ctrlButton(this, m_buttonbox, pause_xpm, Qt::Key_P); + m_buttons[button_stop] = ctrlButton(this, m_buttonbox, stop_xpm, TQt::Key_S); + m_buttons[button_pause]=ctrlButton(this, m_buttonbox, pause_xpm, TQt::Key_P); m_buttons[button_record] = ctrlButton (this, m_buttonbox, record_xpm); m_buttons[button_broadcast] = ctrlButton (this, m_buttonbox, broadcast_xpm); m_buttons[button_language] = new KMPlayerMenuButton (this, m_buttonbox, language_xpm); @@ -372,7 +372,7 @@ KDE_NO_CDTOR_EXPORT ControlPanel::ControlPanel(QWidget * parent, View * view) m_buttons[button_stop]->setToggleButton (true); m_buttons[button_record]->setToggleButton (true); m_buttons[button_broadcast]->setToggleButton (true); - m_posSlider = new QSlider (0, 100, 1, 0, Qt::Horizontal, this); + m_posSlider = new TQSlider (0, 100, 1, 0, Qt::Horizontal, this); m_posSlider->setEnabled (false); m_buttonbox->addWidget (m_posSlider); setupPositionSlider (true); @@ -383,81 +383,81 @@ KDE_NO_CDTOR_EXPORT ControlPanel::ControlPanel(QWidget * parent, View * view) m_popupMenu->insertItem (i18n ("&Play with"), m_playerMenu, menu_player); m_bookmarkMenu = new KMPlayerPopupMenu (this); m_popupMenu->insertItem (i18n("&Bookmarks"), m_bookmarkMenu, menu_bookmark); - m_popupMenu->insertItem (KGlobal::iconLoader ()->loadIconSet (QString ("konsole"), KIcon::Small, 0, true), i18n ("Con&sole"), menu_video); - m_popupMenu->insertItem (KGlobal::iconLoader ()->loadIconSet (QString ("player_playlist"), KIcon::Small, 0, true), i18n ("Play&list"), menu_playlist); + m_popupMenu->insertItem (KGlobal::iconLoader ()->loadIconSet (TQString ("konsole"), KIcon::Small, 0, true), i18n ("Con&sole"), menu_video); + m_popupMenu->insertItem (KGlobal::iconLoader ()->loadIconSet (TQString ("player_playlist"), KIcon::Small, 0, true), i18n ("Play&list"), menu_playlist); m_zoomMenu = new KMPlayerPopupMenu (this); m_zoomMenu->insertItem (i18n ("50%"), menu_zoom50); m_zoomMenu->insertItem (i18n ("100%"), menu_zoom100); m_zoomMenu->insertItem (i18n ("150%"), menu_zoom150); - m_popupMenu->insertItem (KGlobal::iconLoader ()->loadIconSet (QString ("viewmag"), KIcon::Small, 0, false), i18n ("&Zoom"), m_zoomMenu, menu_zoom); - m_popupMenu->insertItem (KGlobal::iconLoader()->loadIconSet (QString ("window_fullscreen"), KIcon::Small, 0, true), i18n ("&Full Screen"), menu_fullscreen); - m_popupMenu->setAccel (QKeySequence (Qt::Key_F), menu_fullscreen); + m_popupMenu->insertItem (KGlobal::iconLoader ()->loadIconSet (TQString ("viewmag"), KIcon::Small, 0, false), i18n ("&Zoom"), m_zoomMenu, menu_zoom); + m_popupMenu->insertItem (KGlobal::iconLoader()->loadIconSet (TQString ("window_fullscreen"), KIcon::Small, 0, true), i18n ("&Full Screen"), menu_fullscreen); + m_popupMenu->setAccel (TQKeySequence (TQt::Key_F), menu_fullscreen); m_popupMenu->insertSeparator (); m_colorMenu = new KMPlayerPopupMenu (this); m_languageMenu = new KMPlayerPopupMenu (this); m_audioMenu = new KMPlayerPopupMenu (this); m_subtitleMenu = new KMPlayerPopupMenu (this); - m_languageMenu->insertItem (KGlobal::iconLoader ()->loadIconSet (QString ("mime-sound"), KIcon::Small, 0, true), i18n ("&Audio languages"), m_audioMenu); - m_languageMenu->insertItem (KGlobal::iconLoader ()->loadIconSet (QString ("view_text"), KIcon::Small, 0, true), i18n ("&Subtitles"), m_subtitleMenu); - QLabel * label = new QLabel (i18n ("Contrast:"), m_colorMenu); + m_languageMenu->insertItem (KGlobal::iconLoader ()->loadIconSet (TQString ("mime-sound"), KIcon::Small, 0, true), i18n ("&Audio languages"), m_audioMenu); + m_languageMenu->insertItem (KGlobal::iconLoader ()->loadIconSet (TQString ("view_text"), KIcon::Small, 0, true), i18n ("&Subtitles"), m_subtitleMenu); + TQLabel * label = new TQLabel (i18n ("Contrast:"), m_colorMenu); m_colorMenu->insertItem (label); - m_contrastSlider = new QSlider (-100, 100, 10, 0, Qt::Horizontal, m_colorMenu); + m_contrastSlider = new TQSlider (-100, 100, 10, 0, Qt::Horizontal, m_colorMenu); m_colorMenu->insertItem (m_contrastSlider); - label = new QLabel (i18n ("Brightness:"), m_colorMenu); + label = new TQLabel (i18n ("Brightness:"), m_colorMenu); m_colorMenu->insertItem (label); - m_brightnessSlider = new QSlider (-100, 100, 10, 0, Qt::Horizontal, m_colorMenu); + m_brightnessSlider = new TQSlider (-100, 100, 10, 0, Qt::Horizontal, m_colorMenu); m_colorMenu->insertItem (m_brightnessSlider); - label = new QLabel (i18n ("Hue:"), m_colorMenu); + label = new TQLabel (i18n ("Hue:"), m_colorMenu); m_colorMenu->insertItem (label); - m_hueSlider = new QSlider (-100, 100, 10, 0, Qt::Horizontal, m_colorMenu); + m_hueSlider = new TQSlider (-100, 100, 10, 0, Qt::Horizontal, m_colorMenu); m_colorMenu->insertItem (m_hueSlider); - label = new QLabel (i18n ("Saturation:"), m_colorMenu); + label = new TQLabel (i18n ("Saturation:"), m_colorMenu); m_colorMenu->insertItem (label); - m_saturationSlider = new QSlider (-100, 100, 10, 0, Qt::Horizontal, m_colorMenu); + m_saturationSlider = new TQSlider (-100, 100, 10, 0, Qt::Horizontal, m_colorMenu); m_colorMenu->insertItem (m_saturationSlider); - m_popupMenu->insertItem (KGlobal::iconLoader ()->loadIconSet (QString ("colorize"), KIcon::Small, 0, true), i18n ("Co&lors"), m_colorMenu); + m_popupMenu->insertItem (KGlobal::iconLoader ()->loadIconSet (TQString ("colorize"), KIcon::Small, 0, true), i18n ("Co&lors"), m_colorMenu); m_popupMenu->insertSeparator (); - m_popupMenu->insertItem (KGlobal::iconLoader ()->loadIconSet (QString ("configure"), KIcon::Small, 0, true), i18n ("&Configure KMPlayer..."), menu_config); + m_popupMenu->insertItem (KGlobal::iconLoader ()->loadIconSet (TQString ("configure"), KIcon::Small, 0, true), i18n ("&Configure KMPlayer..."), menu_config); setAutoControls (true); - connect (m_buttons [button_config], SIGNAL (clicked ()), - this, SLOT (buttonClicked ())); - connect (m_buttons [button_language], SIGNAL (clicked ()), - this, SLOT (buttonClicked ())); - connect (m_buttons [button_config], SIGNAL (mouseEntered ()), - this, SLOT (buttonMouseEntered ())); - connect (m_buttons [button_language], SIGNAL (mouseEntered ()), - this, SLOT (buttonMouseEntered ())); - connect (m_popupMenu, SIGNAL (mouseLeft ()), this, SLOT (menuMouseLeft ())); - connect (m_playerMenu, SIGNAL (mouseLeft ()), this, SLOT(menuMouseLeft ())); - connect (m_zoomMenu, SIGNAL (mouseLeft ()), this, SLOT (menuMouseLeft ())); - connect (m_colorMenu, SIGNAL (mouseLeft ()), this, SLOT (menuMouseLeft ())); - connect (m_languageMenu, SIGNAL(mouseLeft ()), this, SLOT(menuMouseLeft())); - connect (m_subtitleMenu, SIGNAL(mouseLeft ()), this, SLOT(menuMouseLeft())); - connect (m_audioMenu, SIGNAL (mouseLeft ()), this, SLOT (menuMouseLeft ())); -} - -KDE_NO_EXPORT void ControlPanel::setPalette (const QPalette & pal) { - QWidget::setPalette (pal); - QColor c = paletteForegroundColor (); - strncpy (xpm_fg_color, QString().sprintf(". c #%02x%02x%02x", c.red(), c.green(),c.blue()).ascii(), 31); + connect (m_buttons [button_config], TQT_SIGNAL (clicked ()), + this, TQT_SLOT (buttonClicked ())); + connect (m_buttons [button_language], TQT_SIGNAL (clicked ()), + this, TQT_SLOT (buttonClicked ())); + connect (m_buttons [button_config], TQT_SIGNAL (mouseEntered ()), + this, TQT_SLOT (buttonMouseEntered ())); + connect (m_buttons [button_language], TQT_SIGNAL (mouseEntered ()), + this, TQT_SLOT (buttonMouseEntered ())); + connect (m_popupMenu, TQT_SIGNAL (mouseLeft ()), this, TQT_SLOT (menuMouseLeft ())); + connect (m_playerMenu, TQT_SIGNAL (mouseLeft ()), this, TQT_SLOT(menuMouseLeft ())); + connect (m_zoomMenu, TQT_SIGNAL (mouseLeft ()), this, TQT_SLOT (menuMouseLeft ())); + connect (m_colorMenu, TQT_SIGNAL (mouseLeft ()), this, TQT_SLOT (menuMouseLeft ())); + connect (m_languageMenu, TQT_SIGNAL(mouseLeft ()), this, TQT_SLOT(menuMouseLeft())); + connect (m_subtitleMenu, TQT_SIGNAL(mouseLeft ()), this, TQT_SLOT(menuMouseLeft())); + connect (m_audioMenu, TQT_SIGNAL (mouseLeft ()), this, TQT_SLOT (menuMouseLeft ())); +} + +KDE_NO_EXPORT void ControlPanel::setPalette (const TQPalette & pal) { + TQWidget::setPalette (pal); + TQColor c = paletteForegroundColor (); + strncpy (xpm_fg_color, TQString(TQString().sprintf(". c #%02x%02x%02x", c.red(), c.green(),c.blue())).ascii(), 31); xpm_fg_color[31] = 0; - m_buttons[button_config]->setIconSet (QIconSet (QPixmap (config_xpm))); - m_buttons[button_playlist]->setIconSet (QIconSet (QPixmap (playlist_xpm))); - m_buttons[button_back]->setIconSet (QIconSet (QPixmap (back_xpm))); - m_buttons[button_play]->setIconSet (QIconSet (QPixmap (play_xpm))); - m_buttons[button_forward]->setIconSet (QIconSet (QPixmap (forward_xpm))); - m_buttons[button_stop]->setIconSet (QIconSet (QPixmap (stop_xpm))); - m_buttons[button_pause]->setIconSet (QIconSet (QPixmap (pause_xpm))); - m_buttons[button_record]->setIconSet (QIconSet (QPixmap (record_xpm))); - m_buttons[button_broadcast]->setIconSet (QIconSet (QPixmap (broadcast_xpm))); - m_buttons[button_language]->setIconSet (QIconSet (QPixmap (language_xpm))); - m_buttons[button_red]->setIconSet (QIconSet (QPixmap (red_xpm))); - m_buttons[button_green]->setIconSet (QIconSet (QPixmap (green_xpm))); - m_buttons[button_yellow]->setIconSet (QIconSet (QPixmap (yellow_xpm))); - m_buttons[button_blue]->setIconSet (QIconSet (QPixmap (blue_xpm))); -} - -KDE_NO_EXPORT void ControlPanel::timerEvent (QTimerEvent * e) { + m_buttons[button_config]->setIconSet (TQIconSet (TQPixmap (config_xpm))); + m_buttons[button_playlist]->setIconSet (TQIconSet (TQPixmap (playlist_xpm))); + m_buttons[button_back]->setIconSet (TQIconSet (TQPixmap (back_xpm))); + m_buttons[button_play]->setIconSet (TQIconSet (TQPixmap (play_xpm))); + m_buttons[button_forward]->setIconSet (TQIconSet (TQPixmap (forward_xpm))); + m_buttons[button_stop]->setIconSet (TQIconSet (TQPixmap (stop_xpm))); + m_buttons[button_pause]->setIconSet (TQIconSet (TQPixmap (pause_xpm))); + m_buttons[button_record]->setIconSet (TQIconSet (TQPixmap (record_xpm))); + m_buttons[button_broadcast]->setIconSet (TQIconSet (TQPixmap (broadcast_xpm))); + m_buttons[button_language]->setIconSet (TQIconSet (TQPixmap (language_xpm))); + m_buttons[button_red]->setIconSet (TQIconSet (TQPixmap (red_xpm))); + m_buttons[button_green]->setIconSet (TQIconSet (TQPixmap (green_xpm))); + m_buttons[button_yellow]->setIconSet (TQIconSet (TQPixmap (yellow_xpm))); + m_buttons[button_blue]->setIconSet (TQIconSet (TQPixmap (blue_xpm))); +} + +KDE_NO_EXPORT void ControlPanel::timerEvent (TQTimerEvent * e) { if (e->timerId () == m_popup_timer) { m_popup_timer = 0; if (m_button_monitored == button_config) { @@ -477,7 +477,7 @@ KDE_NO_EXPORT void ControlPanel::timerEvent (QTimerEvent * e) { !m_colorMenu->hasMouse () && !m_bookmarkMenu->hasMouse ()) { if (!(m_bookmarkMenu->isVisible () && - static_cast (m_bookmarkMenu) != QWidget::keyboardGrabber ())) { + static_cast (m_bookmarkMenu) != TQWidget::keyboardGrabber ())) { // not if user entered the bookmark sub menu or if I forgot one m_popupMenu->hide (); if (m_buttons [button_config]->isOn ()) @@ -517,11 +517,11 @@ void ControlPanel::setAutoControls (bool b) { KDE_NO_EXPORT void ControlPanel::showPopupMenu () { m_view->updateVolume (); - m_popupMenu->exec (m_buttons [button_config]->mapToGlobal (QPoint (0, maximumSize ().height ()))); + m_popupMenu->exec (m_buttons [button_config]->mapToGlobal (TQPoint (0, tqmaximumSize ().height ()))); } KDE_NO_EXPORT void ControlPanel::showLanguageMenu () { - m_languageMenu->exec (m_buttons [button_language]->mapToGlobal (QPoint (0, maximumSize ().height ()))); + m_languageMenu->exec (m_buttons [button_language]->mapToGlobal (TQPoint (0, tqmaximumSize ().height ()))); } void ControlPanel::showPositionSlider (bool show) { @@ -540,12 +540,12 @@ KDE_NO_EXPORT void ControlPanel::setupPositionSlider (bool show) { m_posSlider->show (); m_buttonbox->setMargin (4); m_buttonbox->setSpacing (4); - setEraseColor (m_view->topLevelWidget ()->paletteBackgroundColor ()); + setEraseColor (m_view->tqtopLevelWidget ()->paletteBackgroundColor ()); } else { m_posSlider->hide (); m_buttonbox->setMargin (1); m_buttonbox->setSpacing (1); - setEraseColor (QColor (0, 0, 0)); + setEraseColor (TQColor (0, 0, 0)); } for (int i = 0; i < (int) button_last; i++) { m_buttons[i]->setMinimumSize (15, h-1); @@ -656,7 +656,7 @@ KDE_NO_EXPORT void ControlPanel::menuMouseLeft () { m_popdown_timer = startTimer (400); } -KDE_NO_EXPORT void ControlPanel::setLanguages (const QStringList & alang, const QStringList & slang) { +KDE_NO_EXPORT void ControlPanel::setLanguages (const TQStringList & alang, const TQStringList & slang) { int sz = (int) alang.size (); bool showbutton = (sz > 0); m_audioMenu->clear (); diff --git a/src/kmplayercontrolpanel.h b/src/kmplayercontrolpanel.h index 69f93e7..6234a37 100644 --- a/src/kmplayercontrolpanel.h +++ b/src/kmplayercontrolpanel.h @@ -23,15 +23,15 @@ #include #endif -#include -#include +#include +#include #include -class QSlider; -//class QPushButton; -class QBoxLayout; -class QStringList; +class TQSlider; +//class TQPushButton; +class TQBoxLayout; +class TQStringList; class KPopupMenu; namespace KMPlayer { @@ -41,15 +41,16 @@ class View; /* * A button from the controlpanel */ -class KMPLAYER_NO_EXPORT KMPlayerMenuButton : public QPushButton { +class KMPLAYER_NO_EXPORT KMPlayerMenuButton : public TQPushButton { Q_OBJECT + TQ_OBJECT public: - KMPlayerMenuButton (QWidget *, QBoxLayout *, const char **, int = 0); + KMPlayerMenuButton (TQWidget *, TQBoxLayout *, const char **, int = 0); KDE_NO_CDTOR_EXPORT ~KMPlayerMenuButton () {} signals: void mouseEntered (); protected: - void enterEvent (QEvent *); + void enterEvent (TQEvent *); }; /* @@ -57,32 +58,34 @@ protected: */ class KMPLAYER_EXPORT KMPlayerPopupMenu : public KPopupMenu { Q_OBJECT + TQ_OBJECT public: - KMPlayerPopupMenu (QWidget *); + KMPlayerPopupMenu (TQWidget *); KDE_NO_CDTOR_EXPORT ~KMPlayerPopupMenu () {} signals: void mouseLeft (); protected: - void leaveEvent (QEvent *); + void leaveEvent (TQEvent *); }; /* * The volume bar from the controlpanel */ -class KMPLAYER_EXPORT VolumeBar : public QWidget { +class KMPLAYER_EXPORT VolumeBar : public TQWidget { Q_OBJECT + TQ_OBJECT public: - VolumeBar (QWidget * parent, View * view); + VolumeBar (TQWidget * tqparent, View * view); ~VolumeBar (); KDE_NO_EXPORT int value () const { return m_value; } void setValue (int v); signals: void volumeChanged (int); // 0 - 100 protected: - void wheelEvent (QWheelEvent * e); - void paintEvent (QPaintEvent *); - void mousePressEvent (QMouseEvent * e); - void mouseMoveEvent (QMouseEvent * e); + void wheelEvent (TQWheelEvent * e); + void paintEvent (TQPaintEvent *); + void mousePressEvent (TQMouseEvent * e); + void mouseMoveEvent (TQMouseEvent * e); private: View * m_view; int m_value; @@ -91,8 +94,9 @@ private: /* * The controlpanel GUI */ -class KMPLAYER_EXPORT ControlPanel : public QWidget { +class KMPLAYER_EXPORT ControlPanel : public TQWidget { Q_OBJECT + TQ_OBJECT public: enum MenuID { menu_config = 0, menu_player, menu_fullscreen, menu_volume, @@ -107,7 +111,7 @@ public: button_red, button_green, button_yellow, button_blue, button_last }; - ControlPanel (QWidget * parent, View * view); + ControlPanel (TQWidget * tqparent, View * view); KDE_NO_CDTOR_EXPORT ~ControlPanel () {} void showPositionSlider (bool show); void enableSeekButtons (bool enable); @@ -115,27 +119,27 @@ public: void setPlaying (bool play); void setRecording (bool record); void setAutoControls (bool b); - void setPalette (const QPalette &); + void setPalette (const TQPalette &); int preferedHeight (); KDE_NO_EXPORT bool autoControls () const { return m_auto_controls; } - KDE_NO_EXPORT QSlider * positionSlider () const { return m_posSlider; } - KDE_NO_EXPORT QSlider * contrastSlider () const { return m_contrastSlider; } - KDE_NO_EXPORT QSlider * brightnessSlider () const { return m_brightnessSlider; } - KDE_NO_EXPORT QSlider * hueSlider () const { return m_hueSlider; } - KDE_NO_EXPORT QSlider * saturationSlider () const { return m_saturationSlider; } - QPushButton * button (Button b) const { return m_buttons [(int) b]; } - KDE_NO_EXPORT QPushButton * broadcastButton () const { return m_buttons[button_broadcast]; } + KDE_NO_EXPORT TQSlider * positionSlider () const { return m_posSlider; } + KDE_NO_EXPORT TQSlider * contrastSlider () const { return m_contrastSlider; } + KDE_NO_EXPORT TQSlider * brightnessSlider () const { return m_brightnessSlider; } + KDE_NO_EXPORT TQSlider * hueSlider () const { return m_hueSlider; } + KDE_NO_EXPORT TQSlider * saturationSlider () const { return m_saturationSlider; } + TQPushButton * button (Button b) const { return m_buttons [(int) b]; } + KDE_NO_EXPORT TQPushButton * broadcastButton () const { return m_buttons[button_broadcast]; } KDE_NO_EXPORT VolumeBar * volumeBar () const { return m_volume; } KDE_NO_EXPORT KMPlayerPopupMenu * popupMenu () const { return m_popupMenu; } KDE_NO_EXPORT KPopupMenu * bookmarkMenu () const { return m_bookmarkMenu; } - KDE_NO_EXPORT QPopupMenu * zoomMenu () const { return m_zoomMenu; } - KDE_NO_EXPORT QPopupMenu * playerMenu () const { return m_playerMenu; } - KDE_NO_EXPORT QPopupMenu * colorMenu () const { return m_colorMenu; } - KDE_NO_EXPORT QPopupMenu * audioMenu () const { return m_audioMenu; } - KDE_NO_EXPORT QPopupMenu * subtitleMenu () const { return m_subtitleMenu; } + KDE_NO_EXPORT TQPopupMenu * zoomMenu () const { return m_zoomMenu; } + KDE_NO_EXPORT TQPopupMenu * playerMenu () const { return m_playerMenu; } + KDE_NO_EXPORT TQPopupMenu * colorMenu () const { return m_colorMenu; } + KDE_NO_EXPORT TQPopupMenu * audioMenu () const { return m_audioMenu; } + KDE_NO_EXPORT TQPopupMenu * subtitleMenu () const { return m_subtitleMenu; } KDE_NO_EXPORT View * view () const { return m_view; } public slots: - void setLanguages (const QStringList & al, const QStringList & sl); + void setLanguages (const TQStringList & al, const TQStringList & sl); void selectSubtitle (int id); void selectAudioLanguage (int id); void showPopupMenu (); @@ -143,7 +147,7 @@ public slots: void setPlayingProgress (int position, int length); void setLoadingProgress (int pos); protected: - void timerEvent (QTimerEvent * e); + void timerEvent (TQTimerEvent * e); void setupPositionSlider (bool show); private slots: void buttonMouseEntered (); @@ -156,13 +160,13 @@ private: int m_popdown_timer; int m_button_monitored; View * m_view; - QBoxLayout * m_buttonbox; - QSlider * m_posSlider; - QSlider * m_contrastSlider; - QSlider * m_brightnessSlider; - QSlider * m_hueSlider; - QSlider * m_saturationSlider; - QPushButton * m_buttons [button_last]; + TQBoxLayout * m_buttonbox; + TQSlider * m_posSlider; + TQSlider * m_contrastSlider; + TQSlider * m_brightnessSlider; + TQSlider * m_hueSlider; + TQSlider * m_saturationSlider; + TQPushButton * m_buttons [button_last]; VolumeBar * m_volume; KMPlayerPopupMenu * m_popupMenu; KMPlayerPopupMenu * m_bookmarkMenu; diff --git a/src/kmplayerpartbase.cpp b/src/kmplayerpartbase.cpp index 10a9f87..7bd33bb 100644 --- a/src/kmplayerpartbase.cpp +++ b/src/kmplayerpartbase.cpp @@ -24,17 +24,17 @@ #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -68,16 +68,16 @@ class KMPLAYER_NO_EXPORT BookmarkOwner : public KBookmarkOwner { public: BookmarkOwner (PartBase *); KDE_NO_CDTOR_EXPORT virtual ~BookmarkOwner () {} - void openBookmarkURL(const QString& _url); - QString currentTitle() const; - QString currentURL() const; + void openBookmarkURL(const TQString& _url); + TQString currentTitle() const; + TQString currentURL() const; private: PartBase * m_player; }; class KMPLAYER_NO_EXPORT BookmarkManager : public KBookmarkManager { public: - BookmarkManager (const QString &); + BookmarkManager (const TQString &); }; } // namespace @@ -87,29 +87,29 @@ using namespace KMPlayer; KDE_NO_CDTOR_EXPORT BookmarkOwner::BookmarkOwner (PartBase * player) : m_player (player) {} -KDE_NO_EXPORT void BookmarkOwner::openBookmarkURL (const QString & url) { +KDE_NO_EXPORT void BookmarkOwner::openBookmarkURL (const TQString & url) { m_player->openURL (KURL (url)); } -KDE_NO_EXPORT QString BookmarkOwner::currentTitle () const { +KDE_NO_EXPORT TQString BookmarkOwner::currentTitle () const { return m_player->source ()->prettyName (); } -KDE_NO_EXPORT QString BookmarkOwner::currentURL () const { +KDE_NO_EXPORT TQString BookmarkOwner::currentURL () const { return m_player->source ()->url ().url (); } -inline BookmarkManager::BookmarkManager(const QString & bmfile) +inline BookmarkManager::BookmarkManager(const TQString & bmfile) : KBookmarkManager (bmfile, false) { } //----------------------------------------------------------------------------- -PartBase::PartBase (QWidget * wparent, const char *wname, - QObject * parent, const char *name, KConfig * config) - : KMediaPlayer::Player (wparent, wname ? wname : "kde_kmplayer_view", parent, name ? name : "kde_kmplayer_part"), +PartBase::PartBase (TQWidget * wtqparent, const char *wname, + TQObject * tqparent, const char *name, KConfig * config) + : KMediaPlayer::Player (wtqparent, wname ? wname : "kde_kmplayer_view", tqparent, name ? name : "kde_kmplayer_part"), m_config (config), - m_view (new View (wparent, wname ? wname : "kde_kmplayer_view")), + m_view (new View (wtqparent, wname ? wname : "kde_kmplayer_view")), m_settings (new Settings (this, config)), m_recorder (0L), m_source (0L), @@ -133,12 +133,12 @@ PartBase::PartBase (QWidget * wparent, const char *wname, m_recorders ["xine"] = xine; m_sources ["urlsource"] = new URLSource (this); - QString bmfile = locate ("data", "kmplayer/bookmarks.xml"); - QString localbmfile = locateLocal ("data", "kmplayer/bookmarks.xml"); + TQString bmfile = locate ("data", "kmplayer/bookmarks.xml"); + TQString localbmfile = locateLocal ("data", "kmplayer/bookmarks.xml"); if (localbmfile != bmfile) { kdDebug () << "cp " << bmfile << " " << localbmfile << endl; KProcess p; - p << "/bin/cp" << QFile::encodeName (bmfile) << QFile::encodeName (localbmfile); + p << "/bin/cp" << TQString(TQFile::encodeName (bmfile)) << TQString(TQFile::encodeName (localbmfile)); p.start (KProcess::Block); } m_bookmark_manager = new BookmarkManager (localbmfile); @@ -160,7 +160,7 @@ KDE_NO_EXPORT void PartBase::showPlayListWindow () { m_view->toggleShowPlaylist (); } -KDE_NO_EXPORT void PartBase::addBookMark (const QString & t, const QString & url) { +KDE_NO_EXPORT void PartBase::addBookMark (const TQString & t, const TQString & url) { KBookmarkGroup b = m_bookmark_manager->root (); b.addBookmark (m_bookmark_manager, t, KURL (url)); m_bookmark_manager->emitChanged (b); @@ -172,14 +172,14 @@ void PartBase::init (KActionCollection * action_collection) { #ifdef HAVE_NSPR m_players ["npp"] = new NpPlayer (this, m_settings, m_service); #endif - connect(m_settings, SIGNAL(configChanged()), this, SLOT(settingsChanged())); + connect(m_settings, TQT_SIGNAL(configChanged()), this, TQT_SLOT(settingsChanged())); m_settings->readConfig (); m_settings->applyColorSetting (false); m_bookmark_menu = new KBookmarkMenu (m_bookmark_manager, m_bookmark_owner, m_view->controlPanel ()->bookmarkMenu (), action_collection, true, true); - connect (m_view, SIGNAL (urlDropped (const KURL::List &)), this, SLOT (openURL (const KURL::List &))); + connect (m_view, TQT_SIGNAL (urlDropped (const KURL::List &)), this, TQT_SLOT (openURL (const KURL::List &))); connectPlaylist (m_view->playList ()); connectInfoPanel (m_view->infoPanel ()); - new KAction (i18n ("Edit playlist &item"), 0, 0, m_view->playList (), SLOT (editCurrent ()), action_collection, "edit_playlist_item"); + new KAction (i18n ("Edit playlist &item"), 0, 0, TQT_TQOBJECT(m_view->playList ()), TQT_SLOT (editCurrent ()), action_collection, "edit_playlist_item"); } void PartBase::connectPanel (ControlPanel * panel) { @@ -188,56 +188,56 @@ void PartBase::connectPanel (ControlPanel * panel) { panel->hueSlider ()->setValue (m_settings->hue); panel->saturationSlider ()->setValue (m_settings->saturation); panel->volumeBar ()->setValue (m_settings->volume); - connect (panel->button (ControlPanel::button_playlist), SIGNAL (clicked ()), this, SLOT (showPlayListWindow ())); - connect (panel->button (ControlPanel::button_back), SIGNAL (clicked ()), this, SLOT (back ())); - connect (panel->button (ControlPanel::button_play), SIGNAL (clicked ()), this, SLOT (play ())); - connect (panel->button (ControlPanel::button_forward), SIGNAL (clicked ()), this, SLOT (forward ())); - connect (panel->button (ControlPanel::button_pause), SIGNAL (clicked ()), this, SLOT (pause ())); - connect (panel->button (ControlPanel::button_stop), SIGNAL (clicked ()), this, SLOT (stop ())); - connect (panel->button (ControlPanel::button_record), SIGNAL (clicked()), this, SLOT (record())); - connect (panel->volumeBar (), SIGNAL (volumeChanged (int)), this, SLOT (volumeChanged (int))); - connect (panel->positionSlider (), SIGNAL (valueChanged (int)), this, SLOT (positionValueChanged (int))); - connect (panel->positionSlider (), SIGNAL (sliderPressed()), this, SLOT (posSliderPressed())); - connect (panel->positionSlider (), SIGNAL (sliderReleased()), this, SLOT (posSliderReleased())); - connect (this, SIGNAL (positioned (int, int)), panel, SLOT (setPlayingProgress (int, int))); - connect (this, SIGNAL (loading(int)), panel, SLOT(setLoadingProgress(int))); - connect (panel->contrastSlider (), SIGNAL (valueChanged(int)), this, SLOT (contrastValueChanged(int))); - connect (panel->brightnessSlider (), SIGNAL (valueChanged(int)), this, SLOT (brightnessValueChanged(int))); - connect (panel->hueSlider (), SIGNAL (valueChanged(int)), this, SLOT (hueValueChanged(int))); - connect (panel->saturationSlider (), SIGNAL (valueChanged(int)), this, SLOT (saturationValueChanged(int))); - connect (this, SIGNAL (languagesUpdated(const QStringList &, const QStringList &)), panel, SLOT (setLanguages (const QStringList &, const QStringList &))); - connect (panel->audioMenu (), SIGNAL (activated (int)), this, SLOT (audioSelected (int))); - connect (panel->subtitleMenu (), SIGNAL (activated (int)), this, SLOT (subtitleSelected (int))); - connect (this, SIGNAL (audioIsSelected (int)), panel, SLOT (selectAudioLanguage (int))); - connect (this, SIGNAL (subtitleIsSelected (int)), panel, SLOT (selectSubtitle (int))); - panel->popupMenu()->connectItem (ControlPanel::menu_fullscreen, this, SLOT (fullScreen ())); + connect (panel->button (ControlPanel::button_playlist), TQT_SIGNAL (clicked ()), this, TQT_SLOT (showPlayListWindow ())); + connect (panel->button (ControlPanel::button_back), TQT_SIGNAL (clicked ()), this, TQT_SLOT (back ())); + connect (panel->button (ControlPanel::button_play), TQT_SIGNAL (clicked ()), this, TQT_SLOT (play ())); + connect (panel->button (ControlPanel::button_forward), TQT_SIGNAL (clicked ()), this, TQT_SLOT (forward ())); + connect (panel->button (ControlPanel::button_pause), TQT_SIGNAL (clicked ()), this, TQT_SLOT (pause ())); + connect (panel->button (ControlPanel::button_stop), TQT_SIGNAL (clicked ()), this, TQT_SLOT (stop ())); + connect (panel->button (ControlPanel::button_record), TQT_SIGNAL (clicked()), this, TQT_SLOT (record())); + connect (panel->volumeBar (), TQT_SIGNAL (volumeChanged (int)), this, TQT_SLOT (volumeChanged (int))); + connect (panel->positionSlider (), TQT_SIGNAL (valueChanged (int)), this, TQT_SLOT (positionValueChanged (int))); + connect (panel->positionSlider (), TQT_SIGNAL (sliderPressed()), this, TQT_SLOT (posSliderPressed())); + connect (panel->positionSlider (), TQT_SIGNAL (sliderReleased()), this, TQT_SLOT (posSliderReleased())); + connect (this, TQT_SIGNAL (positioned (int, int)), panel, TQT_SLOT (setPlayingProgress (int, int))); + connect (this, TQT_SIGNAL (loading(int)), panel, TQT_SLOT(setLoadingProgress(int))); + connect (panel->contrastSlider (), TQT_SIGNAL (valueChanged(int)), this, TQT_SLOT (contrastValueChanged(int))); + connect (panel->brightnessSlider (), TQT_SIGNAL (valueChanged(int)), this, TQT_SLOT (brightnessValueChanged(int))); + connect (panel->hueSlider (), TQT_SIGNAL (valueChanged(int)), this, TQT_SLOT (hueValueChanged(int))); + connect (panel->saturationSlider (), TQT_SIGNAL (valueChanged(int)), this, TQT_SLOT (saturationValueChanged(int))); + connect (this, TQT_SIGNAL (languagesUpdated(const TQStringList &, const TQStringList &)), panel, TQT_SLOT (setLanguages (const TQStringList &, const TQStringList &))); + connect (panel->audioMenu (), TQT_SIGNAL (activated (int)), this, TQT_SLOT (audioSelected (int))); + connect (panel->subtitleMenu (), TQT_SIGNAL (activated (int)), this, TQT_SLOT (subtitleSelected (int))); + connect (this, TQT_SIGNAL (audioIsSelected (int)), panel, TQT_SLOT (selectAudioLanguage (int))); + connect (this, TQT_SIGNAL (subtitleIsSelected (int)), panel, TQT_SLOT (selectSubtitle (int))); + panel->popupMenu()->connectItem (ControlPanel::menu_fullscreen, this, TQT_SLOT (fullScreen ())); panel->popupMenu ()->connectItem (ControlPanel::menu_config, - this, SLOT (showConfigDialog ())); + this, TQT_SLOT (showConfigDialog ())); panel->popupMenu ()->connectItem (ControlPanel::menu_video, - m_view, SLOT(toggleVideoConsoleWindow())); + m_view, TQT_SLOT(toggleVideoConsoleWindow())); panel->popupMenu ()->connectItem (ControlPanel::menu_playlist, - m_view, SLOT (toggleShowPlaylist ())); - connect (this, SIGNAL (statusUpdated (const QString &)), - panel->view (), SLOT (setStatusMessage (const QString &))); - //connect (panel (), SIGNAL (clicked ()), m_settings, SLOT (show ())); + m_view, TQT_SLOT (toggleShowPlaylist ())); + connect (this, TQT_SIGNAL (statusUpdated (const TQString &)), + panel->view (), TQT_SLOT (setStatusMessage (const TQString &))); + //connect (panel (), TQT_SIGNAL (clicked ()), m_settings, TQT_SLOT (show ())); } void PartBase::connectPlaylist (PlayListView * playlist) { - connect (playlist, SIGNAL (addBookMark (const QString &, const QString &)), - this, SLOT (addBookMark (const QString &, const QString &))); - connect (playlist, SIGNAL (executed (QListViewItem *)), - this, SLOT (playListItemExecuted (QListViewItem *))); - connect (playlist, SIGNAL (clicked (QListViewItem *)), - this, SLOT (playListItemClicked (QListViewItem *))); - connect (this, SIGNAL (treeChanged (int, NodePtr, NodePtr, bool, bool)), - playlist, SLOT (updateTree (int, NodePtr, NodePtr, bool, bool))); - connect (this, SIGNAL (treeUpdated ()), - playlist, SLOT (triggerUpdate ())); + connect (playlist, TQT_SIGNAL (addBookMark (const TQString &, const TQString &)), + this, TQT_SLOT (addBookMark (const TQString &, const TQString &))); + connect (playlist, TQT_SIGNAL (executed (TQListViewItem *)), + this, TQT_SLOT (playListItemExecuted (TQListViewItem *))); + connect (playlist, TQT_SIGNAL (clicked (TQListViewItem *)), + this, TQT_SLOT (playListItemClicked (TQListViewItem *))); + connect (this, TQT_SIGNAL (treeChanged (int, NodePtr, NodePtr, bool, bool)), + playlist, TQT_SLOT (updateTree (int, NodePtr, NodePtr, bool, bool))); + connect (this, TQT_SIGNAL (treeUpdated ()), + playlist, TQT_SLOT (triggerUpdate ())); } void PartBase::connectInfoPanel (InfoWindow * infopanel) { - connect (this, SIGNAL (infoUpdated (const QString &)), - infopanel->view (), SLOT (setInfoMessage (const QString &))); + connect (this, TQT_SIGNAL (infoUpdated (const TQString &)), + infopanel->view (), TQT_SLOT (setInfoMessage (const TQString &))); } PartBase::~PartBase () { @@ -278,7 +278,7 @@ extern const char * strGeneralGroup; bool PartBase::setProcess (Mrl *mrl) { // determine backend, start with temp_backends - QString p = temp_backends [m_source->name()]; + TQString p = temp_backends [m_source->name()]; bool remember_backend = p.isEmpty (); bool changed = false; if (p.isEmpty ()) { @@ -287,7 +287,7 @@ bool PartBase::setProcess (Mrl *mrl) { m_config->setGroup (mrl->mimetype); p = m_config->readEntry ("player", "" ); remember_backend = !(!p.isEmpty () && - m_players.contains (p) && + m_players.tqcontains (p) && m_players [p]->supports (m_source->name ())); } } @@ -300,7 +300,7 @@ bool PartBase::setProcess (Mrl *mrl) { p = m_config->readEntry (m_source->name (), ""); } if (p.isEmpty () || - !m_players.contains (p) || + !m_players.tqcontains (p) || !m_players [p]->supports (m_source->name ())) { // finally find first supported player p.truncate (0); @@ -308,11 +308,11 @@ bool PartBase::setProcess (Mrl *mrl) { ProcessMap::const_iterator i, e = m_players.end(); for (i = m_players.begin(); i != e; ++i) if (i.data ()->supports (m_source->name ())) { - p = QString (i.data ()->name ()); + p = TQString (i.data ()->name ()); break; } } else - p = QString (m_process->name ()); + p = TQString (m_process->name ()); } if (!p.isEmpty ()) { if (!m_process || p != m_process->name ()) { @@ -361,7 +361,7 @@ void PartBase::setRecorder (const char * name) { KDE_NO_EXPORT void PartBase::slotPlayerMenu (int id) { bool playing = m_process->playing (); const char * srcname = m_source->name (); - QPopupMenu * menu = m_view->controlPanel ()->playerMenu (); + TQPopupMenu * menu = m_view->controlPanel ()->playerMenu (); ProcessMap::const_iterator pi = m_players.begin(), e = m_players.end(); unsigned i = 0; for (; pi != e && i < menu->count(); ++pi) { @@ -371,7 +371,7 @@ KDE_NO_EXPORT void PartBase::slotPlayerMenu (int id) { int menuid = menu->idAt (i); menu->setItemChecked (menuid, menuid == id); if (menuid == id) { - if (proc->name () != QString ("npp")) + if (proc->name () != TQString ("npp")) m_settings->backends [srcname] = proc->name (); temp_backends [srcname] = proc->name (); if (playing && strcmp (m_process->name (), proc->name ())) @@ -387,7 +387,7 @@ KDE_NO_EXPORT void PartBase::slotPlayerMenu (int id) { void PartBase::updatePlayerMenu (ControlPanel * panel) { if (!m_view || !m_process) return; - QPopupMenu * menu = panel->playerMenu (); + TQPopupMenu * menu = panel->playerMenu (); menu->clear (); if (!m_source) return; @@ -396,7 +396,7 @@ void PartBase::updatePlayerMenu (ControlPanel * panel) { for (ProcessMap::const_iterator i = m_players.begin(); i != e; ++i) { Process * p = i.data (); if (p->supports (m_source->name ())) { - menu->insertItem (p->menuName (), this, SLOT (slotPlayerMenu (int)), 0, id++); + menu->insertItem (p->menuName (), this, TQT_SLOT (slotPlayerMenu (int)), 0, id++); if (i.data() == m_process) menu->setItemChecked (id-1, true); } @@ -405,20 +405,20 @@ void PartBase::updatePlayerMenu (ControlPanel * panel) { void PartBase::connectSource (Source * old_source, Source * source) { if (old_source) { - disconnect (old_source, SIGNAL(endOfPlayItems ()), this, SLOT(stop ())); - disconnect (old_source, SIGNAL (dimensionsChanged ()), - this, SLOT (sourceHasChangedAspects ())); - disconnect (old_source, SIGNAL (startPlaying ()), - this, SLOT (playingStarted ())); - disconnect (old_source, SIGNAL (stopPlaying ()), - this, SLOT (playingStopped ())); + disconnect (old_source, TQT_SIGNAL(endOfPlayItems ()), this, TQT_SLOT(stop ())); + disconnect (old_source, TQT_SIGNAL (dimensionsChanged ()), + this, TQT_SLOT (sourceHasChangedAspects ())); + disconnect (old_source, TQT_SIGNAL (startPlaying ()), + this, TQT_SLOT (playingStarted ())); + disconnect (old_source, TQT_SIGNAL (stopPlaying ()), + this, TQT_SLOT (playingStopped ())); } if (source) { - connect (source, SIGNAL (endOfPlayItems ()), this, SLOT (stop ())); - connect (source, SIGNAL (dimensionsChanged ()), - this, SLOT (sourceHasChangedAspects ())); - connect (source, SIGNAL (startPlaying()), this, SLOT(playingStarted())); - connect (source, SIGNAL (stopPlaying ()), this, SLOT(playingStopped())); + connect (source, TQT_SIGNAL (endOfPlayItems ()), this, TQT_SLOT (stop ())); + connect (source, TQT_SIGNAL (dimensionsChanged ()), + this, TQT_SLOT (sourceHasChangedAspects ())); + connect (source, TQT_SIGNAL (startPlaying()), this, TQT_SLOT(playingStarted())); + connect (source, TQT_SIGNAL (stopPlaying ()), this, TQT_SLOT(playingStopped())); } } @@ -429,14 +429,14 @@ void PartBase::setSource (Source * _source) { stop (); if (m_view) { m_view->reset (); - emit infoUpdated (QString ()); + emit infoUpdated (TQString ()); } - disconnect (m_source, SIGNAL (startRecording ()), - this, SLOT (recordingStarted ())); - disconnect (this, SIGNAL (audioIsSelected (int)), - m_source, SLOT (setAudioLang (int))); - disconnect (this, SIGNAL (subtitleIsSelected (int)), - m_source, SLOT (setSubtitle (int))); + disconnect (m_source, TQT_SIGNAL (startRecording ()), + this, TQT_SLOT (recordingStarted ())); + disconnect (this, TQT_SIGNAL (audioIsSelected (int)), + m_source, TQT_SLOT (setAudioLang (int))); + disconnect (this, TQT_SIGNAL (subtitleIsSelected (int)), + m_source, TQT_SLOT (setSubtitle (int))); } if (m_view) { if (m_auto_controls) @@ -450,23 +450,23 @@ void PartBase::setSource (Source * _source) { m_source = _source; connectSource (old_source, m_source); m_process->setSource (m_source); - connect (m_source, SIGNAL(startRecording()), this,SLOT(recordingStarted())); - connect (this, SIGNAL (audioIsSelected (int)), - m_source, SLOT (setAudioLang (int))); - connect (this, SIGNAL (subtitleIsSelected (int)), - m_source, SLOT (setSubtitle (int))); + connect (m_source, TQT_SIGNAL(startRecording()), this,TQT_SLOT(recordingStarted())); + connect (this, TQT_SIGNAL (audioIsSelected (int)), + m_source, TQT_SLOT (setAudioLang (int))); + connect (this, TQT_SIGNAL (subtitleIsSelected (int)), + m_source, TQT_SLOT (setSubtitle (int))); m_source->init (); m_source->setIdentified (false); if (m_view && m_view->viewer ()) { updatePlayerMenu (m_view->controlPanel ()); m_view->viewer ()->setAspect (0.0); } - if (m_source) QTimer::singleShot (0, m_source, SLOT (activate ())); + if (m_source) TQTimer::singleShot (0, m_source, TQT_SLOT (activate ())); updateTree (true, true); emit sourceChanged (old_source, m_source); } -KDE_NO_EXPORT void PartBase::changeURL (const QString & url) { +KDE_NO_EXPORT void PartBase::changeURL (const TQString & url) { emit urlChanged (url); } @@ -486,7 +486,7 @@ bool PartBase::openURL (const KURL & url) { kdDebug () << "PartBase::openURL " << url.url() << url.isValid () << endl; if (!m_view) return false; stop (); - Source * src = (url.isEmpty () ? m_sources ["urlsource"] : (!url.protocol ().compare ("kmplayer") && m_sources.contains (url.host ()) ? m_sources [url.host ()] : m_sources ["urlsource"])); + Source * src = (url.isEmpty () ? m_sources ["urlsource"] : (!url.protocol ().compare ("kmplayer") && m_sources.tqcontains (url.host ()) ? m_sources [url.host ()] : m_sources ["urlsource"])); src->setSubURL (KURL ()); src->setURL (url); setSource (src); @@ -545,7 +545,7 @@ void PartBase::recordingStopped () { setRecorder ("mencoder"); //FIXME see PartBase::record() checking playing() } -void PartBase::timerEvent (QTimerEvent * e) { +void PartBase::timerEvent (TQTimerEvent * e) { if (e->timerId () == m_record_timer) { kdDebug () << "record timer event" << (m_recorder->playing () && !playing ()) << endl; m_record_timer = 0; @@ -615,13 +615,13 @@ void PartBase::forward () { m_source->forward (); } -KDE_NO_EXPORT void PartBase::playListItemClicked (QListViewItem * item) { +KDE_NO_EXPORT void PartBase::playListItemClicked (TQListViewItem * item) { if (!item) return; PlayListItem * vi = static_cast (item); RootPlayListItem * ri = vi->playListView ()->rootItem (item); if (ri == item && vi->node) { - QString src = ri->source; + TQString src = ri->source; //kdDebug() << "playListItemClicked " << src << " " << vi->node->nodeName() << endl; Source * source = src.isEmpty() ? m_source : m_sources[src.ascii()]; if (vi->node->isPlayable ()) { @@ -634,7 +634,7 @@ KDE_NO_EXPORT void PartBase::playListItemClicked (QListViewItem * item) { updateTree (); // items already deleted } -KDE_NO_EXPORT void PartBase::playListItemExecuted (QListViewItem * item) { +KDE_NO_EXPORT void PartBase::playListItemExecuted (TQListViewItem * item) { if (m_in_update_tree) return; if (m_view->editMode ()) return; PlayListItem * vi = static_cast (item); @@ -642,7 +642,7 @@ KDE_NO_EXPORT void PartBase::playListItemExecuted (QListViewItem * item) { if (ri == item) return; // both null or handled by playListItemClicked if (vi->node) { - QString src = ri->source; + TQString src = ri->source; //kdDebug() << "playListItemExecuted " << src << " " << vi->node->nodeName() << endl; Source * source = src.isEmpty() ? m_source : m_sources[src.ascii()]; if (vi->node->isPlayable ()) { @@ -657,11 +657,11 @@ KDE_NO_EXPORT void PartBase::playListItemExecuted (QListViewItem * item) { vi->m_attr->name () == StringPool::attr_url || vi->m_attr->name () == StringPool::attr_value || vi->m_attr->name () == "data") { - QString src (vi->m_attr->value ()); + TQString src (vi->m_attr->value ()); if (!src.isEmpty ()) { - PlayListItem * pi = static_cast (item->parent()); + PlayListItem * pi = static_cast (item->tqparent()); if (pi) { - for (NodePtr e = pi->node; e; e = e->parentNode ()) { + for (NodePtr e = pi->node; e; e = e->tqparentNode ()) { Mrl * mrl = e->mrl (); if (mrl) src = KURL (mrl->absolutePath (), src).url (); @@ -698,15 +698,15 @@ void PartBase::updateTree (bool full, bool force) { m_update_tree_full |= full; } -void PartBase::updateInfo (const QString & msg) { +void PartBase::updateInfo (const TQString & msg) { emit infoUpdated (msg); } -void PartBase::updateStatus (const QString & msg) { +void PartBase::updatetqStatus (const TQString & msg) { emit statusUpdated (msg); } -void PartBase::setLanguages (const QStringList & al, const QStringList & sl) { +void PartBase::setLanguages (const TQStringList & al, const TQStringList & sl) { emit languagesUpdated (al, sl); } @@ -719,19 +719,19 @@ KDE_NO_EXPORT void PartBase::subtitleSelected (int id) { } void PartBase::record () { - if (m_view) m_view->setCursor (QCursor (Qt::WaitCursor)); + if (m_view) m_view->setCursor (TQCursor (TQt::WaitCursor)); if (m_recorder->playing ()) { m_recorder->stop (); } else { m_settings->show ("RecordPage"); m_view->controlPanel ()->setRecording (false); } - if (m_view) m_view->setCursor (QCursor (Qt::ArrowCursor)); + if (m_view) m_view->setCursor (TQCursor (TQt::ArrowCursor)); } void PartBase::play () { if (!m_process || !m_view) return; - QPushButton * pb = ::qt_cast (sender ()); + TQPushButton * pb = ::tqqt_cast (sender ()); if (pb && !pb->isOn ()) { stop (); return; @@ -743,16 +743,16 @@ void PartBase::play () { if (m_process->state () == Process::NotRunning) { PlayListItem * lvi = m_view->playList ()->currentPlayListItem (); if (lvi) { // make sure it's in the first tree - QListViewItem * pitem = lvi; - while (pitem->parent()) - pitem = pitem->parent(); + TQListViewItem * pitem = lvi; + while (pitem->tqparent()) + pitem = pitem->tqparent(); if (pitem != m_view->playList ()->firstChild ()) lvi = 0L; } if (!lvi) lvi = static_cast(m_view->playList()->firstChild()); if (lvi) - for (NodePtr n = lvi->node; n; n = n->parentNode ()) { + for (NodePtr n = lvi->node; n; n = n->tqparentNode ()) { if (n->isPlayable ()) { m_source->setCurrent (n); break; @@ -770,18 +770,18 @@ bool PartBase::playing () const { } void PartBase::stop () { - QPushButton * b = m_view ? m_view->controlPanel ()->button (ControlPanel::button_stop) : 0L; + TQPushButton * b = m_view ? m_view->controlPanel ()->button (ControlPanel::button_stop) : 0L; if (b) { if (!b->isOn ()) b->toggle (); - m_view->setCursor (QCursor (Qt::WaitCursor)); + m_view->setCursor (TQCursor (TQt::WaitCursor)); } if (m_process) m_process->quit (); if (m_source) m_source->reset (); if (m_view) { - m_view->setCursor (QCursor (Qt::ArrowCursor)); + m_view->setCursor (TQCursor (TQt::ArrowCursor)); if (b->isOn ()) b->toggle (); m_view->controlPanel ()->setPlaying (false); @@ -814,11 +814,7 @@ KDE_NO_EXPORT void PartBase::posSliderPressed () { KDE_NO_EXPORT void PartBase::posSliderReleased () { m_bPosSliderPressed=false; -#if (QT_VERSION < 0x030200) - const QSlider * posSlider = dynamic_cast (sender ()); -#else - const QSlider * posSlider = ::qt_cast (sender ()); -#endif + const TQSlider * posSlider = ::tqqt_cast (sender ()); if (posSlider) m_process->seek (posSlider->value(), true); } @@ -860,7 +856,7 @@ KDE_NO_EXPORT void PartBase::sourceHasChangedAspects () { } KDE_NO_EXPORT void PartBase::positionValueChanged (int pos) { - QSlider * slider = ::qt_cast (sender ()); + TQSlider * slider = ::tqqt_cast (sender ()); if (slider && slider->isEnabled ()) m_process->seek (pos, true); } @@ -885,8 +881,8 @@ KAboutData* PartBase::createAboutData () { //----------------------------------------------------------------------------- -Source::Source (const QString & name, PartBase * player, const char * n) - : QObject (player, n), +Source::Source (const TQString & name, PartBase * player, const char * n) + : TQObject (player, n), m_name (name), m_player (player), m_identified (false), m_auto_play (true), m_frequency (0), m_xvport (0), m_xvencoding (-1), m_doc_timer (0) { init (); @@ -910,7 +906,7 @@ void Source::init () { m_recordcmd.truncate (0); } -KDE_NO_EXPORT void Source::setLanguages (const QStringList & alang, const QStringList & slang) { +KDE_NO_EXPORT void Source::setLanguages (const TQStringList & alang, const TQStringList & slang) { m_player->setLanguages (alang, slang); } @@ -971,13 +967,13 @@ KDE_NO_EXPORT void Source::setLoading (int percentage) { } /* -static void printTree (NodePtr root, QString off=QString()) { +static void printTree (NodePtr root, TQString off=TQString()) { if (!root) { kdDebug() << off << "[null]" << endl; return; } - kdDebug() << off << root->nodeName() << " " << (Element*)root << (root->isPlayable() ? root->mrl ()->src : QString ("-")) << endl; - off += QString (" "); + kdDebug() << off << root->nodeName() << " " << (Element*)root << (root->isPlayable() ? root->mrl ()->src : TQString ("-")) << endl; + off += TQString (" "); for (NodePtr e = root->firstChild(); e; e = e->nextSibling()) printTree(e, off); }*/ @@ -1001,7 +997,7 @@ void Source::setURL (const KURL & url) { m_current = m_document; } -void Source::setTitle (const QString & title) { +void Source::setTitle (const TQString & title) { emit titleChanged (title); } @@ -1027,14 +1023,14 @@ void Source::reset () { init (); } -QString Source::currentMrl () { +TQString Source::currentMrl () { Mrl * mrl = m_current ? m_current->mrl () : 0L; - kdDebug() << "Source::currentMrl " << (m_current ? m_current->nodeName():"") << " src:" << (mrl ? mrl->absolutePath () : QString ()) << endl; - return mrl ? mrl->absolutePath () : QString (); + kdDebug() << "Source::currentMrl " << (m_current ? m_current->nodeName():"") << " src:" << (mrl ? mrl->absolutePath () : TQString ()) << endl; + return mrl ? mrl->absolutePath () : TQString (); } void Source::playCurrent () { - QString url = currentMrl (); + TQString url = currentMrl (); m_player->changeURL (url); m_width = m_height = 0; m_aspect = 0.0; @@ -1044,7 +1040,7 @@ void Source::playCurrent () { if (!m_current) m_document->activate (); else { // ugly code duplicate w/ back_request - for (NodePtr p = m_current->parentNode(); p; p = p->parentNode()) + for (NodePtr p = m_current->tqparentNode(); p; p = p->tqparentNode()) p->state = Element::state_activated; m_current->activate (); } @@ -1097,7 +1093,7 @@ bool Source::requestPlayURL (NodePtr mrl) { else m_back_request = mrl; m_player->updateTree (); - QTimer::singleShot (0, this, SLOT (playCurrent ())); + TQTimer::singleShot (0, this, TQT_SLOT (playCurrent ())); } m_player->setProcess (mrl->mrl ()); return true; @@ -1114,7 +1110,7 @@ void Source::setTimeout (int ms) { m_doc_timer = ms > -1 ? startTimer (ms) : 0; } -void Source::timerEvent (QTimerEvent * e) { +void Source::timerEvent (TQTimerEvent * e) { if (e->timerId () == m_doc_timer && m_document && m_document->active ()) m_document->document ()->timer (); // will call setTimeout() else @@ -1137,7 +1133,7 @@ void Source::stateElementChanged (Node * elm, Node::State os, Node::State ns) { //a SMIL movies stopped by SMIL events rather than movie just ending m_player->process ()->stop (); if (m_player->view ()) // move away the video widget - QTimer::singleShot (0, m_player->view (), SLOT (updateLayout ())); + TQTimer::singleShot (0, m_player->view (), TQT_SLOT (updateLayout ())); } else if ((ns == Node::state_deferred || (os == Node::state_deferred && ns > Node::state_deferred)) && elm == m_document) { @@ -1145,7 +1141,7 @@ void Source::stateElementChanged (Node * elm, Node::State os, Node::State ns) { } else if (ns == Node::state_activated && elm->isPlayable () && elm->mrl ()->view_mode == Mrl::SingleMode) { - Node *p = elm->parentNode(); + Node *p = elm->tqparentNode(); if (!p || !p->mrl () || p->mrl ()->view_mode == Mrl::SingleMode) // make sure we don't set current to nested document m_current = elm; @@ -1164,7 +1160,7 @@ SurfacePtr Source::getSurface (NodePtr n) { return 0L; } -void Source::setInfoMessage (const QString & msg) { +void Source::setInfoMessage (const TQString & msg) { m_player->updateInfo (msg); } @@ -1173,10 +1169,10 @@ void Source::bitRates (int & preferred, int & maximal) { maximal= 1024 * m_player->settings ()->maxbitrate; } -void Source::insertURL (NodePtr node, const QString & mrl, const QString & title) { +void Source::insertURL (NodePtr node, const TQString & mrl, const TQString & title) { if (!node || !node->mrl ()) // this should always be false return; - QString cur_url = node->mrl ()->absolutePath (); + TQString cur_url = node->mrl ()->absolutePath (); KURL url (cur_url, mrl); kdDebug() << "Source::insertURL " << KURL (cur_url) << " " << url << endl; if (!url.isValid ()) @@ -1185,7 +1181,7 @@ void Source::insertURL (NodePtr node, const QString & mrl, const QString & title kdError () << "try to append url to itself" << endl; else { int depth = 0; // cache this? - for (NodePtr e = node; e->parentNode (); e = e->parentNode ()) + for (NodePtr e = node; e->tqparentNode (); e = e->tqparentNode ()) ++depth; if (depth < 40) { node->appendChild (new GenericURL (m_document, KURL::decode_string (url.url ()), title.isEmpty() ? KURL::decode_string (mrl) : title)); @@ -1197,7 +1193,7 @@ void Source::insertURL (NodePtr node, const QString & mrl, const QString & title void Source::play () { m_player->updateTree (); - QTimer::singleShot (0, m_player, SLOT (play ())); + TQTimer::singleShot (0, m_player, TQT_SLOT (play ())); //printTree (m_document); } @@ -1222,12 +1218,12 @@ void Source::backward () { else if (m_current) { m_document->reset (); m_current = e; - QTimer::singleShot (0, this, SLOT (playCurrent ())); + TQTimer::singleShot (0, this, TQT_SLOT (playCurrent ())); } return; } } else - m_back_request = m_back_request->parentNode (); + m_back_request = m_back_request->tqparentNode (); } m_back_request = 0L; } else @@ -1253,7 +1249,7 @@ void Source::jump (NodePtr e) { if (m_current) m_document->reset (); m_current = e; - QTimer::singleShot (0, this, SLOT (playCurrent ())); + TQTimer::singleShot (0, this, TQT_SLOT (playCurrent ())); } } else m_player->updateTree (); @@ -1261,7 +1257,7 @@ void Source::jump (NodePtr e) { NodePtr Source::document () { if (!m_document) - m_document = new Document (QString (), this); + m_document = new Document (TQString (), this); return m_document; } @@ -1269,13 +1265,13 @@ NodePtr Source::root () { return document (); } -bool Source::processOutput (const QString &) { +bool Source::processOutput (const TQString &) { return false; } -QString Source::filterOptions () { +TQString Source::filterOptions () { Settings* m_settings = m_player->settings (); - QString PPargs (""); + TQString PPargs (""); if (m_settings->postprocessing) { if (m_settings->pp_default) @@ -1371,7 +1367,7 @@ void Source::setIdentified (bool b) { m_identified = b; } -static const QString statemap [] = { +static const TQString statemap [] = { i18n ("Not Running"), i18n ("Ready"), i18n ("Buffering"), i18n ("Playing") }; @@ -1380,7 +1376,7 @@ void Source::stateChange(Process *p, Process::State olds, Process::State news) { Recorder *rec = dynamic_cast (p); if (rec && !rec->recordURL ().isEmpty ()) { kdDebug () << "recordState " << statemap[olds] << " -> " << statemap[news] << endl; - m_player->updateStatus (i18n ("Recorder %1 %2").arg (p->name ()).arg (statemap[news])); + m_player->updatetqStatus (i18n ("Recorder %1 %2").arg (p->name ()).arg (statemap[news])); p->viewer ()->view ()->controlPanel ()->setRecording (news > Process::Ready); if (news == Process::Ready) { if (olds > Process::Ready) { @@ -1398,7 +1394,7 @@ void Source::stateChange(Process *p, Process::State olds, Process::State news) { } else { p->viewer()->view()->controlPanel()->setPlaying(news > Process::Ready); kdDebug () << "processState " << statemap[olds] << " -> " << statemap[news] << endl; - m_player->updateStatus (i18n ("Player %1 %2").arg (p->name ()).arg (statemap[news])); + m_player->updatetqStatus (i18n ("Player %1 %2").arg (p->name ()).arg (statemap[news])); if (!p->mrl () && news > Process::Ready) { p->stop (); // reschedule for Ready state } else if (news == Process::Playing) { @@ -1428,9 +1424,9 @@ void Source::stateChange(Process *p, Process::State olds, Process::State news) { m_current->id < SMIL::id_node_last) { playCurrent (); // just play back_request } else { - // sanitize pl having all parents of current activated + // sanitize pl having all tqparents of current activated m_document->reset (); // deactivate everything - for (NodePtr p = m_current->parentNode(); p; p = p->parentNode()) + for (NodePtr p = m_current->tqparentNode(); p; p = p->tqparentNode()) p->state = Element::state_activated; m_current->activate (); // calls requestPlayUrl } @@ -1441,9 +1437,9 @@ void Source::stateChange(Process *p, Process::State olds, Process::State news) { } if (m_player->view() && (!mrl || mrl->view_mode != Mrl::WindowMode)) - static_cast(m_player->view())->viewArea()->repaint(); + static_cast(m_player->view())->viewArea()->tqrepaint(); } else - QTimer::singleShot (0, this, SLOT (playCurrent ())); + TQTimer::singleShot (0, this, TQT_SLOT (playCurrent ())); } else if (news == Process::Buffering) { if (p->mrl ()->mrl ()->view_mode != Mrl::SingleMode) p->mrl ()->defer (); // paused the SMIL @@ -1451,12 +1447,12 @@ void Source::stateChange(Process *p, Process::State olds, Process::State news) { } } -QString Source::plugin (const QString &mime) const { +TQString Source::plugin (const TQString &mime) const { m_player->config ()->setGroup (mime); return m_player->config ()->readEntry ("plugin", "" ); } -QString Source::prettyName () { +TQString Source::prettyName () { return i18n ("Unknown"); } @@ -1506,7 +1502,7 @@ KDE_NO_EXPORT void URLSource::stopResolving () { for (SharedPtr ri = m_resolve_info; ri; ri = ri->next) ri->job->kill (); m_resolve_info = 0L; - m_player->updateStatus (i18n ("Disconnected")); + m_player->updatetqStatus (i18n ("Disconnected")); m_player->setLoaded (100); } } @@ -1537,16 +1533,16 @@ void URLSource::deactivate () { getSurface (0L); } -QString URLSource::prettyName () { +TQString URLSource::prettyName () { if (m_url.isEmpty ()) return i18n ("URL"); if (m_url.url ().length () > 50) { - QString newurl = m_url.protocol () + QString ("://"); + TQString newurl = m_url.protocol () + TQString ("://"); if (m_url.hasHost ()) newurl += m_url.host (); if (m_url.port ()) - newurl += QString (":%1").arg (m_url.port ()); - QString file = m_url.fileName (); + newurl += TQString (":%1").arg (m_url.port ()); + TQString file = m_url.fileName (); int len = newurl.length () + file.length (); KURL path = KURL (m_url.directory ()); bool modified = false; @@ -1554,20 +1550,20 @@ QString URLSource::prettyName () { path = path.upURL (); modified = true; } - QString dir = path.directory (); - if (!dir.endsWith (QString ("/"))) + TQString dir = path.directory (); + if (!dir.endsWith (TQString ("/"))) dir += '/'; if (modified) - dir += QString (".../"); + dir += TQString (".../"); newurl += dir + file; return i18n ("URL - %1").arg (newurl); } return i18n ("URL - %1").arg (m_url.prettyURL ()); } -static bool isPlayListMime (const QString & mime) { - QString m (mime); - int plugin_pos = m.find ("-plugin"); +static bool isPlayListMime (const TQString & mime) { + TQString m (mime); + int plugin_pos = m.tqfind ("-plugin"); if (plugin_pos > 0) m.truncate (plugin_pos); const char * mimestr = m.ascii (); @@ -1595,8 +1591,8 @@ static bool isPlayListMime (const QString & mime) { !strcmp (mimestr, "application/x-mplayer2")); } -KDE_NO_EXPORT void URLSource::read (NodePtr root, QTextStream & textstream) { - QString line; +KDE_NO_EXPORT void URLSource::read (NodePtr root, TQTextStream & textstream) { + TQString line; do { line = textstream.readLine (); } while (!line.isNull () && line.stripWhiteSpace ().isEmpty ()); @@ -1604,25 +1600,25 @@ KDE_NO_EXPORT void URLSource::read (NodePtr root, QTextStream & textstream) { NodePtr cur_elm = root; if (cur_elm->isPlayable ()) cur_elm = cur_elm->mrl ()->linkNode (); - if (cur_elm->mrl ()->mimetype == QString ("audio/x-scpls")) { + if (cur_elm->mrl ()->mimetype == TQString ("audio/x-scpls")) { bool groupfound = false; int nr = -1; struct Entry { - QString url, title; + TQString url, title; } * entries = 0L; do { line = line.stripWhiteSpace (); if (!line.isEmpty ()) { - if (line.startsWith (QString ("[")) && line.endsWith (QString ("]"))) { - if (!groupfound && line.mid (1, line.length () - 2).stripWhiteSpace () == QString ("playlist")) + if (line.startsWith (TQString ("[")) && line.endsWith (TQString ("]"))) { + if (!groupfound && line.mid (1, line.length () - 2).stripWhiteSpace () == TQString ("playlist")) groupfound = true; else break; kdDebug () << "Group found: " << line << endl; } else if (groupfound) { - int eq_pos = line.find (QChar ('=')); + int eq_pos = line.tqfind (TQChar ('=')); if (eq_pos > 0) { - if (line.lower ().startsWith (QString ("numberofentries"))) { + if (line.lower ().startsWith (TQString ("numberofentries"))) { nr = line.mid (eq_pos + 1).stripWhiteSpace ().toInt (); kdDebug () << "numberofentries : " << nr << endl; if (nr > 0 && nr < 1024) @@ -1630,12 +1626,12 @@ KDE_NO_EXPORT void URLSource::read (NodePtr root, QTextStream & textstream) { else nr = 0; } else if (nr > 0) { - QString ll = line.lower (); - if (ll.startsWith (QString ("file"))) { + TQString ll = line.lower (); + if (ll.startsWith (TQString ("file"))) { int i = line.mid (4, eq_pos-4).toInt (); if (i > 0 && i <= nr) entries[i-1].url = line.mid (eq_pos + 1).stripWhiteSpace (); - } else if (ll.startsWith (QString ("title"))) { + } else if (ll.startsWith (TQString ("title"))) { int i = line.mid (5, eq_pos-5).toInt (); if (i > 0 && i <= nr) entries[i-1].title = line.mid (eq_pos + 1).stripWhiteSpace (); @@ -1650,29 +1646,29 @@ KDE_NO_EXPORT void URLSource::read (NodePtr root, QTextStream & textstream) { if (!entries[i].url.isEmpty ()) cur_elm->appendChild (new GenericURL (m_document, KURL::decode_string (entries[i].url), entries[i].title)); delete [] entries; - } else if (line.stripWhiteSpace ().startsWith (QChar ('<'))) { + } else if (line.stripWhiteSpace ().startsWith (TQChar ('<'))) { readXML (cur_elm, textstream, line); //cur_elm->normalize (); if (m_document && m_document->firstChild ()) { - // SMIL documents have set its size of root-layout + // SMIL documents have set its size of root-tqlayout Mrl * mrl = m_document->firstChild ()->mrl (); if (mrl) Source::setDimensions (m_document->firstChild (), mrl->width, mrl->height); } - } else if (line.lower () != QString ("[reference]")) do { - QString mrl = line.stripWhiteSpace (); - if (line == QString ("--stop--")) + } else if (line.lower () != TQString ("[reference]")) do { + TQString mrl = line.stripWhiteSpace (); + if (line == TQString ("--stop--")) break; - if (mrl.lower ().startsWith (QString ("asf "))) + if (mrl.lower ().startsWith (TQString ("asf "))) mrl = mrl.mid (4).stripWhiteSpace (); - if (!mrl.isEmpty () && !mrl.startsWith (QChar ('#'))) + if (!mrl.isEmpty () && !mrl.startsWith (TQChar ('#'))) cur_elm->appendChild (new GenericURL (m_document, mrl)); line = textstream.readLine (); } while (!line.isNull ()); /* TODO && m_document.size () < 1024 / * support 1k entries * /);*/ } } -KDE_NO_EXPORT void URLSource::kioData (KIO::Job * job, const QByteArray & d) { +KDE_NO_EXPORT void URLSource::kioData (KIO::Job * job, const TQByteArray & d) { SharedPtr rinfo = m_resolve_info; while (rinfo && rinfo->job != job) rinfo = rinfo->next; @@ -1686,7 +1682,7 @@ KDE_NO_EXPORT void URLSource::kioData (KIO::Job * job, const QByteArray & d) { int accuraty = 0; KMimeType::Ptr mime = KMimeType::findByContent (d, &accuraty); if (!mime || - !mime->name ().startsWith (QString ("text/")) || + !mime->name ().startsWith (TQString ("text/")) || (newsize > 4 && !strncmp (d.data (), "RIFF", 4))) { newsize = 0; kdDebug () << "URLSource::kioData: " << mime->name () << accuraty << endl; @@ -1704,7 +1700,7 @@ KDE_NO_EXPORT void URLSource::kioData (KIO::Job * job, const QByteArray & d) { } } -KDE_NO_EXPORT void URLSource::kioMimetype (KIO::Job * job, const QString & mimestr) { +KDE_NO_EXPORT void URLSource::kioMimetype (KIO::Job * job, const TQString & mimestr) { SharedPtr rinfo = m_resolve_info; while (rinfo && rinfo->job != job) rinfo = rinfo->next; @@ -1728,13 +1724,13 @@ KDE_NO_EXPORT void URLSource::kioResult (KIO::Job * job) { kdWarning () << "Spurious kioData" << endl; return; } - m_player->updateStatus (""); + m_player->updatetqStatus (""); m_player->setLoaded (100); if (previnfo) previnfo->next = rinfo->next; else m_resolve_info = rinfo->next; - QTextStream textstream (rinfo->data, IO_ReadOnly); + TQTextStream textstream (rinfo->data, IO_ReadOnly); if (rinfo->resolving_mrl) { if (isPlayListMime (rinfo->resolving_mrl->mrl ()->mimetype)) read (rinfo->resolving_mrl, textstream); @@ -1794,19 +1790,19 @@ bool URLSource::resolveURL (NodePtr m) { if (!mrl || mrl->src.isEmpty ()) return true; int depth = 0; - for (NodePtr e = m->parentNode (); e; e = e->parentNode ()) + for (NodePtr e = m->tqparentNode (); e; e = e->tqparentNode ()) ++depth; if (depth > 40) return true; KURL url (mrl->absolutePath ()); - QString mimestr = mrl->mimetype; + TQString mimestr = mrl->mimetype; if (mimestr == "application/x-shockwave-flash" || mimestr == "application/futuresplash") return true; // FIXME bool maybe_playlist = isPlayListMime (mimestr); kdDebug () << "resolveURL " << mrl->absolutePath () << " " << mimestr << endl; if (url.isLocalFile ()) { - QFile file (url.path ()); + TQFile file (url.path ()); if (!file.exists ()) { kdWarning () << "resolveURL " << url.path() << " not found" << endl; return true; @@ -1823,39 +1819,39 @@ bool URLSource::resolveURL (NodePtr m) { int nr_bytes = file.readBlock (databuf, 512); if (nr_bytes > 3) { int accuraty = 0; - KMimeType::Ptr mime = KMimeType::findByContent (QCString (databuf, nr_bytes), &accuraty); - if ((mime && !mime->name().startsWith (QString("text/"))) || + KMimeType::Ptr mime = KMimeType::findByContent (TQCString (databuf, nr_bytes), &accuraty); + if ((mime && !mime->name().startsWith (TQString("text/"))) || !strncmp (databuf, "RIFF", 4)) { return true; } - kdDebug () << "mime: " << (mime ? mime->name (): QString("null")) << endl; + kdDebug () << "mime: " << (mime ? mime->name (): TQString("null")) << endl; } file.reset (); - QTextStream textstream (&file); + TQTextStream textstream (&file); read (m, textstream); } } else if ((maybe_playlist && - url.protocol ().compare (QString ("mms")) && - url.protocol ().compare (QString ("rtsp")) && - url.protocol ().compare (QString ("rtp"))) || + url.protocol ().compare (TQString ("mms")) && + url.protocol ().compare (TQString ("rtsp")) && + url.protocol ().compare (TQString ("rtp"))) || (mimestr.isEmpty () && - (url.protocol ().startsWith (QString ("http")) || - url.protocol () == QString::fromLatin1 ("media") || - url.protocol () == QString::fromLatin1 ("remote")))) { + (url.protocol ().startsWith (TQString ("http")) || + url.protocol () == TQString::tqfromLatin1 ("media") || + url.protocol () == TQString::tqfromLatin1 ("remote")))) { KIO::Job * job = KIO::get (url, false, false); job->addMetaData ("PropagateHttpHeader", "true"); job->addMetaData ("errorPage", "false"); m_resolve_info = new ResolveInfo (m, job, m_resolve_info); - connect (m_resolve_info->job, SIGNAL(data(KIO::Job*,const QByteArray&)), - this, SLOT (kioData (KIO::Job *, const QByteArray &))); - //connect( m_job, SIGNAL(connected(KIO::Job*)), - // this, SLOT(slotConnected(KIO::Job*))); - connect(m_resolve_info->job, SIGNAL(mimetype(KIO::Job*,const QString&)), - this, SLOT (kioMimetype (KIO::Job *, const QString &))); - connect (m_resolve_info->job, SIGNAL (result (KIO::Job *)), - this, SLOT (kioResult (KIO::Job *))); + connect (m_resolve_info->job, TQT_SIGNAL(data(KIO::Job*,const TQByteArray&)), + this, TQT_SLOT (kioData (KIO::Job *, const TQByteArray &))); + //connect( m_job, TQT_SIGNAL(connected(KIO::Job*)), + // this, TQT_SLOT(slotConnected(KIO::Job*))); + connect(m_resolve_info->job, TQT_SIGNAL(mimetype(KIO::Job*,const TQString&)), + this, TQT_SLOT (kioMimetype (KIO::Job *, const TQString &))); + connect (m_resolve_info->job, TQT_SIGNAL (result (KIO::Job *)), + this, TQT_SLOT (kioResult (KIO::Job *))); static_cast (m_player->view ())->controlPanel ()->setPlaying (true); - m_player->updateStatus (i18n ("Connecting")); + m_player->updatetqStatus (i18n ("Connecting")); m_player->setLoaded (0); return false; // wait for result .. } @@ -1869,16 +1865,16 @@ namespace KMPlayer { static DataCache * memory_cache; } -void DataCache::add (const QString & url, const QByteArray & data) { - QByteArray bytes; +void DataCache::add (const TQString & url, const TQByteArray & data) { + TQByteArray bytes; bytes.duplicate (data); cache_map.insert (url, bytes); preserve_map.erase (url); emit preserveRemoved (url); } -bool DataCache::get (const QString & url, QByteArray & data) { - DataMap::const_iterator it = cache_map.find (url); +bool DataCache::get (const TQString & url, TQByteArray & data) { + DataMap::const_iterator it = cache_map.tqfind (url); if (it != cache_map.end ()) { data.duplicate (it.data ()); return true; @@ -1886,8 +1882,8 @@ bool DataCache::get (const QString & url, QByteArray & data) { return false; } -bool DataCache::preserve (const QString & url) { - PreserveMap::const_iterator it = preserve_map.find (url); +bool DataCache::preserve (const TQString & url) { + PreserveMap::const_iterator it = preserve_map.tqfind (url); if (it == preserve_map.end ()) { preserve_map.insert (url, true); return true; @@ -1895,12 +1891,12 @@ bool DataCache::preserve (const QString & url) { return false; } -bool DataCache::isPreserved (const QString & url) { - return preserve_map.find (url) != preserve_map.end (); +bool DataCache::isPreserved (const TQString & url) { + return preserve_map.tqfind (url) != preserve_map.end (); } -bool DataCache::unpreserve (const QString & url) { - const PreserveMap::iterator it = preserve_map.find (url); +bool DataCache::unpreserve (const TQString & url) { + const PreserveMap::iterator it = preserve_map.tqfind (url); if (it == preserve_map.end ()) return false; preserve_map.erase (it); @@ -1918,11 +1914,11 @@ RemoteObjectPrivate::~RemoteObjectPrivate () { clear (); } -KDE_NO_EXPORT bool RemoteObjectPrivate::download (const QString & str) { +KDE_NO_EXPORT bool RemoteObjectPrivate::download (const TQString & str) { url = str; KURL kurl (str); if (kurl.isLocalFile ()) { - QFile file (kurl.path ()); + TQFile file (kurl.path ()); if (file.exists () && file.open (IO_ReadOnly)) { data = file.readAll (); file.close (); @@ -1938,16 +1934,16 @@ KDE_NO_EXPORT bool RemoteObjectPrivate::download (const QString & str) { if (memory_cache->preserve (str)) { //kdDebug () << "downloading " << str << endl; job = KIO::get (kurl, false, false); - connect (job, SIGNAL (data (KIO::Job *, const QByteArray &)), - this, SLOT (slotData (KIO::Job *, const QByteArray &))); - connect (job, SIGNAL (result (KIO::Job *)), - this, SLOT (slotResult (KIO::Job *))); - connect (job, SIGNAL (mimetype (KIO::Job *, const QString &)), - this, SLOT (slotMimetype (KIO::Job *, const QString &))); + connect (job, TQT_SIGNAL (data (KIO::Job *, const TQByteArray &)), + this, TQT_SLOT (slotData (KIO::Job *, const TQByteArray &))); + connect (job, TQT_SIGNAL (result (KIO::Job *)), + this, TQT_SLOT (slotResult (KIO::Job *))); + connect (job, TQT_SIGNAL (mimetype (KIO::Job *, const TQString &)), + this, TQT_SLOT (slotMimetype (KIO::Job *, const TQString &))); } else { //kdDebug () << "download preserved " << str << endl; - connect (memory_cache, SIGNAL (preserveRemoved (const QString &)), - this, SLOT (cachePreserveRemoved (const QString &))); + connect (memory_cache, TQT_SIGNAL (preserveRemoved (const TQString &)), + this, TQT_SLOT (cachePreserveRemoved (const TQString &))); preserve_wait = true; } return false; @@ -1959,8 +1955,8 @@ KDE_NO_EXPORT void RemoteObjectPrivate::clear () { job = 0L; memory_cache->unpreserve (url); } else if (preserve_wait) { - disconnect (memory_cache, SIGNAL (preserveRemoved (const QString &)), - this, SLOT (cachePreserveRemoved (const QString &))); + disconnect (memory_cache, TQT_SIGNAL (preserveRemoved (const TQString &)), + this, TQT_SLOT (cachePreserveRemoved (const TQString &))); preserve_wait = false; } } @@ -1975,17 +1971,17 @@ KDE_NO_EXPORT void RemoteObjectPrivate::slotResult (KIO::Job * kjob) { } KDE_NO_EXPORT -void RemoteObjectPrivate::cachePreserveRemoved (const QString & str) { +void RemoteObjectPrivate::cachePreserveRemoved (const TQString & str) { if (str == url && !memory_cache->isPreserved (str)) { preserve_wait = false; - disconnect (memory_cache, SIGNAL (preserveRemoved (const QString &)), - this, SLOT (cachePreserveRemoved (const QString &))); + disconnect (memory_cache, TQT_SIGNAL (preserveRemoved (const TQString &)), + this, TQT_SLOT (cachePreserveRemoved (const TQString &))); download (str); } } KDE_NO_EXPORT -void RemoteObjectPrivate::slotData (KIO::Job*, const QByteArray& qb) { +void RemoteObjectPrivate::slotData (KIO::Job*, const TQByteArray& qb) { if (qb.size ()) { int old_size = data.size (); data.resize (old_size + qb.size ()); @@ -1994,7 +1990,7 @@ void RemoteObjectPrivate::slotData (KIO::Job*, const QByteArray& qb) { } KDE_NO_EXPORT -void RemoteObjectPrivate::slotMimetype (KIO::Job *, const QString & m) { +void RemoteObjectPrivate::slotMimetype (KIO::Job *, const TQString & m) { mime = m; } @@ -2015,12 +2011,12 @@ KDE_NO_EXPORT void RemoteObject::killWGet () { /** * Gets contents from url and puts it in m_data */ -KDE_NO_EXPORT bool RemoteObject::wget (const QString & url) { +KDE_NO_EXPORT bool RemoteObject::wget (const TQString & url) { clear (); return d->download (url); } -KDE_NO_EXPORT QString RemoteObject::mimetype () { +KDE_NO_EXPORT TQString RemoteObject::mimetype () { if (d->data.size () > 0 && d->mime.isEmpty ()) { int accuraty; KMimeType::Ptr mime = KMimeType::findByContent (d->data, &accuraty); diff --git a/src/kmplayerpartbase.h b/src/kmplayerpartbase.h index 206f71e..5082860 100644 --- a/src/kmplayerpartbase.h +++ b/src/kmplayerpartbase.h @@ -23,10 +23,10 @@ #include "kmplayer_def.h" -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -41,9 +41,9 @@ class KInstance; class KActionCollection; class KBookmarkMenu; class KConfig; -class QIODevice; -class QTextStream; -class QListViewItem; +class TQIODevice; +class TQTextStream; +class TQListViewItem; namespace KIO { class Job; @@ -67,13 +67,14 @@ class Settings; */ class KMPLAYER_EXPORT URLSource : public Source { Q_OBJECT +// TQ_OBJECT public: URLSource (PartBase * player, const KURL & url = KURL ()); virtual ~URLSource (); virtual void dimensions (int & w, int & h); virtual bool hasLength (); - virtual QString prettyName (); + virtual TQString prettyName (); virtual void reset (); virtual void setURL (const KURL & url); public slots: @@ -86,21 +87,21 @@ public slots: virtual void jump (NodePtr e); void play (); private slots: - void kioData (KIO::Job *, const QByteArray &); - void kioMimetype (KIO::Job *, const QString &); + void kioData (KIO::Job *, const TQByteArray &); + void kioMimetype (KIO::Job *, const TQString &); void kioResult (KIO::Job *); protected: virtual bool requestPlayURL (NodePtr mrl); virtual bool resolveURL (NodePtr mrl); private: - void read (NodePtr mrl, QTextStream &); + void read (NodePtr mrl, TQTextStream &); void stopResolving (); struct ResolveInfo { ResolveInfo (NodePtr mrl, KIO::Job * j, SharedPtr & n) : resolving_mrl (mrl), job (j), progress (0), next (n) {} NodePtrW resolving_mrl; KIO::Job * job; - QByteArray data; + TQByteArray data; int progress; SharedPtr next; }; @@ -113,10 +114,11 @@ private: */ class KMPLAYER_EXPORT PartBase : public KMediaPlayer::Player { Q_OBJECT +// TQ_OBJECT K_DCOP public: - typedef QMap ProcessMap; - PartBase (QWidget * parent, const char * wname,QObject * objectParent, const char * name, KConfig *); + typedef TQMap ProcessMap; + PartBase (TQWidget * tqparent, const char * wname,TQObject * objectParent, const char * name, KConfig *); ~PartBase (); void init (KActionCollection * = 0L); virtual KMediaPlayer::View* view (); @@ -143,23 +145,23 @@ public: Process * process () const { return m_process; } Process * recorder () const { return m_recorder; } Source * source () const { return m_source; } - QMap & players () { return m_players; } - QMap & recorders () { return m_recorders; } - QMap & sources () { return m_sources; } + TQMap & players () { return m_players; } + TQMap & recorders () { return m_recorders; } + TQMap & sources () { return m_sources; } KConfig * config () const { return m_config; } bool mayResize () const { return !m_noresize; } void updatePlayerMenu (ControlPanel *); - void updateInfo (const QString & msg); - void updateStatus (const QString & msg); + void updateInfo (const TQString & msg); + void updatetqStatus (const TQString & msg); #ifdef HAVE_DBUS - void setServiceName (const QString & srv) { m_service = srv; } - QString serviceName () const { return m_service; } + void setServiceName (const TQString & srv) { m_service = srv; } + TQString serviceName () const { return m_service; } #endif // these are called from Process - void changeURL (const QString & url); + void changeURL (const TQString & url); void updateTree (bool full=true, bool force=false); - void setLanguages (const QStringList & alang, const QStringList & slang); + void setLanguages (const TQStringList & alang, const TQStringList & slang); public slots: virtual bool openURL (const KURL & url); virtual bool openURL (const KURL::List & urls); @@ -176,7 +178,7 @@ public slots: void slotPlayerMenu (int); void back (); void forward (); - void addBookMark (const QString & title, const QString & url); + void addBookMark (const TQString & title, const TQString & url); void volumeChanged (int); void increaseVolume (); void decreaseVolume (); @@ -194,20 +196,20 @@ signals: void sourceChanged (KMPlayer::Source * old, KMPlayer::Source * nw); void sourceDimensionChanged (); void loading (int percentage); - void urlAdded (const QString & url); - void urlChanged (const QString & url); + void urlAdded (const TQString & url); + void urlChanged (const TQString & url); void processChanged (const char *); void treeChanged (int id, NodePtr root, NodePtr, bool select, bool open); void treeUpdated (); - void infoUpdated (const QString & msg); - void statusUpdated (const QString & msg); - void languagesUpdated(const QStringList & alang, const QStringList & slang); + void infoUpdated (const TQString & msg); + void statusUpdated (const TQString & msg); + void languagesUpdated(const TQStringList & alang, const TQStringList & slang); void audioIsSelected (int id); void subtitleIsSelected (int id); void positioned (int pos, int length); protected: bool openFile(); - virtual void timerEvent (QTimerEvent *); + virtual void timerEvent (TQTimerEvent *); protected slots: void posSliderPressed (); void posSliderReleased (); @@ -218,8 +220,8 @@ protected slots: void saturationValueChanged (int val); void sourceHasChangedAspects (); void fullScreen (); - void playListItemClicked (QListViewItem *); - void playListItemExecuted (QListViewItem *); + void playListItemClicked (TQListViewItem *); + void playListItemExecuted (TQListViewItem *); virtual void playingStarted (); virtual void playingStopped (); void recordingStarted (); @@ -229,20 +231,20 @@ protected slots: void subtitleSelected (int); protected: KConfig * m_config; - QGuardedPtr m_view; - QMap temp_backends; + TQGuardedPtr m_view; + TQMap temp_backends; Settings * m_settings; Process * m_process; Process * m_recorder; Source * m_source; ProcessMap m_players; ProcessMap m_recorders; - QMap m_sources; + TQMap m_sources; BookmarkManager * m_bookmark_manager; BookmarkOwner * m_bookmark_owner; KBookmarkMenu * m_bookmark_menu; #ifdef HAVE_DBUS - QString m_service; + TQString m_service; #endif int m_record_timer; int m_update_tree_timer; @@ -254,40 +256,42 @@ protected: bool m_update_tree_full : 1; }; -class KMPLAYER_NO_EXPORT DataCache : public QObject { +class KMPLAYER_NO_EXPORT DataCache : public TQObject { Q_OBJECT - typedef QMap DataMap; - typedef QMap PreserveMap; +// TQ_OBJECT + typedef TQMap DataMap; + typedef TQMap PreserveMap; DataMap cache_map; PreserveMap preserve_map; public: DataCache () {} ~DataCache () {} - void add (const QString &, const QByteArray &); - bool get (const QString &, QByteArray &); - bool preserve (const QString &); - bool unpreserve (const QString &); - bool isPreserved (const QString &); + void add (const TQString &, const TQByteArray &); + bool get (const TQString &, TQByteArray &); + bool preserve (const TQString &); + bool unpreserve (const TQString &); + bool isPreserved (const TQString &); signals: - void preserveRemoved (const QString &); // ready or canceled + void preserveRemoved (const TQString &); // ready or canceled }; -class KMPLAYER_NO_EXPORT RemoteObjectPrivate : public QObject { +class KMPLAYER_NO_EXPORT RemoteObjectPrivate : public TQObject { Q_OBJECT +// TQ_OBJECT public: RemoteObjectPrivate (RemoteObject * r); ~RemoteObjectPrivate (); - bool download (const QString &); + bool download (const TQString &); void clear (); KIO::Job * job; - QString url; - QByteArray data; - QString mime; + TQString url; + TQByteArray data; + TQString mime; private slots: void slotResult (KIO::Job*); - void slotData (KIO::Job*, const QByteArray& qb); - void slotMimetype (KIO::Job * job, const QString & mimestr); - void cachePreserveRemoved (const QString &); + void slotData (KIO::Job*, const TQByteArray& qb); + void slotMimetype (KIO::Job * job, const TQString & mimestr); + void cachePreserveRemoved (const TQString &); private: RemoteObject * remote_object; bool preserve_wait; diff --git a/src/kmplayerplaylist.cpp b/src/kmplayerplaylist.cpp index e2db4f3..9e1db11 100644 --- a/src/kmplayerplaylist.cpp +++ b/src/kmplayerplaylist.cpp @@ -19,7 +19,7 @@ #include #include -#include +#include #include #include #ifdef HAVE_EXPAT @@ -45,7 +45,7 @@ using namespace KMPlayer; //----------------------------------------------------------------------------- namespace KMPlayer { - Node * fromXMLDocumentTag (NodePtr & d, const QString & tag) { + Node * fromXMLDocumentTag (NodePtr & d, const TQString & tag) { const char * const name = tag.latin1 (); if (!strcmp (name, "smil")) return new SMIL::Smil (d); @@ -60,7 +60,7 @@ namespace KMPlayer { else if (!strcasecmp (name, "playlist")) return new XSPF::Playlist (d); else if (!strcasecmp (name, "url")) - return new GenericURL (d, QString ()); + return new GenericURL (d, TQString ()); else if (!strcasecmp (name, "mrl") || !strcasecmp (name, "document")) return new GenericMrl (d); @@ -70,21 +70,21 @@ namespace KMPlayer { //----------------------------------------------------------------------------- struct XMLStringlet { - const QString str; - XMLStringlet (const QString & s) : str (s) {} + const TQString str; + XMLStringlet (const TQString & s) : str (s) {} }; } // namespace -QTextStream & operator << (QTextStream & out, const XMLStringlet & txt) { +TQTextStream & operator << (TQTextStream & out, const XMLStringlet & txt) { int len = int (txt.str.length ()); for (int i = 0; i < len; ++i) { - if (txt.str [i] == QChar ('<')) { + if (txt.str [i] == TQChar ('<')) { out << "<"; - } else if (txt.str [i] == QChar ('>')) { + } else if (txt.str [i] == TQChar ('>')) { out << ">"; - } else if (txt.str [i] == QChar ('"')) { + } else if (txt.str [i] == TQChar ('"')) { out << """; - } else if (txt.str [i] == QChar ('&')) { + } else if (txt.str [i] == TQChar ('&')) { out << "&"; } else out << txt.str [i]; @@ -296,7 +296,7 @@ void Node::clearChildren () { if (m_doc) document()->m_tree_version++; while (m_first_child != m_last_child) { - // avoid stack abuse with 10k children derefing each other + // avoid stack abuse with 10k tqchildren derefing each other m_last_child->m_parent = 0L; m_last_child = m_last_child->m_prev; m_last_child->m_next = 0L; @@ -308,7 +308,7 @@ void Node::clearChildren () { void Node::appendChild (NodePtr c) { document()->m_tree_version++; - ASSERT (!c->parentNode ()); + ASSERT (!c->tqparentNode ()); TreeNode::appendChild (c); } @@ -316,7 +316,7 @@ void Node::insertBefore (NodePtr c, NodePtr b) { if (!b) { appendChild (c); } else { - ASSERT (!c->parentNode ()); + ASSERT (!c->tqparentNode ()); document()->m_tree_version++; if (b->m_prev) { b->m_prev->m_next = c; @@ -358,11 +358,11 @@ KDE_NO_EXPORT void Node::replaceChild (NodePtr _new, NodePtr old) { old->m_parent = 0L; } -NodePtr Node::childFromTag (const QString &) { +NodePtr Node::childFromTag (const TQString &) { return NodePtr (); } -KDE_NO_EXPORT void Node::characterData (const QString & s) { +KDE_NO_EXPORT void Node::characterData (const TQString & s) { document()->m_tree_version++; if (!m_last_child || m_last_child->id != id_node_text) appendChild (new TextNode (m_doc, s)); @@ -375,7 +375,7 @@ void Node::normalize () { while (e) { NodePtr tmp = e->nextSibling (); if (!e->isElementNode () && e->id == id_node_text) { - QString val = e->nodeValue ().simplifyWhiteSpace (); + TQString val = e->nodeValue ().simplifyWhiteSpace (); if (val.isEmpty ()) removeChild (e); else @@ -386,7 +386,7 @@ void Node::normalize () { } } -static void getInnerText (const NodePtr p, QTextOStream & out) { +static void getInnerText (const NodePtr p, TQTextOStream & out) { for (NodePtr e = p->firstChild (); e; e = e->nextSibling ()) { if (e->id == id_node_text || e->id == id_node_cdata) out << e->nodeValue (); @@ -395,48 +395,48 @@ static void getInnerText (const NodePtr p, QTextOStream & out) { } } -QString Node::innerText () const { - QString buf; - QTextOStream out (&buf); +TQString Node::innerText () const { + TQString buf; + TQTextOStream out (&buf); getInnerText (m_self, out); return buf; } -static void getOuterXML (const NodePtr p, QTextOStream & out, int depth) { +static void getOuterXML (const NodePtr p, TQTextOStream & out, int depth) { if (!p->isElementNode ()) { // #text or #cdata if (p->id == id_node_cdata) - out << "nodeValue () << "]]>" << QChar ('\n'); + out << "nodeValue () << "]]>" << TQChar ('\n'); else - out << XMLStringlet (p->nodeValue ()) << QChar ('\n'); + out << XMLStringlet (p->nodeValue ()) << TQChar ('\n'); } else { Element * e = convertNode (p); - QString indent (QString ().fill (QChar (' '), depth)); - out << indent << QChar ('<') << XMLStringlet (e->nodeName ()); + TQString indent (TQString ().fill (TQChar (' '), depth)); + out << indent << TQChar ('<') << XMLStringlet (e->nodeName ()); for (AttributePtr a = e->attributes()->first(); a; a = a->nextSibling()) out << " " << XMLStringlet (a->name ().toString ()) << "=\"" << XMLStringlet (a->value ()) << "\""; if (e->hasChildNodes ()) { - out << QChar ('>') << QChar ('\n'); + out << TQChar ('>') << TQChar ('\n'); for (NodePtr c = e->firstChild (); c; c = c->nextSibling ()) getOuterXML (c, out, depth + 1); - out << indent << QString("nodeName()) << - QChar ('>') << QChar ('\n'); + out << indent << TQString("nodeName()) << + TQChar ('>') << TQChar ('\n'); } else - out << QString ("/>") << QChar ('\n'); + out << TQString ("/>") << TQChar ('\n'); } } -QString Node::innerXML () const { - QString buf; - QTextOStream out (&buf); +TQString Node::innerXML () const { + TQString buf; + TQTextOStream out (&buf); for (NodePtr e = firstChild (); e; e = e->nextSibling ()) getOuterXML (e, out, 0); return buf; } -QString Node::outerXML () const { - QString buf; - QTextOStream out (&buf); +TQString Node::outerXML () const { + TQString buf; + TQTextOStream out (&buf); getOuterXML (m_self, out, 0); return buf; } @@ -475,8 +475,8 @@ ConnectionPtr Node::connectTo (NodePtr node, unsigned int evt_id) { return ConnectionPtr (); } -QString Node::nodeValue () const { - return QString (); +TQString Node::nodeValue () const { + return TQString (); } SurfacePtr Node::getSurface (NodePtr) { @@ -493,21 +493,21 @@ RefNode::RefNode (NodePtr & d, NodePtr ref) void RefNode::setRefNode (const NodePtr ref) { ref_node = ref; if (ref_node) - tag_name = QString ("&%1").arg (ref_node->nodeName ()); + tag_name = TQString ("&%1").arg (ref_node->nodeName ()); } //----------------------------------------------------------------------------- namespace KMPlayer { struct KMPLAYER_NO_EXPORT ParamValue { - QString val; - QStringList * modifications; - ParamValue (const QString & v) : val (v), modifications (0L) {} + TQString val; + TQStringList * modifications; + ParamValue (const TQString & v) : val (v), modifications (0L) {} ~ParamValue () { delete modifications; } - QString value (); - void setValue (const QString & v) { val = v; } + TQString value (); + void setValue (const TQString & v) { val = v; } }; - typedef QMap ParamMap; + typedef TQMap ParamMap; class KMPLAYER_NO_EXPORT ElementPrivate { public: ~ElementPrivate (); @@ -516,7 +516,7 @@ namespace KMPlayer { }; } -KDE_NO_EXPORT QString ParamValue::value () { +KDE_NO_EXPORT TQString ParamValue::value () { return modifications && modifications->size () ? modifications->back () : val; } @@ -539,15 +539,15 @@ Element::~Element () { delete d; } -void Element::setParam (const TrieString ¶m, const QString &val, int *mid) { +void Element::setParam (const TrieString ¶m, const TQString &val, int *mid) { ParamValue * pv = d->params [param]; if (!pv) { - pv = new ParamValue (mid ? QString() : val); + pv = new ParamValue (mid ? TQString() : val); d->params.insert (param, pv); } if (mid) { if (!pv->modifications) - pv->modifications = new QStringList; + pv->modifications = new TQStringList; if (*mid >= 0 && *mid < int (pv->modifications->size ())) { (*pv->modifications) [*mid] = val; } else { @@ -559,23 +559,23 @@ void Element::setParam (const TrieString ¶m, const QString &val, int *mid) { parseParam (param, val); } -QString Element::param (const TrieString & name) { +TQString Element::param (const TrieString & name) { ParamValue * pv = d->params [name]; if (pv) return pv->value (); - return QString (); + return TQString (); } void Element::resetParam (const TrieString & param, int mid) { ParamValue * pv = d->params [param]; if (pv && pv->modifications) { if (int (pv->modifications->size ()) > mid && mid > -1) { - (*pv->modifications) [mid] = QString (); + (*pv->modifications) [mid] = TQString (); while (pv->modifications->size () > 0 && pv->modifications->back ().isNull ()) pv->modifications->pop_back (); } - QString val = pv->value (); + TQString val = pv->value (); if (pv->modifications->size () == 0) { delete pv->modifications; pv->modifications = 0L; @@ -590,7 +590,7 @@ void Element::resetParam (const TrieString & param, int mid) { kdError () << "resetting " << param.toString() << " that doesn't exists" << endl; } -void Element::setAttribute (const TrieString & name, const QString & value) { +void Element::setAttribute (const TrieString & name, const TQString & value) { for (AttributePtr a = m_attributes->first (); a; a = a->nextSibling ()) if (name == a->name ()) { a->setValue (value); @@ -599,11 +599,11 @@ void Element::setAttribute (const TrieString & name, const QString & value) { m_attributes->append (new Attribute (name, value)); } -QString Element::getAttribute (const TrieString & name) { +TQString Element::getAttribute (const TrieString & name) { for (AttributePtr a = m_attributes->first (); a; a = a->nextSibling ()) if (name == a->name ()) return a->value (); - return QString (); + return TQString (); } void Element::init () { @@ -629,14 +629,14 @@ void Element::setAttributes (AttributeListPtr attrs) { //----------------------------------------------------------------------------- -Attribute::Attribute (const TrieString & n, const QString & v) +Attribute::Attribute (const TrieString & n, const TQString & v) : m_name (n), m_value (v) {} void Attribute::setName (const TrieString & n) { m_name = n; } -void Attribute::setValue (const QString & v) { +void Attribute::setValue (const TQString & v) { m_value = v; } @@ -666,10 +666,10 @@ Node::PlayType Mrl::playType () { return cached_play_type; } -QString Mrl::absolutePath () { - QString path = src; +TQString Mrl::absolutePath () { + TQString path = src; if (!path.isEmpty()) { - for (NodePtr e = parentNode (); e; e = e->parentNode ()) { + for (NodePtr e = tqparentNode (); e; e = e->tqparentNode ()) { Mrl * mrl = e->mrl (); if (mrl && !mrl->src.isEmpty () && mrl->src != src) { path = KURL (mrl->absolutePath (), src).url (); @@ -680,7 +680,7 @@ QString Mrl::absolutePath () { return path; } -NodePtr Mrl::childFromTag (const QString & tag) { +NodePtr Mrl::childFromTag (const TQString & tag) { Node * elm = fromXMLDocumentTag (m_doc, tag); if (elm) return elm; @@ -737,7 +737,7 @@ void Mrl::begin () { } SurfacePtr Mrl::getSurface (NodePtr node) { - for (NodePtr p = parentNode (); p; p = p->parentNode ()) + for (NodePtr p = tqparentNode (); p; p = p->tqparentNode ()) if (p->mrl ()) return p->getSurface (node); return 0L; @@ -747,9 +747,9 @@ bool Mrl::handleEvent (EventPtr) { return false; } -void Mrl::parseParam (const TrieString & para, const QString & val) { +void Mrl::parseParam (const TrieString & para, const TQString & val) { if (para == StringPool::attr_src && !src.startsWith ("#")) { - QString abs = absolutePath (); + TQString abs = absolutePath (); if (abs != src) src = val; else @@ -782,7 +782,7 @@ Surface::~Surface() { } void Surface::remove () { - Surface *sp = parentNode ().ptr (); + Surface *sp = tqparentNode ().ptr (); if (sp) { sp->markDirty (); sp->removeChild (this); @@ -790,7 +790,7 @@ void Surface::remove () { } void Surface::markDirty () { - for (Surface *s = this; s; s = s->parentNode ().ptr ()) + for (Surface *s = this; s; s = s->tqparentNode ().ptr ()) s->dirty = true; } @@ -812,7 +812,7 @@ namespace KMPlayer { static NodePtr dummy_element; } -Document::Document (const QString & s, PlayListNotify * n) +Document::Document (const TQString & s, PlayListNotify * n) : Mrl (dummy_element, id_node_document), notify_listener (n), m_tree_version (0), @@ -827,7 +827,7 @@ Document::~Document () { kdDebug () << "~Document" << endl; } -static NodePtr getElementByIdImpl (NodePtr n, const QString & id, bool inter) { +static NodePtr getElementByIdImpl (NodePtr n, const TQString & id, bool inter) { NodePtr elm; if (!n->isElementNode ()) return elm; @@ -843,15 +843,15 @@ static NodePtr getElementByIdImpl (NodePtr n, const QString & id, bool inter) { return elm; } -NodePtr Document::getElementById (const QString & id) { +NodePtr Document::getElementById (const TQString & id) { return getElementByIdImpl (this, id, true); } -NodePtr Document::getElementById (NodePtr n, const QString & id, bool inter) { +NodePtr Document::getElementById (NodePtr n, const TQString & id, bool inter) { return getElementByIdImpl (n, id, inter); } -NodePtr Document::childFromTag (const QString & tag) { +NodePtr Document::childFromTag (const TQString & tag) { Node * elm = fromXMLDocumentTag (m_doc, tag); if (elm) return elm; @@ -1066,14 +1066,14 @@ NodeRefListPtr Document::listeners (unsigned int id) { //----------------------------------------------------------------------------- -KDE_NO_CDTOR_EXPORT TextNode::TextNode (NodePtr & d, const QString & s, short i) +KDE_NO_CDTOR_EXPORT TextNode::TextNode (NodePtr & d, const TQString & s, short i) : Node (d, i), text (s) {} -void TextNode::appendText (const QString & s) { +void TextNode::appendText (const TQString & s) { text += s; } -QString TextNode::nodeValue () const { +TQString TextNode::nodeValue () const { return text; } @@ -1083,16 +1083,16 @@ KDE_NO_EXPORT bool TextNode::expose () const { //----------------------------------------------------------------------------- -KDE_NO_CDTOR_EXPORT CData::CData (NodePtr & d, const QString & s) +KDE_NO_CDTOR_EXPORT CData::CData (NodePtr & d, const TQString & s) : TextNode (d, s, id_node_cdata) {} //----------------------------------------------------------------------------- -DarkNode::DarkNode (NodePtr & d, const QString & n, short id) +DarkNode::DarkNode (NodePtr & d, const TQString & n, short id) : Element (d, id), name (n) { } -NodePtr DarkNode::childFromTag (const QString & tag) { +NodePtr DarkNode::childFromTag (const TQString & tag) { return new DarkNode (m_doc, tag); } @@ -1102,7 +1102,7 @@ KDE_NO_EXPORT bool DarkNode::expose () const { //----------------------------------------------------------------------------- -GenericURL::GenericURL (NodePtr & d, const QString & s, const QString & name) +GenericURL::GenericURL (NodePtr & d, const TQString & s, const TQString & name) : Mrl (d, id_node_playlist_item) { src = s; if (!src.isEmpty ()) @@ -1117,7 +1117,7 @@ KDE_NO_EXPORT void GenericURL::closed () { //----------------------------------------------------------------------------- -GenericMrl::GenericMrl (NodePtr & d, const QString & s, const QString & name, const QString & tag) +GenericMrl::GenericMrl (NodePtr & d, const TQString & s, const TQString & name, const TQString & tag) : Mrl (d, id_node_playlist_item), node_name (tag) { src = s; if (!src.isEmpty ()) @@ -1155,16 +1155,16 @@ class KMPLAYER_NO_EXPORT DocumentBuilder { public: DocumentBuilder (NodePtr d, bool set_opener); ~DocumentBuilder () {} - bool startTag (const QString & tag, AttributeListPtr attr); - bool endTag (const QString & tag); - bool characterData (const QString & data); - bool cdataData (const QString & data); + bool startTag (const TQString & tag, AttributeListPtr attr); + bool endTag (const TQString & tag); + bool characterData (const TQString & data); + bool cdataData (const TQString & data); #ifdef HAVE_EXPAT void cdataStart (); void cdataEnd (); private: bool in_cdata; - QString cdata; + TQString cdata; #endif }; @@ -1178,7 +1178,7 @@ DocumentBuilder::DocumentBuilder (NodePtr d, bool set_opener) #endif {} -bool DocumentBuilder::startTag(const QString &tag, AttributeListPtr attr) { +bool DocumentBuilder::startTag(const TQString &tag, AttributeListPtr attr) { if (m_ignore_depth) { m_ignore_depth++; //kdDebug () << "Warning: ignored tag " << tag.latin1 () << " ignore depth = " << m_ignore_depth << endl; @@ -1207,7 +1207,7 @@ bool DocumentBuilder::startTag(const QString &tag, AttributeListPtr attr) { return true; } -bool DocumentBuilder::endTag (const QString & tag) { +bool DocumentBuilder::endTag (const TQString & tag) { if (m_ignore_depth) { // endtag to ignore m_ignore_depth--; kdDebug () << "Warning: ignored end tag " << " ignore depth = " << m_ignore_depth << endl; @@ -1218,10 +1218,10 @@ bool DocumentBuilder::endTag (const QString & tag) { (m_root_is_first || n != m_root)) { while (n != m_node) { kdWarning() << m_node->nodeName () << " not closed" << endl; - if (m_root == m_node->parentNode ()) + if (m_root == m_node->tqparentNode ()) break; m_node->closed (); - m_node = m_node->parentNode (); + m_node = m_node->tqparentNode (); } break; } @@ -1234,16 +1234,16 @@ bool DocumentBuilder::endTag (const QString & tag) { break; } else kdWarning () << "tag " << tag << " not " << n->nodeName () << endl; - n = n ->parentNode (); + n = n ->tqparentNode (); } //kdDebug () << "end tag " << tag << endl; m_node->closed (); - m_node = m_node->parentNode (); + m_node = m_node->tqparentNode (); } return true; } -bool DocumentBuilder::characterData (const QString & data) { +bool DocumentBuilder::characterData (const TQString & data) { if (!m_ignore_depth) { #ifdef HAVE_EXPAT if (in_cdata) @@ -1256,7 +1256,7 @@ bool DocumentBuilder::characterData (const QString & data) { return true; } -bool DocumentBuilder::cdataData (const QString & data) { +bool DocumentBuilder::cdataData (const TQString & data) { if (!m_ignore_depth) { NodePtr d = m_node->document (); m_node->appendChild (new CData (d, data)); @@ -1283,14 +1283,14 @@ static void startTag (void *data, const char * tag, const char **attr) { AttributeListPtr attributes = new AttributeList; if (attr && attr [0]) { for (int i = 0; attr[i]; i += 2) - attributes->append (new Attribute (QString::fromUtf8 (attr [i]), QString::fromUtf8 (attr [i+1]))); + attributes->append (new Attribute (TQString::fromUtf8 (attr [i]), TQString::fromUtf8 (attr [i+1]))); } - builder->startTag (QString::fromUtf8 (tag), attributes); + builder->startTag (TQString::fromUtf8 (tag), attributes); } static void endTag (void *data, const char * tag) { DocumentBuilder * builder = static_cast (data); - builder->endTag (QString::fromUtf8 (tag)); + builder->endTag (TQString::fromUtf8 (tag)); } static void characterData (void *data, const char *s, int len) { @@ -1298,7 +1298,7 @@ static void characterData (void *data, const char *s, int len) { char * buf = new char [len + 1]; strncpy (buf, s, len); buf[len] = 0; - builder->characterData (QString::fromUtf8 (buf)); + builder->characterData (TQString::fromUtf8 (buf)); delete [] buf; } @@ -1315,7 +1315,7 @@ static void cdataEnd (void *data) { namespace KMPlayer { KMPLAYER_EXPORT -void readXML (NodePtr root, QTextStream & in, const QString & firstline, bool set_opener) { +void readXML (NodePtr root, TQTextStream & in, const TQString & firstline, bool set_opener) { bool ok = true; DocumentBuilder builder (root, set_opener); XML_Parser parser = XML_ParserCreate (0L); @@ -1324,14 +1324,14 @@ void readXML (NodePtr root, QTextStream & in, const QString & firstline, bool se XML_SetCharacterDataHandler (parser, characterData); XML_SetCdataSectionHandler (parser, cdataStart, cdataEnd); if (!firstline.isEmpty ()) { - QString str (firstline + QChar ('\n')); - QCString buf = str.utf8 (); + TQString str (firstline + TQChar ('\n')); + TQCString buf = str.utf8 (); ok = XML_Parse(parser, buf, strlen (buf), false) != XML_STATUS_ERROR; if (!ok) kdWarning () << XML_ErrorString(XML_GetErrorCode(parser)) << " at " << XML_GetCurrentLineNumber(parser) << " col " << XML_GetCurrentColumnNumber(parser) << endl; } if (ok && !in.atEnd ()) { - QCString buf = in.read ().utf8 (); + TQCString buf = in.read ().utf8 (); ok = XML_Parse(parser, buf, strlen (buf), true) != XML_STATUS_ERROR; if (!ok) kdWarning () << XML_ErrorString(XML_GetErrorCode(parser)) << " at " << XML_GetCurrentLineNumber(parser) << " col " << XML_GetCurrentColumnNumber(parser) << endl; @@ -1352,12 +1352,12 @@ class KMPLAYER_NO_EXPORT SimpleSAXParser { public: SimpleSAXParser (DocumentBuilder & b) : builder (b), position (0), m_attributes (new AttributeList), equal_seen (false), in_dbl_quote (false), in_sngl_quote (false), have_error (false), no_entitity_look_ahead (false), have_next_char (false) {} virtual ~SimpleSAXParser () {}; - bool parse (QTextStream & d); + bool parse (TQTextStream & d); private: - QTextStream * data; + TQTextStream * data; DocumentBuilder & builder; int position; - QChar next_char; + TQChar next_char; enum Token { tok_empty, tok_text, tok_white_space, tok_angle_open, tok_equal, tok_double_quote, tok_single_quote, tok_angle_close, tok_slash, tok_exclamation, tok_amp, tok_hash, tok_semi_colon, @@ -1368,23 +1368,23 @@ private: struct TokenInfo { TokenInfo () : token (tok_empty) {} Token token; - QString string; + TQString string; SharedPtr next; }; typedef SharedPtr TokenInfoPtr; struct StateInfo { StateInfo (State s, SharedPtr n) : state (s), next (n) {} State state; - QString data; + TQString data; SharedPtr next; }; SharedPtr m_state; TokenInfoPtr next_token, token, prev_token; // for element reading - QString tagname; + TQString tagname; AttributeListPtr m_attributes; - QString attr_name, attr_value; - QString cdata; + TQString attr_name, attr_value; + TQString cdata; bool equal_seen; bool in_dbl_quote; bool in_sngl_quote; @@ -1407,17 +1407,17 @@ private: } // namespace KMPLAYER_EXPORT -void KMPlayer::readXML (NodePtr root, QTextStream & in, const QString & firstline, bool set_opener) { +void KMPlayer::readXML (NodePtr root, TQTextStream & in, const TQString & firstline, bool set_opener) { DocumentBuilder builder (root, set_opener); SimpleSAXParser parser (builder); if (!firstline.isEmpty ()) { - QString str (firstline + QChar ('\n')); - QTextStream fl_in (&str, IO_ReadOnly); + TQString str (firstline + TQChar ('\n')); + TQTextStream fl_in (&str, IO_ReadOnly); parser.parse (fl_in); } if (!in.atEnd ()) parser.parse (in); - for (NodePtr e = root; e; e = e->parentNode ()) + for (NodePtr e = root; e; e = e->tqparentNode ()) e->closed (); //doc->normalize (); //kdDebug () << root->outerXML (); @@ -1455,39 +1455,39 @@ bool SimpleSAXParser::nextToken () { push (); next_token->token = tok_white_space; } else if (!next_char.isLetterOrNumber ()) { - if (next_char == QChar ('#')) { + if (next_char == TQChar ('#')) { //if (next_token->token == tok_empty) { // check last item on stack & push (); next_token->token = tok_hash; //} - } else if (next_char == QChar ('/')) { + } else if (next_char == TQChar ('/')) { push (); next_token->token = tok_slash; - } else if (next_char == QChar ('!')) { + } else if (next_char == TQChar ('!')) { push (); next_token->token = tok_exclamation; - } else if (next_char == QChar ('?')) { + } else if (next_char == TQChar ('?')) { push (); next_token->token = tok_question_mark; - } else if (next_char == QChar ('<')) { + } else if (next_char == TQChar ('<')) { push (); next_token->token = tok_angle_open; - } else if (next_char == QChar ('>')) { + } else if (next_char == TQChar ('>')) { push (); next_token->token = tok_angle_close; - } else if (next_char == QChar (';')) { + } else if (next_char == TQChar (';')) { push (); next_token->token = tok_semi_colon; - } else if (next_char == QChar ('=')) { + } else if (next_char == TQChar ('=')) { push (); next_token->token = tok_equal; - } else if (next_char == QChar ('"')) { + } else if (next_char == TQChar ('"')) { push (); next_token->token = tok_double_quote; - } else if (next_char == QChar ('\'')) { + } else if (next_char == TQChar ('\'')) { push (); next_token->token = tok_single_quote; - } else if (next_char == QChar ('&')) { + } else if (next_char == TQChar ('&')) { push (); if (no_entitity_look_ahead) { have_next_char = true; @@ -1499,20 +1499,20 @@ bool SimpleSAXParser::nextToken () { TokenInfoPtr prev_tmp = prev_token; if (nextToken () && token->token == tok_text && nextToken () && token->token == tok_semi_colon) { - if (prev_token->string == QString ("amp")) - token->string = QChar ('&'); - else if (prev_token->string == QString ("lt")) - token->string = QChar ('<'); - else if (prev_token->string == QString ("gt")) - token->string = QChar ('>'); - else if (prev_token->string == QString ("quot")) - token->string = QChar ('"'); - else if (prev_token->string == QString ("apos")) - token->string = QChar ('\''); - else if (prev_token->string == QString ("copy")) - token->string = QChar (169); + if (prev_token->string == TQString ("amp")) + token->string = TQChar ('&'); + else if (prev_token->string == TQString ("lt")) + token->string = TQChar ('<'); + else if (prev_token->string == TQString ("gt")) + token->string = TQChar ('>'); + else if (prev_token->string == TQString ("quot")) + token->string = TQChar ('"'); + else if (prev_token->string == TQString ("apos")) + token->string = TQChar ('\''); + else if (prev_token->string == TQString ("copy")) + token->string = TQChar (169); else - token->string = QChar ('?');// TODO lookup more .. + token->string = TQChar ('?');// TODO lookup more .. token->token = tok_text; if (tmp) { // cut out the & xxx ; tokens tmp->next = token; @@ -1524,10 +1524,10 @@ bool SimpleSAXParser::nextToken () { nextToken () && token->token == tok_semi_colon) { //kdDebug () << "char entity found " << prev_token->string << prev_token->string.toInt (0L, 16) << endl; token->token = tok_text; - if (!prev_token->string.startsWith (QChar ('x'))) - token->string = QChar (prev_token->string.toInt ()); + if (!prev_token->string.startsWith (TQChar ('x'))) + token->string = TQChar (prev_token->string.toInt ()); else - token->string = QChar (prev_token->string.mid (1).toInt (0L, 16)); + token->string = TQChar (prev_token->string.mid (1).toInt (0L, 16)); if (tmp) { // cut out the '& # xxx ;' tokens tmp->next = token; token = tmp; @@ -1536,7 +1536,7 @@ bool SimpleSAXParser::nextToken () { token = tmp; // restore and insert the lost & token tmp = TokenInfoPtr (new TokenInfo); tmp->token = tok_amp; - tmp->string += QChar ('&'); + tmp->string += TQChar ('&'); tmp->next = token->next; if (token) token->next = tmp; @@ -1556,7 +1556,7 @@ bool SimpleSAXParser::nextToken () { if (append_char) next_token->string += next_char; if (next_token->token == tok_text && - next_char == QChar ('[' ) && next_token->string == "[CDATA[") { + next_char == TQChar ('[' ) && next_token->string == "[CDATA[") { next_token->token = tok_cdata_start; break; } @@ -1639,7 +1639,7 @@ bool SimpleSAXParser::readAttributes () { } m_state = m_state->next; if (m_state->state == InPITag) { - if (tagname == QString ("xml")) { + if (tagname == TQString ("xml")) { /*const AttributeMap::const_iterator e = attr.end (); for (AttributeMap::const_iterator i = attr.begin (); i != e; ++i) if (!strcasecmp (i.key ().latin1 (), "encoding")) @@ -1674,7 +1674,7 @@ bool SimpleSAXParser::readPI () { bool SimpleSAXParser::readDTD () { //TODO: if (!nextToken ()) return false; - if (token->token == tok_text && token->string.startsWith (QString ("--"))) { + if (token->token == tok_text && token->string.startsWith (TQString ("--"))) { m_state = new StateInfo (InComment, m_state->next); // note: pop DTD return readComment (); } @@ -1702,7 +1702,7 @@ bool SimpleSAXParser::readDTD () { bool SimpleSAXParser::readCDATA () { while (!data->atEnd ()) { *data >> next_char; - if (next_char == QChar ('>') && cdata.endsWith (QString ("]]"))) { + if (next_char == TQChar ('>') && cdata.endsWith (TQString ("]]"))) { cdata.truncate (cdata.length () - 2); m_state = m_state->next; if (m_state->state == InContent) @@ -1724,7 +1724,7 @@ bool SimpleSAXParser::readCDATA () { bool SimpleSAXParser::readComment () { while (nextToken ()) { if (token->token == tok_angle_close && prev_token) - if (prev_token->string.endsWith (QString ("--"))) { + if (prev_token->string.endsWith (TQString ("--"))) { m_state = m_state->next; return true; } @@ -1773,7 +1773,7 @@ bool SimpleSAXParser::readTag () { return readAttributes (); } -bool SimpleSAXParser::parse (QTextStream & d) { +bool SimpleSAXParser::parse (TQTextStream & d) { data = &d; if (!next_token) { next_token = TokenInfoPtr (new TokenInfo); @@ -1781,7 +1781,7 @@ bool SimpleSAXParser::parse (QTextStream & d) { } bool ok = true; bool in_character_data = false; - QString white_space; + TQString white_space; while (ok) { switch (m_state->state) { case InTag: @@ -1821,7 +1821,7 @@ bool SimpleSAXParser::parse (QTextStream & d) { } else { if (!white_space.isEmpty ()) { if (!in_character_data) { - int pos = white_space.findRev (QChar ('\n')); + int pos = white_space.tqfindRev (TQChar ('\n')); if (pos > -1) white_space = white_space.mid (pos + 1); } diff --git a/src/kmplayerplaylist.h b/src/kmplayerplaylist.h index c9c0b6b..0b3f29b 100644 --- a/src/kmplayerplaylist.h +++ b/src/kmplayerplaylist.h @@ -26,7 +26,7 @@ #include #include -#include +#include #include "kmplayer_def.h" #include "kmplayertypes.h" @@ -34,7 +34,7 @@ typedef struct _cairo_surface cairo_surface_t; -class QTextStream; +class TQTextStream; namespace KMPlayer { @@ -164,8 +164,8 @@ public: }; /* - * Base class for double linked tree nodes having parent/siblings/children. - * The linkage is a shared firstChild and weak parentNode. + * Base class for double linked tree nodes having tqparent/siblings/tqchildren. + * The linkage is a shared firstChild and weak tqparentNode. */ template class KMPLAYER_EXPORT TreeNode : public ListNodeBase { @@ -176,7 +176,7 @@ public: virtual void removeChild (typename Item::SharedType c); bool hasChildNodes () const { return m_first_child != 0L; } - typename Item::SharedType parentNode () const { return m_parent; } + typename Item::SharedType tqparentNode () const { return m_parent; } typename Item::SharedType firstChild () const { return m_first_child; } typename Item::SharedType lastChild () const { return m_last_child; } @@ -193,15 +193,15 @@ protected: class KMPLAYER_EXPORT Attribute : public ListNodeBase { public: KDE_NO_CDTOR_EXPORT Attribute () {} - Attribute (const TrieString & n, const QString & v); + Attribute (const TrieString & n, const TQString & v); KDE_NO_CDTOR_EXPORT ~Attribute () {} TrieString name () const { return m_name; } - QString value () const { return m_value; } + TQString value () const { return m_value; } void setName (const TrieString &); - void setValue (const QString &); + void setValue (const TQString &); protected: TrieString m_name; - QString m_value; + TQString m_value; }; ITEM_AS_POINTER(KMPlayer::Attribute) @@ -246,7 +246,7 @@ typedef Item::WeakType NodePtrW; typedef Item::SharedType AttributePtr; typedef Item::WeakType AttributePtrW; typedef Item::SharedType EventPtr; -typedef List NodeList; // eg. for Node's children +typedef List NodeList; // eg. for Node's tqchildren typedef Item::SharedType NodeListPtr; typedef Item::WeakType NodeListPtrW; ITEM_AS_POINTER(KMPlayer::NodeList) @@ -312,14 +312,14 @@ public: virtual ~Node (); Document * document (); virtual Mrl * mrl (); - virtual NodePtr childFromTag (const QString & tag); - void characterData (const QString & s); - QString innerText () const; - QString innerXML () const; - QString outerXML () const; + virtual NodePtr childFromTag (const TQString & tag); + void characterData (const TQString & s); + TQString innerText () const; + TQString innerXML () const; + TQString outerXML () const; virtual const char * nodeName () const; - virtual QString nodeValue () const; - virtual void setNodeName (const QString &) {} + virtual TQString nodeValue () const; + virtual void setNodeName (const TQString &) {} /** * If this is a derived Mrl object and has a SRC attribute @@ -397,12 +397,12 @@ public: virtual void begin (); /** * Sets state to state_finish when >= state_activated. - * Notifies parent with a childDone call. + * Notifies tqparent with a childDone call. */ virtual void finish (); /** * Stops element, sets state to state_deactivated. Calls deactivate() on - * activated/deferred children. May call childDone() when active() and not + * activated/deferred tqchildren. May call childDone() when active() and not * finished yet. */ virtual void deactivate (); @@ -440,7 +440,7 @@ public: */ virtual void opened (); /* - * Close tag is found by parser, children are appended + * Close tag is found by parser, tqchildren are appended */ virtual void closed (); protected: @@ -475,8 +475,8 @@ class KMPLAYER_EXPORT Element : public Node { public: ~Element (); void setAttributes (AttributeListPtr attrs); - void setAttribute (const TrieString & name, const QString & value); - QString getAttribute (const TrieString & name); + void setAttribute (const TrieString & name, const TQString & value); + TQString getAttribute (const TrieString & name); KDE_NO_EXPORT AttributeListPtr attributes () const { return m_attributes; } virtual void init (); virtual void reset (); @@ -487,13 +487,13 @@ public: * pass a modification id, that it can use to restore the old value. * Param will be auto removed on deactivate */ - void setParam (const TrieString ¶, const QString &val, int * mod_id=0L); - QString param (const TrieString & para); + void setParam (const TrieString ¶, const TQString &val, int * mod_id=0L); + TQString param (const TrieString & para); void resetParam (const TrieString & para, int mod_id); /** * Called from (re)setParam for specialized interpretation of params **/ - virtual void parseParam (const TrieString &, const QString &) {} + virtual void parseParam (const TrieString &, const TQString &) {} protected: Element (NodePtr & d, short id=0); AttributeListPtr m_attributes; @@ -512,7 +512,7 @@ public: void setRefNode (const NodePtr ref); protected: NodePtrW ref_node; - QString tag_name; + TQString tag_name; }; template @@ -526,8 +526,8 @@ inline KDE_NO_EXPORT T * convertNode (NodePtr e) { class KMPLAYER_EXPORT Mrl : public Element { protected: Mrl (NodePtr & d, short id=0); - NodePtr childFromTag (const QString & tag); - void parseParam (const TrieString &, const QString &); + NodePtr childFromTag (const TQString & tag); + void parseParam (const TrieString &, const TQString &); unsigned int cached_ismrl_version; PlayType cached_play_type; public: @@ -539,7 +539,7 @@ public: virtual Mrl * linkNode (); virtual Mrl * mrl (); virtual void endOfFile (); - QString absolutePath (); + TQString absolutePath (); /* * Reimplement to callback with requestPlayURL if isPlayable() */ @@ -553,12 +553,12 @@ public: /** * If this Mrl is top node of external document, opener has the - * location in SCR. Typically that's the parent of this node. + * location in SCR. Typically that's the tqparent of this node. */ NodePtrW opener; //if this node is top node of external document, - QString src; - QString pretty_name; - QString mimetype; + TQString src; + TQString pretty_name; + TQString mimetype; Single width; Single height; float aspect; @@ -594,7 +594,7 @@ public: /** * Request to show msg for informing the user */ - virtual void setInfoMessage (const QString & msg) = 0; + virtual void setInfoMessage (const TQString & msg) = 0; /** * Ask for connection bitrates settings */ @@ -613,12 +613,12 @@ class KMPLAYER_NO_EXPORT RemoteObject { public: RemoteObject (); virtual ~RemoteObject (); - bool wget (const QString & url); + bool wget (const TQString & url); void killWGet (); void clear (); - QString mimetype (); + TQString mimetype (); protected: - KDE_NO_EXPORT virtual void remoteReady (QByteArray &) {} + KDE_NO_EXPORT virtual void remoteReady (TQByteArray &) {} bool downloading () const; private: RemoteObjectPrivate *d; @@ -632,14 +632,14 @@ public: virtual SurfacePtr createSurface (NodePtr owner, const SRect & rect) = 0; virtual IRect toScreen (Single x, Single y, Single w, Single h) = 0; virtual void resize (const SRect & rect) = 0; - virtual void repaint () = 0; - virtual void repaint (const SRect &rect) = 0; + virtual void tqrepaint () = 0; + virtual void tqrepaint (const SRect &rect) = 0; virtual void video () = 0; - void remove (); // remove from parent, mark ancestors dirty + void remove (); // remove from tqparent, mark ancestors dirty void markDirty (); // mark this and ancestors dirty NodePtrW node; - SRect bounds; // bounds in in parent coord. + SRect bounds; // bounds in in tqparent coord. float xscale, yscale; // internal scaling unsigned int background_color; // rgba background color bool dirty; // a decendant is removed @@ -710,15 +710,15 @@ typedef WeakPtr PostponePtrW; class KMPLAYER_EXPORT Document : public Mrl { friend class Postpone; public: - Document (const QString &, PlayListNotify * notify = 0L); + Document (const TQString &, PlayListNotify * notify = 0L); ~Document (); - NodePtr getElementById (const QString & id); - NodePtr getElementById (NodePtr start, const QString & id, bool inter_doc); + NodePtr getElementById (const TQString & id); + NodePtr getElementById (NodePtr start, const TQString & id, bool inter_doc); /** All nodes have shared pointers to Document, * so explicitly dispose it (calls clear and set m_doc to 0L) * */ void dispose (); - virtual NodePtr childFromTag (const QString & tag); + virtual NodePtr childFromTag (const TQString & tag); KDE_NO_EXPORT const char * nodeName () const { return "document"; } virtual void activate (); virtual void defer (); @@ -765,15 +765,15 @@ private: */ class KMPLAYER_EXPORT TextNode : public Node { public: - TextNode (NodePtr & d, const QString & s, short _id = id_node_text); + TextNode (NodePtr & d, const TQString & s, short _id = id_node_text); KDE_NO_CDTOR_EXPORT ~TextNode () {} - void appendText (const QString & s); - void setText (const QString & txt) { text = txt; } + void appendText (const TQString & s); + void setText (const TQString & txt) { text = txt; } const char * nodeName () const { return "#text"; } - QString nodeValue () const; + TQString nodeValue () const; bool expose () const; protected: - QString text; + TQString text; }; /** @@ -781,23 +781,23 @@ protected: */ class KMPLAYER_EXPORT CData : public TextNode { public: - CData (NodePtr & d, const QString & s); + CData (NodePtr & d, const TQString & s); KDE_NO_CDTOR_EXPORT ~CData () {} const char * nodeName () const { return "#cdata"; } }; /** - * Unrecognized tag by parent element or just some auxiliary node + * Unrecognized tag by tqparent element or just some auxiliary node */ class KMPLAYER_EXPORT DarkNode : public Element { public: - DarkNode (NodePtr & d, const QString & n, short id=0); + DarkNode (NodePtr & d, const TQString & n, short id=0); KDE_NO_CDTOR_EXPORT ~DarkNode () {} const char * nodeName () const { return name.ascii (); } - NodePtr childFromTag (const QString & tag); + NodePtr childFromTag (const TQString & tag); virtual bool expose () const; protected: - QString name; + TQString name; }; namespace SMIL { @@ -860,7 +860,7 @@ public: */ class KMPLAYER_EXPORT GenericURL : public Mrl { public: - GenericURL(NodePtr &d, const QString &s, const QString &n=QString ()); + GenericURL(NodePtr &d, const TQString &s, const TQString &n=TQString ()); KDE_NO_EXPORT const char * nodeName () const { return "url"; } void closed (); }; @@ -871,16 +871,16 @@ public: class KMPLAYER_EXPORT GenericMrl : public Mrl { public: KDE_NO_CDTOR_EXPORT GenericMrl (NodePtr & d) : Mrl (d), node_name ("mrl") {} - GenericMrl(NodePtr &d, const QString &s, const QString & name=QString (), const QString &tag=QString ("mrl")); + GenericMrl(NodePtr &d, const TQString &s, const TQString & name=TQString (), const TQString &tag=TQString ("mrl")); KDE_NO_EXPORT const char * nodeName () const { return node_name.ascii (); } void closed (); bool expose () const; - QString node_name; + TQString node_name; }; KMPLAYER_EXPORT -void readXML (NodePtr root, QTextStream & in, const QString & firstline, bool set_opener=true); -KMPLAYER_EXPORT Node * fromXMLDocumentTag (NodePtr & d, const QString & tag); +void readXML (NodePtr root, TQTextStream & in, const TQString & firstline, bool set_opener=true); +KMPLAYER_EXPORT Node * fromXMLDocumentTag (NodePtr & d, const TQString & tag); template inline Item::Item () : m_self (static_cast (this), true) {} diff --git a/src/kmplayerprocess.cpp b/src/kmplayerprocess.cpp index fff98f4..415e28b 100644 --- a/src/kmplayerprocess.cpp +++ b/src/kmplayerprocess.cpp @@ -19,20 +19,20 @@ */ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -64,23 +64,23 @@ using namespace KMPlayer; static const char * default_supported [] = { 0L }; -static QString getPath (const KURL & url) { - QString p = KURL::decode_string (url.url ()); - if (p.startsWith (QString ("file:/"))) { +static TQString getPath (const KURL & url) { + TQString p = KURL::decode_string (url.url ()); + if (p.startsWith (TQString ("file:/"))) { p = p.mid (5); unsigned int i = 0; - for (; i < p.length () && p[i] == QChar ('/'); ++i) + for (; i < p.length () && p[i] == TQChar ('/'); ++i) ; //kdDebug () << "getPath " << p.mid (i-1) << endl; if (i > 0) return p.mid (i-1); - return QString (QChar ('/') + p); + return TQString (TQChar ('/') + p); } return p; } -Process::Process (QObject * parent, Settings * settings, const char * n) - : QObject (parent, n), m_source (0L), m_settings (settings), +Process::Process (TQObject * tqparent, Settings * settings, const char * n) + : TQObject (tqparent, n), m_source (0L), m_settings (settings), m_state (NotRunning), m_old_state (NotRunning), m_process (0L), m_job(0L), m_supported_sources (default_supported), m_viewer (0L) {} @@ -92,8 +92,8 @@ Process::~Process () { void Process::init () { } -QString Process::menuName () const { - return QString (className ()); +TQString Process::menuName () const { + return TQString (className ()); } void Process::initProcess (Viewer * viewer) { @@ -101,7 +101,7 @@ void Process::initProcess (Viewer * viewer) { delete m_process; m_process = new KProcess; m_process->setUseShell (true); - m_process->setEnvironment (QString::fromLatin1 ("SESSION_MANAGER"), QString::fromLatin1 ("")); + m_process->setEnvironment (TQString::tqfromLatin1 ("SESSION_MANAGER"), TQString::tqfromLatin1 ("")); if (m_source) m_source->setPosition (0); } @@ -113,9 +113,9 @@ bool Process::playing () const { return m_process && m_process->isRunning (); } -void Process::setAudioLang (int, const QString &) {} +void Process::setAudioLang (int, const TQString &) {} -void Process::setSubtitle (int, const QString &) {} +void Process::setSubtitle (int, const TQString &) {} bool Process::pause () { return false; @@ -191,7 +191,7 @@ void Process::setState (State newstate) { m_old_state = m_state; m_state = newstate; if (need_timer && m_source) - QTimer::singleShot (0, this, SLOT (rescheduledStateChanged ())); + TQTimer::singleShot (0, this, TQT_SLOT (rescheduledStateChanged ())); } } @@ -205,7 +205,7 @@ bool Process::play (Source * src, NodePtr _mrl) { m_source = src; m_mrl = _mrl; Mrl * m = _mrl ? _mrl->mrl () : 0L; - QString url = m ? m->absolutePath () : QString (); + TQString url = m ? m->absolutePath () : TQString (); bool changed = m_url != url; m_url = url; #if KDE_IS_VERSION(3,3,91) @@ -213,7 +213,7 @@ bool Process::play (Source * src, NodePtr _mrl) { return deMediafiedPlay (); m_url = url; m_job = KIO::stat (m_url, false); - connect(m_job, SIGNAL (result(KIO::Job *)), this, SLOT(result(KIO::Job *))); + connect(m_job, TQT_SIGNAL (result(KIO::Job *)), this, TQT_SLOT(result(KIO::Job *))); return true; #else return deMediafiedPlay (); @@ -258,15 +258,15 @@ Viewer * Process::viewer () const { //----------------------------------------------------------------------------- -static bool proxyForURL (const KURL& url, QString& proxy) { +static bool proxyForURL (const KURL& url, TQString& proxy) { KProtocolManager::slaveProtocol (url, proxy); return !proxy.isNull (); } //----------------------------------------------------------------------------- -KDE_NO_CDTOR_EXPORT MPlayerBase::MPlayerBase (QObject * parent, Settings * settings, const char * n) - : Process (parent, settings, n), m_use_slave (true) { +KDE_NO_CDTOR_EXPORT MPlayerBase::MPlayerBase (TQObject * tqparent, Settings * settings, const char * n) + : Process (tqparent, settings, n), m_use_slave (true) { m_process = new KProcess; } @@ -277,22 +277,22 @@ KDE_NO_EXPORT void MPlayerBase::initProcess (Viewer * viewer) { Process::initProcess (viewer); const KURL & url (m_source->url ()); if (!url.isEmpty ()) { - QString proxy_url; + TQString proxy_url; if (KProtocolManager::useProxy () && proxyForURL (url, proxy_url)) m_process->setEnvironment("http_proxy", proxy_url); } - connect (m_process, SIGNAL (wroteStdin (KProcess *)), - this, SLOT (dataWritten (KProcess *))); - connect (m_process, SIGNAL (processExited (KProcess *)), - this, SLOT (processStopped (KProcess *))); + connect (m_process, TQT_SIGNAL (wroteStdin (KProcess *)), + this, TQT_SLOT (dataWritten (KProcess *))); + connect (m_process, TQT_SIGNAL (processExited (KProcess *)), + this, TQT_SLOT (processStopped (KProcess *))); } -KDE_NO_EXPORT bool MPlayerBase::sendCommand (const QString & cmd) { +KDE_NO_EXPORT bool MPlayerBase::sendCommand (const TQString & cmd) { if (playing () && m_use_slave) { commands.push_front (cmd + '\n'); fprintf (stderr, "eval %s", commands.last ().latin1 ()); if (commands.size () < 2) - m_process->writeStdin (QFile::encodeName(commands.last ()), + m_process->writeStdin (TQFile::encodeName(commands.last ()), commands.last ().length ()); return true; } @@ -309,8 +309,8 @@ KDE_NO_EXPORT bool MPlayerBase::stop () { KDE_NO_EXPORT bool MPlayerBase::quit () { if (playing ()) { stop (); - disconnect (m_process, SIGNAL (processExited (KProcess *)), - this, SLOT (processStopped (KProcess *))); + disconnect (m_process, TQT_SIGNAL (processExited (KProcess *)), + this, TQT_SLOT (processStopped (KProcess *))); if (!m_use_slave) { void (*oldhandler)(int) = signal(SIGTERM, SIG_IGN); ::kill (-1 * ::getpid (), SIGTERM); @@ -319,7 +319,7 @@ KDE_NO_EXPORT bool MPlayerBase::quit () { #if KDE_IS_VERSION(3, 1, 90) m_process->wait(2); #else - QTime t; + TQTime t; t.start (); do { KProcessController::theKProcessController->waitForProcessExit (2); @@ -338,7 +338,7 @@ KDE_NO_EXPORT void MPlayerBase::dataWritten (KProcess *) { kdDebug() << "eval done " << commands.last () << endl; commands.pop_back (); if (commands.size ()) - m_process->writeStdin (QFile::encodeName(commands.last ()), + m_process->writeStdin (TQFile::encodeName(commands.last ()), commands.last ().length ()); } @@ -354,8 +354,8 @@ static const char * mplayer_supports [] = { "dvdsource", "exitsource", "hrefsource", "introsource", "pipesource", "tvscanner", "tvsource", "urlsource", "vcdsource", "audiocdsource", 0L }; -KDE_NO_CDTOR_EXPORT MPlayer::MPlayer (QObject * parent, Settings * settings) - : MPlayerBase (parent, settings, "mplayer"), +KDE_NO_CDTOR_EXPORT MPlayer::MPlayer (TQObject * tqparent, Settings * settings) + : MPlayerBase (tqparent, settings, "mplayer"), m_widget (0L), m_configpage (new MPlayerPreferencesPage (this)), aid (-1), sid (-1), @@ -365,7 +365,7 @@ KDE_NO_CDTOR_EXPORT MPlayer::MPlayer (QObject * parent, Settings * settings) } KDE_NO_CDTOR_EXPORT MPlayer::~MPlayer () { - if (m_widget && !m_widget->parent ()) + if (m_widget && !m_widget->tqparent ()) delete m_widget; delete m_configpage; } @@ -373,7 +373,7 @@ KDE_NO_CDTOR_EXPORT MPlayer::~MPlayer () { KDE_NO_EXPORT void MPlayer::init () { } -QString MPlayer::menuName () const { +TQString MPlayer::menuName () const { return i18n ("&MPlayer"); } @@ -389,7 +389,7 @@ KDE_NO_EXPORT bool MPlayer::ready (Viewer * viewer) { KDE_NO_EXPORT bool MPlayer::deMediafiedPlay () { if (playing ()) - return sendCommand (QString ("gui_play")); + return sendCommand (TQString ("gui_play")); if (!m_needs_restarted && playing ()) quit (); // rescheduling of setState will reset state just-in-time initProcess (viewer ()); @@ -401,47 +401,47 @@ KDE_NO_EXPORT bool MPlayer::deMediafiedPlay () { alanglist = 0L; slanglist = 0L; m_request_seek = -1; - QString args = m_source->options () + ' '; + TQString args = m_source->options () + ' '; KURL url (m_url); if (!url.isEmpty ()) { if (m_source->url ().isLocalFile ()) m_process->setWorkingDirectory - (QFileInfo (m_source->url ().path ()).dirPath (true)); + (TQFileInfo (m_source->url ().path ()).dirPath (true)); if (url.isLocalFile ()) { m_url = getPath (url); if (m_configpage->alwaysbuildindex && (m_url.lower ().endsWith (".avi") || m_url.lower ().endsWith (".divx"))) - args += QString (" -idx "); + args += TQString (" -idx "); } else { int cache = m_configpage->cachesize; - if (cache > 3 && !url.url ().startsWith (QString ("dvd")) && - !url.url ().startsWith (QString ("vcd")) && - !url.url ().startsWith (QString ("tv://"))) - args += QString ("-cache %1 ").arg (cache); - if (m_url.startsWith (QString ("cdda:/")) && - !m_url.startsWith (QString ("cdda://"))) - m_url = QString ("cdda://") + m_url.mid (6); + if (cache > 3 && !url.url ().startsWith (TQString ("dvd")) && + !url.url ().startsWith (TQString ("vcd")) && + !url.url ().startsWith (TQString ("tv://"))) + args += TQString ("-cache %1 ").arg (cache); + if (m_url.startsWith (TQString ("cdda:/")) && + !m_url.startsWith (TQString ("cdda://"))) + m_url = TQString ("cdda://") + m_url.mid (6); } - if (url.protocol () != QString ("stdin")) - args += KProcess::quote (QString (QFile::encodeName (m_url))); + if (url.protocol () != TQString ("stdin")) + args += KProcess::quote (TQString (TQFile::encodeName (m_url))); } m_tmpURL.truncate (0); if (!m_source->identified () && !m_settings->mplayerpost090) { - args += QString (" -quiet -nocache -identify -frames 0 "); + args += TQString (" -quiet -nocache -identify -frames 0 "); } else { if (m_mrl->mrl ()->repeat > 0) - args += QString(" -loop " +QString::number(m_mrl->mrl()->repeat+1)); + args += TQString(" -loop " +TQString::number(m_mrl->mrl()->repeat+1)); else if (m_settings->loop) - args += QString (" -loop 0"); + args += TQString (" -loop 0"); if (m_settings->mplayerpost090) - args += QString (" -identify"); + args += TQString (" -identify"); if (!m_source->subUrl ().isEmpty ()) { - args += QString (" -sub "); + args += TQString (" -sub "); const KURL & sub_url (m_source->subUrl ()); if (!sub_url.isEmpty ()) { - QString myurl (sub_url.isLocalFile () ? getPath (sub_url) : sub_url.url ()); - args += KProcess::quote (QString (QFile::encodeName (myurl))); + TQString myurl (sub_url.isLocalFile () ? getPath (sub_url) : sub_url.url ()); + args += KProcess::quote (TQString (TQFile::encodeName (myurl))); } } } @@ -452,12 +452,12 @@ KDE_NO_EXPORT bool MPlayer::stop () { terminateJobs (); if (!m_source || !m_process || !m_process->isRunning ()) return true; if (m_use_slave) - sendCommand (QString ("quit")); + sendCommand (TQString ("quit")); return MPlayerBase::stop (); } KDE_NO_EXPORT bool MPlayer::pause () { - return sendCommand (QString ("pause")); + return sendCommand (TQString ("pause")); } KDE_NO_EXPORT bool MPlayer::seek (int pos, bool absolute) { @@ -465,10 +465,10 @@ KDE_NO_EXPORT bool MPlayer::seek (int pos, bool absolute) { (absolute && m_source->position () == pos)) return false; if (m_request_seek >= 0 && commands.size () > 1) { - QStringList::iterator i = commands.begin (); - QStringList::iterator end ( commands.end () ); + TQStringList::iterator i = commands.begin (); + TQStringList::iterator end ( commands.end () ); for (++i; i != end; ++i) - if ((*i).startsWith (QString ("seek"))) { + if ((*i).startsWith (TQString ("seek"))) { i = commands.erase (i); m_request_seek = -1; break; @@ -479,7 +479,7 @@ KDE_NO_EXPORT bool MPlayer::seek (int pos, bool absolute) { return false; } m_request_seek = pos; - QString cmd; + TQString cmd; cmd.sprintf ("seek %d %d", pos/10, absolute ? 2 : 0); if (!absolute) pos = m_source->position () + pos; @@ -493,67 +493,67 @@ KDE_NO_EXPORT bool MPlayer::volume (int incdec, bool absolute) { if (incdec == 0) return true; old_volume += incdec; - return sendCommand (QString ("volume ") + QString::number (incdec)); + return sendCommand (TQString ("volume ") + TQString::number (incdec)); } KDE_NO_EXPORT bool MPlayer::saturation (int val, bool absolute) { - QString cmd; + TQString cmd; cmd.sprintf ("saturation %d %d", val, absolute ? 1 : 0); return sendCommand (cmd); } KDE_NO_EXPORT bool MPlayer::hue (int val, bool absolute) { - QString cmd; + TQString cmd; cmd.sprintf ("hue %d %d", val, absolute ? 1 : 0); return sendCommand (cmd); } KDE_NO_EXPORT bool MPlayer::contrast (int val, bool /*absolute*/) { - QString cmd; + TQString cmd; cmd.sprintf ("contrast %d 1", val); return sendCommand (cmd); } KDE_NO_EXPORT bool MPlayer::brightness (int val, bool /*absolute*/) { - QString cmd; + TQString cmd; cmd.sprintf ("brightness %d 1", val); return sendCommand (cmd); } bool MPlayer::run (const char * args, const char * pipe) { //m_view->consoleOutput ()->clear (); - m_process_output = QString (); - connect (m_process, SIGNAL (receivedStdout (KProcess *, char *, int)), - this, SLOT (processOutput (KProcess *, char *, int))); - connect (m_process, SIGNAL (receivedStderr (KProcess *, char *, int)), - this, SLOT (processOutput (KProcess *, char *, int))); + m_process_output = TQString (); + connect (m_process, TQT_SIGNAL (receivedStdout (KProcess *, char *, int)), + this, TQT_SLOT (processOutput (KProcess *, char *, int))); + connect (m_process, TQT_SIGNAL (receivedStderr (KProcess *, char *, int)), + this, TQT_SLOT (processOutput (KProcess *, char *, int))); m_use_slave = !(pipe && pipe[0]); if (!m_use_slave) { fprintf (stderr, "%s | ", pipe); *m_process << pipe << " | "; } - QString exe = m_configpage->mplayer_path; + TQString exe = m_configpage->mplayer_path; if (exe.isEmpty ()) exe = "mplayer"; fprintf (stderr, "%s -wid %lu ", exe.ascii(), (unsigned long) widget ()); - *m_process << exe << " -wid " << QString::number (widget ()); + *m_process << exe << " -wid " << TQString::number (widget ()); if (m_use_slave) { fprintf (stderr, "-slave "); *m_process << "-slave "; } - QString strVideoDriver = QString (m_settings->videodrivers[m_settings->videodriver].driver); + TQString strVideoDriver = TQString (m_settings->videodrivers[m_settings->videodriver].driver); if (!strVideoDriver.isEmpty ()) { fprintf (stderr, " -vo %s", strVideoDriver.lower().ascii()); *m_process << " -vo " << strVideoDriver.lower(); if (viewer ()->view ()->keepSizeRatio () && - strVideoDriver.lower() == QString::fromLatin1 ("x11")) { + strVideoDriver.lower() == TQString::tqfromLatin1 ("x11")) { fprintf (stderr, " -zoom"); *m_process << " -zoom"; } } - QString strAudioDriver = QString (m_settings->audiodrivers[m_settings->audiodriver].driver); + TQString strAudioDriver = TQString (m_settings->audiodrivers[m_settings->audiodriver].driver); if (!strAudioDriver.isEmpty ()) { fprintf (stderr, " -ao %s", strAudioDriver.lower().ascii()); *m_process << " -ao " << strAudioDriver.lower(); @@ -574,34 +574,34 @@ bool MPlayer::run (const char * args, const char * pipe) { if (m_settings->autoadjustcolors) { fprintf (stderr, " -contrast %d", m_settings->contrast); - *m_process << " -contrast " << QString::number (m_settings->contrast); + *m_process << " -contrast " << TQString::number (m_settings->contrast); fprintf (stderr, " -brightness %d", m_settings->brightness); - *m_process << " -brightness " <brightness); + *m_process << " -brightness " <brightness); fprintf (stderr, " -hue %d", m_settings->hue); - *m_process << " -hue " << QString::number (m_settings->hue); + *m_process << " -hue " << TQString::number (m_settings->hue); fprintf (stderr, " -saturation %d", m_settings->saturation); - *m_process << " -saturation " <saturation); + *m_process << " -saturation " <saturation); } if (aid > -1) { fprintf (stderr, " -aid %d", aid); - *m_process << " -aid " << QString::number (aid); + *m_process << " -aid " << TQString::number (aid); } if (sid > -1) { fprintf (stderr, " -sid %d", sid); - *m_process << " -sid " << QString::number (sid); + *m_process << " -sid " << TQString::number (sid); } - for (NodePtr n = m_mrl; n; n = n->parentNode ()) { + for (NodePtr n = m_mrl; n; n = n->tqparentNode ()) { if (n->id != id_node_group_node && n->id != id_node_playlist_item) break; - QString plops = convertNode (n)->getAttribute ("mplayeropts"); + TQString plops = convertNode (n)->getAttribute ("mplayeropts"); if (!plops.isNull ()) { - QStringList sl = QStringList::split (QChar (' '), plops); + TQStringList sl = TQStringList::split (TQChar (' '), plops); for (int i = 0; i < sl.size (); ++i) { - QString plop = KProcess::quote (sl[i]); + TQString plop = KProcess::quote (sl[i]); fprintf (stderr, " %s", plop.ascii ()); *m_process << " " << plop; } @@ -612,9 +612,9 @@ bool MPlayer::run (const char * args, const char * pipe) { fprintf (stderr, " %s\n", args); *m_process << " " << args; - QValueList::const_iterator it; - QString sMPArgs; - QValueList::const_iterator end( m_process->args().end() ); + TQValueList::const_iterator it; + TQString sMPArgs; + TQValueList::const_iterator end( m_process->args().end() ); for ( it = m_process->args().begin(); it != end; ++it ){ sMPArgs += (*it); } @@ -632,20 +632,20 @@ bool MPlayer::run (const char * args, const char * pipe) { KDE_NO_EXPORT bool MPlayer::grabPicture (const KURL & url, int pos) { stop (); initProcess (viewer ()); - QString outdir = locateLocal ("data", "kmplayer/"); - m_grabfile = outdir + QString ("00000001.jpg"); + TQString outdir = locateLocal ("data", "kmplayer/"); + m_grabfile = outdir + TQString ("00000001.jpg"); unlink (m_grabfile.ascii ()); - QString myurl (url.isLocalFile () ? getPath (url) : url.url ()); - QString args ("mplayer "); + TQString myurl (url.isLocalFile () ? getPath (url) : url.url ()); + TQString args ("mplayer "); if (m_settings->mplayerpost090) args += "-vo jpeg:outdir="; else args += "-vo jpeg -jpeg outdir="; args += KProcess::quote (outdir); - args += QString (" -frames 1 -nosound -quiet "); + args += TQString (" -frames 1 -nosound -quiet "); if (pos > 0) - args += QString ("-ss %1 ").arg (pos); - args += KProcess::quote (QString (QFile::encodeName (myurl))); + args += TQString ("-ss %1 ").arg (pos); + args += KProcess::quote (TQString (TQFile::encodeName (myurl))); *m_process << args; kdDebug () << args << endl; m_process->start (KProcess::NotifyOnExit, KProcess::NoCommunication); @@ -657,13 +657,13 @@ KDE_NO_EXPORT void MPlayer::processOutput (KProcess *, char * str, int slen) { View * v = viewer ()->view (); bool ok; - QRegExp * patterns = m_configpage->m_patterns; - QRegExp & m_refURLRegExp = patterns[MPlayerPreferencesPage::pat_refurl]; - QRegExp & m_refRegExp = patterns[MPlayerPreferencesPage::pat_ref]; + TQRegExp * patterns = m_configpage->m_patterns; + TQRegExp & m_refURLRegExp = patterns[MPlayerPreferencesPage::pat_refurl]; + TQRegExp & m_refRegExp = patterns[MPlayerPreferencesPage::pat_ref]; do { int len = strcspn (str, "\r\n"); - QString out = m_process_output + QString::fromLocal8Bit (str, len); - m_process_output = QString (); + TQString out = m_process_output + TQString::fromLocal8Bit (str, len); + m_process_output = TQString (); str += len; slen -= len; if (slen <= 0) { @@ -682,8 +682,8 @@ KDE_NO_EXPORT void MPlayer::processOutput (KProcess *, char * str, int slen) { slen--; if (process_stats) { - QRegExp & m_posRegExp = patterns[MPlayerPreferencesPage::pat_pos]; - QRegExp & m_cacheRegExp = patterns[MPlayerPreferencesPage::pat_cache]; + TQRegExp & m_posRegExp = patterns[MPlayerPreferencesPage::pat_pos]; + TQRegExp & m_cacheRegExp = patterns[MPlayerPreferencesPage::pat_cache]; if (m_source->hasLength () && m_posRegExp.search (out) > -1) { int pos = int (10.0 * m_posRegExp.cap (1).toFloat ()); m_source->setPosition (pos); @@ -692,7 +692,7 @@ KDE_NO_EXPORT void MPlayer::processOutput (KProcess *, char * str, int slen) { m_source->setLoading (int (m_cacheRegExp.cap(1).toDouble())); } } else if (out.startsWith ("ID_LENGTH")) { - int pos = out.find ('='); + int pos = out.tqfind ('='); if (pos > 0) { int l = (int) out.mid (pos + 1).toDouble (&ok); if (ok && l >= 0) { @@ -710,35 +710,35 @@ KDE_NO_EXPORT void MPlayer::processOutput (KProcess *, char * str, int slen) { kdDebug () << "Reference File " << endl; m_tmpURL.truncate (0); } else if (out.startsWith ("ID_VIDEO_WIDTH")) { - int pos = out.find ('='); + int pos = out.tqfind ('='); if (pos > 0) { int w = out.mid (pos + 1).toInt (); m_source->setDimensions (m_mrl, w, m_source->height ()); } } else if (out.startsWith ("ID_VIDEO_HEIGHT")) { - int pos = out.find ('='); + int pos = out.tqfind ('='); if (pos > 0) { int h = out.mid (pos + 1).toInt (); m_source->setDimensions (m_mrl, m_source->width (), h); } } else if (out.startsWith ("ID_VIDEO_ASPECT")) { - int pos = out.find ('='); + int pos = out.tqfind ('='); if (pos > 0) { bool ok; - QString val = out.mid (pos + 1); + TQString val = out.mid (pos + 1); float a = val.toFloat (&ok); if (!ok) { - val.replace (',', '.'); + val.tqreplace (',', '.'); a = val.toFloat (&ok); } if (ok && a > 0.001) m_source->setAspect (m_mrl, a); } } else if (out.startsWith ("ID_AID_")) { - int pos = out.find ('_', 7); + int pos = out.tqfind ('_', 7); if (pos > 0) { int id = out.mid (7, pos - 7).toInt (); - pos = out.find ('=', pos); + pos = out.tqfind ('=', pos); if (pos > 0) { if (!alanglist_end) { alanglist = new LangInfo (id, out.mid (pos + 1)); @@ -751,10 +751,10 @@ KDE_NO_EXPORT void MPlayer::processOutput (KProcess *, char * str, int slen) { } } } else if (out.startsWith ("ID_SID_")) { - int pos = out.find ('_', 7); + int pos = out.tqfind ('_', 7); if (pos > 0) { int id = out.mid (7, pos - 7).toInt (); - pos = out.find ('=', pos); + pos = out.tqfind ('=', pos); if (pos > 0) { if (!slanglist_end) { slanglist = new LangInfo (id, out.mid (pos + 1)); @@ -767,17 +767,17 @@ KDE_NO_EXPORT void MPlayer::processOutput (KProcess *, char * str, int slen) { } } } else if (out.startsWith ("ICY Info")) { - int p = out.find ("StreamTitle=", 8); + int p = out.tqfind ("StreamTitle=", 8); if (p > -1) { p += 12; - int e = out.find (';', p); + int e = out.tqfind (';', p); if (e > -1) e -= p; ((PlayListNotify *)m_source)->setInfoMessage (out.mid (p, e)); } } else { - QRegExp & m_startRegExp = patterns[MPlayerPreferencesPage::pat_start]; - QRegExp & m_sizeRegExp = patterns[MPlayerPreferencesPage::pat_size]; + TQRegExp & m_startRegExp = patterns[MPlayerPreferencesPage::pat_start]; + TQRegExp & m_sizeRegExp = patterns[MPlayerPreferencesPage::pat_size]; v->addText (out, true); if (!m_source->processOutput (out)) { // int movie_width = m_source->width (); @@ -796,7 +796,7 @@ KDE_NO_EXPORT void MPlayer::processOutput (KProcess *, char * str, int slen) { } m_source->setIdentified (); } - QStringList alst, slst; + TQStringList alst, slst; for (SharedPtr li = alanglist; li; li = li->next) alst.push_back (li->name); for (SharedPtr li = slanglist; li; li = li->next) @@ -814,7 +814,7 @@ KDE_NO_EXPORT void MPlayer::processStopped (KProcess * p) { emit grabReady (m_grabfile); m_grabfile.truncate (0); } else if (p) { - QString url; + TQString url; if (!m_source->identified ()) { m_source->setIdentified (); if (!m_tmpURL.isEmpty () && m_url != m_tmpURL) { @@ -832,24 +832,24 @@ KDE_NO_EXPORT void MPlayer::processStopped (KProcess * p) { } } -void MPlayer::setAudioLang (int id, const QString &) { +void MPlayer::setAudioLang (int id, const TQString &) { SharedPtr li = alanglist; for (; id > 0 && li; li = li->next) id--; if (li) aid = li->id; m_needs_restarted = true; - sendCommand (QString ("quit")); + sendCommand (TQString ("quit")); } -void MPlayer::setSubtitle (int id, const QString &) { +void MPlayer::setSubtitle (int id, const TQString &) { SharedPtr li = slanglist; for (; id > 0 && li; li = li->next) id--; if (li) sid = li->id; m_needs_restarted = true; - sendCommand (QString ("quit")); + sendCommand (TQString ("quit")); } //----------------------------------------------------------------------------- @@ -863,7 +863,7 @@ static const char * strAlwaysBuildIndex = "Always build index"; static const int non_patterns = 4; static struct MPlayerPattern { - QString caption; + TQString caption; const char * name; const char * pattern; } _mplayer_patterns [] = { @@ -884,18 +884,18 @@ static struct MPlayerPattern { namespace KMPlayer { -class KMPLAYER_NO_EXPORT MPlayerPreferencesFrame : public QFrame { +class KMPLAYER_NO_EXPORT MPlayerPreferencesFrame : public TQFrame { public: - MPlayerPreferencesFrame (QWidget * parent); - QTable * table; + MPlayerPreferencesFrame (TQWidget * tqparent); + TQTable * table; }; } // namespace -KDE_NO_CDTOR_EXPORT MPlayerPreferencesFrame::MPlayerPreferencesFrame (QWidget * parent) - : QFrame (parent) { - QVBoxLayout * layout = new QVBoxLayout (this); - table = new QTable (int (MPlayerPreferencesPage::pat_last)+non_patterns, 2, this); +KDE_NO_CDTOR_EXPORT MPlayerPreferencesFrame::MPlayerPreferencesFrame (TQWidget * tqparent) + : TQFrame (tqparent) { + TQVBoxLayout * tqlayout = new TQVBoxLayout (this); + table = new TQTable (int (MPlayerPreferencesPage::pat_last)+non_patterns, 2, this); table->verticalHeader ()->hide (); table->setLeftMargin (0); table->horizontalHeader ()->hide (); @@ -903,14 +903,14 @@ KDE_NO_CDTOR_EXPORT MPlayerPreferencesFrame::MPlayerPreferencesFrame (QWidget * table->setColumnReadOnly (0, true); table->setText (0, 0, i18n ("MPlayer command:")); table->setText (1, 0, i18n ("Additional command line arguments:")); - table->setText (2, 0, QString("%1 (%2)").arg (i18n ("Cache size:")).arg (i18n ("kB"))); // FIXME for new translations - table->setCellWidget (2, 1, new QSpinBox (0, 32767, 32, table->viewport())); + table->setText (2, 0, TQString("%1 (%2)").arg (i18n ("Cache size:")).arg (i18n ("kB"))); // FIXME for new translations + table->setCellWidget (2, 1, new TQSpinBox (0, 32767, 32, table->viewport())); table->setText (3, 0, i18n ("Build new index when possible")); - table->setCellWidget (3, 1, new QCheckBox (table->viewport())); - QWhatsThis::add (table->cellWidget (3, 1), i18n ("Allows seeking in indexed files (AVIs)")); + table->setCellWidget (3, 1, new TQCheckBox (table->viewport())); + TQWhatsThis::add (table->cellWidget (3, 1), i18n ("Allows seeking in indexed files (AVIs)")); for (int i = 0; i < int (MPlayerPreferencesPage::pat_last); i++) table->setText (i+non_patterns, 0, _mplayer_patterns[i].caption); - QFontMetrics metrics (table->font ()); + TQFontMetrics metrics (table->font ()); int first_column_width = 50; for (int i = 0; i < int (MPlayerPreferencesPage::pat_last+non_patterns); i++) { int strwidth = metrics.boundingRect (table->text (i, 0)).width (); @@ -919,7 +919,7 @@ KDE_NO_CDTOR_EXPORT MPlayerPreferencesFrame::MPlayerPreferencesFrame (QWidget * } table->setColumnWidth (0, first_column_width); table->setColumnStretchable (1, true); - layout->addWidget (table); + tqlayout->addWidget (table); } KDE_NO_CDTOR_EXPORT MPlayerPreferencesPage::MPlayerPreferencesPage (MPlayer * p) @@ -930,7 +930,7 @@ KDE_NO_EXPORT void MPlayerPreferencesPage::write (KConfig * config) { config->setGroup (strMPlayerPatternGroup); for (int i = 0; i < int (pat_last); i++) config->writeEntry - (_mplayer_patterns[i].name, m_patterns[i].pattern ()); + (_mplayer_patterns[i].name, TQString(m_patterns[i].pattern ())); config->setGroup (strMPlayerGroup); config->writeEntry (strMPlayerPath, mplayer_path); config->writeEntry (strAddArgs, additionalarguments); @@ -951,9 +951,9 @@ KDE_NO_EXPORT void MPlayerPreferencesPage::read (KConfig * config) { } KDE_NO_EXPORT void MPlayerPreferencesPage::sync (bool fromUI) { - QTable * table = m_configframe->table; - QSpinBox * cacheSize = static_cast(table->cellWidget (2, 1)); - QCheckBox * buildIndex = static_cast(table->cellWidget (3, 1)); + TQTable * table = m_configframe->table; + TQSpinBox * cacheSize = static_cast(table->cellWidget (2, 1)); + TQCheckBox * buildIndex = static_cast(table->cellWidget (3, 1)); if (fromUI) { mplayer_path = table->text (0, 1); additionalarguments = table->text (1, 1); @@ -972,14 +972,14 @@ KDE_NO_EXPORT void MPlayerPreferencesPage::sync (bool fromUI) { } } -KDE_NO_EXPORT void MPlayerPreferencesPage::prefLocation (QString & item, QString & icon, QString & tab) { +KDE_NO_EXPORT void MPlayerPreferencesPage::prefLocation (TQString & item, TQString & icon, TQString & tab) { item = i18n ("General Options"); - icon = QString ("kmplayer"); + icon = TQString ("kmplayer"); tab = i18n ("MPlayer"); } -KDE_NO_EXPORT QFrame * MPlayerPreferencesPage::prefPage (QWidget * parent) { - m_configframe = new MPlayerPreferencesFrame (parent); +KDE_NO_EXPORT TQFrame * MPlayerPreferencesPage::prefPage (TQWidget * tqparent) { + m_configframe = new MPlayerPreferencesFrame (tqparent); return m_configframe; } @@ -989,8 +989,8 @@ static const char * mencoder_supports [] = { "dvdsource", "pipesource", "tvscanner", "tvsource", "urlsource", "vcdsource", "audiocdsource", 0L }; -KDE_NO_CDTOR_EXPORT MEncoder::MEncoder (QObject * parent, Settings * settings) - : MPlayerBase (parent, settings, "mencoder") { +KDE_NO_CDTOR_EXPORT MEncoder::MEncoder (TQObject * tqparent, Settings * settings) + : MPlayerBase (tqparent, settings, "mencoder") { m_supported_sources = mencoder_supports; } @@ -1006,29 +1006,29 @@ bool MEncoder::deMediafiedPlay () { initProcess (viewer ()); KURL url (m_url); m_source->setPosition (0); - QString args; + TQString args; m_use_slave = m_source->pipeCmd ().isEmpty (); if (!m_use_slave) - args = m_source->pipeCmd () + QString (" | "); - QString margs = m_settings->mencoderarguments; + args = m_source->pipeCmd () + TQString (" | "); + TQString margs = m_settings->mencoderarguments; if (m_settings->recordcopy) - margs = QString ("-oac copy -ovc copy"); - args += QString ("mencoder ") + margs + ' ' + m_source->recordCmd (); + margs = TQString ("-oac copy -ovc copy"); + args += TQString ("mencoder ") + margs + ' ' + m_source->recordCmd (); // FIXME if (m_player->source () == source) // ugly // m_player->stop (); - QString myurl = url.isLocalFile () ? getPath (url) : url.url (); + TQString myurl = url.isLocalFile () ? getPath (url) : url.url (); bool post090 = m_settings->mplayerpost090; if (!myurl.isEmpty ()) { - if (!post090 && myurl.startsWith (QString ("tv://"))) + if (!post090 && myurl.startsWith (TQString ("tv://"))) ; // skip it - else if (!post090 && myurl.startsWith (QString ("vcd://"))) - args += myurl.replace (0, 6, QString (" -vcd ")); - else if (!post090 && myurl.startsWith (QString ("dvd://"))) - args += myurl.replace (0, 6, QString (" -dvd ")); + else if (!post090 && myurl.startsWith (TQString ("vcd://"))) + args += myurl.tqreplace (0, 6, TQString (" -vcd ")); + else if (!post090 && myurl.startsWith (TQString ("dvd://"))) + args += myurl.tqreplace (0, 6, TQString (" -dvd ")); else - args += ' ' + KProcess::quote (QString (QFile::encodeName (myurl))); + args += ' ' + KProcess::quote (TQString (TQFile::encodeName (myurl))); } - QString outurl = KProcess::quote (QString (QFile::encodeName (m_recordurl.isLocalFile () ? getPath (m_recordurl) : m_recordurl.url ()))); + TQString outurl = KProcess::quote (TQString (TQFile::encodeName (m_recordurl.isLocalFile () ? getPath (m_recordurl) : m_recordurl.url ()))); kdDebug () << args << " -o " << outurl << endl; *m_process << args << " -o " << outurl; m_process->start (KProcess::NotifyOnExit, KProcess::NoCommunication); @@ -1054,8 +1054,8 @@ static const char * mplayerdump_supports [] = { }; KDE_NO_CDTOR_EXPORT -MPlayerDumpstream::MPlayerDumpstream (QObject * parent, Settings * settings) - : MPlayerBase (parent, settings, "mplayerdumpstream") { +MPlayerDumpstream::MPlayerDumpstream (TQObject * tqparent, Settings * settings) + : MPlayerBase (tqparent, settings, "mplayerdumpstream") { m_supported_sources = mplayerdump_supports; } @@ -1071,26 +1071,26 @@ bool MPlayerDumpstream::deMediafiedPlay () { initProcess (viewer ()); KURL url (m_url); m_source->setPosition (0); - QString args; + TQString args; m_use_slave = m_source->pipeCmd ().isEmpty (); if (!m_use_slave) - args = m_source->pipeCmd () + QString (" | "); - args += QString ("mplayer ") + m_source->recordCmd (); + args = m_source->pipeCmd () + TQString (" | "); + args += TQString ("mplayer ") + m_source->recordCmd (); // FIXME if (m_player->source () == source) // ugly // m_player->stop (); - QString myurl = url.isLocalFile () ? getPath (url) : url.url (); + TQString myurl = url.isLocalFile () ? getPath (url) : url.url (); bool post090 = m_settings->mplayerpost090; if (!myurl.isEmpty ()) { - if (!post090 && myurl.startsWith (QString ("tv://"))) + if (!post090 && myurl.startsWith (TQString ("tv://"))) ; // skip it - else if (!post090 && myurl.startsWith (QString ("vcd://"))) - args += myurl.replace (0, 6, QString (" -vcd ")); - else if (!post090 && myurl.startsWith (QString ("dvd://"))) - args += myurl.replace (0, 6, QString (" -dvd ")); + else if (!post090 && myurl.startsWith (TQString ("vcd://"))) + args += myurl.tqreplace (0, 6, TQString (" -vcd ")); + else if (!post090 && myurl.startsWith (TQString ("dvd://"))) + args += myurl.tqreplace (0, 6, TQString (" -dvd ")); else - args += ' ' + KProcess::quote (QString (QFile::encodeName (myurl))); + args += ' ' + KProcess::quote (TQString (TQFile::encodeName (myurl))); } - QString outurl = KProcess::quote (QString (QFile::encodeName (m_recordurl.isLocalFile () ? getPath (m_recordurl) : m_recordurl.url ()))); + TQString outurl = KProcess::quote (TQString (TQFile::encodeName (m_recordurl.isLocalFile () ? getPath (m_recordurl) : m_recordurl.url ()))); kdDebug () << args << " -dumpstream -dumpfile " << outurl << endl; *m_process << args << " -dumpstream -dumpfile " << outurl; m_process->start (KProcess::NotifyOnExit, KProcess::NoCommunication); @@ -1114,11 +1114,11 @@ KDE_NO_EXPORT bool MPlayerDumpstream::stop () { static int callback_counter = 0; Callback::Callback (CallbackProcess * process) - : DCOPObject (QString (QString ("KMPlayerCallback-") + - QString::number (callback_counter++)).ascii ()), + : DCOPObject (TQString (TQString ("KMPlayerCallback-") + + TQString::number (callback_counter++)).ascii ()), m_process (process) {} -void Callback::statusMessage (int code, QString msg) { +void Callback::statusMessage (int code, TQString msg) { if (!m_process->m_source) return; switch ((StatusCode) code) { case stat_newtitle: @@ -1135,14 +1135,14 @@ void Callback::statusMessage (int code, QString msg) { }; } -void Callback::subMrl (QString mrl, QString title) { +void Callback::subMrl (TQString mrl, TQString title) { if (!m_process->m_source) return; m_process->m_source->insertURL (m_process->m_mrl, KURL::fromPathOrURL (mrl).url (), title); if (m_process->m_mrl && m_process->m_mrl->active ()) m_process->m_mrl->defer (); // Xine detected this is a playlist } -void Callback::errorMessage (int code, QString msg) { +void Callback::errorMessage (int code, TQString msg) { m_process->setErrorMessage (code, msg); } @@ -1154,11 +1154,11 @@ void Callback::playing () { m_process->setPlaying (); } -void Callback::started (QCString dcopname, QByteArray data) { +void Callback::started (TQCString dcopname, TQByteArray data) { m_process->setStarted (dcopname, data); } -void Callback::movieParams (int length, int w, int h, float aspect, QStringList alang, QStringList slang) { +void Callback::movieParams (int length, int w, int h, float aspect, TQStringList alang, TQStringList slang) { m_process->setMovieParams (length, w, h, aspect, alang, slang); } @@ -1178,8 +1178,8 @@ void Callback::toggleFullScreen () { //----------------------------------------------------------------------------- -CallbackProcess::CallbackProcess (QObject * parent, Settings * settings, const char * n, const QString & menuname) - : Process (parent, settings, n), +CallbackProcess::CallbackProcess (TQObject * tqparent, Settings * settings, const char * n, const TQString & menuname) + : Process (tqparent, settings, n), m_callback (new Callback (this)), m_backend (0L), m_menuname (menuname), @@ -1196,14 +1196,14 @@ CallbackProcess::~CallbackProcess () { configdoc->document()->dispose (); } -void CallbackProcess::setStatusMessage (const QString & /*msg*/) { +void CallbackProcess::setStatusMessage (const TQString & /*msg*/) { } -QString CallbackProcess::menuName () const { +TQString CallbackProcess::menuName () const { return m_menuname; } -void CallbackProcess::setErrorMessage (int code, const QString & msg) { +void CallbackProcess::setErrorMessage (int code, const TQString & msg) { kdDebug () << "setErrorMessage " << code << " " << msg << endl; if (code == 0 && m_send_config != send_no) { if (m_send_config == send_new) @@ -1220,7 +1220,7 @@ void CallbackProcess::setPlaying () { setState (Playing); } -void CallbackProcess::setStarted (QCString dcopname, QByteArray & data) { +void CallbackProcess::setStarted (TQCString dcopname, TQByteArray & data) { if (data.size ()) m_configdata = data; kdDebug () << "up and running " << dcopname << endl; @@ -1233,8 +1233,8 @@ void CallbackProcess::setStarted (QCString dcopname, QByteArray & data) { m_have_config = data.size () ? config_yes : config_no; if (m_have_config == config_yes) { configdoc = new ConfigDocument (); - QTextStream ts (data, IO_ReadOnly); - readXML (configdoc, ts, QString ()); + TQTextStream ts (data, IO_ReadOnly); + readXML (configdoc, ts, TQString ()); configdoc->normalize (); //kdDebug () << mydoc->innerText () << endl; } @@ -1255,7 +1255,7 @@ void CallbackProcess::setStarted (QCString dcopname, QByteArray & data) { setState (Ready); } -void CallbackProcess::setMovieParams (int len, int w, int h, float a, const QStringList & alang, const QStringList & slang) { +void CallbackProcess::setMovieParams (int len, int w, int h, float a, const TQStringList & alang, const TQStringList & slang) { kdDebug () << "setMovieParams " << len << " " << w << "," << h << " " << a << endl; if (!m_source) return; in_gui_update = true; @@ -1290,7 +1290,7 @@ bool CallbackProcess::getConfigData () { return true; } -void CallbackProcess::setChangedData (const QByteArray & data) { +void CallbackProcess::setChangedData (const TQByteArray & data) { m_changeddata = data; m_send_config = playing () ? send_try : send_new; if (m_send_config == send_try) @@ -1303,18 +1303,18 @@ bool CallbackProcess::deMediafiedPlay () { if (!m_backend) return false; kdDebug () << "CallbackProcess::play " << m_url << endl; - QString u = m_url; + TQString u = m_url; if (u == "tv://" && !m_source->tuner ().isEmpty ()) { u = "v4l:/" + m_source->tuner (); if (m_source->frequency () > 0) - u += QChar ('/') + QString::number (m_source->frequency ()); + u += TQChar ('/') + TQString::number (m_source->frequency ()); } KURL url (u); - QString myurl = url.isLocalFile () ? getPath (url) : url.url (); + TQString myurl = url.isLocalFile () ? getPath (url) : url.url (); m_backend->setURL (myurl); const KURL & sub_url = m_source->subUrl (); if (!sub_url.isEmpty ()) - m_backend->setSubTitleURL (QString (QFile::encodeName (sub_url.isLocalFile () ? QFileInfo (getPath (sub_url)).absFilePath () : sub_url.url ()))); + m_backend->setSubTitleURL (TQString (TQFile::encodeName (sub_url.isLocalFile () ? TQFileInfo (getPath (sub_url)).absFilePath () : sub_url.url ()))); if (m_source->frequency () > 0) m_backend->frequency (m_source->frequency ()); m_backend->play (m_mrl ? m_mrl->mrl ()->repeat : 0); @@ -1346,7 +1346,7 @@ bool CallbackProcess::quit () { #if KDE_IS_VERSION(3, 1, 90) m_process->wait(1); #else - QTime t; + TQTime t; t.start (); do { KProcessController::theKProcessController->waitForProcessExit (2); @@ -1362,12 +1362,12 @@ bool CallbackProcess::pause () { return true; } -void CallbackProcess::setAudioLang (int id, const QString & al) { +void CallbackProcess::setAudioLang (int id, const TQString & al) { if (!m_backend) return; m_backend->setAudioLang (id, al); } -void CallbackProcess::setSubtitle (int id, const QString & sl) { +void CallbackProcess::setSubtitle (int id, const TQString & sl) { if (!m_backend) return; m_backend->setSubtitle (id, sl); } @@ -1418,31 +1418,31 @@ bool CallbackProcess::contrast (int val, bool b) { return !!m_backend; } -QString CallbackProcess::dcopName () { - QString cbname; - cbname.sprintf ("%s/%s", QString (kapp->dcopClient ()->appId ()).ascii (), - QString (m_callback->objId ()).ascii ()); +TQString CallbackProcess::dcopName () { + TQString cbname; + cbname.sprintf ("%s/%s", TQString (kapp->dcopClient ()->appId ()).ascii (), + TQString (m_callback->objId ()).ascii ()); return cbname; } void CallbackProcess::initProcess (Viewer * viewer) { Process::initProcess (viewer); - connect (m_process, SIGNAL (processExited (KProcess *)), - this, SLOT (processStopped (KProcess *))); - connect (m_process, SIGNAL (receivedStdout (KProcess *, char *, int)), - this, SLOT (processOutput (KProcess *, char *, int))); - connect (m_process, SIGNAL (receivedStderr (KProcess *, char *, int)), - this, SLOT (processOutput (KProcess *, char *, int))); + connect (m_process, TQT_SIGNAL (processExited (KProcess *)), + this, TQT_SLOT (processStopped (KProcess *))); + connect (m_process, TQT_SIGNAL (receivedStdout (KProcess *, char *, int)), + this, TQT_SLOT (processOutput (KProcess *, char *, int))); + connect (m_process, TQT_SIGNAL (receivedStderr (KProcess *, char *, int)), + this, TQT_SLOT (processOutput (KProcess *, char *, int))); } KDE_NO_EXPORT void CallbackProcess::processOutput (KProcess *, char * str, int slen) { if (viewer () && slen > 0) - viewer ()->view ()->addText (QString::fromLocal8Bit (str, slen)); + viewer ()->view ()->addText (TQString::fromLocal8Bit (str, slen)); } KDE_NO_EXPORT void CallbackProcess::processStopped (KProcess *) { if (m_source) - ((PlayListNotify *) m_source)->setInfoMessage (QString ()); + ((PlayListNotify *) m_source)->setInfoMessage (TQString ()); delete m_backend; m_backend = 0L; setState (NotRunning); @@ -1459,7 +1459,7 @@ WId CallbackProcess::widget () { //----------------------------------------------------------------------------- KDE_NO_CDTOR_EXPORT ConfigDocument::ConfigDocument () - : Document (QString ()) {} + : Document (TQString ()) {} KDE_NO_CDTOR_EXPORT ConfigDocument::~ConfigDocument () { kdDebug () << "~ConfigDocument" << endl; @@ -1470,53 +1470,53 @@ namespace KMPlayer { * Element for ConfigDocument */ struct KMPLAYER_NO_EXPORT SomeNode : public ConfigNode { - KDE_NO_CDTOR_EXPORT SomeNode (NodePtr & d, const QString & t) + KDE_NO_CDTOR_EXPORT SomeNode (NodePtr & d, const TQString & t) : ConfigNode (d, t) {} KDE_NO_CDTOR_EXPORT ~SomeNode () {} - NodePtr childFromTag (const QString & t); + NodePtr childFromTag (const TQString & t); }; } // namespace -KDE_NO_CDTOR_EXPORT ConfigNode::ConfigNode (NodePtr & d, const QString & t) +KDE_NO_CDTOR_EXPORT ConfigNode::ConfigNode (NodePtr & d, const TQString & t) : DarkNode (d, t), w (0L) {} -NodePtr ConfigDocument::childFromTag (const QString & tag) { - if (tag.lower () == QString ("document")) +NodePtr ConfigDocument::childFromTag (const TQString & tag) { + if (tag.lower () == TQString ("document")) return new ConfigNode (m_doc, tag); return 0L; } -NodePtr ConfigNode::childFromTag (const QString & t) { +NodePtr ConfigNode::childFromTag (const TQString & t) { return new TypeNode (m_doc, t); } -KDE_NO_CDTOR_EXPORT TypeNode::TypeNode (NodePtr & d, const QString & t) +KDE_NO_CDTOR_EXPORT TypeNode::TypeNode (NodePtr & d, const TQString & t) : ConfigNode (d, t), tag (t) {} -NodePtr TypeNode::childFromTag (const QString & tag) { +NodePtr TypeNode::childFromTag (const TQString & tag) { return new SomeNode (m_doc, tag); } -NodePtr SomeNode::childFromTag (const QString & t) { +NodePtr SomeNode::childFromTag (const TQString & t) { return new SomeNode (m_doc, t); } -QWidget * TypeNode::createWidget (QWidget * parent) { - QString type_attr = getAttribute (StringPool::attr_type); +TQWidget * TypeNode::createWidget (TQWidget * tqparent) { + TQString type_attr = getAttribute (StringPool::attr_type); const char * ctype = type_attr.ascii (); - QString value = getAttribute (StringPool::attr_value); + TQString value = getAttribute (StringPool::attr_value); if (!strcmp (ctype, "range")) { - w = new QSlider (getAttribute (QString ("START")).toInt (), + w = new TQSlider (getAttribute (TQString ("START")).toInt (), getAttribute (StringPool::attr_end).toInt (), - 1, value.toInt (), Qt::Horizontal, parent); + 1, value.toInt (), Qt::Horizontal, tqparent); } else if (!strcmp (ctype, "num") || !strcmp (ctype, "string")) { - w = new QLineEdit (value, parent); + w = new TQLineEdit (value, tqparent); } else if (!strcmp (ctype, "bool")) { - QCheckBox * checkbox = new QCheckBox (parent); + TQCheckBox * checkbox = new TQCheckBox (tqparent); checkbox->setChecked (value.toInt ()); w = checkbox; } else if (!strcmp (ctype, "enum")) { - QComboBox * combo = new QComboBox (parent); + TQComboBox * combo = new TQComboBox (tqparent); for (NodePtr e = firstChild (); e; e = e->nextSibling ()) if (e->isElementNode () && !strcmp (e->nodeName (), "item")) combo->insertItem (convertNode (e)->getAttribute (StringPool::attr_value)); @@ -1528,20 +1528,20 @@ QWidget * TypeNode::createWidget (QWidget * parent) { return w; } -void TypeNode::changedXML (QTextStream & out) { +void TypeNode::changedXML (TQTextStream & out) { if (!w) return; - QString type_attr = getAttribute (StringPool::attr_type); + TQString type_attr = getAttribute (StringPool::attr_type); const char * ctype = type_attr.ascii (); - QString value = getAttribute (StringPool::attr_value); - QString newvalue; + TQString value = getAttribute (StringPool::attr_value); + TQString newvalue; if (!strcmp (ctype, "range")) { - newvalue = QString::number (static_cast (w)->value ()); + newvalue = TQString::number (static_cast (w)->value ()); } else if (!strcmp (ctype, "num") || !strcmp (ctype, "string")) { - newvalue = static_cast (w)->text (); + newvalue = static_cast (w)->text (); } else if (!strcmp (ctype, "bool")) { - newvalue = QString::number (static_cast (w)->isChecked()); + newvalue = TQString::number (static_cast (w)->isChecked()); } else if (!strcmp (ctype, "enum")) { - newvalue = QString::number (static_cast(w)->currentItem()); + newvalue = TQString::number (static_cast(w)->currentItem()); } else if (!strcmp (ctype, "tree")) { } else kdDebug() << "Unknown type:" << ctype << endl; @@ -1556,13 +1556,13 @@ void TypeNode::changedXML (QTextStream & out) { namespace KMPlayer { -class KMPLAYER_NO_EXPORT XMLPreferencesFrame : public QFrame { +class KMPLAYER_NO_EXPORT XMLPreferencesFrame : public TQFrame { public: - XMLPreferencesFrame (QWidget * parent, CallbackProcess *); + XMLPreferencesFrame (TQWidget * tqparent, CallbackProcess *); KDE_NO_CDTOR_EXPORT ~XMLPreferencesFrame () {} - QTable * table; + TQTable * table; protected: - void showEvent (QShowEvent *); + void showEvent (TQShowEvent *); private: CallbackProcess * m_process; }; @@ -1570,11 +1570,11 @@ private: } // namespace KDE_NO_CDTOR_EXPORT XMLPreferencesFrame::XMLPreferencesFrame -(QWidget * parent, CallbackProcess * p) - : QFrame (parent), m_process (p){ - QVBoxLayout * layout = new QVBoxLayout (this); - table = new QTable (this); - layout->addWidget (table); +(TQWidget * tqparent, CallbackProcess * p) + : TQFrame (tqparent), m_process (p){ + TQVBoxLayout * tqlayout = new TQVBoxLayout (this); + table = new TQTable (this); + tqlayout->addWidget (table); } KDE_NO_CDTOR_EXPORT XMLPreferencesPage::XMLPreferencesPage (CallbackProcess * p) @@ -1584,7 +1584,7 @@ KDE_NO_CDTOR_EXPORT XMLPreferencesPage::XMLPreferencesPage (CallbackProcess * p) KDE_NO_CDTOR_EXPORT XMLPreferencesPage::~XMLPreferencesPage () { } -KDE_NO_EXPORT void XMLPreferencesFrame::showEvent (QShowEvent *) { +KDE_NO_EXPORT void XMLPreferencesFrame::showEvent (TQShowEvent *) { if (!m_process->haveConfig ()) m_process->getConfigData (); } @@ -1597,7 +1597,7 @@ KDE_NO_EXPORT void XMLPreferencesPage::read (KConfig *) { KDE_NO_EXPORT void XMLPreferencesPage::sync (bool fromUI) { if (!m_configframe) return; - QTable * table = m_configframe->table; + TQTable * table = m_configframe->table; int row = 0; if (fromUI) { NodePtr configdoc = m_process->configDocument (); @@ -1608,14 +1608,14 @@ KDE_NO_EXPORT void XMLPreferencesPage::sync (bool fromUI) { kdDebug () << "No valid data" << endl; return; } - QString str; - QTextStream ts (&str, IO_WriteOnly); + TQString str; + TQTextStream ts (&str, IO_WriteOnly); ts << ""; for (NodePtr e = elm->firstChild (); e; e = e->nextSibling ()) convertNode (e)->changedXML (ts); if (str.length () > 10) { ts << ""; - QByteArray changeddata = QCString (str.ascii ()); + TQByteArray changeddata = TQCString (str.ascii ()); kdDebug () << str << " " << changeddata.size () << str.length () << endl; changeddata.resize (str.length ()); m_process->setChangedData (changeddata); @@ -1627,7 +1627,7 @@ KDE_NO_EXPORT void XMLPreferencesPage::sync (bool fromUI) { if (!configdoc) return; if (m_configframe->table->numCols () < 1) { // not yet created - QString err; + TQString err; int first_column_width = 50; NodePtr elm = configdoc->firstChild (); // document if (!elm || !elm->hasChildNodes ()) { @@ -1642,18 +1642,18 @@ KDE_NO_EXPORT void XMLPreferencesPage::sync (bool fromUI) { table->horizontalHeader ()->hide (); table->setTopMargin (0); table->setColumnReadOnly (0, true); - QFontMetrics metrics (table->font ()); + TQFontMetrics metrics (table->font ()); for (elm=elm->firstChild (); elm; elm=elm->nextSibling (), row++) { TypeNode * tn = convertNode (elm); - QString name = tn->getAttribute (StringPool::attr_name); + TQString name = tn->getAttribute (StringPool::attr_name); m_configframe->table->setText (row, 0, name); int strwid = metrics.boundingRect (name).width (); if (strwid > first_column_width) first_column_width = strwid + 4; - QWidget * w = tn->createWidget (table->viewport ()); + TQWidget * w = tn->createWidget (table->viewport ()); if (w) { table->setCellWidget (row, 1, w); - QWhatsThis::add (w, elm->innerText ()); + TQWhatsThis::add (w, elm->innerText ()); } else kdDebug () << "No widget for " << name; } @@ -1663,14 +1663,14 @@ KDE_NO_EXPORT void XMLPreferencesPage::sync (bool fromUI) { } } -KDE_NO_EXPORT void XMLPreferencesPage::prefLocation (QString & item, QString & icon, QString & tab) { +KDE_NO_EXPORT void XMLPreferencesPage::prefLocation (TQString & item, TQString & icon, TQString & tab) { item = i18n ("General Options"); - icon = QString ("kmplayer"); + icon = TQString ("kmplayer"); tab = m_process->menuName (); } -KDE_NO_EXPORT QFrame * XMLPreferencesPage::prefPage (QWidget * parent) { - m_configframe = new XMLPreferencesFrame (parent, m_process); +KDE_NO_EXPORT TQFrame * XMLPreferencesPage::prefPage (TQWidget * tqparent) { + m_configframe = new XMLPreferencesFrame (tqparent, m_process); return m_configframe; } @@ -1681,8 +1681,8 @@ static const char * xine_supported [] = { "tvsource", "urlsource", "vcdsource", "audiocdsource", 0L }; -KDE_NO_CDTOR_EXPORT Xine::Xine (QObject * parent, Settings * settings) - : CallbackProcess (parent, settings, "xine", i18n ("&Xine")) { +KDE_NO_CDTOR_EXPORT Xine::Xine (TQObject * tqparent, Settings * settings) + : CallbackProcess (tqparent, settings, "xine", i18n ("&Xine")) { #ifdef HAVE_XINE m_supported_sources = xine_supported; m_settings->addPage (m_configpage); @@ -1694,26 +1694,26 @@ KDE_NO_CDTOR_EXPORT Xine::~Xine () {} bool Xine::ready (Viewer * viewer) { initProcess (viewer); viewer->changeProtocol (QXEmbed::XPLAIN); - QString xine_config = KProcess::quote (QString (QFile::encodeName (locateLocal ("data", "kmplayer/") + QString ("xine_config")))); + TQString xine_config = KProcess::quote (TQString (TQFile::encodeName (locateLocal ("data", "kmplayer/") + TQString ("xine_config")))); m_request_seek = -1; if (m_source && !m_source->pipeCmd ().isEmpty ()) { fprintf (stderr, "%s | ", m_source->pipeCmd ().ascii ()); *m_process << m_source->pipeCmd ().ascii () << " | "; } fprintf (stderr, "kxineplayer -wid %lu", (unsigned long) widget ()); - *m_process << "kxineplayer -wid " << QString::number (widget ()); + *m_process << "kxineplayer -wid " << TQString::number (widget ()); fprintf (stderr, " -f %s", xine_config.ascii ()); *m_process << " -f " << xine_config; - QString strVideoDriver = QString (m_settings->videodrivers[m_settings->videodriver].driver); + TQString strVideoDriver = TQString (m_settings->videodrivers[m_settings->videodriver].driver); if (!strVideoDriver.isEmpty ()) { fprintf (stderr, " -vo %s", strVideoDriver.lower().ascii()); *m_process << " -vo " << strVideoDriver.lower(); } - QString strAudioDriver = QString (m_settings->audiodrivers[m_settings->audiodriver].driver); + TQString strAudioDriver = TQString (m_settings->audiodrivers[m_settings->audiodriver].driver); if (!strAudioDriver.isEmpty ()) { - if (strAudioDriver.startsWith (QString ("alsa"))) - strAudioDriver = QString ("alsa"); + if (strAudioDriver.startsWith (TQString ("alsa"))) + strAudioDriver = TQString ("alsa"); fprintf (stderr, " -ao %s", strAudioDriver.lower().ascii()); *m_process << " -ao " << strAudioDriver.lower(); } @@ -1724,22 +1724,22 @@ bool Xine::ready (Viewer * viewer) { *m_process << " -c"; } if (m_source) - if (m_source->url ().url ().startsWith (QString ("dvd://")) && + if (m_source->url ().url ().startsWith (TQString ("dvd://")) && !m_settings->dvddevice.isEmpty ()) { fprintf (stderr, " -dvd-device %s", m_settings->dvddevice.ascii ()); *m_process << " -dvd-device " << m_settings->dvddevice; - } else if (m_source->url ().url ().startsWith (QString ("vcd://")) && + } else if (m_source->url ().url ().startsWith (TQString ("vcd://")) && !m_settings->vcddevice.isEmpty ()) { fprintf (stderr, " -vcd-device %s", m_settings->vcddevice.ascii ()); *m_process << " -vcd-device " << m_settings->vcddevice; - } else if (m_source->url ().url ().startsWith (QString ("tv://")) && + } else if (m_source->url ().url ().startsWith (TQString ("tv://")) && !m_source->videoDevice ().isEmpty ()) { fprintf (stderr, " -vd %s", m_source->videoDevice ().ascii ()); *m_process << " -vd " << m_source->videoDevice (); } if (!m_recordurl.isEmpty ()) { - QString rf = KProcess::quote ( - QString (QFile::encodeName (getPath (m_recordurl)))); + TQString rf = KProcess::quote ( + TQString (TQFile::encodeName (getPath (m_recordurl)))); fprintf (stderr, " -rec %s", rf.ascii ()); *m_process << " -rec " << rf; } @@ -1757,8 +1757,8 @@ static const char * gst_supported [] = { "exitsource", "introsource", "urlsource", "vcdsource", "audiocdsource", 0L }; -KDE_NO_CDTOR_EXPORT GStreamer::GStreamer (QObject * parent, Settings * settings) - : CallbackProcess (parent, settings, "gstreamer", i18n ("&GStreamer")) { +KDE_NO_CDTOR_EXPORT GStreamer::GStreamer (TQObject * tqparent, Settings * settings) + : CallbackProcess (tqparent, settings, "gstreamer", i18n ("&GStreamer")) { #ifdef HAVE_GSTREAMER m_supported_sources = gst_supported; #endif @@ -1771,28 +1771,28 @@ KDE_NO_EXPORT bool GStreamer::ready (Viewer * viewer) { viewer->changeProtocol (QXEmbed::XPLAIN); m_request_seek = -1; fprintf (stderr, "kgstplayer -wid %lu", (unsigned long) widget ()); - *m_process << "kgstplayer -wid " << QString::number (widget ()); + *m_process << "kgstplayer -wid " << TQString::number (widget ()); - QString strVideoDriver = QString (m_settings->videodrivers[m_settings->videodriver].driver); + TQString strVideoDriver = TQString (m_settings->videodrivers[m_settings->videodriver].driver); if (!strVideoDriver.isEmpty ()) { fprintf (stderr, " -vo %s", strVideoDriver.lower().ascii()); *m_process << " -vo " << strVideoDriver.lower(); } - QString strAudioDriver = QString (m_settings->audiodrivers[m_settings->audiodriver].driver); + TQString strAudioDriver = TQString (m_settings->audiodrivers[m_settings->audiodriver].driver); if (!strAudioDriver.isEmpty ()) { - if (strAudioDriver.startsWith (QString ("alsa"))) - strAudioDriver = QString ("alsa"); + if (strAudioDriver.startsWith (TQString ("alsa"))) + strAudioDriver = TQString ("alsa"); fprintf (stderr, " -ao %s", strAudioDriver.lower().ascii()); *m_process << " -ao " << strAudioDriver.lower(); } fprintf (stderr, " -cb %s", dcopName ().ascii()); *m_process << " -cb " << dcopName (); if (m_source) - if (m_source->url ().url ().startsWith (QString ("dvd://")) && + if (m_source->url ().url ().startsWith (TQString ("dvd://")) && !m_settings->dvddevice.isEmpty ()) { fprintf (stderr, " -dvd-device %s", m_settings->dvddevice.ascii ()); *m_process << " -dvd-device " << m_settings->dvddevice; - } else if (m_source->url ().url ().startsWith (QString ("vcd://")) && + } else if (m_source->url ().url ().startsWith (TQString ("vcd://")) && !m_settings->vcddevice.isEmpty ()) { fprintf (stderr, " -vcd-device %s", m_settings->vcddevice.ascii ()); *m_process << " -vcd-device " << m_settings->vcddevice; @@ -1808,8 +1808,8 @@ static const char * ffmpeg_supports [] = { "tvsource", "urlsource", 0L }; -FFMpeg::FFMpeg (QObject * parent, Settings * settings) - : Process (parent, settings, "ffmpeg") { +FFMpeg::FFMpeg (TQObject * tqparent, Settings * settings) + : Process (tqparent, settings, "ffmpeg") { m_supported_sources = ffmpeg_supports; } @@ -1822,41 +1822,41 @@ KDE_NO_EXPORT void FFMpeg::init () { bool FFMpeg::deMediafiedPlay () { initProcess (viewer ()); KURL url (m_url); - connect (m_process, SIGNAL (processExited (KProcess *)), - this, SLOT (processStopped (KProcess *))); - QString outurl = QString (QFile::encodeName (m_recordurl.isLocalFile () ? getPath (m_recordurl) : m_recordurl.url ())); + connect (m_process, TQT_SIGNAL (processExited (KProcess *)), + this, TQT_SLOT (processStopped (KProcess *))); + TQString outurl = TQString (TQFile::encodeName (m_recordurl.isLocalFile () ? getPath (m_recordurl) : m_recordurl.url ())); if (m_recordurl.isLocalFile ()) - QFile (outurl).remove (); - QString cmd ("ffmpeg "); + TQFile (outurl).remove (); + TQString cmd ("ffmpeg "); if (!m_source->videoDevice ().isEmpty () || !m_source->audioDevice ().isEmpty ()) { if (!m_source->videoDevice ().isEmpty ()) - cmd += QString ("-vd ") + m_source->videoDevice (); + cmd += TQString ("-vd ") + m_source->videoDevice (); else - cmd += QString ("-vn"); + cmd += TQString ("-vn"); if (!m_source->audioDevice ().isEmpty ()) - cmd += QString (" -ad ") + m_source->audioDevice (); + cmd += TQString (" -ad ") + m_source->audioDevice (); else - cmd += QString (" -an"); + cmd += TQString (" -an"); KProcess process; process.setUseShell (true); if (!m_source->videoNorm ().isEmpty ()) { process << "v4lctl -c " << m_source->videoDevice () << " setnorm " << m_source->videoNorm (); kdDebug () << "v4lctl -c " << m_source->videoDevice () << " setnorm " << m_source->videoNorm () << endl; process.start (KProcess::Block); - cmd += QString (" -tvstd ") + m_source->videoNorm (); + cmd += TQString (" -tvstd ") + m_source->videoNorm (); } if (m_source->frequency () > 0) { process.clearArguments(); - process << "v4lctl -c " << m_source->videoDevice () << " setfreq " << QString::number (m_source->frequency ()); + process << "v4lctl -c " << m_source->videoDevice () << " setfreq " << TQString::number (m_source->frequency ()); kdDebug () << "v4lctl -c " << m_source->videoDevice () << " setfreq " << m_source->frequency () << endl; process.start (KProcess::Block); } } else { - cmd += QString ("-i ") + KProcess::quote (QString (QFile::encodeName (url.isLocalFile () ? getPath (url) : url.url ()))); + cmd += TQString ("-i ") + KProcess::quote (TQString (TQFile::encodeName (url.isLocalFile () ? getPath (url) : url.url ()))); } - cmd += QChar (' ') + m_settings->ffmpegarguments; - cmd += QChar (' ') + KProcess::quote (QString (QFile::encodeName (outurl))); + cmd += TQChar (' ') + m_settings->ffmpegarguments; + cmd += TQChar (' ') + KProcess::quote (TQString (TQFile::encodeName (outurl))); fprintf (stderr, "%s\n", (const char *) cmd.local8Bit ()); *m_process << cmd; // FIXME if (m_player->source () == source) // ugly @@ -1878,7 +1878,7 @@ KDE_NO_EXPORT bool FFMpeg::stop () { KDE_NO_EXPORT bool FFMpeg::quit () { stop (); if (!playing ()) return true; - QTime t; + TQTime t; t.start (); do { KProcessController::theKProcessController->waitForProcessExit (2); @@ -1927,7 +1927,7 @@ dbusFilter (DBusConnection *conn, DBusMessage *msg, void *data) { if (dbus_message_has_destination (msg, process->destination ().ascii ()) && dbus_message_has_interface (msg, iface) && - QString (path).startsWith(process->objectPath ())) + TQString (path).startsWith(process->objectPath ())) { //kdDebug () << "dbusFilter " << sender << // " iface:" << dbus_message_get_interface (msg) << @@ -1936,15 +1936,15 @@ dbusFilter (DBusConnection *conn, DBusMessage *msg, void *data) { if (dbus_message_is_method_call (msg, iface, "getUrl")) { char *param = 0; - QString url, target; + TQString url, target; if (dbus_message_iter_init (msg, &args) && DBUS_TYPE_STRING == dbus_message_iter_get_arg_type(&args)) { dbus_message_iter_get_basic (&args, ¶m); - url = QString::fromLocal8Bit (param); + url = TQString::fromLocal8Bit (param); if (dbus_message_iter_next (&args) && DBUS_TYPE_STRING==dbus_message_iter_get_arg_type(&args)) { dbus_message_iter_get_basic (&args, ¶m); - target = QString::fromLocal8Bit (param); + target = TQString::fromLocal8Bit (param); } process->requestStream (path, url, target); } @@ -1955,7 +1955,7 @@ dbusFilter (DBusConnection *conn, DBusMessage *msg, void *data) { if (dbus_message_iter_init (msg, &args) && DBUS_TYPE_STRING == dbus_message_iter_get_arg_type(&args)) { dbus_message_iter_get_basic (&args, ¶m); - QString r = process->evaluateScript (QString::fromUtf8 (param)); + TQString r = process->evaluateScript (TQString::fromUtf8 (param)); DBusMessage * rmsg = dbus_message_new_method_return (msg); char *res = strdup (r.utf8 ().data ()); //kdDebug () << "evaluate => " << res << endl; @@ -1969,7 +1969,7 @@ dbusFilter (DBusConnection *conn, DBusMessage *msg, void *data) { } } else if (dbus_message_is_method_call (msg, iface, "destroy")) { - QString stream =QString(path).mid(process->objectPath().length()+1); + TQString stream =TQString(path).mid(process->objectPath().length()+1); process->destroyStream (stream); } else if (dbus_message_is_method_call (msg, iface, "running")) { @@ -1977,13 +1977,13 @@ dbusFilter (DBusConnection *conn, DBusMessage *msg, void *data) { if (dbus_message_iter_init (msg, &args) && DBUS_TYPE_STRING == dbus_message_iter_get_arg_type(&args)) { dbus_message_iter_get_basic (&args, ¶m); - process->setStarted (QString (param)); + process->setStarted (TQString (param)); } } else if (dbus_message_is_method_call (msg, iface, "plugged")) { process->viewer ()->view ()->videoStart (); } else if (dbus_message_is_method_call (msg, iface, "dimension")) { - Q_UINT32 w, h; + TQ_UINT32 w, h; if (dbus_message_iter_init (msg, &args) && DBUS_TYPE_UINT32 == dbus_message_iter_get_arg_type(&args)) { dbus_message_iter_get_basic (&args, &w); @@ -2001,8 +2001,8 @@ dbusFilter (DBusConnection *conn, DBusMessage *msg, void *data) { } KDE_NO_CDTOR_EXPORT -NpStream::NpStream (QObject *p, Q_UINT32 sid, const KURL & u) - : QObject (p), +NpStream::NpStream (TQObject *p, TQ_UINT32 sid, const KURL & u) + : TQObject (p), url (u), job (0L), bytes (0), content_length (0), stream_id (sid), @@ -2017,10 +2017,10 @@ KDE_NO_CDTOR_EXPORT NpStream::~NpStream () { KDE_NO_EXPORT void NpStream::open () { kdDebug () << "NpStream " << stream_id << " open " << url.url () << endl; if (url.url().startsWith ("javascript:")) { - NpPlayer *npp = static_cast (parent ()); - QString result = npp->evaluateScript (url.url().mid (11)); + NpPlayer *npp = static_cast (tqparent ()); + TQString result = npp->evaluateScript (url.url().mid (11)); if (!result.isEmpty ()) { - QCString cr = result.local8Bit (); + TQCString cr = result.local8Bit (); int len = cr.length (); pending_buf.resize (len + 1); memcpy (pending_buf.data (), cr.data (), len); @@ -2033,16 +2033,16 @@ KDE_NO_EXPORT void NpStream::open () { } else { job = KIO::get (url, false, false); job->addMetaData ("errorPage", "false"); - connect (job, SIGNAL (data (KIO::Job *, const QByteArray &)), - this, SLOT (slotData (KIO::Job *, const QByteArray &))); - connect (job, SIGNAL (result (KIO::Job *)), - this, SLOT (slotResult (KIO::Job *))); - connect (job, SIGNAL (redirection (KIO::Job *, const KURL &)), - this, SLOT (redirection (KIO::Job *, const KURL &))); - connect (job, SIGNAL (mimetype (KIO::Job *, const QString &)), - SLOT (slotMimetype (KIO::Job *, const QString &))); - connect (job, SIGNAL (totalSize (KIO::Job *, KIO::filesize_t)), - SLOT (slotTotalSize (KIO::Job *, KIO::filesize_t))); + connect (job, TQT_SIGNAL (data (KIO::Job *, const TQByteArray &)), + this, TQT_SLOT (slotData (KIO::Job *, const TQByteArray &))); + connect (job, TQT_SIGNAL (result (KIO::Job *)), + this, TQT_SLOT (slotResult (KIO::Job *))); + connect (job, TQT_SIGNAL (redirection (KIO::Job *, const KURL &)), + this, TQT_SLOT (redirection (KIO::Job *, const KURL &))); + connect (job, TQT_SIGNAL (mimetype (KIO::Job *, const TQString &)), + TQT_SLOT (slotMimetype (KIO::Job *, const TQString &))); + connect (job, TQT_SIGNAL (totalSize (KIO::Job *, KIO::filesize_t)), + TQT_SLOT (slotTotalSize (KIO::Job *, KIO::filesize_t))); } } @@ -2062,7 +2062,7 @@ KDE_NO_EXPORT void NpStream::slotResult (KIO::Job *jb) { emit stateChanged (); } -KDE_NO_EXPORT void NpStream::slotData (KIO::Job*, const QByteArray& qb) { +KDE_NO_EXPORT void NpStream::slotData (KIO::Job*, const TQByteArray& qb) { pending_buf = qb; // we suspend job, so qb should be valid until resume if (qb.size()) { job->suspend (); @@ -2076,7 +2076,7 @@ KDE_NO_EXPORT void NpStream::redirection (KIO::Job *, const KURL &u) { emit redirected (stream_id, url); } -void NpStream::slotMimetype (KIO::Job *, const QString &mime) { +void NpStream::slotMimetype (KIO::Job *, const TQString &mime) { mimetype = mime; } @@ -2089,8 +2089,8 @@ static const char * npplayer_supports [] = { }; KDE_NO_CDTOR_EXPORT -NpPlayer::NpPlayer (QObject * parent, Settings * settings, const QString & srv) - : Process (parent, settings, "npp"), +NpPlayer::NpPlayer (TQObject * tqparent, Settings * settings, const TQString & srv) + : Process (tqparent, settings, "npp"), service (srv), write_in_progress (false) { m_supported_sources = npplayer_supports; @@ -2116,22 +2116,22 @@ KDE_NO_EXPORT void NpPlayer::init () { KDE_NO_EXPORT void NpPlayer::initProcess (Viewer * viewer) { Process::initProcess (viewer); - connect (m_process, SIGNAL (processExited (KProcess *)), - this, SLOT (processStopped (KProcess *))); - connect (m_process, SIGNAL (receivedStdout (KProcess *, char *, int)), - this, SLOT (processOutput (KProcess *, char *, int))); - connect (m_process, SIGNAL (receivedStderr (KProcess *, char *, int)), - this, SLOT (processOutput (KProcess *, char *, int))); - connect (m_process, SIGNAL (wroteStdin (KProcess *)), - this, SLOT (wroteStdin (KProcess *))); + connect (m_process, TQT_SIGNAL (processExited (KProcess *)), + this, TQT_SLOT (processStopped (KProcess *))); + connect (m_process, TQT_SIGNAL (receivedStdout (KProcess *, char *, int)), + this, TQT_SLOT (processOutput (KProcess *, char *, int))); + connect (m_process, TQT_SIGNAL (receivedStderr (KProcess *, char *, int)), + this, TQT_SLOT (processOutput (KProcess *, char *, int))); + connect (m_process, TQT_SIGNAL (wroteStdin (KProcess *)), + this, TQT_SLOT (wroteStdin (KProcess *))); if (!dbus_static) dbus_static = dbus_static_deleter.setObject (new DBusStatic ()); if (iface.isEmpty ()) { DBusError dberr; - iface = QString ("org.kde.kmplayer.callback"); + iface = TQString ("org.kde.kmplayer.callback"); static int count = 0; - path = QString ("/npplayer%1").arg (count++); - filter = QString ("type='method_call',interface='org.kde.kmplayer.callback'"); + path = TQString ("/npplayer%1").arg (count++); + filter = TQString ("type='method_call',interface='org.kde.kmplayer.callback'"); dbus_error_init (&dberr); DBusConnection *conn = dbus_bus_get (DBUS_BUS_SESSION, &dberr); @@ -2152,7 +2152,7 @@ KDE_NO_EXPORT void NpPlayer::initProcess (Viewer * viewer) { } } if (!has_service) // plugin, accept what-is [sic] - service = QString (dbus_bus_get_unique_name (conn)); + service = TQString (dbus_bus_get_unique_name (conn)); kdDebug() << "using service " << service << " interface " << iface << endl; dbus_bus_add_match (conn, filter.ascii(), &dberr); if (dbus_error_is_set (&dberr)) { @@ -2170,8 +2170,8 @@ KDE_NO_EXPORT bool NpPlayer::deMediafiedPlay () { // if we change from XPLAIN to XEMBED, the DestroyNotify may come later viewer ()->changeProtocol (QXEmbed::XEMBED); if (m_mrl && !m_url.isEmpty () && dbus_static->dbus_connnection) { - QString mime = "text/plain"; - QString plugin; + TQString mime = "text/plain"; + TQString plugin; Element *elm = m_mrl->mrl (); if (elm->id == id_node_html_object) { // this sucks to have to do this here .. @@ -2181,7 +2181,7 @@ KDE_NO_EXPORT bool NpPlayer::deMediafiedPlay () { break; } } - for (NodePtr n = m_mrl; n; n = n->parentNode ()) { + for (NodePtr n = m_mrl; n; n = n->tqparentNode ()) { Mrl *mrl = n->mrl (); if (mrl && m_base_url.isEmpty ()) m_base_url = mrl->getAttribute ("pluginbaseurl"); @@ -2255,39 +2255,39 @@ KDE_NO_EXPORT bool NpPlayer::ready (Viewer * viewer) { initProcess (viewer); viewer->changeProtocol (QXEmbed::XEMBED); kdDebug() << "NpPlayer::ready" << endl; - QString cmd ("knpplayer"); - cmd += QString (" -cb "); + TQString cmd ("knpplayer"); + cmd += TQString (" -cb "); cmd += service; cmd += path; - cmd += QString (" -wid "); - cmd += QString::number (viewer->winId ()); + cmd += TQString (" -wid "); + cmd += TQString::number (viewer->winId ()); fprintf (stderr, "%s\n", cmd.local8Bit ().data ()); *m_process << cmd; m_process->start (KProcess::NotifyOnExit, KProcess::All); return m_process->isRunning (); } -KDE_NO_EXPORT void NpPlayer::setStarted (const QString & srv) { +KDE_NO_EXPORT void NpPlayer::setStarted (const TQString & srv) { remote_service = srv; kdDebug () << "NpPlayer::setStarted " << srv << endl; setState (Ready); } -KDE_NO_EXPORT QString NpPlayer::evaluateScript (const QString & script) { - QString result; +KDE_NO_EXPORT TQString NpPlayer::evaluateScript (const TQString & script) { + TQString result; emit evaluate (script, result); //kdDebug () << "evaluateScript " << script << " => " << result << endl; return result; } -static int getStreamId (const QString &path) { - int p = path.findRev (QChar ('_')); +static int getStreamId (const TQString &path) { + int p = path.tqfindRev (TQChar ('_')); if (p < 0) { kdError() << "wrong object path " << path << endl; return -1; } bool ok; - Q_UINT32 sid = path.mid (p+1).toInt (&ok); + TQ_UINT32 sid = path.mid (p+1).toInt (&ok); if (!ok) { kdError() << "wrong object path suffix " << path.mid (p+1) << endl; return -1; @@ -2296,15 +2296,15 @@ static int getStreamId (const QString &path) { } KDE_NO_EXPORT -void NpPlayer::requestStream (const QString &path, const QString & url, const QString & target) { +void NpPlayer::requestStream (const TQString &path, const TQString & url, const TQString & target) { KURL uri (m_base_url.isEmpty () ? m_url : m_base_url, url); kdDebug () << "NpPlayer::request " << path << " '" << uri << "'" << endl; - Q_UINT32 sid = getStreamId (path); + TQ_UINT32 sid = getStreamId (path); if (sid >= 0) { if (!target.isEmpty ()) { kdDebug () << "new page request " << target << endl; if (url.startsWith ("javascript:")) { - QString result = evaluateScript (url.mid (11)); + TQString result = evaluateScript (url.mid (11)); kdDebug() << "result is " << result << endl; if (result == "undefined") uri = KURL (); @@ -2316,8 +2316,8 @@ void NpPlayer::requestStream (const QString &path, const QString & url, const QS sendFinish (sid, 0, NpStream::BecauseDone); } else { NpStream * ns = new NpStream (this, sid, uri); - connect (ns, SIGNAL (stateChanged ()), - this, SLOT (streamStateChanged ())); + connect (ns, TQT_SIGNAL (stateChanged ()), + this, TQT_SLOT (streamStateChanged ())); streams[sid] = ns; if (url != uri.url ()) streamRedirected (sid, uri.url ()); @@ -2327,10 +2327,10 @@ void NpPlayer::requestStream (const QString &path, const QString & url, const QS } } -KDE_NO_EXPORT void NpPlayer::destroyStream (const QString &s) { +KDE_NO_EXPORT void NpPlayer::destroyStream (const TQString &s) { int sid = getStreamId (s); - if (sid >= 0 && streams.contains ((Q_UINT32) sid)) { - NpStream *ns = streams[(Q_UINT32) sid]; + if (sid >= 0 && streams.tqcontains ((TQ_UINT32) sid)) { + NpStream *ns = streams[(TQ_UINT32) sid]; ns->close (); if (!write_in_progress) processStreams (); @@ -2340,10 +2340,10 @@ KDE_NO_EXPORT void NpPlayer::destroyStream (const QString &s) { } KDE_NO_EXPORT -void NpPlayer::sendFinish (Q_UINT32 sid, Q_UINT32 bytes, NpStream::Reason because) { +void NpPlayer::sendFinish (TQ_UINT32 sid, TQ_UINT32 bytes, NpStream::Reason because) { if (playing () && dbus_static->dbus_connnection) { - Q_UINT32 reason = (int) because; - QString objpath = QString ("/plugin/stream_%1").arg (sid); + TQ_UINT32 reason = (int) because; + TQString objpath = TQString ("/plugin/stream_%1").arg (sid); DBusMessage *msg = dbus_message_new_method_call ( remote_service.ascii(), objpath.ascii (), @@ -2389,7 +2389,7 @@ KDE_NO_EXPORT bool NpPlayer::stop () { KDE_NO_EXPORT bool NpPlayer::quit () { if (playing ()) { stop (); - QTime t; + TQTime t; t.start (); do { KProcessController::theKProcessController->waitForProcessExit (2); @@ -2401,13 +2401,13 @@ KDE_NO_EXPORT bool NpPlayer::quit () { KDE_NO_EXPORT void NpPlayer::processOutput (KProcess *, char * str, int slen) { if (viewer () && slen > 0) - viewer ()->view ()->addText (QString::fromLocal8Bit (str, slen)); + viewer ()->view ()->addText (TQString::fromLocal8Bit (str, slen)); } KDE_NO_EXPORT void NpPlayer::processStopped (KProcess *) { terminateJobs (); if (m_source) - ((PlayListNotify *) m_source)->setInfoMessage (QString ()); + ((PlayListNotify *) m_source)->setInfoMessage (TQString ()); setState (NotRunning); } @@ -2417,11 +2417,11 @@ KDE_NO_EXPORT void NpPlayer::streamStateChanged () { processStreams (); } -KDE_NO_EXPORT void NpPlayer::streamRedirected (Q_UINT32 sid, const KURL &u) { +KDE_NO_EXPORT void NpPlayer::streamRedirected (TQ_UINT32 sid, const KURL &u) { if (playing () && dbus_static->dbus_connnection) { kdDebug() << "redirected " << sid << " to " << u.url() << endl; char *cu = strdup (u.url ().local8Bit().data ()); - QString objpath = QString ("/plugin/stream_%1").arg (sid); + TQString objpath = TQString ("/plugin/stream_%1").arg (sid); DBusMessage *msg = dbus_message_new_method_call ( remote_service.ascii(), objpath.ascii (), @@ -2438,7 +2438,7 @@ KDE_NO_EXPORT void NpPlayer::streamRedirected (Q_UINT32 sid, const KURL &u) { KDE_NO_EXPORT void NpPlayer::processStreams () { NpStream *stream = 0L; - Q_UINT32 stream_id; + TQ_UINT32 stream_id; timeval tv = { 0x7fffffff, 0 }; const StreamMap::iterator e = streams.end (); int active_count = 0; @@ -2453,8 +2453,8 @@ KDE_NO_EXPORT void NpPlayer::processStreams () { ns->open (); write_in_progress = false; if (ns->job) { - connect (ns, SIGNAL (redirected (Q_UINT32, const KURL&)), - this, SLOT (streamRedirected (Q_UINT32, const KURL&))); + connect (ns, TQT_SIGNAL (redirected (TQ_UINT32, const KURL&)), + this, TQT_SLOT (streamRedirected (TQ_UINT32, const KURL&))); active_count++; } } @@ -2488,7 +2488,7 @@ KDE_NO_EXPORT void NpPlayer::processStreams () { char *mt = strdup (stream->mimetype.isEmpty () ? "" : stream->mimetype.utf8 ().data ()); - QString objpath=QString("/plugin/stream_%1").arg(stream->stream_id); + TQString objpath=TQString("/plugin/stream_%1").tqarg(stream->stream_id); DBusMessage *msg = dbus_message_new_method_call ( remote_service.ascii(), objpath.ascii (), @@ -2504,13 +2504,13 @@ KDE_NO_EXPORT void NpPlayer::processStreams () { dbus_connection_flush (dbus_static->dbus_connnection); free (mt); } - const int header_len = 2 * sizeof (Q_UINT32); - Q_UINT32 chunk = stream->pending_buf.size(); + const int header_len = 2 * sizeof (TQ_UINT32); + TQ_UINT32 chunk = stream->pending_buf.size(); send_buf.resize (chunk + header_len); - memcpy (send_buf.data (), &stream_id, sizeof (Q_UINT32)); - memcpy (send_buf.data() + sizeof (Q_UINT32), &chunk, sizeof (Q_UINT32)); + memcpy (send_buf.data (), &stream_id, sizeof (TQ_UINT32)); + memcpy (send_buf.data() + sizeof (TQ_UINT32), &chunk, sizeof (TQ_UINT32)); memcpy (send_buf.data()+header_len, stream->pending_buf.data (), chunk); - stream->pending_buf = QByteArray (); + stream->pending_buf = TQByteArray (); /*fprintf (stderr, " => %d %d\n", (long)stream_id, chunk);*/ stream->bytes += chunk; write_in_progress = true; @@ -2526,32 +2526,32 @@ KDE_NO_EXPORT void NpPlayer::wroteStdin (KProcess *) { processStreams (); } -KDE_NO_EXPORT QString NpPlayer::menuName () const { +KDE_NO_EXPORT TQString NpPlayer::menuName () const { return i18n ("&Ice Ape"); } #else KDE_NO_CDTOR_EXPORT -NpStream::NpStream (QObject *p, Q_UINT32, const KURL & url) - : QObject (p) {} +NpStream::NpStream (TQObject *p, TQ_UINT32, const KURL & url) + : TQObject (p) {} KDE_NO_CDTOR_EXPORT NpStream::~NpStream () {} void NpStream::slotResult (KIO::Job*) {} -void NpStream::slotData (KIO::Job*, const QByteArray&) {} +void NpStream::slotData (KIO::Job*, const TQByteArray&) {} void NpStream::redirection (KIO::Job *, const KURL &) {} -void NpStream::slotMimetype (KIO::Job *, const QString &) {} +void NpStream::slotMimetype (KIO::Job *, const TQString &) {} void NpStream::slotTotalSize (KIO::Job *, KIO::filesize_t) {} KDE_NO_CDTOR_EXPORT -NpPlayer::NpPlayer (QObject * parent, Settings * settings, const QString &) - : Process (parent, settings, "npp") {} +NpPlayer::NpPlayer (TQObject * tqparent, Settings * settings, const TQString &) + : Process (tqparent, settings, "npp") {} KDE_NO_CDTOR_EXPORT NpPlayer::~NpPlayer () {} KDE_NO_EXPORT void NpPlayer::init () {} KDE_NO_EXPORT bool NpPlayer::deMediafiedPlay () { return false; } KDE_NO_EXPORT void NpPlayer::initProcess (Viewer *) {} -KDE_NO_EXPORT QString NpPlayer::menuName () const { return QString (); } -KDE_NO_EXPORT void NpPlayer::setStarted (const QString &) {} +KDE_NO_EXPORT TQString NpPlayer::menuName () const { return TQString (); } +KDE_NO_EXPORT void NpPlayer::setStarted (const TQString &) {} KDE_NO_EXPORT bool NpPlayer::stop () { return false; } KDE_NO_EXPORT bool NpPlayer::quit () { return false; } KDE_NO_EXPORT bool NpPlayer::ready (Viewer *) { return false; } @@ -2559,7 +2559,7 @@ KDE_NO_EXPORT void NpPlayer::processOutput (KProcess *, char *, int) {} KDE_NO_EXPORT void NpPlayer::processStopped (KProcess *) {} KDE_NO_EXPORT void NpPlayer::wroteStdin (KProcess *) {} KDE_NO_EXPORT void NpPlayer::streamStateChanged () {} -KDE_NO_EXPORT void NpPlayer::streamRedirected (Q_UINT32, const KURL &) {} +KDE_NO_EXPORT void NpPlayer::streamRedirected (TQ_UINT32, const KURL &) {} KDE_NO_EXPORT void NpPlayer::terminateJobs () {} #endif diff --git a/src/kmplayerprocess.h b/src/kmplayerprocess.h index 8a51702..02f9c6d 100644 --- a/src/kmplayerprocess.h +++ b/src/kmplayerprocess.h @@ -21,12 +21,12 @@ #ifndef _KMPLAYERPROCESS_H_ #define _KMPLAYERPROCESS_H_ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -34,7 +34,7 @@ #include "kmplayerconfig.h" #include "kmplayersource.h" -class QWidget; +class TQWidget; class KProcess; namespace KIO { @@ -53,19 +53,20 @@ class Backend_stub; /* * Base class for all backend processes */ -class KMPLAYER_EXPORT Process : public QObject { +class KMPLAYER_EXPORT Process : public TQObject { Q_OBJECT + TQ_OBJECT public: enum State { NotRunning = 0, Ready, Buffering, Playing }; - Process (QObject * parent, Settings * settings, const char * n); + Process (TQObject * tqparent, Settings * settings, const char * n); virtual ~Process (); virtual void init (); virtual void initProcess (Viewer *); - virtual QString menuName () const; - virtual void setAudioLang (int, const QString &); - virtual void setSubtitle (int, const QString &); + virtual TQString menuName () const; + virtual void setAudioLang (int, const TQString &); + virtual void setSubtitle (int, const TQString &); bool playing () const; KDE_NO_EXPORT KProcess * process () const { return m_process; } KDE_NO_EXPORT Source * source () const { return m_source; } @@ -77,7 +78,7 @@ public: State state () const { return m_state; } NodePtr mrl () const { return m_mrl; } signals: - void grabReady (const QString & path); + void grabReady (const TQString & path); public slots: virtual bool ready (Viewer *); bool play (Source *, NodePtr mrl); @@ -107,11 +108,11 @@ protected: State m_old_state; KProcess * m_process; KIO::Job * m_job; - QString m_url; + TQString m_url; int m_request_seek; const char ** m_supported_sources; private: - QGuardedPtr m_viewer; + TQGuardedPtr m_viewer; }; /* @@ -119,16 +120,17 @@ private: */ class MPlayerBase : public Process { Q_OBJECT + TQ_OBJECT public: - MPlayerBase (QObject * parent, Settings * settings, const char * n); + MPlayerBase (TQObject * tqparent, Settings * settings, const char * n); ~MPlayerBase (); void initProcess (Viewer *); public slots: virtual bool stop (); virtual bool quit (); protected: - bool sendCommand (const QString &); - QStringList commands; + bool sendCommand (const TQString &); + TQStringList commands; bool m_use_slave : 1; protected slots: virtual void processStopped (KProcess *); @@ -144,15 +146,16 @@ class MPlayerPreferencesFrame; */ class KDE_EXPORT MPlayer : public MPlayerBase { Q_OBJECT + TQ_OBJECT public: - MPlayer (QObject * parent, Settings * settings); + MPlayer (TQObject * tqparent, Settings * settings); ~MPlayer (); virtual void init (); - virtual QString menuName () const; + virtual TQString menuName () const; virtual WId widget (); virtual bool grabPicture (const KURL & url, int pos); - virtual void setAudioLang (int, const QString &); - virtual void setSubtitle (int, const QString &); + virtual void setAudioLang (int, const TQString &); + virtual void setSubtitle (int, const TQString &); bool run (const char * args, const char * pipe = 0L); public slots: virtual bool deMediafiedPlay (); @@ -171,14 +174,14 @@ protected slots: private slots: void processOutput (KProcess *, char *, int); private: - QString m_process_output; - QString m_grabfile; - QWidget * m_widget; + TQString m_process_output; + TQString m_grabfile; + TQWidget * m_widget; MPlayerPreferencesPage * m_configpage; - QString m_tmpURL; + TQString m_tmpURL; struct LangInfo { - LangInfo (int i, const QString & n) : id (i), name (n) {} - int id; QString name; SharedPtr next; + LangInfo (int i, const TQString & n) : id (i), name (n) {} + int id; TQString name; SharedPtr next; }; SharedPtr alanglist; WeakPtr alanglist_end; @@ -206,12 +209,12 @@ public: void write (KConfig *); void read (KConfig *); void sync (bool fromUI); - void prefLocation (QString & item, QString & icon, QString & tab); - QFrame * prefPage (QWidget * parent); - QRegExp m_patterns[pat_last]; + void prefLocation (TQString & item, TQString & icon, TQString & tab); + TQFrame * prefPage (TQWidget * tqparent); + TQRegExp m_patterns[pat_last]; int cachesize; - QString mplayer_path; - QString additionalarguments; + TQString mplayer_path; + TQString additionalarguments; bool alwaysbuildindex; private: MPlayer * m_process; @@ -234,8 +237,9 @@ protected: */ class MEncoder : public MPlayerBase, public Recorder { Q_OBJECT + TQ_OBJECT public: - MEncoder (QObject * parent, Settings * settings); + MEncoder (TQObject * tqparent, Settings * settings); ~MEncoder (); virtual void init (); virtual bool deMediafiedPlay (); @@ -249,8 +253,9 @@ public slots: class KMPLAYER_NO_EXPORT MPlayerDumpstream : public MPlayerBase, public Recorder { Q_OBJECT + TQ_OBJECT public: - MPlayerDumpstream (QObject * parent, Settings * settings); + MPlayerDumpstream (TQObject * tqparent, Settings * settings); ~MPlayerDumpstream (); virtual void init (); virtual bool deMediafiedPlay (); @@ -266,27 +271,28 @@ class XMLPreferencesFrame; */ class KMPLAYER_EXPORT CallbackProcess : public Process { Q_OBJECT + TQ_OBJECT friend class Callback; public: - CallbackProcess (QObject * parent, Settings * settings, const char * n, const QString & menu); + CallbackProcess (TQObject * tqparent, Settings * settings, const char * n, const TQString & menu); ~CallbackProcess (); - virtual void setStatusMessage (const QString & msg); - virtual void setErrorMessage (int code, const QString & msg); + virtual void setStatusMessage (const TQString & msg); + virtual void setErrorMessage (int code, const TQString & msg); virtual void setFinished (); virtual void setPlaying (); - virtual void setStarted (QCString dcopname, QByteArray & data); - virtual void setMovieParams (int length, int width, int height, float aspect, const QStringList & alang, const QStringList & slang); + virtual void setStarted (TQCString dcopname, TQByteArray & data); + virtual void setMovieParams (int length, int width, int height, float aspect, const TQStringList & alang, const TQStringList & slang); virtual void setMoviePosition (int position); virtual void setLoadingProgress (int percentage); - virtual void setAudioLang (int, const QString &); - virtual void setSubtitle (int, const QString &); - virtual QString menuName () const; + virtual void setAudioLang (int, const TQString &); + virtual void setSubtitle (int, const TQString &); + virtual TQString menuName () const; virtual WId widget (); - KDE_NO_EXPORT QByteArray & configData () { return m_configdata; } + KDE_NO_EXPORT TQByteArray & configData () { return m_configdata; } KDE_NO_EXPORT bool haveConfig () { return m_have_config == config_yes; } bool getConfigData (); - void setChangedData (const QByteArray &); - QString dcopName (); + void setChangedData (const TQByteArray &); + TQString dcopName (); NodePtr configDocument () { return configdoc; } void initProcess (Viewer *); virtual bool deMediafiedPlay (); @@ -308,9 +314,9 @@ protected slots: protected: Callback * m_callback; Backend_stub * m_backend; - QString m_menuname; - QByteArray m_configdata; - QByteArray m_changeddata; + TQString m_menuname; + TQByteArray m_configdata; + TQByteArray m_changeddata; XMLPreferencesPage * m_configpage; NodePtr configdoc; bool in_gui_update; @@ -324,30 +330,30 @@ protected: struct KMPLAYER_NO_EXPORT ConfigDocument : public Document { ConfigDocument (); ~ConfigDocument (); - NodePtr childFromTag (const QString & tag); + NodePtr childFromTag (const TQString & tag); }; /* * Element for ConfigDocument */ struct KMPLAYER_NO_EXPORT ConfigNode : public DarkNode { - ConfigNode (NodePtr & d, const QString & tag); + ConfigNode (NodePtr & d, const TQString & tag); KDE_NO_CDTOR_EXPORT ~ConfigNode () {} - NodePtr childFromTag (const QString & tag); - QWidget * w; + NodePtr childFromTag (const TQString & tag); + TQWidget * w; }; /* * Element for ConfigDocument, defining type of config item */ struct KMPLAYER_NO_EXPORT TypeNode : public ConfigNode { - TypeNode (NodePtr & d, const QString & t); + TypeNode (NodePtr & d, const TQString & t); KDE_NO_CDTOR_EXPORT ~TypeNode () {} - NodePtr childFromTag (const QString & tag); - void changedXML (QTextStream & out); - QWidget * createWidget (QWidget * parent); + NodePtr childFromTag (const TQString & tag); + void changedXML (TQTextStream & out); + TQWidget * createWidget (TQWidget * tqparent); const char * nodeName () const { return tag.ascii (); } - QString tag; + TQString tag; }; /* @@ -360,8 +366,8 @@ public: void write (KConfig *); void read (KConfig *); void sync (bool fromUI); - void prefLocation (QString & item, QString & icon, QString & tab); - QFrame * prefPage (QWidget * parent); + void prefLocation (TQString & item, TQString & icon, TQString & tab); + TQFrame * prefPage (TQWidget * tqparent); private: CallbackProcess * m_process; XMLPreferencesFrame * m_configframe; @@ -372,8 +378,9 @@ private: */ class KMPLAYER_NO_EXPORT Xine : public CallbackProcess, public Recorder { Q_OBJECT + TQ_OBJECT public: - Xine (QObject * parent, Settings * settings); + Xine (TQObject * tqparent, Settings * settings); ~Xine (); public slots: bool ready (Viewer *); @@ -384,8 +391,9 @@ public slots: */ class KMPLAYER_NO_EXPORT GStreamer : public CallbackProcess { Q_OBJECT + TQ_OBJECT public: - GStreamer (QObject * parent, Settings * settings); + GStreamer (TQObject * tqparent, Settings * settings); ~GStreamer (); public slots: virtual bool ready (Viewer *); @@ -396,8 +404,9 @@ public slots: */ class KMPLAYER_EXPORT FFMpeg : public Process, public Recorder { Q_OBJECT + TQ_OBJECT public: - FFMpeg (QObject * parent, Settings * settings); + FFMpeg (TQObject * tqparent, Settings * settings); ~FFMpeg (); virtual void init (); virtual bool deMediafiedPlay (); @@ -412,61 +421,63 @@ private slots: * npplayer backend */ -class KMPLAYER_NO_EXPORT NpStream : public QObject { +class KMPLAYER_NO_EXPORT NpStream : public TQObject { Q_OBJECT + TQ_OBJECT public: enum Reason { NoReason = -1, BecauseDone = 0, BecauseError = 1, BecauseStopped = 2 }; - NpStream (QObject *parent, Q_UINT32 stream_id, const KURL & url); + NpStream (TQObject *tqparent, TQ_UINT32 stream_id, const KURL & url); ~NpStream (); void open (); void close (); KURL url; - QByteArray pending_buf; + TQByteArray pending_buf; KIO::TransferJob *job; timeval data_arrival; - Q_UINT32 bytes; - Q_UINT32 stream_id; - Q_UINT32 content_length; + TQ_UINT32 bytes; + TQ_UINT32 stream_id; + TQ_UINT32 content_length; Reason finish_reason; - QString mimetype; + TQString mimetype; signals: void stateChanged (); - void redirected (Q_UINT32, const KURL &); + void redirected (TQ_UINT32, const KURL &); private slots: void slotResult (KIO::Job*); - void slotData (KIO::Job*, const QByteArray& qb); + void slotData (KIO::Job*, const TQByteArray& qb); void redirection (KIO::Job *, const KURL &url); - void slotMimetype (KIO::Job *, const QString &mime); + void slotMimetype (KIO::Job *, const TQString &mime); void slotTotalSize (KIO::Job *, KIO::filesize_t sz); }; class KMPLAYER_NO_EXPORT NpPlayer : public Process { Q_OBJECT + TQ_OBJECT public: - NpPlayer (QObject * parent, Settings * settings, const QString & srv); + NpPlayer (TQObject * tqparent, Settings * settings, const TQString & srv); ~NpPlayer (); virtual void init (); virtual bool deMediafiedPlay (); virtual void initProcess (Viewer * viewer); - virtual QString menuName () const; + virtual TQString menuName () const; - void setStarted (const QString & srv); - void requestStream (const QString & path, const QString & url, const QString & target); - void destroyStream (const QString & path); + void setStarted (const TQString & srv); + void requestStream (const TQString & path, const TQString & url, const TQString & target); + void destroyStream (const TQString & path); - KDE_NO_EXPORT const QString & destination () const { return service; } - KDE_NO_EXPORT const QString & interface () const { return iface; } - KDE_NO_EXPORT QString objectPath () const { return path; } - QString evaluateScript (const QString & scr); + KDE_NO_EXPORT const TQString & destination () const { return service; } + KDE_NO_EXPORT const TQString & interface () const { return iface; } + KDE_NO_EXPORT TQString objectPath () const { return path; } + TQString evaluateScript (const TQString & scr); signals: - void evaluate (const QString & scr, QString & result); - void openUrl (const KURL & url, const QString & target); + void evaluate (const TQString & scr, TQString & result); + void openUrl (const KURL & url, const TQString & target); public slots: virtual bool stop (); virtual bool quit (); @@ -477,21 +488,21 @@ private slots: void processStopped (KProcess *); void wroteStdin (KProcess *); void streamStateChanged (); - void streamRedirected (Q_UINT32, const KURL &); + void streamRedirected (TQ_UINT32, const KURL &); protected: virtual void terminateJobs (); private: - void sendFinish (Q_UINT32 sid, Q_UINT32 total, NpStream::Reason because); + void sendFinish (TQ_UINT32 sid, TQ_UINT32 total, NpStream::Reason because); void processStreams (); - QString service; - QString iface; - QString path; - QString filter; - QString m_base_url; - typedef QMap StreamMap; + TQString service; + TQString iface; + TQString path; + TQString filter; + TQString m_base_url; + typedef TQMap StreamMap; StreamMap streams; - QString remote_service; - QByteArray send_buf; + TQString remote_service; + TQByteArray send_buf; bool write_in_progress; }; diff --git a/src/kmplayersource.h b/src/kmplayersource.h index e93f98f..191cfce 100644 --- a/src/kmplayersource.h +++ b/src/kmplayersource.h @@ -21,16 +21,16 @@ #ifndef KMPLAYERSOURCE_H #define KMPLAYERSOURCE_H -#include -#include +#include +#include #include #include "kmplayerplaylist.h" #include "kmplayerprocess.h" class KConfig; -class QWidget; -class QFrame; +class TQWidget; +class TQFrame; namespace KMPlayer { @@ -39,13 +39,14 @@ class PartBase; /** * Class for a certain media, like URL, DVD, TV etc */ -class KMPLAYER_EXPORT Source : public QObject, public PlayListNotify { +class KMPLAYER_EXPORT Source : public TQObject, public PlayListNotify { Q_OBJECT + TQ_OBJECT public: - Source (const QString & name, PartBase * player, const char * src); + Source (const TQString & name, PartBase * player, const char * src); virtual ~Source (); virtual void init (); - virtual bool processOutput (const QString & line); + virtual bool processOutput (const TQString & line); bool identified () const { return m_identified; } virtual bool hasLength (); @@ -63,28 +64,28 @@ public: KDE_NO_EXPORT const KURL & subUrl () const { return m_sub_url; } PartBase * player () { return m_player; } virtual void reset (); - QString currentMrl (); - KDE_NO_EXPORT const QString & audioDevice () const { return m_audiodevice; } - KDE_NO_EXPORT const QString & videoDevice () const { return m_videodevice; } - KDE_NO_EXPORT const QString & videoNorm () const { return m_videonorm; } + TQString currentMrl (); + KDE_NO_EXPORT const TQString & audioDevice () const { return m_audiodevice; } + KDE_NO_EXPORT const TQString & videoDevice () const { return m_videodevice; } + KDE_NO_EXPORT const TQString & videoNorm () const { return m_videonorm; } /* frequency() if set, returns frequency in kHz */ KDE_NO_EXPORT int frequency () const { return m_frequency; } KDE_NO_EXPORT int xvPort () const { return m_xvport; } KDE_NO_EXPORT int xvEncoding () const { return m_xvencoding; } - KDE_NO_EXPORT const QString & pipeCmd () const { return m_pipecmd; } - KDE_NO_EXPORT const QString & options () const { return m_options; } - KDE_NO_EXPORT const QString & recordCmd () const { return m_recordcmd; } - KDE_NO_EXPORT const QString & tuner () const { return m_tuner; } + KDE_NO_EXPORT const TQString & pipeCmd () const { return m_pipecmd; } + KDE_NO_EXPORT const TQString & options () const { return m_options; } + KDE_NO_EXPORT const TQString & recordCmd () const { return m_recordcmd; } + KDE_NO_EXPORT const TQString & tuner () const { return m_tuner; } KDE_NO_EXPORT NodePtr current () const { return m_current; } - QString plugin (const QString &mime) const; + TQString plugin (const TQString &mime) const; virtual NodePtr document (); virtual NodePtr root (); - virtual QString filterOptions (); + virtual TQString filterOptions (); virtual void setURL (const KURL & url); - void insertURL (NodePtr mrl, const QString & url, const QString & title=QString()); + void insertURL (NodePtr mrl, const TQString & url, const TQString & title=TQString()); KDE_NO_EXPORT void setSubURL (const KURL & url) { m_sub_url = url; } - void setLanguages (const QStringList & alang, const QStringList & slang); + void setLanguages (const TQStringList & alang, const TQStringList & slang); KDE_NO_EXPORT void setWidth (int w) { m_width = w; } KDE_NO_EXPORT void setHeight (int h) { m_height = h; } virtual void setDimensions (NodePtr, int w, int h); @@ -98,11 +99,11 @@ public: virtual void stateChange (Process *, Process::State os, Process::State ns); KDE_NO_EXPORT void setAutoPlay (bool b) { m_auto_play = b; } KDE_NO_EXPORT bool autoPlay () const { return m_auto_play; } - void setTitle (const QString & title); + void setTitle (const TQString & title); void setLoading (int percentage); bool setCurrent (NodePtr mrl); - virtual QString prettyName (); + virtual TQString prettyName (); signals: void startPlaying (); void stopPlaying (); @@ -113,7 +114,7 @@ signals: */ void endOfPlayItems (); void dimensionsChanged (); - void titleChanged (const QString & title); + void titleChanged (const TQString & title); public slots: virtual void activate () = 0; virtual void deactivate () = 0; @@ -130,7 +131,7 @@ public slots: void setAudioLang (int); void setSubtitle (int); protected: - void timerEvent (QTimerEvent *); + void timerEvent (TQTimerEvent *); /** * PlayListNotify implementation */ @@ -138,30 +139,30 @@ protected: bool resolveURL (NodePtr mrl); void stateElementChanged (Node * element, Node::State os, Node::State ns); SurfacePtr getSurface (NodePtr node); - void setInfoMessage (const QString & msg); + void setInfoMessage (const TQString & msg); void bitRates (int & preferred, int & maximal); void setTimeout (int ms); NodePtr m_document; NodePtrW m_current; NodePtrW m_back_request; - QString m_name; + TQString m_name; PartBase * m_player; - QString m_recordcmd; + TQString m_recordcmd; bool m_identified; bool m_auto_play; KURL m_url; KURL m_sub_url; - QString m_audiodevice; - QString m_videodevice; - QString m_videonorm; - QString m_tuner; + TQString m_audiodevice; + TQString m_videodevice; + TQString m_videonorm; + TQString m_tuner; int m_frequency; int m_xvport; int m_xvencoding; - QString m_pipecmd; - QString m_options; - QString m_plugin; + TQString m_pipecmd; + TQString m_options; + TQString m_plugin; private: int m_width; int m_height; 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 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -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 (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 (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(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(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 (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 (ip); bool ok; if (input->getAttribute ("tuner").toInt (&ok) && ok) { - QWidget * widget = device_page->inputsTab->page (i); - QTable * table = static_cast (widget->child ("PageTVChannels", "QTable")); + TQWidget * widget = device_page->inputsTab->page (i); + TQTable * table = static_cast (TQT_TQWIDGET(widget->child ("PageTVChannels", TQTABLE_OBJECT_NAME_STRING))); if (table) { input->clearChildren (); for (int j = 0; jnumRows() && 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 (widget->child ("PageTVNorm", "QComboBox")); + TQComboBox * norms = static_cast (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 (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 (m_cur_tvdevice.ptr ())->getAttribute (QString::fromLatin1 ("playback")); + TQString playback = static_cast (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 (dp)->pretty_name, this, SLOT (menuClicked (int)), 0, counter++); + m_menu->insertItem (KMPlayer::convertNode (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 (elm); - elm = elm->parentNode (); + elm = elm->tqparentNode (); } if (elm && elm->id == id_node_tv_input) input = KMPlayer::convertNode (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 (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 (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 ()); diff --git a/src/kmplayertvsource.h b/src/kmplayertvsource.h index ef5f416..6e9407d 100644 --- a/src/kmplayertvsource.h +++ b/src/kmplayertvsource.h @@ -20,9 +20,9 @@ #ifndef _KMPLAYER_TV_SOURCE_H_ #define _KMPLAYER_TV_SOURCE_H_ -#include -#include -#include +#include +#include +#include #include "kmplayerappsource.h" #include "kmplayerconfig.h" @@ -39,26 +39,27 @@ class KMPlayerTVSource; class KURLRequester; class KHistoryCombo; class KMPlayerApp; -class QTabWidget; -class QGroupBox; -class QLineEdit; -class QCheckBox; +class TQTabWidget; +class TQGroupBox; +class TQLineEdit; +class TQCheckBox; class KComboBox; class KConfig; -class KMPLAYER_NO_EXPORT TVDevicePage : public QFrame { +class KMPLAYER_NO_EXPORT TVDevicePage : public TQFrame { Q_OBJECT + TQ_OBJECT public: - TVDevicePage (QWidget *parent, KMPlayer::NodePtr dev); + TVDevicePage (TQWidget *tqparent, KMPlayer::NodePtr dev); KDE_NO_CDTOR_EXPORT ~TVDevicePage () {} - QLineEdit * name; + TQLineEdit * name; KURLRequester * audiodevice; - QLineEdit * sizewidth; - QLineEdit * sizeheight; - QCheckBox * noplayback; - QTabWidget * inputsTab; + TQLineEdit * sizewidth; + TQLineEdit * sizeheight; + TQCheckBox * noplayback; + TQTabWidget * inputsTab; KMPlayer::NodePtrW device_doc; signals: void deleted (TVDevicePage *); @@ -66,24 +67,25 @@ private slots: void slotDelete (); }; -class KMPLAYER_NO_EXPORT KMPlayerPrefSourcePageTV : public QFrame { +class KMPLAYER_NO_EXPORT KMPlayerPrefSourcePageTV : public TQFrame { Q_OBJECT + TQ_OBJECT public: - KMPlayerPrefSourcePageTV (QWidget *parent, KMPlayerTVSource *); + KMPlayerPrefSourcePageTV (TQWidget *tqparent, KMPlayerTVSource *); KDE_NO_CDTOR_EXPORT ~KMPlayerPrefSourcePageTV () {} - QLineEdit * driver; + TQLineEdit * driver; KURLRequester * device; - QPushButton * scan; - QTabWidget * notebook; + TQPushButton * scan; + TQTabWidget * notebook; protected: - void showEvent (QShowEvent *); + void showEvent (TQShowEvent *); KMPlayerTVSource * m_tvsource; }; class KMPLAYER_NO_EXPORT TVNode : public KMPlayer::GenericMrl { public: - TVNode (KMPlayer::NodePtr &d, const QString &s, const char * t, short id, const QString &n=QString ()); - virtual void setNodeName (const QString &); + TVNode (KMPlayer::NodePtr &d, const TQString &s, const char * t, short id, const TQString &n=TQString ()); + virtual void setNodeName (const TQString &); }; /* @@ -91,7 +93,7 @@ public: */ class KMPLAYER_NO_EXPORT TVChannel : public TVNode { public: - TVChannel (KMPlayer::NodePtr & d, const QString & n, double f); + TVChannel (KMPlayer::NodePtr & d, const TQString & n, double f); TVChannel (KMPlayer::NodePtr & d); KDE_NO_CDTOR_EXPORT ~TVChannel () {} void closed (); @@ -102,11 +104,11 @@ public: */ class KMPLAYER_NO_EXPORT TVInput : public TVNode { public: - TVInput (KMPlayer::NodePtr & d, const QString & n, int id); + TVInput (KMPlayer::NodePtr & d, const TQString & n, int id); TVInput (KMPlayer::NodePtr & d); KDE_NO_CDTOR_EXPORT ~TVInput () {} - KMPlayer::NodePtr childFromTag (const QString &); - void setNodeName (const QString &); + KMPlayer::NodePtr childFromTag (const TQString &); + void setNodeName (const TQString &); void closed (); }; @@ -115,25 +117,25 @@ public: */ class KMPLAYER_NO_EXPORT TVDevice : public TVNode { public: - TVDevice (KMPlayer::NodePtr & d, const QString & s); + TVDevice (KMPlayer::NodePtr & d, const TQString & s); TVDevice (KMPlayer::NodePtr & d); ~TVDevice (); - KMPlayer::NodePtr childFromTag (const QString &); + KMPlayer::NodePtr childFromTag (const TQString &); void closed (); void childDone (KMPlayer::NodePtr child); - void setNodeName (const QString &); + void setNodeName (const TQString &); bool expose () const { return false; } void updateNodeName (); void updateDevicePage (); bool zombie; - QGuardedPtr device_page; + TQGuardedPtr device_page; }; class KMPLAYER_NO_EXPORT TVDocument : public FileDocument { KMPlayerTVSource * m_source; public: TVDocument (KMPlayerTVSource *); - KMPlayer::NodePtr childFromTag (const QString &); + KMPlayer::NodePtr childFromTag (const TQString &); void defer (); KDE_NO_EXPORT const char * nodeName () const { return "tvdevices"; } void childDone (KMPlayer::NodePtr child); @@ -145,15 +147,16 @@ public: */ class KMPLAYER_NO_EXPORT TVDeviceScannerSource : public KMPlayer::Source { Q_OBJECT + TQ_OBJECT public: TVDeviceScannerSource (KMPlayerTVSource * src); KDE_NO_CDTOR_EXPORT ~TVDeviceScannerSource () {}; virtual void init (); - virtual bool processOutput (const QString & line); - virtual QString filterOptions (); + virtual bool processOutput (const TQString & line); + virtual TQString filterOptions (); virtual bool hasLength (); virtual bool isSeekable (); - virtual bool scan (const QString & device, const QString & driver); + virtual bool scan (const TQString & device, const TQString & driver); public slots: virtual void activate (); virtual void deactivate (); @@ -165,10 +168,10 @@ private: KMPlayerTVSource * m_tvsource; TVDevice * m_tvdevice; KMPlayer::Source * m_old_source; - QString m_driver; - QRegExp m_nameRegExp; - QRegExp m_sizesRegExp; - QRegExp m_inputRegExp; + TQString m_driver; + TQRegExp m_nameRegExp; + TQRegExp m_sizesRegExp; + TQRegExp m_inputRegExp; }; /* @@ -176,20 +179,21 @@ private: */ class KMPLAYER_NO_EXPORT KMPlayerTVSource : public KMPlayerMenuSource, public KMPlayer::PreferencesPage { Q_OBJECT + TQ_OBJECT public: - KMPlayerTVSource (KMPlayerApp * app, QPopupMenu * m); + KMPlayerTVSource (KMPlayerApp * app, TQPopupMenu * m); virtual ~KMPlayerTVSource (); - virtual QString filterOptions (); + virtual TQString filterOptions (); virtual bool hasLength (); virtual bool isSeekable (); virtual KMPlayer::NodePtr root (); void buildMenu (); - virtual QString prettyName (); + virtual TQString prettyName (); virtual void write (KConfig *); virtual void read (KConfig *); virtual void sync (bool); - virtual void prefLocation (QString & item, QString & icon, QString & tab); - virtual QFrame * prefPage (QWidget * parent); + virtual void prefLocation (TQString & item, TQString & icon, TQString & tab); + virtual TQFrame * prefPage (TQWidget * tqparent); void readXML (); public slots: virtual void activate (); @@ -207,8 +211,8 @@ private: void buildArguments (); KMPlayer::NodePtrW m_cur_tvdevice; KMPlayer::NodePtrW m_cur_tvinput; - QPopupMenu * m_channelmenu; - QString tvdriver; + TQPopupMenu * m_channelmenu; + TQString tvdriver; KMPlayerPrefSourcePageTV * m_configpage; TVDeviceScannerSource * scanner; int tree_id; diff --git a/src/kmplayervdr.cpp b/src/kmplayervdr.cpp index 14a57ec..955eb90 100644 --- a/src/kmplayervdr.cpp +++ b/src/kmplayervdr.cpp @@ -20,25 +20,25 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -75,39 +75,39 @@ static const char * strXVPort = "XV Port"; static const char * strXVEncoding = "XV Encoding"; static const char * strXVScale = "XV Scale"; -KDE_NO_CDTOR_EXPORT KMPlayerPrefSourcePageVDR::KMPlayerPrefSourcePageVDR (QWidget * parent, KMPlayer::PartBase * player) - : QFrame (parent), m_player (player) { +KDE_NO_CDTOR_EXPORT KMPlayerPrefSourcePageVDR::KMPlayerPrefSourcePageVDR (TQWidget * tqparent, KMPlayer::PartBase * player) + : TQFrame (tqparent), m_player (player) { //KURLRequester * v4ldevice; - QVBoxLayout *layout = new QVBoxLayout (this, 5, 2); - QGridLayout *gridlayout = new QGridLayout (1, 2); + TQVBoxLayout *tqlayout = new TQVBoxLayout (this, 5, 2); + TQGridLayout *gridtqlayout = new TQGridLayout (1, 2); xv_port = new KListView (this); - xv_port->addColumn (QString()); + xv_port->addColumn (TQString()); xv_port->header()->hide (); xv_port->setTreeStepSize (15); //xv_port->setRootIsDecorated (true); //xv_port->setSorting (-1); - QListViewItem * vitem = new QListViewItem (xv_port, i18n ("XVideo port")); + TQListViewItem * vitem = new TQListViewItem (xv_port, i18n ("XVideo port")); vitem->setOpen (true); - QWhatsThis::add (xv_port, i18n ("Port base of the X Video extension.\nIf left to default (0), the first available port will be used. However if you have multiple XVideo instances, you might have to provide the port to use here.\nSee the output from 'xvinfo' for more information")); - QLabel * label = new QLabel (i18n ("Communication port:"), this); - gridlayout->addWidget (label, 0, 0); - tcp_port = new QLineEdit ("", this); - QWhatsThis::add (tcp_port, i18n ("Communication port with VDR. Default is port 2001.\nIf you use another port, with the '-p' option of 'vdr', you must set it here too.")); - gridlayout->addWidget (tcp_port, 0, 1); - layout->addWidget (xv_port); - layout->addLayout (gridlayout); - scale = new QButtonGroup (2, Qt::Vertical, i18n ("Scale"), this); - new QRadioButton (i18n ("4:3"), scale); - new QRadioButton (i18n ("16:9"), scale); - QWhatsThis::add (scale, i18n ("Aspects to use when viewing VDR")); + TQWhatsThis::add (xv_port, i18n ("Port base of the X Video extension.\nIf left to default (0), the first available port will be used. However if you have multiple XVideo instances, you might have to provide the port to use here.\nSee the output from 'xvinfo' for more information")); + TQLabel * label = new TQLabel (i18n ("Communication port:"), this); + gridtqlayout->addWidget (label, 0, 0); + tcp_port = new TQLineEdit ("", this); + TQWhatsThis::add (tcp_port, i18n ("Communication port with VDR. Default is port 2001.\nIf you use another port, with the '-p' option of 'vdr', you must set it here too.")); + gridtqlayout->addWidget (tcp_port, 0, 1); + tqlayout->addWidget (xv_port); + tqlayout->addLayout (gridtqlayout); + scale = new TQButtonGroup (2, Qt::Vertical, i18n ("Scale"), this); + new TQRadioButton (i18n ("4:3"), scale); + new TQRadioButton (i18n ("16:9"), scale); + TQWhatsThis::add (scale, i18n ("Aspects to use when viewing VDR")); scale->setButton (0); - layout->addWidget (scale); - layout->addItem (new QSpacerItem (5, 0, QSizePolicy::Minimum, QSizePolicy::Expanding)); + tqlayout->addWidget (scale); + tqlayout->addItem (new TQSpacerItem (5, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding)); } KDE_NO_CDTOR_EXPORT KMPlayerPrefSourcePageVDR::~KMPlayerPrefSourcePageVDR () {} -KDE_NO_EXPORT void KMPlayerPrefSourcePageVDR::showEvent (QShowEvent *) { +KDE_NO_EXPORT void KMPlayerPrefSourcePageVDR::showEvent (TQShowEvent *) { XVideo * xvideo = static_cast(m_player->players()["xvideo"]); if (!xvideo->configDocument ()) xvideo->getConfigData (); @@ -130,10 +130,10 @@ public: //----------------------------------------------------------------------------- KDE_NO_CDTOR_EXPORT KMPlayerVDRSource::KMPlayerVDRSource (KMPlayerApp * app) - : KMPlayer::Source (QString ("VDR"), app->player (), "vdrsource"), + : KMPlayer::Source (TQString ("VDR"), app->player (), "vdrsource"), m_app (app), m_configpage (0), - m_socket (new QSocket (this)), + m_socket (new TQSocket (this)), commands (0L), channel_timer (0), timeout_timer (0), @@ -142,10 +142,10 @@ KDE_NO_CDTOR_EXPORT KMPlayerVDRSource::KMPlayerVDRSource (KMPlayerApp * app) m_stored_volume (0) { memset (m_actions, 0, sizeof (KAction *) * int (act_last)); m_player->settings ()->addPage (this); - connect (m_socket, SIGNAL (connectionClosed()), this, SLOT(disconnected())); - connect (m_socket, SIGNAL (connected ()), this, SLOT (connected ())); - connect (m_socket, SIGNAL (readyRead ()), this, SLOT (readyRead ())); - connect (m_socket, SIGNAL (error (int)), this, SLOT (socketError (int))); + connect (m_socket, TQT_SIGNAL (connectionClosed()), this, TQT_SLOT(disconnected())); + connect (m_socket, TQT_SIGNAL (connected ()), this, TQT_SLOT (connected ())); + connect (m_socket, TQT_SIGNAL (readyRead ()), this, TQT_SLOT (readyRead ())); + connect (m_socket, TQT_SIGNAL (error (int)), this, TQT_SLOT (socketError (int))); } KDE_NO_CDTOR_EXPORT KMPlayerVDRSource::~KMPlayerVDRSource () {} @@ -154,8 +154,8 @@ KDE_NO_CDTOR_EXPORT void KMPlayerVDRSource::waitForConnectionClose () { if (timeout_timer) { finish_timer = startTimer (500); kdDebug () << "VDR connection not yet closed" << endl; - QApplication::eventLoop ()->enterLoop (); - kdDebug () << "VDR connection:" << (m_socket->state () == QSocket::Connected) << endl; + TQApplication::eventLoop ()->enterLoop (); + kdDebug () << "VDR connection:" << (m_socket->state () == TQSocket::Connected) << endl; timeout_timer = 0; } } @@ -168,14 +168,14 @@ KDE_NO_EXPORT bool KMPlayerVDRSource::isSeekable () { return true; } -KDE_NO_EXPORT QString KMPlayerVDRSource::prettyName () { +KDE_NO_EXPORT TQString KMPlayerVDRSource::prettyName () { return i18n ("VDR"); } KDE_NO_EXPORT void KMPlayerVDRSource::activate () { last_channel = 0; - connect (this, SIGNAL (startPlaying ()), this, SLOT (processStarted())); - connect (this, SIGNAL (stopPlaying ()), this, SLOT (processStopped ())); + connect (this, TQT_SIGNAL (startPlaying ()), this, TQT_SLOT (processStarted())); + connect (this, TQT_SIGNAL (stopPlaying ()), this, TQT_SLOT (processStopped ())); KMPlayer::ControlPanel * panel = m_app->view()->controlPanel (); panel->button (KMPlayer::ControlPanel::button_red)->show (); panel->button (KMPlayer::ControlPanel::button_green)->show (); @@ -183,29 +183,29 @@ KDE_NO_EXPORT void KMPlayerVDRSource::activate () { panel->button (KMPlayer::ControlPanel::button_blue)->show (); panel->button (KMPlayer::ControlPanel::button_pause)->hide (); panel->button (KMPlayer::ControlPanel::button_record)->hide (); - connect (panel->volumeBar (), SIGNAL (volumeChanged (int)), this, SLOT (volumeChanged (int))); - connect (panel->button (KMPlayer::ControlPanel::button_red), SIGNAL (clicked ()), this, SLOT (keyRed ())); - connect (panel->button (KMPlayer::ControlPanel::button_green), SIGNAL (clicked ()), this, SLOT (keyGreen ())); - connect (panel->button (KMPlayer::ControlPanel::button_yellow), SIGNAL (clicked ()), this, SLOT (keyYellow ())); - connect (panel->button (KMPlayer::ControlPanel::button_blue), SIGNAL (clicked ()), this, SLOT (keyBlue ())); + connect (panel->volumeBar (), TQT_SIGNAL (volumeChanged (int)), this, TQT_SLOT (volumeChanged (int))); + connect (panel->button (KMPlayer::ControlPanel::button_red), TQT_SIGNAL (clicked ()), this, TQT_SLOT (keyRed ())); + connect (panel->button (KMPlayer::ControlPanel::button_green), TQT_SIGNAL (clicked ()), this, TQT_SLOT (keyGreen ())); + connect (panel->button (KMPlayer::ControlPanel::button_yellow), TQT_SIGNAL (clicked ()), this, TQT_SLOT (keyYellow ())); + connect (panel->button (KMPlayer::ControlPanel::button_blue), TQT_SIGNAL (clicked ()), this, TQT_SLOT (keyBlue ())); setAspect (m_document, scale ? 16.0/9 : 1.33); if (!m_url.protocol ().compare ("kmplayer")) m_request_jump = KURL::decode_string (m_url.path ()).mid (1); - setURL (KURL (QString ("vdr://localhost:%1").arg (tcp_port))); - QTimer::singleShot (0, m_player, SLOT (play ())); + setURL (KURL (TQString ("vdr://localhost:%1").arg (tcp_port))); + TQTimer::singleShot (0, m_player, TQT_SLOT (play ())); } KDE_NO_EXPORT void KMPlayerVDRSource::deactivate () { - disconnect (m_socket, SIGNAL (error (int)), this, SLOT (socketError (int))); + disconnect (m_socket, TQT_SIGNAL (error (int)), this, TQT_SLOT (socketError (int))); if (m_player->view ()) { - disconnect (this, SIGNAL(startPlaying()), this, SLOT(processStarted())); - disconnect (this, SIGNAL (stopPlaying()), this, SLOT(processStopped())); + disconnect (this, TQT_SIGNAL(startPlaying()), this, TQT_SLOT(processStarted())); + disconnect (this, TQT_SIGNAL (stopPlaying()), this, TQT_SLOT(processStopped())); KMPlayer::ControlPanel * panel = m_app->view()->controlPanel (); - disconnect (panel->volumeBar (), SIGNAL (volumeChanged (int)), this, SLOT (volumeChanged (int))); - disconnect (panel->button (KMPlayer::ControlPanel::button_red), SIGNAL (clicked ()), this, SLOT (keyRed ())); - disconnect (panel->button (KMPlayer::ControlPanel::button_green), SIGNAL (clicked ()), this, SLOT (keyGreen ())); - disconnect (panel->button (KMPlayer::ControlPanel::button_yellow), SIGNAL (clicked ()), this, SLOT (keyYellow ())); - disconnect (panel->button (KMPlayer::ControlPanel::button_blue), SIGNAL (clicked ()), this, SLOT (keyBlue ())); + disconnect (panel->volumeBar (), TQT_SIGNAL (volumeChanged (int)), this, TQT_SLOT (volumeChanged (int))); + disconnect (panel->button (KMPlayer::ControlPanel::button_red), TQT_SIGNAL (clicked ()), this, TQT_SLOT (keyRed ())); + disconnect (panel->button (KMPlayer::ControlPanel::button_green), TQT_SIGNAL (clicked ()), this, TQT_SLOT (keyGreen ())); + disconnect (panel->button (KMPlayer::ControlPanel::button_yellow), TQT_SIGNAL (clicked ()), this, TQT_SLOT (keyYellow ())); + disconnect (panel->button (KMPlayer::ControlPanel::button_blue), TQT_SIGNAL (clicked ()), this, TQT_SLOT (keyBlue ())); } processStopped (); m_request_jump.truncate (0); @@ -217,9 +217,9 @@ KDE_NO_EXPORT void KMPlayerVDRSource::playCurrent () { } KDE_NO_EXPORT void KMPlayerVDRSource::processStopped () { - if (m_socket->state () == QSocket::Connected) { - queueCommand (QString ("VOLU %1\n").arg (m_stored_volume).ascii ()); - queueCommand ("QUIT\n"); + if (m_socket->state () == TQSocket::Connected) { + queueCommand (TQString ("VOLU %1\n").tqarg (m_stored_volume).ascii ()); + queueCommand ("TQUIT\n"); } } @@ -229,7 +229,7 @@ KDE_NO_EXPORT void KMPlayerVDRSource::processStarted () { } #define DEF_ACT(i,text,pix,scut,slot,name) \ - m_actions [i] = new KAction (text, QString (pix), KShortcut (scut), this, slot, m_app->actionCollection (), name); \ + m_actions [i] = new KAction (text, TQString (pix), KShortcut (scut), this, slot, m_app->actionCollection (), name); \ m_fullscreen_actions [i] = new KAction (text, KShortcut (scut), this, slot, m_app->view ()->viewArea ()->actionCollection (), name) KDE_NO_EXPORT void KMPlayerVDRSource::connected () { @@ -238,33 +238,33 @@ KDE_NO_EXPORT void KMPlayerVDRSource::connected () { killTimer (channel_timer); channel_timer = startTimer (3000); KAction * action = m_app->actionCollection ()->action ("vdr_connect"); - action->setIcon (QString ("connect_no")); + action->setIcon (TQString ("connect_no")); action->setText (i18n ("Dis&connect")); - DEF_ACT (act_up, i18n ("VDR Key Up"), "up", , SLOT (keyUp ()), "vdr_key_up"); - DEF_ACT (act_down, i18n ("VDR Key Down"), "down", , SLOT (keyDown ()), "vdr_key_down"); - DEF_ACT (act_back, i18n ("VDR Key Back"), "back", , SLOT (keyBack ()), "vdr_key_back"); - DEF_ACT (act_ok, i18n ("VDR Key Ok"), "ok", , SLOT (keyOk ()), "vdr_key_ok"); - DEF_ACT (act_setup, i18n ("VDR Key Setup"), "configure", , SLOT (keySetup ()), "vdr_key_setup"); - DEF_ACT (act_channels, i18n ("VDR Key Channels"), "player_playlist", , SLOT (keyChannels ()), "vdr_key_channels"); - DEF_ACT (act_menu, i18n ("VDR Key Menu"), "showmenu", , SLOT (keyMenu ()), "vdr_key_menu"); - DEF_ACT (act_red, i18n ("VDR Key Red"), "red", , SLOT (keyRed ()), "vdr_key_red"); - DEF_ACT (act_green, i18n ("VDR Key Green"), "green", , SLOT (keyGreen ()), "vdr_key_green"); - DEF_ACT (act_yellow, i18n ("VDR Key Yellow"), "yellow", , SLOT (keyYellow ()), "vdr_key_yellow"); - DEF_ACT (act_blue, i18n ("VDR Key Blue"), "blue", , SLOT (keyBlue ()), "vdr_key_blue"); + DEF_ACT (act_up, i18n ("VDR Key Up"), "up", , TQT_SLOT (keyUp ()), "vdr_key_up"); + DEF_ACT (act_down, i18n ("VDR Key Down"), "down", , TQT_SLOT (keyDown ()), "vdr_key_down"); + DEF_ACT (act_back, i18n ("VDR Key Back"), "back", , TQT_SLOT (keyBack ()), "vdr_key_back"); + DEF_ACT (act_ok, i18n ("VDR Key Ok"), "ok", , TQT_SLOT (keyOk ()), "vdr_key_ok"); + DEF_ACT (act_setup, i18n ("VDR Key Setup"), "configure", , TQT_SLOT (keySetup ()), "vdr_key_setup"); + DEF_ACT (act_channels, i18n ("VDR Key Channels"), "player_playlist", , TQT_SLOT (keyChannels ()), "vdr_key_channels"); + DEF_ACT (act_menu, i18n ("VDR Key Menu"), "showmenu", , TQT_SLOT (keyMenu ()), "vdr_key_menu"); + DEF_ACT (act_red, i18n ("VDR Key Red"), "red", , TQT_SLOT (keyRed ()), "vdr_key_red"); + DEF_ACT (act_green, i18n ("VDR Key Green"), "green", , TQT_SLOT (keyGreen ()), "vdr_key_green"); + DEF_ACT (act_yellow, i18n ("VDR Key Yellow"), "yellow", , TQT_SLOT (keyYellow ()), "vdr_key_yellow"); + DEF_ACT (act_blue, i18n ("VDR Key Blue"), "blue", , TQT_SLOT (keyBlue ()), "vdr_key_blue"); #if KDE_IS_VERSION(3, 1, 90) - DEF_ACT (act_custom, "VDR Custom Command", "exec", , SLOT (customCmd ()), "vdr_key_custom"); + DEF_ACT (act_custom, "VDR Custom Command", "exec", , TQT_SLOT (customCmd ()), "vdr_key_custom"); #endif m_app->initMenu (); // update menu and toolbar - DEF_ACT (act_0, i18n ("VDR Key 0"), "0", Qt::Key_0, SLOT (key0 ()), "vdr_key_0"); - DEF_ACT (act_1, i18n ("VDR Key 1"), "1", Qt::Key_1, SLOT (key1 ()), "vdr_key_1"); - DEF_ACT (act_2, i18n ("VDR Key 2"), "2", Qt::Key_2, SLOT (key2 ()), "vdr_key_2"); - DEF_ACT (act_3, i18n ("VDR Key 3"), "3", Qt::Key_3, SLOT (key3 ()), "vdr_key_3"); - DEF_ACT (act_4, i18n ("VDR Key 4"), "4", Qt::Key_4, SLOT (key4 ()), "vdr_key_4"); - DEF_ACT (act_5, i18n ("VDR Key 5"), "5", Qt::Key_5, SLOT (key5 ()), "vdr_key_5"); - DEF_ACT (act_6, i18n ("VDR Key 6"), "6", Qt::Key_6, SLOT (key6 ()), "vdr_key_6"); - DEF_ACT (act_7, i18n ("VDR Key 7"), "7", Qt::Key_7, SLOT (key7 ()), "vdr_key_7"); - DEF_ACT (act_8, i18n ("VDR Key 8"), "8", Qt::Key_8, SLOT (key8 ()), "vdr_key_8"); - DEF_ACT (act_9, i18n ("VDR Key 9"), "9", Qt::Key_9, SLOT (key9 ()), "vdr_key_9"); + DEF_ACT (act_0, i18n ("VDR Key 0"), "0", TQt::Key_0, TQT_SLOT (key0 ()), "vdr_key_0"); + DEF_ACT (act_1, i18n ("VDR Key 1"), "1", TQt::Key_1, TQT_SLOT (key1 ()), "vdr_key_1"); + DEF_ACT (act_2, i18n ("VDR Key 2"), "2", TQt::Key_2, TQT_SLOT (key2 ()), "vdr_key_2"); + DEF_ACT (act_3, i18n ("VDR Key 3"), "3", TQt::Key_3, TQT_SLOT (key3 ()), "vdr_key_3"); + DEF_ACT (act_4, i18n ("VDR Key 4"), "4", TQt::Key_4, TQT_SLOT (key4 ()), "vdr_key_4"); + DEF_ACT (act_5, i18n ("VDR Key 5"), "5", TQt::Key_5, TQT_SLOT (key5 ()), "vdr_key_5"); + DEF_ACT (act_6, i18n ("VDR Key 6"), "6", TQt::Key_6, TQT_SLOT (key6 ()), "vdr_key_6"); + DEF_ACT (act_7, i18n ("VDR Key 7"), "7", TQt::Key_7, TQT_SLOT (key7 ()), "vdr_key_7"); + DEF_ACT (act_8, i18n ("VDR Key 8"), "8", TQt::Key_8, TQT_SLOT (key8 ()), "vdr_key_8"); + DEF_ACT (act_9, i18n ("VDR Key 9"), "9", TQt::Key_9, TQT_SLOT (key9 ()), "vdr_key_9"); //KMPlayer::ViewLayer * layer = m_app->view ()->viewArea (); for (int i = 0; i < int (act_last); ++i) // somehow, the configured shortcuts only show up after createGUI() call @@ -280,12 +280,12 @@ KDE_NO_EXPORT void KMPlayerVDRSource::disconnected () { deleteCommands (); return; } - setURL (KURL (QString ("vdr://localhost:%1").arg (tcp_port))); + setURL (KURL (TQString ("vdr://localhost:%1").arg (tcp_port))); if (channel_timer && m_player->source () == this) m_player->process ()->quit (); deleteCommands (); KAction * action = m_app->actionCollection ()->action ("vdr_connect"); - action->setIcon (QString ("connect_established")); + action->setIcon (TQString ("connect_established")); action->setText (i18n ("&Connect")); m_app->guiFactory ()->removeClient (m_app);// crash w/ m_actions[i]->unplugAll (); in for loop below for (int i = 0; i < int (act_last); ++i) @@ -298,8 +298,8 @@ KDE_NO_EXPORT void KMPlayerVDRSource::disconnected () { } KDE_NO_EXPORT void KMPlayerVDRSource::toggleConnected () { - if (m_socket->state () == QSocket::Connected) { - queueCommand ("QUIT\n"); + if (m_socket->state () == TQSocket::Connected) { + queueCommand ("TQUIT\n"); killTimer (channel_timer); channel_timer = 0; } else { @@ -309,7 +309,7 @@ KDE_NO_EXPORT void KMPlayerVDRSource::toggleConnected () { } KDE_NO_EXPORT void KMPlayerVDRSource::volumeChanged (int val) { - queueCommand (QString ("VOLU %1\n").arg (int (sqrt (255 * 255 * val / 100))).ascii ()); + queueCommand (TQString ("VOLU %1\n").tqarg (int (sqrt (255 * 255 * val / 100))).ascii ()); } static struct ReadBuf { @@ -329,13 +329,13 @@ static struct ReadBuf { delete buf; buf = b; } - KDE_NO_EXPORT QCString mid (int p) { - return QCString (buf + p); + KDE_NO_EXPORT TQCString mid (int p) { + return TQCString (buf + p); } - KDE_NO_EXPORT QCString left (int p) { - return QCString (buf, p); + KDE_NO_EXPORT TQCString left (int p) { + return TQCString (buf, p); } - KDE_NO_EXPORT QCString getReadLine (); + KDE_NO_EXPORT TQCString getReadLine (); KDE_NO_EXPORT void clear () { delete [] buf; buf = 0; @@ -343,8 +343,8 @@ static struct ReadBuf { } } readbuf; -KDE_NO_EXPORT QCString ReadBuf::getReadLine () { - QCString out; +KDE_NO_EXPORT TQCString ReadBuf::getReadLine () { + TQCString out; if (!length) return out; int p = strcspn (buf, "\r\n"); @@ -365,7 +365,7 @@ KDE_NO_EXPORT void KMPlayerVDRSource::readyRead () { m_socket->readBlock (data, nr); data [nr] = 0; readbuf += data; - QCString line = readbuf.getReadLine (); + TQCString line = readbuf.getReadLine (); if (commands) { bool cmd_done = false; while (!line.isEmpty ()) { @@ -373,14 +373,14 @@ KDE_NO_EXPORT void KMPlayerVDRSource::readyRead () { cmd_done = (line.length () > 3 && line[3] == ' '); // from svdrpsend.pl // kdDebug () << "readyRead " << cmd_done << " " << commands->command << endl; if (!strcmp (commands->command, cmd_list_channels) && m_document) { - int p = line.find (';'); - int q = line.find (':'); + int p = line.tqfind (';'); + int q = line.tqfind (':'); if (q > 0 && (p < 0 || q < p)) p = q; if (p > 0) line.truncate (p); - QString channel_name = line.mid (4); - m_document->appendChild (new KMPlayer::GenericMrl (m_document, QString ("kmplayer://vdrsource/%1").arg(channel_name), channel_name)); + TQString channel_name = line.mid (4); + m_document->appendChild (new KMPlayer::GenericMrl (m_document, TQString ("kmplayer://vdrsource/%1").tqarg(channel_name), channel_name)); if (cmd_done) { m_player->updateTree (); if (!m_request_jump.isEmpty ()) { @@ -391,9 +391,9 @@ KDE_NO_EXPORT void KMPlayerVDRSource::readyRead () { toconsole = false; } else if (!strcmp (commands->command, cmd_chan_query)) { if (v && line.length () > 4) { - QString ch = line.mid (4); + TQString ch = line.mid (4); setTitle (ch); - KMPlayer::PlayListItem * lvi = static_cast (v->playList ()->findItem (ch, 0)); + KMPlayer::PlayListItem * lvi = static_cast (v->playList ()->tqfindItem (ch, 0)); if (lvi && lvi->node != m_last_channel) { KMPlayer::PlayListItem * si = static_cast (v->playList ()->selectedItem ()); bool jump_selection = (si && (si->node == m_document || si->node == m_last_channel)); @@ -412,14 +412,14 @@ KDE_NO_EXPORT void KMPlayerVDRSource::readyRead () { int c = strtol(ch.ascii(), 0L, 10); if (c != last_channel) { last_channel = c; - m_app->statusBar ()->changeItem (QString::number (c), + m_app->statusBar ()->changeItem (TQString::number (c), id_status_timer); } } } else if (cmd_done && !strcmp(commands->command,cmd_volume_query)){ - int pos = line.findRev (QChar (' ')); + int pos = line.tqfindRev (TQChar (' ')); if (pos > 0) { - QString vol = line.mid (pos + 1); + TQString vol = line.mid (pos + 1); if (!vol.compare ("mute")) m_stored_volume = 0; else @@ -429,7 +429,7 @@ KDE_NO_EXPORT void KMPlayerVDRSource::readyRead () { } } if (v && toconsole) - v->addText (QString (line), true); + v->addText (TQString (line), true); line = readbuf.getReadLine (); } if (cmd_done) { @@ -448,9 +448,9 @@ KDE_NO_EXPORT void KMPlayerVDRSource::readyRead () { } KDE_NO_EXPORT void KMPlayerVDRSource::socketError (int code) { - if (code == QSocket::ErrHostNotFound) { + if (code == TQSocket::ErrHostNotFound) { KMessageBox::error (m_configpage, i18n ("Host not found"), i18n ("Error")); - } else if (code == QSocket::ErrConnectionRefused) { + } else if (code == TQSocket::ErrConnectionRefused) { KMessageBox::error (m_configpage, i18n ("Connection refused"), i18n ("Error")); } } @@ -461,7 +461,7 @@ KDE_NO_EXPORT void KMPlayerVDRSource::queueCommand (const char * cmd) { if (!commands) { readbuf.clear (); commands = new VDRCommand (cmd); - if (m_socket->state () == QSocket::Connected) { + if (m_socket->state () == TQSocket::Connected) { sendCommand (); } else { m_socket->connectToHost ("127.0.0.1", tcp_port); @@ -493,13 +493,13 @@ KDE_NO_EXPORT void KMPlayerVDRSource::sendCommand () { KDE_NO_EXPORT void KMPlayerVDRSource::customCmd () { #if KDE_IS_VERSION(3, 1, 90) - QString cmd = KInputDialog::getText (i18n ("Custom VDR command"), i18n ("You can pass commands to VDR.\nEnter 'HELP' to see a list of available commands.\nYou can see VDR response in the console window.\n\nVDR Command:"), QString(), 0, m_player->view ()); + TQString cmd = KInputDialog::getText (i18n ("Custom VDR command"), i18n ("You can pass commands to VDR.\nEnter 'HELP' to see a list of available commands.\nYou can see VDR response in the console window.\n\nVDR Command:"), TQString(), 0, m_player->view ()); if (!cmd.isEmpty ()) - queueCommand (QString (cmd + QChar ('\n')).local8Bit ()); + queueCommand (TQString (cmd + TQChar ('\n')).local8Bit ()); #endif } -KDE_NO_EXPORT void KMPlayerVDRSource::timerEvent (QTimerEvent * e) { +KDE_NO_EXPORT void KMPlayerVDRSource::timerEvent (TQTimerEvent * e) { if (e->timerId () == timeout_timer || e->timerId () == finish_timer) { deleteCommands (); } else if (e->timerId () == channel_timer) { @@ -521,7 +521,7 @@ KDE_NO_EXPORT void KMPlayerVDRSource::deleteCommands () { readbuf.clear (); if (finish_timer) { killTimer (finish_timer); - QApplication::eventLoop ()->exitLoop (); + TQApplication::eventLoop ()->exitLoop (); } } @@ -531,10 +531,10 @@ KDE_NO_EXPORT void KMPlayerVDRSource::jump (KMPlayer::NodePtr e) { jump (e->mrl ()->pretty_name); } -KDE_NO_EXPORT void KMPlayerVDRSource::jump (const QString & channel) { - QCString c ("CHAN "); - QCString ch = channel.local8Bit (); - int p = ch.find (' '); +KDE_NO_EXPORT void KMPlayerVDRSource::jump (const TQString & channel) { + TQCString c ("CHAN "); + TQCString ch = channel.local8Bit (); + int p = ch.tqfind (' '); if (p > 0) c += ch.left (p); else @@ -651,9 +651,9 @@ KDE_NO_EXPORT void KMPlayerVDRSource::read (KConfig * m_config) { scale = m_config->readNumEntry (strXVScale, 0); } -struct XVTreeItem : public QListViewItem { - XVTreeItem (QListViewItem *parent, const QString & t, int p, int e) - : QListViewItem (parent, t), port (p), encoding (e) {} +struct XVTreeItem : public TQListViewItem { + XVTreeItem (TQListViewItem *tqparent, const TQString & t, int p, int e) + : TQListViewItem (tqparent, t), port (p), encoding (e) {} int port; int encoding; }; @@ -670,12 +670,12 @@ KDE_NO_EXPORT void KMPlayerVDRSource::sync (bool fromUI) { m_xvencoding = vitem->encoding; } } else { - m_configpage->tcp_port->setText (QString::number (tcp_port)); + m_configpage->tcp_port->setText (TQString::number (tcp_port)); m_configpage->scale->setButton (scale); - QListViewItem * vitem = m_configpage->xv_port->firstChild (); + TQListViewItem * vitem = m_configpage->xv_port->firstChild (); NodePtr configdoc = xvideo->configDocument (); if (configdoc && configdoc->firstChild ()) { - for (QListViewItem *i=vitem->firstChild(); i; i=vitem->firstChild()) + for (TQListViewItem *i=vitem->firstChild(); i; i=vitem->firstChild()) delete i; NodePtr node = configdoc->firstChild (); for (node = node->firstChild (); node; node = node->nextSibling()) { @@ -683,27 +683,27 @@ KDE_NO_EXPORT void KMPlayerVDRSource::sync (bool fromUI) { continue; // some text sneaked in ? Element * elm = convertNode (node); if (elm->getAttribute (KMPlayer::StringPool::attr_type) != - QString ("tree")) + TQString ("tree")) continue; for (NodePtr n = elm->firstChild (); n; n = n->nextSibling ()) { if (!n->isElementNode () || strcmp (n->nodeName (), "Port")) continue; Element * e = convertNode (n); - QString portatt = e->getAttribute ( + TQString portatt = e->getAttribute ( KMPlayer::StringPool::attr_value); int port; - QListViewItem *pi = new QListViewItem (vitem, i18n ("Port ") + portatt); + TQListViewItem *pi = new TQListViewItem (vitem, i18n ("Port ") + portatt); port = portatt.toInt (); for (NodePtr in=e->firstChild(); in; in=in->nextSibling()) { if (!in->isElementNode () || strcmp (in->nodeName (), "Input")) continue; Element * i = convertNode (in); - QString inp = i->getAttribute ( + TQString inp = i->getAttribute ( KMPlayer::StringPool::attr_name); int enc = i->getAttribute ( KMPlayer::StringPool::attr_value).toInt (); - QListViewItem * ii = new XVTreeItem(pi, inp, port, enc); + TQListViewItem * ii = new XVTreeItem(pi, inp, port, enc); if (m_xvport == port && enc == m_xvencoding) { ii->setSelected (true); m_configpage->xv_port->ensureItemVisible (ii); @@ -712,25 +712,25 @@ KDE_NO_EXPORT void KMPlayerVDRSource::sync (bool fromUI) { } } } else // wait for showEvent - connect (xvideo, SIGNAL (configReceived()), this, SLOT (configReceived())); + connect (xvideo, TQT_SIGNAL (configReceived()), this, TQT_SLOT (configReceived())); } } KDE_NO_EXPORT void KMPlayerVDRSource::configReceived () { XVideo * xvideo = static_cast(m_player->players()["xvideo"]); - disconnect (xvideo, SIGNAL (configReceived()), this, SLOT (configReceived())); + disconnect (xvideo, TQT_SIGNAL (configReceived()), this, TQT_SLOT (configReceived())); sync (false); } -KDE_NO_EXPORT void KMPlayerVDRSource::prefLocation (QString & item, QString & icon, QString & tab) { +KDE_NO_EXPORT void KMPlayerVDRSource::prefLocation (TQString & item, TQString & icon, TQString & tab) { item = i18n ("Source"); - icon = QString ("source"); + icon = TQString ("source"); tab = i18n ("VDR"); } -KDE_NO_EXPORT QFrame * KMPlayerVDRSource::prefPage (QWidget * parent) { +KDE_NO_EXPORT TQFrame * KMPlayerVDRSource::prefPage (TQWidget * tqparent) { if (!m_configpage) - m_configpage = new KMPlayerPrefSourcePageVDR (parent, m_player); + m_configpage = new KMPlayerPrefSourcePageVDR (tqparent, m_player); return m_configpage; } @@ -747,8 +747,8 @@ static const char * xv_supported [] = { "tvsource", "vdrsource", 0L }; -KDE_NO_CDTOR_EXPORT XVideo::XVideo (QObject * parent, Settings * settings) - : KMPlayer::CallbackProcess (parent, settings, "xvideo", i18n ("X&Video")) { +KDE_NO_CDTOR_EXPORT XVideo::XVideo (TQObject * tqparent, Settings * settings) + : KMPlayer::CallbackProcess (tqparent, settings, "xvideo", i18n ("X&Video")) { m_supported_sources = xv_supported; //m_player->settings ()->addPage (m_configpage); } @@ -760,16 +760,16 @@ KDE_NO_EXPORT bool XVideo::ready (KMPlayer::Viewer * v) { return true; } initProcess (v); - QString cmd = QString ("kxvplayer -wid %3 -cb %4").arg (viewer ()->embeddedWinId ()).arg (dcopName ()); + TQString cmd = TQString ("kxvplayer -wid %3 -cb %4").arg (viewer ()->embeddedWinId ()).arg (dcopName ()); if (m_have_config == config_unknown || m_have_config == config_probe) - cmd += QString (" -c"); + cmd += TQString (" -c"); if (m_source) { int xv_port = m_source->xvPort (); int xv_encoding = m_source->xvEncoding (); int freq = m_source->frequency (); - cmd += QString (" -port %1 -enc %2 -norm \"%3\"").arg (xv_port).arg (xv_encoding).arg (m_source->videoNorm ()); + cmd += TQString (" -port %1 -enc %2 -norm \"%3\"").arg (xv_port).arg (xv_encoding).arg (m_source->videoNorm ()); if (freq > 0) - cmd += QString (" -freq %1").arg (freq); + cmd += TQString (" -freq %1").arg (freq); } fprintf (stderr, "%s\n", cmd.latin1 ()); *m_process << cmd; diff --git a/src/kmplayervdr.h b/src/kmplayervdr.h index 4f11e8f..ce714aa 100644 --- a/src/kmplayervdr.h +++ b/src/kmplayervdr.h @@ -24,7 +24,7 @@ #include #endif -#include +#include #include @@ -36,29 +36,30 @@ class KMPlayerApp; class VDRCommand; class KURLRequester; -class QButtonGroup; -class QMenuItem; -class QCheckBox; -class QLineEdit; +class TQButtonGroup; +class TQMenuItem; +class TQCheckBox; +class TQLineEdit; class KAction; -class QSocket; -class QTimerEvent; +class TQSocket; +class TQTimerEvent; class KListView; /* * Preference page for VDR */ -class KMPLAYER_NO_EXPORT KMPlayerPrefSourcePageVDR : public QFrame { +class KMPLAYER_NO_EXPORT KMPlayerPrefSourcePageVDR : public TQFrame { Q_OBJECT + TQ_OBJECT public: - KMPlayerPrefSourcePageVDR (QWidget * parent, KMPlayer::PartBase * player); + KMPlayerPrefSourcePageVDR (TQWidget * tqparent, KMPlayer::PartBase * player); ~KMPlayerPrefSourcePageVDR (); KURLRequester * vcddevice; KListView * xv_port; - QLineEdit * tcp_port; - QButtonGroup * scale; + TQLineEdit * tcp_port; + TQButtonGroup * scale; protected: - void showEvent (QShowEvent *); + void showEvent (TQShowEvent *); private: KMPlayer::PartBase * m_player; }; @@ -69,17 +70,18 @@ private: */ class KMPLAYER_NO_EXPORT KMPlayerVDRSource : public KMPlayer::Source, public KMPlayer::PreferencesPage { Q_OBJECT + TQ_OBJECT public: KMPlayerVDRSource (KMPlayerApp * app); virtual ~KMPlayerVDRSource (); virtual bool hasLength (); virtual bool isSeekable (); - virtual QString prettyName (); + virtual TQString prettyName (); virtual void write (KConfig *); virtual void read (KConfig *); virtual void sync (bool); - virtual void prefLocation (QString & item, QString & icon, QString & tab); - virtual QFrame * prefPage (QWidget * parent); + virtual void prefLocation (TQString & item, TQString & icon, TQString & tab); + virtual TQFrame * prefPage (TQWidget * tqparent); virtual bool requestPlayURL (KMPlayer::NodePtr mrl); virtual void stateElementChanged (KMPlayer::Node * node, KMPlayer::Node::State os, KMPlayer::Node::State ns); void waitForConnectionClose (); @@ -123,7 +125,7 @@ private slots: void processStarted (); void configReceived (); protected: - void timerEvent (QTimerEvent *); + void timerEvent (TQTimerEvent *); private: enum { act_up = 0, act_down, act_back, act_ok, @@ -139,14 +141,14 @@ private: void queueCommand (const char * cmd, int repeat_ms); void sendCommand (); void deleteCommands (); - void jump (const QString & channel); + void jump (const TQString & channel); KMPlayerApp * m_app; KMPlayerPrefSourcePageVDR * m_configpage; KAction * m_actions [act_last]; KAction * m_fullscreen_actions [act_last]; - QSocket * m_socket; + TQSocket * m_socket; VDRCommand * commands; - QString m_request_jump; + TQString m_request_jump; KMPlayer::NodePtrW m_last_channel; int channel_timer; int timeout_timer; @@ -159,8 +161,9 @@ private: class XVideo : public KMPlayer::CallbackProcess { Q_OBJECT + TQ_OBJECT public: - XVideo (QObject * parent, KMPlayer::Settings * settings); + XVideo (TQObject * tqparent, KMPlayer::Settings * settings); ~XVideo (); public slots: virtual bool ready (KMPlayer::Viewer *); diff --git a/src/kmplayerview.cpp b/src/kmplayerview.cpp index d55be16..15cb8fa 100644 --- a/src/kmplayerview.cpp +++ b/src/kmplayerview.cpp @@ -20,25 +20,25 @@ #include #include -// include files for Qt -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +// include files for TQt +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -68,7 +68,7 @@ static const int XKeyPress = KeyPress; #undef KeyPress #undef Always #undef Never -#undef Status +#undef tqStatus #undef Unsorted #undef Bool @@ -85,49 +85,49 @@ using namespace KMPlayer; namespace KMPlayer { -class KMPlayerPictureWidget : public QWidget { +class KMPlayerPictureWidget : public TQWidget { View * m_view; public: - KDE_NO_CDTOR_EXPORT KMPlayerPictureWidget (QWidget * parent, View * view) - : QWidget (parent), m_view (view) {} + KDE_NO_CDTOR_EXPORT KMPlayerPictureWidget (TQWidget * tqparent, View * view) + : TQWidget (tqparent), m_view (view) {} KDE_NO_CDTOR_EXPORT ~KMPlayerPictureWidget () {} protected: - void mousePressEvent (QMouseEvent *); + void mousePressEvent (TQMouseEvent *); }; } // namespace -KDE_NO_EXPORT void KMPlayerPictureWidget::mousePressEvent (QMouseEvent *) { +KDE_NO_EXPORT void KMPlayerPictureWidget::mousePressEvent (TQMouseEvent *) { m_view->emitPictureClicked (); } //----------------------------------------------------------------------------- -KDE_NO_CDTOR_EXPORT TextEdit::TextEdit (QWidget * parent, View * view) : QTextEdit (parent, "kde_kmplayer_console"), m_view (view) { +KDE_NO_CDTOR_EXPORT TextEdit::TextEdit (TQWidget * tqparent, View * view) : TQTextEdit (tqparent, "kde_kmplayer_console"), m_view (view) { setReadOnly (true); - setPaper (QBrush (QColor (0, 0, 0))); - setColor (QColor (0xB2, 0xB2, 0xB2)); + setPaper (TQBrush (TQColor (0, 0, 0))); + setColor (TQColor (0xB2, 0xB2, 0xB2)); } -KDE_NO_EXPORT void TextEdit::contextMenuEvent (QContextMenuEvent * e) { +KDE_NO_EXPORT void TextEdit::contextMenuEvent (TQContextMenuEvent * e) { m_view->controlPanel ()->popupMenu ()->exec (e->globalPos ()); } //----------------------------------------------------------------------------- -KDE_NO_CDTOR_EXPORT InfoWindow::InfoWindow (QWidget * parent, View * view) : QTextEdit (parent, "kde_kmplayer_console"), m_view (view) { +KDE_NO_CDTOR_EXPORT InfoWindow::InfoWindow (TQWidget * tqparent, View * view) : TQTextEdit (tqparent, "kde_kmplayer_console"), m_view (view) { setReadOnly (true); setLinkUnderline (false); } -KDE_NO_EXPORT void InfoWindow::contextMenuEvent (QContextMenuEvent * e) { +KDE_NO_EXPORT void InfoWindow::contextMenuEvent (TQContextMenuEvent * e) { m_view->controlPanel ()->popupMenu ()->exec (e->globalPos ()); } //----------------------------------------------------------------------------- -KDE_NO_CDTOR_EXPORT View::View (QWidget *parent, const char *name) - : KMediaPlayer::View (parent, name), +KDE_NO_CDTOR_EXPORT View::View (TQWidget *tqparent, const char *name) + : KMediaPlayer::View (tqparent, name), m_image (0L), m_control_panel (0L), m_status_bar (0L), @@ -148,13 +148,13 @@ KDE_NO_CDTOR_EXPORT View::View (QWidget *parent, const char *name) m_edit_mode (false) {} -KDE_NO_EXPORT void View::dropEvent (QDropEvent * de) { +KDE_NO_EXPORT void View::dropEvent (TQDropEvent * de) { KURL::List sl; if (KURLDrag::canDecode (de)) { KURLDrag::decode (de, sl); - } else if (QTextDrag::canDecode (de)) { - QString text; - QTextDrag::decode (de, text); + } else if (TQTextDrag::canDecode (de)) { + TQString text; + TQTextDrag::decode (de, text); sl.push_back (KURL (text)); } if (sl.size () > 0) { @@ -166,34 +166,34 @@ KDE_NO_EXPORT void View::dropEvent (QDropEvent * de) { } } -KDE_NO_EXPORT void View::dragEnterEvent (QDragEnterEvent* dee) { +KDE_NO_EXPORT void View::dragEnterEvent (TQDragEnterEvent* dee) { if (isDragValid (dee)) dee->accept (); } KDE_NO_EXPORT void View::init (KActionCollection * action_collection) { - setBackgroundMode(Qt::NoBackground); // prevents flashing - //m_dockarea->setEraseColor (QColor (0, 0, 0)); - QPalette pal (QColor (64, 64,64), QColor (32, 32, 32)); - QVBoxLayout * viewbox = new QVBoxLayout (this, 0, 0); + setBackgroundMode(TQt::NoBackground); // prevents flashing + //m_dockarea->setEraseColor (TQColor (0, 0, 0)); + TQPalette pal (TQColor (64, 64,64), TQColor (32, 32, 32)); + TQVBoxLayout * viewbox = new TQVBoxLayout (this, 0, 0); m_dockarea = new KDockArea (this, "kde_kmplayer_dock_area"); - m_dock_video = new KDockWidget (m_dockarea->manager (), 0, KGlobal::iconLoader ()->loadIcon (QString ("kmplayer"), KIcon::Small), m_dockarea); - m_dock_video->setEraseColor (QColor (0, 0, 255)); + m_dock_video = new KDockWidget (m_dockarea->manager (), 0, KGlobal::iconLoader ()->loadIcon (TQString ("kmplayer"), KIcon::Small), m_dockarea); + m_dock_video->setEraseColor (TQColor (0, 0, 255)); m_dock_video->setDockSite (KDockWidget::DockLeft | KDockWidget::DockBottom | KDockWidget::DockRight | KDockWidget::DockTop); m_dock_video->setEnableDocking(KDockWidget::DockNone); m_view_area = new ViewArea (m_dock_video, this); m_dock_video->setWidget (m_view_area); m_dockarea->setMainDockWidget (m_dock_video); - m_dock_playlist = m_dockarea->createDockWidget (i18n ("Play List"), KGlobal::iconLoader ()->loadIcon (QString ("player_playlist"), KIcon::Small)); + m_dock_playlist = m_dockarea->createDockWidget (i18n ("Play List"), KGlobal::iconLoader ()->loadIcon (TQString ("player_playlist"), KIcon::Small)); m_playlist = new PlayListView (m_dock_playlist, this, action_collection); m_dock_playlist->setWidget (m_playlist); viewbox->addWidget (m_dockarea); - m_widgetstack = new QWidgetStack (m_view_area); + m_widgetstack = new TQWidgetStack (m_view_area); m_control_panel = new ControlPanel (m_view_area, this); - m_control_panel->setMaximumSize (2500, controlPanel ()->maximumSize ().height ()); + m_control_panel->setMaximumSize (2500, controlPanel ()->tqmaximumSize ().height ()); m_status_bar = new StatusBar (m_view_area); - m_status_bar->insertItem (QString (""), 0); - QSize sbsize = m_status_bar->sizeHint (); + m_status_bar->insertItem (TQString (""), 0); + TQSize sbsize = m_status_bar->tqsizeHint (); m_status_bar->hide (); m_status_bar->setMaximumSize (2500, sbsize.height ()); m_viewer = new Viewer (m_widgetstack, this); @@ -203,14 +203,14 @@ KDE_NO_EXPORT void View::init (KActionCollection * action_collection) { #endif m_multiedit = new TextEdit (m_widgetstack, this); - m_multiedit->setTextFormat (Qt::PlainText); - QFont fnt = KGlobalSettings::fixedFont (); + m_multiedit->setTextFormat (TQt::PlainText); + TQFont fnt = KGlobalSettings::fixedFont (); m_multiedit->setFont (fnt); m_widgettypes[WT_Console] = m_multiedit; m_widgettypes[WT_Picture] = new KMPlayerPictureWidget (m_widgetstack, this); - m_dock_infopanel = m_dockarea->createDockWidget ("infopanel", KGlobal::iconLoader ()->loadIcon (QString ("info"), KIcon::Small)); + m_dock_infopanel = m_dockarea->createDockWidget ("infopanel", KGlobal::iconLoader ()->loadIcon (TQString ("info"), KIcon::Small)); m_infopanel = new InfoWindow (m_dock_infopanel, this); m_dock_infopanel->setWidget (m_infopanel); @@ -218,7 +218,7 @@ KDE_NO_EXPORT void View::init (KActionCollection * action_collection) { m_widgetstack->addWidget (m_multiedit); m_widgetstack->addWidget (m_widgettypes[WT_Picture]); - setFocusPolicy (QWidget::ClickFocus); + setFocusPolicy (TQ_ClickFocus); setAcceptDrops (true); m_view_area->resizeEvent (0L); @@ -228,11 +228,11 @@ KDE_NO_EXPORT void View::init (KActionCollection * action_collection) { KDE_NO_CDTOR_EXPORT View::~View () { delete m_image; - if (m_view_area->parent () != this) + if (TQT_BASE_OBJECT(m_view_area->tqparent ()) != TQT_BASE_OBJECT(this)) delete m_view_area; } -KDE_NO_EXPORT void View::setEraseColor (const QColor & color) { +KDE_NO_EXPORT void View::setEraseColor (const TQColor & color) { KMediaPlayer::View::setEraseColor (color); if (statusBar ()) { statusBar ()->setEraseColor (color); @@ -240,7 +240,7 @@ KDE_NO_EXPORT void View::setEraseColor (const QColor & color) { } } -void View::setInfoMessage (const QString & msg) { +void View::setInfoMessage (const TQString & msg) { bool ismain = m_dockarea->getMainDockWidget () == m_dock_infopanel; if (msg.isEmpty ()) { if (!ismain && !m_edit_mode && !infopanel_timer) @@ -253,7 +253,7 @@ void View::setInfoMessage (const QString & msg) { } } -void View::setStatusMessage (const QString & msg) { +void View::setStatusMessage (const TQString & msg) { if (m_statusbar_mode != SB_Hide) m_status_bar->changeItem (msg, 0); } @@ -266,11 +266,11 @@ void View::toggleShowPlaylist () { m_dock_playlist->dockBack (); else { bool horz = true; - QStyle & style = m_playlist->style (); - int h = style.pixelMetric (QStyle::PM_ScrollBarExtent, m_playlist); - h += style.pixelMetric(QStyle::PM_DockWindowFrameWidth, m_playlist); - h +=style.pixelMetric(QStyle::PM_DockWindowHandleExtent,m_playlist); - for (QListViewItem *i=m_playlist->firstChild();i;i=i->itemBelow()) { + TQStyle & style = m_playlist->tqstyle (); + int h = style.tqpixelMetric (TQStyle::PM_ScrollBarExtent, m_playlist); + h += style.tqpixelMetric(TQStyle::PM_DockWindowFrameWidth, m_playlist); + h +=style.tqpixelMetric(TQStyle::PM_DockWindowHandleExtent,m_playlist); + for (TQListViewItem *i=m_playlist->firstChild();i;i=i->itemBelow()) { h += i->height (); if (h > int (0.25 * height ())) { horz = false; @@ -314,18 +314,18 @@ void View::setPlaylistOnly () { void View::setEditMode (RootPlayListItem *ri, bool enable) { m_edit_mode = enable; m_infopanel->setReadOnly (!m_edit_mode); - m_infopanel->setTextFormat (enable ? Qt::PlainText : Qt::AutoText); + m_infopanel->setTextFormat (enable ? TQt::PlainText : TQt::AutoText); if (m_edit_mode && m_dock_infopanel->mayBeShow ()) m_dock_infopanel->manualDock(m_dock_video,KDockWidget::DockBottom,50); m_playlist->showAllNodes (ri, m_edit_mode); } -bool View::setPicture (const QString & path) { +bool View::setPicture (const TQString & path) { delete m_image; if (path.isEmpty ()) m_image = 0L; else { - m_image = new QPixmap (path); + m_image = new TQPixmap (path); if (m_image->isNull ()) { delete m_image; m_image = 0L; @@ -345,8 +345,8 @@ bool View::setPicture (const QString & path) { KDE_NO_EXPORT void View::updateVolume () { if (m_mixer_init && !m_volume_slider) return; - QByteArray data, replydata; - QCString replyType; + TQByteArray data, replydata; + TQCString replyType; int volume; bool has_mixer = kapp->dcopClient ()->call (m_mixer_object, "Mixer0", "masterVolume()", data, replyType, replydata); @@ -356,13 +356,13 @@ KDE_NO_EXPORT void View::updateVolume () { "masterVolume()", data, replyType, replydata); } if (has_mixer) { - QDataStream replystream (replydata, IO_ReadOnly); + TQDataStream replystream (replydata, IO_ReadOnly); replystream >> volume; if (!m_mixer_init) { - QLabel * mixer_label = new QLabel (i18n ("Volume:"), m_control_panel->popupMenu ()); + TQLabel * mixer_label = new TQLabel (i18n ("Volume:"), m_control_panel->popupMenu ()); m_control_panel->popupMenu ()->insertItem (mixer_label, -1, 4); - m_volume_slider = new QSlider (0, 100, 10, volume, Qt::Horizontal, m_control_panel->popupMenu ()); - connect(m_volume_slider, SIGNAL(valueChanged(int)), this,SLOT(setVolume(int))); + m_volume_slider = new TQSlider (0, 100, 10, volume, Qt::Horizontal, m_control_panel->popupMenu ()); + connect(m_volume_slider, TQT_SIGNAL(valueChanged(int)), this,TQT_SLOT(setVolume(int))); m_control_panel->popupMenu ()->insertItem (m_volume_slider, ControlPanel::menu_volume, 5); m_control_panel->popupMenu ()->insertSeparator (6); } else { @@ -382,7 +382,7 @@ KDE_NO_EXPORT void View::updateVolume () { void View::showWidget (WidgetType wt) { m_widgetstack->raiseWidget (m_widgettypes [wt]); if (m_widgetstack->visibleWidget () == m_widgettypes[WT_Console]) { - addText (QString (""), false); + addText (TQString (""), false); if (m_controlpanel_mode == CP_AutoHide && m_playing) m_control_panel->show(); } else @@ -394,9 +394,9 @@ void View::toggleVideoConsoleWindow () { WidgetType wt = WT_Console; if (m_widgetstack->visibleWidget () == m_widgettypes[WT_Console]) { wt = WT_Video; - m_control_panel->popupMenu ()->changeItem (ControlPanel::menu_video, KGlobal::iconLoader ()->loadIconSet (QString ("konsole"), KIcon::Small, 0, true), i18n ("Con&sole")); + m_control_panel->popupMenu ()->changeItem (ControlPanel::menu_video, KGlobal::iconLoader ()->loadIconSet (TQString ("konsole"), KIcon::Small, 0, true), i18n ("Con&sole")); } else - m_control_panel->popupMenu ()->changeItem (ControlPanel::menu_video, KGlobal::iconLoader ()->loadIconSet (QString ("video"), KIcon::Small, 0, true), i18n ("V&ideo")); + m_control_panel->popupMenu ()->changeItem (ControlPanel::menu_video, KGlobal::iconLoader ()->loadIconSet (TQString ("video"), KIcon::Small, 0, true), i18n ("V&ideo")); showWidget (wt); emit windowVideoConsoleToggled (int (wt)); } @@ -454,8 +454,8 @@ KDE_NO_EXPORT void View::delayedShowButtons (bool show) { KDE_NO_EXPORT void View::setVolume (int vol) { if (m_inVolumeUpdate) return; - QByteArray data; - QDataStream arg( data, IO_WriteOnly ); + TQByteArray data; + TQDataStream arg( data, IO_WriteOnly ); arg << vol; if (!kapp->dcopClient()->send (m_mixer_object, "Mixer0", "setMasterVolume(int)", data)) kdWarning() << "Failed to update volume" << endl; @@ -475,14 +475,14 @@ void View::setKeepSizeRatio (bool b) { } } -KDE_NO_EXPORT void View::timerEvent (QTimerEvent * e) { +KDE_NO_EXPORT void View::timerEvent (TQTimerEvent * e) { if (e->timerId () == controlbar_timer) { controlbar_timer = 0; if (m_playing || m_widgetstack->visibleWidget () == m_widgettypes[WT_Picture]) { int vert_buttons_pos = m_view_area->height()-statusBarHeight (); - QPoint mouse_pos = m_view_area->mapFromGlobal (QCursor::pos ()); - int cp_height = m_control_panel->maximumSize ().height (); + TQPoint mouse_pos = m_view_area->mapFromGlobal (TQCursor::pos ()); + int cp_height = m_control_panel->tqmaximumSize ().height (); bool mouse_on_buttons = (//m_view_area->hasMouse () && mouse_pos.y () >= vert_buttons_pos-cp_height && mouse_pos.y ()<= vert_buttons_pos && @@ -504,9 +504,9 @@ KDE_NO_EXPORT void View::timerEvent (QTimerEvent * e) { killTimer (e->timerId ()); } -void View::addText (const QString & str, bool eol) { +void View::addText (const TQString & str, bool eol) { if (m_tmplog_needs_eol) - tmplog += QChar ('\n'); + tmplog += TQChar ('\n'); tmplog += str; m_tmplog_needs_eol = eol; if (m_widgetstack->visibleWidget () != m_widgettypes[WT_Console] && @@ -517,7 +517,7 @@ void View::addText (const QString & str, bool eol) { tmplog.truncate (0); m_tmplog_needs_eol = false; } else { - int pos = tmplog.findRev (QChar ('\n')); + int pos = tmplog.tqfindRev (TQChar ('\n')); if (pos >= 0) { m_multiedit->append (tmplog.left (pos)); tmplog = tmplog.mid (pos+1); @@ -531,9 +531,9 @@ void View::addText (const QString & str, bool eol) { m_multiedit->setCursorPosition (m_multiedit->paragraphs () - 1, 0); } -/* void View::print (QPrinter *pPrinter) +/* void View::print (TQPrinter *pPrinter) { - QPainter printpainter; + TQPainter printpainter; printpainter.begin (pPrinter); // TODO: add your printing code here @@ -581,7 +581,7 @@ KDE_NO_EXPORT void View::playingStop () { m_view_area->resizeEvent (0L); } -KDE_NO_EXPORT void View::leaveEvent (QEvent *) { +KDE_NO_EXPORT void View::leaveEvent (TQEvent *) { delayedShowButtons (false); } @@ -600,16 +600,16 @@ bool View::isFullScreen () const { void View::fullScreen () { if (!m_view_area->isFullScreen()) { m_sreensaver_disabled = false; - QByteArray data, replydata; - QCString replyType; + TQByteArray data, replydata; + TQCString replyType; if (kapp->dcopClient ()->call ("kdesktop", "KScreensaverIface", "isEnabled()", data, replyType, replydata)) { bool enabled; - QDataStream replystream (replydata, IO_ReadOnly); + TQDataStream replystream (replydata, IO_ReadOnly); replystream >> enabled; if (enabled) m_sreensaver_disabled = kapp->dcopClient()->send - ("kdesktop", "KScreensaverIface", "enable(bool)", "false"); + ("kdesktop", "KScreensaverIface", "enable(bool)", TQString("false")); } //if (m_keepsizeratio && m_viewer->aspect () < 0.01) // m_viewer->setAspect (1.0 * m_viewer->width() / m_viewer->height()); @@ -619,7 +619,7 @@ void View::fullScreen () { } else { if (m_sreensaver_disabled) m_sreensaver_disabled = !kapp->dcopClient()->send - ("kdesktop", "KScreensaverIface", "enable(bool)", "true"); + ("kdesktop", "KScreensaverIface", "enable(bool)", TQString("true")); m_view_area->fullScreen(); m_control_panel->popupMenu ()->setItemVisible (ControlPanel::menu_zoom, true); } @@ -632,7 +632,7 @@ KDE_NO_EXPORT int View::statusBarHeight () const { if (statusBarMode () == SB_Only) return height (); else - return statusBar()->maximumSize ().height (); + return statusBar()->tqmaximumSize ().height (); } return 0; } @@ -665,13 +665,13 @@ bool View::x11Event (XEvent * e) { if (e->xmotion.window == m_viewer->embeddedWinId ()) delayedShowButtons (e->xmotion.y > m_view_area->height () - statusBarHeight () - - m_control_panel->maximumSize ().height ()); + m_control_panel->tqmaximumSize ().height ()); m_view_area->mouseMoved (); break; case MapNotify: if (e->xmap.event == m_viewer->embeddedWinId ()) { show (); - QTimer::singleShot (10, m_viewer, SLOT (sendConfigureEvent ())); + TQTimer::singleShot (10, m_viewer, TQT_SLOT (sendConfigureEvent ())); } break; /*case ConfigureNotify: @@ -685,8 +685,8 @@ bool View::x11Event (XEvent * e) { //---------------------------------------------------------------------- -KDE_NO_CDTOR_EXPORT Viewer::Viewer (QWidget *parent, View * view) - : QXEmbed (parent), m_plain_window (0), m_bgcolor (0), m_aspect (0.0), +KDE_NO_CDTOR_EXPORT Viewer::Viewer (TQWidget *tqparent, View * view) + : QXEmbed (tqparent), m_plain_window (0), m_bgcolor (0), m_aspect (0.0), m_view (view) { /*XWindowAttributes xwa; XGetWindowAttributes (qt_xdisplay(), winId (), &xwa); @@ -694,7 +694,7 @@ KDE_NO_CDTOR_EXPORT Viewer::Viewer (QWidget *parent, View * view) xswa.background_pixel = 0; xswa.border_pixel = 0; xswa.colormap = xwa.colormap; - create (XCreateWindow (qt_xdisplay (), parent->winId (), 0, 0, 10, 10, 0, + create (XCreateWindow (qt_xdisplay (), tqparent->winId (), 0, 0, 10, 10, 0, x11Depth (), InputOutput, (Visual*)x11Visual (), CWBackPixel | CWBorderPixel | CWColormap, &xswa));*/ setAcceptDrops (true); @@ -747,9 +747,9 @@ KDE_NO_EXPORT void Viewer::windowChanged (WId w) { PointerMotionMask); } -KDE_NO_EXPORT void Viewer::mouseMoveEvent (QMouseEvent * e) { +KDE_NO_EXPORT void Viewer::mouseMoveEvent (TQMouseEvent * e) { if (e->state () == Qt::NoButton) { - int cp_height = m_view->controlPanel ()->maximumSize ().height (); + int cp_height = m_view->controlPanel ()->tqmaximumSize ().height (); m_view->delayedShowButtons (e->y () > height () - cp_height); } m_view->viewArea ()->mouseMoved (); @@ -765,11 +765,11 @@ KDE_NO_EXPORT int Viewer::heightForWidth (int w) const { return int (w/m_aspect); } -KDE_NO_EXPORT void Viewer::dropEvent (QDropEvent * de) { +KDE_NO_EXPORT void Viewer::dropEvent (TQDropEvent * de) { m_view->dropEvent (de); } -KDE_NO_EXPORT void Viewer::dragEnterEvent (QDragEnterEvent* dee) { +KDE_NO_EXPORT void Viewer::dragEnterEvent (TQDragEnterEvent* dee) { m_view->dragEnterEvent (dee); } /* @@ -804,11 +804,11 @@ KDE_NO_EXPORT void Viewer::sendConfigureEvent () { } } -KDE_NO_EXPORT void Viewer::contextMenuEvent (QContextMenuEvent * e) { +KDE_NO_EXPORT void Viewer::contextMenuEvent (TQContextMenuEvent * e) { m_view->controlPanel ()->popupMenu ()->exec (e->globalPos ()); } -KDE_NO_EXPORT void Viewer::setBackgroundColor (const QColor & c) { +KDE_NO_EXPORT void Viewer::setBackgroundColor (const TQColor & c) { if (m_bgcolor != c.rgb ()) { m_bgcolor = c.rgb (); setCurrentBackgroundColor (c); @@ -819,7 +819,7 @@ KDE_NO_EXPORT void Viewer::resetBackgroundColor () { setCurrentBackgroundColor (m_bgcolor); } -KDE_NO_EXPORT void Viewer::setCurrentBackgroundColor (const QColor & c) { +KDE_NO_EXPORT void Viewer::setCurrentBackgroundColor (const TQColor & c) { setPaletteBackgroundColor (c); WId w = embeddedWinId (); if (w) { diff --git a/src/kmplayerview.h b/src/kmplayerview.h index d255bd0..e8a77a0 100644 --- a/src/kmplayerview.h +++ b/src/kmplayerview.h @@ -22,8 +22,8 @@ #ifdef HAVE_CONFIG_H #include #endif -#include -#include +#include +#include #include #include @@ -34,12 +34,12 @@ #define MOUSE_INVISIBLE_DELAY 2000 -class QWidgetStack; -class QPixmap; -class QPaintDevice; -class QPainter; -class QSlider; -class QLabel; +class TQWidgetStack; +class TQPixmap; +class TQPaintDevice; +class TQPainter; +class TQSlider; +class TQLabel; class KActionCollection; class KAction; class KShortcut; @@ -63,11 +63,11 @@ typedef KStatusBar StatusBar; /* * The console GUI */ -class TextEdit : public QTextEdit { +class TextEdit : public TQTextEdit { public: - TextEdit (QWidget * parent, View * view); + TextEdit (TQWidget * tqparent, View * view); protected: - void contextMenuEvent (QContextMenuEvent * e); + void contextMenuEvent (TQContextMenuEvent * e); private: View * m_view; }; @@ -75,12 +75,12 @@ private: /* * The infowindow GUI */ -class InfoWindow : public QTextEdit { +class InfoWindow : public TQTextEdit { public: - InfoWindow (QWidget * parent, View * view); + InfoWindow (TQWidget * tqparent, View * view); KDE_NO_EXPORT View * view () const { return m_view; } protected: - void contextMenuEvent (QContextMenuEvent * e); + void contextMenuEvent (TQContextMenuEvent * e); private: View * m_view; }; @@ -90,6 +90,7 @@ private: */ class KMPLAYER_EXPORT View : public KMediaPlayer::View { Q_OBJECT + TQ_OBJECT public: enum ControlPanelMode { CP_Hide, CP_AutoHide, CP_Show, CP_Only /* no video widget */ @@ -101,13 +102,13 @@ public: WT_Video, WT_Console, WT_Picture, WT_Last }; - View (QWidget *parent, const char *); + View (TQWidget *tqparent, const char *); ~View(); - void addText (const QString &, bool eol=false); + void addText (const TQString &, bool eol=false); void init (KActionCollection * ac); void reset (); - //void print(QPrinter *pPrinter); + //void print(TQPrinter *pPrinter); TextEdit * console () const { return m_multiedit; } KDE_NO_EXPORT Viewer * viewer () const { return m_viewer; } @@ -115,7 +116,7 @@ public: KDE_NO_EXPORT StatusBar * statusBar () const {return m_status_bar;} KDE_NO_EXPORT PlayListView * playList () const { return m_playlist; } KDE_NO_EXPORT InfoWindow * infoPanel () const { return m_infopanel; } - KDE_NO_EXPORT QWidgetStack * widgetStack () const { return m_widgetstack; } + KDE_NO_EXPORT TQWidgetStack * widgetStack () const { return m_widgetstack; } KDE_NO_EXPORT KDockArea * docArea () const { return m_dockarea; } KDE_NO_EXPORT ViewArea * viewArea () const { return m_view_area; } KDE_NO_EXPORT bool keepSizeRatio () const { return m_keepsizeratio; } @@ -123,22 +124,22 @@ public: void showWidget (WidgetType w); void setControlPanelMode (ControlPanelMode m); void setStatusBarMode (StatusBarMode m); - void setEraseColor (const QColor &); + void setEraseColor (const TQColor &); KDE_NO_EXPORT ControlPanelMode controlPanelMode () const { return m_controlpanel_mode; } KDE_NO_EXPORT StatusBarMode statusBarMode () const { return m_statusbar_mode; } void delayedShowButtons (bool show); bool isFullScreen () const; int statusBarHeight () const; KDE_NO_EXPORT bool editMode () const { return m_edit_mode; } - bool setPicture (const QString & path); - KDE_NO_EXPORT QPixmap * image () const { return m_image; } + bool setPicture (const TQString & path); + KDE_NO_EXPORT TQPixmap * image () const { return m_image; } void setNoInfoMessages (bool b) { m_no_info = b; } void setViewOnly (); void setInfoPanelOnly (); void setPlaylistOnly (); void setEditMode (RootPlayListItem *, bool enable=true); - void dragEnterEvent (QDragEnterEvent *); - void dropEvent (QDropEvent *); + void dragEnterEvent (TQDragEnterEvent *); + void dropEvent (TQDropEvent *); KDE_NO_EXPORT void emitPictureClicked () { emit pictureClicked (); } /* raise video widget, might (auto) hides panel */ void videoStart (); @@ -152,16 +153,16 @@ public slots: void updateLayout (); void toggleShowPlaylist (); void toggleVideoConsoleWindow (); - void setInfoMessage (const QString & msg); - void setStatusMessage (const QString & msg); + void setInfoMessage (const TQString & msg); + void setStatusMessage (const TQString & msg); signals: void urlDropped (const KURL::List & urls); void pictureClicked (); void fullScreenChanged (); void windowVideoConsoleToggled (int wt); protected: - void leaveEvent (QEvent *) KDE_NO_EXPORT; - void timerEvent (QTimerEvent *) KDE_NO_EXPORT; + void leaveEvent (TQEvent *) KDE_NO_EXPORT; + void timerEvent (TQTimerEvent *) KDE_NO_EXPORT; bool x11Event (XEvent *) KDE_NO_EXPORT; private: // widget for player's output @@ -169,24 +170,24 @@ private: // console output TextEdit * m_multiedit; // widget stack contains m_viewer, m_multiedit and m_picturewidget - QWidgetStack * m_widgetstack; - // widget that layouts m_widgetstack for ratio setting and m_control_panel + TQWidgetStack * m_widgetstack; + // widget that tqlayouts m_widgetstack for ratio setting and m_control_panel ViewArea * m_view_area; // playlist widget PlayListView * m_playlist; // infopanel widget InfoWindow * m_infopanel; // all widget types - QWidget * m_widgettypes [WT_Last]; + TQWidget * m_widgettypes [WT_Last]; KDockArea * m_dockarea; KDockWidget * m_dock_video; KDockWidget * m_dock_playlist; KDockWidget * m_dock_infopanel; - QString tmplog; - QPixmap * m_image; + TQString tmplog; + TQPixmap * m_image; ControlPanel * m_control_panel; StatusBar * m_status_bar; - QSlider * m_volume_slider; + TQSlider * m_volume_slider; const char * m_mixer_object; ControlPanelMode m_controlpanel_mode; ControlPanelMode m_old_controlpanel_mode; @@ -209,8 +210,9 @@ private: */ class KMPLAYER_EXPORT Viewer : public QXEmbed { Q_OBJECT + TQ_OBJECT public: - Viewer(QWidget *parent, View * view); + Viewer(TQWidget *tqparent, View * view); ~Viewer(); int heightForWidth (int w) const; @@ -218,18 +220,18 @@ public: void setAspect (float a); float aspect () { return m_aspect; } void sendKeyEvent (int key); - void setBackgroundColor (const QColor & c); + void setBackgroundColor (const TQColor & c); void resetBackgroundColor (); - void setCurrentBackgroundColor (const QColor & c); + void setCurrentBackgroundColor (const TQColor & c); KDE_NO_EXPORT View * view () const { return m_view; } void changeProtocol (QXEmbed::Protocol p); public slots: void sendConfigureEvent (); protected: - void dragEnterEvent (QDragEnterEvent *); - void dropEvent (QDropEvent *); - void mouseMoveEvent (QMouseEvent * e); - void contextMenuEvent (QContextMenuEvent * e); + void dragEnterEvent (TQDragEnterEvent *); + void dropEvent (TQDropEvent *); + void mouseMoveEvent (TQMouseEvent * e); + void contextMenuEvent (TQContextMenuEvent * e); virtual void windowChanged( WId w ); private: WId m_plain_window; diff --git a/src/main.cpp b/src/main.cpp index c10df5b..ab5b033 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -23,8 +23,8 @@ email : #include #include -#include -#include +#include +#include #include "kmplayer.h" @@ -54,7 +54,7 @@ extern "C" { KMPlayer::StringPool::init(); KApplication app; - QGuardedPtr kmplayer; + TQGuardedPtr kmplayer; if (app.isRestored ()) { RESTORE (KMPlayerApp); @@ -70,8 +70,8 @@ extern "C" { if (args->count () > 1) for (int i = 0; i < args->count (); i++) { KURL url = args->url (i); - if (url.url ().find ("://") < 0) - url = KURL (QFileInfo (url.url ()).absFilePath ()); + if (url.url ().tqfind ("://") < 0) + url = KURL (TQFileInfo (url.url ()).absFilePath ()); if (url.isValid ()) kmplayer->addURL (url); } diff --git a/src/npplayer.c b/src/npplayer.c index e7f67bb..bb0dbd3 100644 --- a/src/npplayer.c +++ b/src/npplayer.c @@ -58,7 +58,7 @@ static gchar *callback_path; static GModule *library; static GtkWidget *xembed; static Window socket_id; -static Window parent_id; +static Window tqparent_id; static int top_w, top_h; static int update_dimension_timer; static int stdin_read_watch; @@ -94,7 +94,7 @@ typedef struct _StreamInfo { struct JsObject; typedef struct _JsObject { NPObject npobject; - struct _JsObject * parent; + struct _JsObject * tqparent; char * name; } JsObject; @@ -249,15 +249,15 @@ static StreamInfo *addStream (const char *url, const char *mime, const char *tar static void createJsName (JsObject * obj, char **name, uint32_t * len) { int slen = strlen (obj->name); - if (obj->parent) { + if (obj->tqparent) { *len += slen + 1; - createJsName (obj->parent, name, len); + createJsName (obj->tqparent, name, len); } else { *name = (char *) malloc (*len + slen + 1); *(*name + *len + slen) = 0; *len = 0; } - if (obj->parent) { + if (obj->tqparent) { *(*name + *len) = '.'; *len += 1; } @@ -379,9 +379,9 @@ static NPError nsDestroyStream (NPP instance, NPStream *stream, NPError reason) return NPERR_NO_DATA; } -static void nsStatus (NPP instance, const char* message) { +static void nstqStatus (NPP instance, const char* message) { (void)instance; - print ("NPN_Status %s\n", message ? message : "-"); + print ("NPN_tqStatus %s\n", message ? message : "-"); } static const char* nsUserAgent (NPP instance) { @@ -687,8 +687,8 @@ static NPObject * windowClassAllocate (NPP instance, NPClass *aClass) { static void windowClassDeallocate (NPObject *npobj) { JsObject *jo = (JsObject *) npobj; /*print ("windowClassDeallocate\n");*/ - if (jo->parent) { - nsReleaseObject ((NPObject *) jo->parent); + if (jo->tqparent) { + nsReleaseObject ((NPObject *) jo->tqparent); } else if (jo->name && !strncmp (jo->name, "this.__kmplayer__obj_", 21)) { char *script = (char *) malloc (strlen (jo->name) + 7); char *result; @@ -793,7 +793,7 @@ static bool windowClassGetProperty (NPObject *npobj, NPIdentifier property, } jo.name = id; - jo.parent = (JsObject *) npobj; + jo.tqparent = (JsObject *) npobj; createJsName (&jo, (char **)&fullname.utf8characters, &fullname.utf8length); res = nsEvaluate (npp, npobj, &fullname, result); @@ -814,7 +814,7 @@ static bool windowClassSetProperty (NPObject *npobj, NPIdentifier property, return false; jo.name = id; - jo.parent = (JsObject *) npobj; + jo.tqparent = (JsObject *) npobj; createJsName (&jo, &var_name, &len); var_val = nsVariant2Str (value); @@ -966,7 +966,7 @@ static int initPlugin (const char *plugin_lib) { ns_funcs.newstream = nsNewStream; ns_funcs.write = nsWrite; ns_funcs.destroystream = nsDestroyStream; - ns_funcs.status = nsStatus; + ns_funcs.status = nstqStatus; ns_funcs.uagent = nsUserAgent; ns_funcs.memalloc = nsAlloc; ns_funcs.memfree = nsMemFree; @@ -1354,19 +1354,19 @@ static void windowCreatedEvent (GtkWidget *w, gpointer d) { (void)d; print ("windowCreatedEvent\n"); socket_id = gtk_socket_get_id (GTK_SOCKET (xembed)); - if (parent_id) { + if (tqparent_id) { print ("windowCreatedEvent %p\n", GTK_PLUG (w)->socket_window); if (!GTK_PLUG (w)->socket_window) - gtk_plug_construct (GTK_PLUG (w), parent_id); + gtk_plug_construct (GTK_PLUG (w), tqparent_id); gdk_window_reparent( w->window, GTK_PLUG (w)->socket_window ? GTK_PLUG (w)->socket_window - : gdk_window_foreign_new (parent_id), + : gdk_window_foreign_new (tqparent_id), 0, 0); gtk_widget_show_all (w); - /*XReparentWindow (gdk_x11_drawable_get_xdisplay (w->window), + /*XRetqparentWindow (gdk_x11_drawable_get_xdisplay (w->window), gdk_x11_drawable_get_xid (w->window), - parent_id, + tqparent_id, 0, 0);*/ } if (!callback_service) { @@ -1425,7 +1425,7 @@ static gboolean initPlayer (void * p) { (void)p; window = callback_service - ? gtk_plug_new (parent_id) + ? gtk_plug_new (tqparent_id) : gtk_window_new (GTK_WINDOW_TOPLEVEL); g_signal_connect (G_OBJECT (window), "delete_event", G_CALLBACK (windowCloseEvent), NULL); @@ -1446,7 +1446,7 @@ static gboolean initPlayer (void * p) { gtk_container_add (GTK_CONTAINER (window), xembed); - if (!parent_id) { + if (!tqparent_id) { gtk_widget_set_size_request (window, 440, 330); gtk_widget_show_all (window); } else { @@ -1518,7 +1518,7 @@ int main (int argc, char **argv) { } else if (!strcmp (argv[i], "-m") && ++i < argc) { mimetype = g_strdup (argv[i]); } else if (!strcmp (argv [i], "-wid") && ++i < argc) { - parent_id = strtol (argv[i], 0L, 10); + tqparent_id = strtol (argv[i], 0L, 10); } else object_url = g_strdup (argv[i]); } diff --git a/src/playlistview.cpp b/src/playlistview.cpp index a7d5503..c13cb54 100644 --- a/src/playlistview.cpp +++ b/src/playlistview.cpp @@ -19,17 +19,17 @@ #include #include -// include files for Qt -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +// include files for TQt +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -48,12 +48,12 @@ using namespace KMPlayer; namespace KMPlayer { - KDE_NO_EXPORT bool isDragValid (QDropEvent * de) { + KDE_NO_EXPORT bool isDragValid (TQDropEvent * de) { if (KURLDrag::canDecode (de)) return true; - if (QTextDrag::canDecode (de)) { - QString text; - if (QTextDrag::decode (de, text) && KURL (text).isValid ()) + if (TQTextDrag::canDecode (de)) { + TQString text; + if (TQTextDrag::decode (de, text) && KURL (text).isValid ()) return true; } return false; @@ -62,59 +62,59 @@ namespace KMPlayer { //----------------------------------------------------------------------------- -KDE_NO_CDTOR_EXPORT PlayListItem::PlayListItem (QListViewItem *p, const NodePtr & e, PlayListView * lv) : QListViewItem (p), node (e), listview (lv) {} +KDE_NO_CDTOR_EXPORT PlayListItem::PlayListItem (TQListViewItem *p, const NodePtr & e, PlayListView * lv) : TQListViewItem (p), node (e), listview (lv) {} -KDE_NO_CDTOR_EXPORT PlayListItem::PlayListItem (QListViewItem *p, const AttributePtr & a, PlayListView * lv) : QListViewItem (p), m_attr (a), listview (lv) {} +KDE_NO_CDTOR_EXPORT PlayListItem::PlayListItem (TQListViewItem *p, const AttributePtr & a, PlayListView * lv) : TQListViewItem (p), m_attr (a), listview (lv) {} KDE_NO_CDTOR_EXPORT -PlayListItem::PlayListItem (PlayListView *v, const NodePtr &e, QListViewItem *b) - : QListViewItem (v, b), node (e), listview (v) {} +PlayListItem::PlayListItem (PlayListView *v, const NodePtr &e, TQListViewItem *b) + : TQListViewItem (v, b), node (e), listview (v) {} -KDE_NO_CDTOR_EXPORT void PlayListItem::paintCell (QPainter * p, const QColorGroup & cg, int column, int width, int align) { +KDE_NO_CDTOR_EXPORT void PlayListItem::paintCell (TQPainter * p, const TQColorGroup & cg, int column, int width, int align) { if (node && node->state == Node::state_began) { - QColorGroup mycg (cg); - mycg.setColor (QColorGroup::Foreground, listview->activeColor ()); - mycg.setColor (QColorGroup::Text, listview->activeColor ()); - QListViewItem::paintCell (p, mycg, column, width, align); + TQColorGroup mycg (cg); + mycg.setColor (TQColorGroup::Foreground, listview->activeColor ()); + mycg.setColor (TQColorGroup::Text, listview->activeColor ()); + TQListViewItem::paintCell (p, mycg, column, width, align); } else - QListViewItem::paintCell (p, cg, column, width, align); + TQListViewItem::paintCell (p, cg, column, width, align); } -KDE_NO_CDTOR_EXPORT void PlayListItem::paintBranches (QPainter * p, const QColorGroup &, int w, int, int h) { +KDE_NO_CDTOR_EXPORT void PlayListItem::paintBranches (TQPainter * p, const TQColorGroup &, int w, int, int h) { p->fillRect (0, 0, w, h, listview->paletteBackgroundColor()); } //----------------------------------------------------------------------------- KDE_NO_CDTOR_EXPORT -RootPlayListItem::RootPlayListItem (int _id, PlayListView *v, const NodePtr & e, QListViewItem * before, int flgs) +RootPlayListItem::RootPlayListItem (int _id, PlayListView *v, const NodePtr & e, TQListViewItem * before, int flgs) : PlayListItem (v, e, before), id (_id), flags (flgs), show_all_nodes (false), have_dark_nodes (false) {} -KDE_NO_CDTOR_EXPORT void RootPlayListItem::paintCell (QPainter * p, const QColorGroup & cg, int column, int width, int align) { - QColorGroup mycg (cg); - mycg.setColor (QColorGroup::Base, listview->topLevelWidget()->paletteBackgroundColor()); - mycg.setColor (QColorGroup::Highlight, mycg.base ()); - mycg.setColor (QColorGroup::Text, listview->topLevelWidget()->paletteForegroundColor()); - mycg.setColor (QColorGroup::HighlightedText, mycg.text ()); - QListViewItem::paintCell (p, mycg, column, width, align); +KDE_NO_CDTOR_EXPORT void RootPlayListItem::paintCell (TQPainter * p, const TQColorGroup & cg, int column, int width, int align) { + TQColorGroup mycg (cg); + mycg.setColor (TQColorGroup::Base, listview->tqtopLevelWidget()->paletteBackgroundColor()); + mycg.setColor (TQColorGroup::Highlight, mycg.base ()); + mycg.setColor (TQColorGroup::Text, listview->tqtopLevelWidget()->paletteForegroundColor()); + mycg.setColor (TQColorGroup::HighlightedText, mycg.text ()); + TQListViewItem::paintCell (p, mycg, column, width, align); qDrawShadeRect (p, 0, 0, width -1, height () -1, mycg, !isOpen ()); } //----------------------------------------------------------------------------- -KDE_NO_CDTOR_EXPORT PlayListView::PlayListView (QWidget * parent, View * view, KActionCollection * ac) - : KListView (parent, "kde_kmplayer_playlist"), +KDE_NO_CDTOR_EXPORT PlayListView::PlayListView (TQWidget * tqparent, View * view, KActionCollection * ac) + : KListView (tqparent, "kde_kmplayer_playlist"), m_view (view), m_find_dialog (0L), m_active_color (30, 0, 255), last_id (0), last_drag_tree_id (0), m_ignore_expanded (false) { - addColumn (QString ()); + addColumn (TQString ()); header()->hide (); //setRootIsDecorated (true); setSorting (-1); @@ -122,36 +122,36 @@ KDE_NO_CDTOR_EXPORT PlayListView::PlayListView (QWidget * parent, View * view, K setDropVisualizer (true); setItemsRenameable (true); setItemMargin (2); - setPaletteBackgroundColor (QColor (0, 0, 0)); - setPaletteForegroundColor (QColor (0xB2, 0xB2, 0xB2)); - m_itemmenu = new QPopupMenu (this); - folder_pix = KGlobal::iconLoader ()->loadIcon (QString ("folder"), KIcon::Small); - auxiliary_pix = KGlobal::iconLoader ()->loadIcon (QString ("folder_grey"), KIcon::Small); - video_pix = KGlobal::iconLoader ()->loadIcon (QString ("video"), KIcon::Small); - info_pix = KGlobal::iconLoader ()->loadIcon (QString ("messagebox_info"), KIcon::Small); - img_pix = KGlobal::iconLoader ()->loadIcon (QString ("colorize"), KIcon::Small); - unknown_pix = KGlobal::iconLoader ()->loadIcon (QString ("unknown"), KIcon::Small); - menu_pix = KGlobal::iconLoader ()->loadIcon (QString ("player_playlist"), KIcon::Small); - config_pix = KGlobal::iconLoader ()->loadIcon (QString ("configure"), KIcon::Small); - url_pix = KGlobal::iconLoader ()->loadIcon (QString ("www"), KIcon::Small); - m_find = KStdAction::find (this, SLOT (slotFind ()), ac, "find"); - m_find_next = KStdAction::findNext (this, SLOT(slotFindNext()), ac, "next"); + setPaletteBackgroundColor (TQColor (0, 0, 0)); + setPaletteForegroundColor (TQColor (0xB2, 0xB2, 0xB2)); + m_itemmenu = new TQPopupMenu (this); + folder_pix = KGlobal::iconLoader ()->loadIcon (TQString ("folder"), KIcon::Small); + auxiliary_pix = KGlobal::iconLoader ()->loadIcon (TQString ("folder_grey"), KIcon::Small); + video_pix = KGlobal::iconLoader ()->loadIcon (TQString ("video"), KIcon::Small); + info_pix = KGlobal::iconLoader ()->loadIcon (TQString ("messagebox_info"), KIcon::Small); + img_pix = KGlobal::iconLoader ()->loadIcon (TQString ("colorize"), KIcon::Small); + unknown_pix = KGlobal::iconLoader ()->loadIcon (TQString ("unknown"), KIcon::Small); + menu_pix = KGlobal::iconLoader ()->loadIcon (TQString ("player_playlist"), KIcon::Small); + config_pix = KGlobal::iconLoader ()->loadIcon (TQString ("configure"), KIcon::Small); + url_pix = KGlobal::iconLoader ()->loadIcon (TQString ("www"), KIcon::Small); + m_tqfind = KStdAction::find (TQT_TQOBJECT(this), TQT_SLOT (slotFind ()), ac, "tqfind"); + m_find_next = KStdAction::findNext (TQT_TQOBJECT(this), TQT_SLOT(slotFindNext()), ac, "next"); m_find_next->setEnabled (false); - connect (this, SIGNAL (contextMenuRequested (QListViewItem *, const QPoint &, int)), this, SLOT (contextMenuItem (QListViewItem *, const QPoint &, int))); - connect (this, SIGNAL (expanded (QListViewItem *)), - this, SLOT (itemExpanded (QListViewItem *))); - connect (this, SIGNAL (dropped (QDropEvent *, QListViewItem *)), - this, SLOT (itemDropped (QDropEvent *, QListViewItem *))); - connect (this, SIGNAL (itemRenamed (QListViewItem *)), - this, SLOT (itemIsRenamed (QListViewItem *))); - connect (this, SIGNAL (selectionChanged (QListViewItem *)), - this, SLOT (itemIsSelected (QListViewItem *))); + connect (this, TQT_SIGNAL (contextMenuRequested (TQListViewItem *, const TQPoint &, int)), this, TQT_SLOT (contextMenuItem (TQListViewItem *, const TQPoint &, int))); + connect (this, TQT_SIGNAL (expanded (TQListViewItem *)), + this, TQT_SLOT (itemExpanded (TQListViewItem *))); + connect (this, TQT_SIGNAL (dropped (TQDropEvent *, TQListViewItem *)), + this, TQT_SLOT (itemDropped (TQDropEvent *, TQListViewItem *))); + connect (this, TQT_SIGNAL (itemRenamed (TQListViewItem *)), + this, TQT_SLOT (itemIsRenamed (TQListViewItem *))); + connect (this, TQT_SIGNAL (selectionChanged (TQListViewItem *)), + this, TQT_SLOT (itemIsSelected (TQListViewItem *))); } KDE_NO_CDTOR_EXPORT PlayListView::~PlayListView () { } -int PlayListView::addTree (NodePtr root, const QString & source, const QString & icon, int flags) { +int PlayListView::addTree (NodePtr root, const TQString & source, const TQString & icon, int flags) { //kdDebug () << "addTree " << source << " " << root->mrl()->src << endl; RootPlayListItem * ritem = new RootPlayListItem (++last_id, this, root, lastChild(), flags); ritem->source = source; @@ -173,7 +173,7 @@ KDE_NO_EXPORT PlayListItem * PlayListView::populate } PlayListItem * item = pitem ? new PlayListItem (pitem, e, this) : root; Mrl * mrl = e->mrl (); - QString text (e->nodeName()); + TQString text (e->nodeName()); if (mrl && !root->show_all_nodes) { if (mrl->pretty_name.isEmpty ()) { if (!mrl->src.isEmpty()) @@ -201,7 +201,7 @@ KDE_NO_EXPORT PlayListItem * PlayListView::populate as->setPixmap (0, menu_pix); for (; a; a = a->nextSibling ()) { PlayListItem * ai = new PlayListItem (as, a, this); - ai->setText (0, QString ("%1=%2").arg ( + ai->setText (0, TQString ("%1=%2").arg ( a->name ().toString ()).arg (a->value ())); ai->setPixmap (0, config_pix); } @@ -210,7 +210,7 @@ KDE_NO_EXPORT PlayListItem * PlayListView::populate } if (item != root) { Node::PlayType pt = e->playType (); - QPixmap * pix; + TQPixmap * pix; switch (pt) { case Node::play_type_image: pix = &img_pix; @@ -238,7 +238,7 @@ void PlayListView::updateTree (int id, NodePtr root, NodePtr active, bool select, bool open) { // TODO, if root is same as rootitems->node and treeversion is the same // and show all nodes is unchanged then only update the cells - QWidget * w = focusWidget (); + TQWidget * w = tqfocusWidget (); if (w && w != this) w->clearFocus (); //setSelected (firstChild (), true); @@ -251,7 +251,7 @@ void PlayListView::updateTree (int id, NodePtr root, NodePtr active, break; // found based on id } if (id == -1) { // wildcard id - for (NodePtr n = root; n; n = n->parentNode ()) + for (NodePtr n = root; n; n = n->tqparentNode ()) if (n == ritem->node) { root = n; break; @@ -277,7 +277,7 @@ void PlayListView::updateTree (int id, NodePtr root, NodePtr active, bool need_timer = !tree_update; tree_update = new TreeUpdate (ritem, active, select, open, tree_update); if (need_timer) - QTimer::singleShot (0, this, SLOT (updateTrees ())); + TQTimer::singleShot (0, this, TQT_SLOT (updateTrees ())); } KDE_NO_EXPORT void PlayListView::updateTrees () { @@ -308,23 +308,23 @@ void PlayListView::updateTree (RootPlayListItem * ritem, NodePtr active, bool se m_ignore_expanded = false; } -void PlayListView::selectItem (const QString & txt) { - QListViewItem * item = selectedItem (); +void PlayListView::selectItem (const TQString & txt) { + TQListViewItem * item = selectedItem (); if (item && item->text (0) == txt) return; - item = findItem (txt, 0); + item = tqfindItem (txt, 0); if (item) { setSelected (item, true); ensureItemVisible (item); } } -KDE_NO_EXPORT QDragObject * PlayListView::dragObject () { +KDE_NO_EXPORT TQDragObject * PlayListView::dragObject () { PlayListItem * item = static_cast (selectedItem ()); if (item && item->node) { - QString txt = item->node->isPlayable () + TQString txt = item->node->isPlayable () ? item->node->mrl ()->src : item->node->outerXML (); - QTextDrag * drag = new QTextDrag (txt, this); + TQTextDrag * drag = new TQTextDrag (txt, this); last_drag_tree_id = rootItem (item)->id; m_last_drag = item->node; drag->setPixmap (*item->pixmap (0)); @@ -335,40 +335,40 @@ KDE_NO_EXPORT QDragObject * PlayListView::dragObject () { return 0; } -KDE_NO_EXPORT void PlayListView::setFont (const QFont & fnt) { - setTreeStepSize (QFontMetrics (fnt).boundingRect ('m').width ()); +KDE_NO_EXPORT void PlayListView::setFont (const TQFont & fnt) { + setTreeStepSize (TQFontMetrics (fnt).boundingRect ('m').width ()); KListView::setFont (fnt); } -KDE_NO_EXPORT void PlayListView::contextMenuItem (QListViewItem * vi, const QPoint & p, int) { +KDE_NO_EXPORT void PlayListView::contextMenuItem (TQListViewItem * vi, const TQPoint & p, int) { if (vi) { PlayListItem * item = static_cast (vi); if (item->node || item->m_attr) { RootPlayListItem * ritem = rootItem (vi); if (m_itemmenu->count () > 0) { - m_find->unplug (m_itemmenu); + m_tqfind->unplug (m_itemmenu); m_find_next->unplug (m_itemmenu); m_itemmenu->clear (); } m_itemmenu->insertItem (KGlobal::iconLoader ()->loadIconSet - (QString ("editcopy"), KIcon::Small, 0, true), + (TQString ("editcopy"), KIcon::Small, 0, true), i18n ("&Copy to Clipboard"), - this, SLOT (copyToClipboard ()), 0, 0); + this, TQT_SLOT (copyToClipboard ()), 0, 0); if (item->m_attr || (item->node && (item->node->isPlayable () || item->node->isDocument ()) && item->node->mrl ()->bookmarkable)) m_itemmenu->insertItem (KGlobal::iconLoader ()->loadIconSet - (QString ("bookmark_add"), KIcon::Small, 0, true), + (TQString ("bookmark_add"), KIcon::Small, 0, true), i18n ("&Add Bookmark"), - this, SLOT (addBookMark ()), 0, 1); + this, TQT_SLOT (addBookMark ()), 0, 1); if (ritem->have_dark_nodes) { m_itemmenu->insertItem (i18n ("&Show all"), - this, SLOT (toggleShowAllNodes ()), 0, 2); + this, TQT_SLOT (toggleShowAllNodes ()), 0, 2); m_itemmenu->setItemChecked (2, ritem->show_all_nodes); } m_itemmenu->insertSeparator (); - m_find->plug (m_itemmenu); + m_tqfind->plug (m_itemmenu); m_find_next->plug (m_itemmenu); emit prepareMenu (item, m_itemmenu); m_itemmenu->exec (p); @@ -377,7 +377,7 @@ KDE_NO_EXPORT void PlayListView::contextMenuItem (QListViewItem * vi, const QPoi m_view->controlPanel ()->popupMenu ()->exec (p); } -void PlayListView::itemExpanded (QListViewItem * item) { +void PlayListView::itemExpanded (TQListViewItem * item) { if (!m_ignore_expanded && item->childCount () == 1) { PlayListItem * child_item = static_cast(item->firstChild ()); child_item->setOpen (rootItem (item)->show_all_nodes || @@ -385,11 +385,11 @@ void PlayListView::itemExpanded (QListViewItem * item) { } } -RootPlayListItem * PlayListView::rootItem (QListViewItem * item) const { +RootPlayListItem * PlayListView::rootItem (TQListViewItem * item) const { if (!item) return 0L; - while (item->parent ()) - item = item->parent (); + while (item->tqparent ()) + item = item->tqparent (); return static_cast (item); } @@ -404,20 +404,20 @@ RootPlayListItem * PlayListView::rootItem (int id) const { void PlayListView::copyToClipboard () { PlayListItem * item = currentPlayListItem (); - QString text = item->text (0); + TQString text = item->text (0); if (item->node) { Mrl * mrl = item->node->mrl (); if (mrl && !mrl->src.isEmpty ()) text = mrl->src; } - QApplication::clipboard()->setText (text); + TQApplication::tqclipboard()->setText (text); } void PlayListView::addBookMark () { PlayListItem * item = currentPlayListItem (); if (item->node) { Mrl * mrl = item->node->mrl (); - KURL url (mrl ? mrl->src : QString (item->node->nodeName ())); + KURL url (mrl ? mrl->src : TQString (item->node->nodeName ())); emit addBookMark (mrl->pretty_name.isEmpty () ? url.prettyURL () : mrl->pretty_name, url.url ()); } } @@ -445,8 +445,8 @@ KDE_NO_EXPORT void PlayListView::showAllNodes(RootPlayListItem *ri, bool show) { } } -KDE_NO_EXPORT bool PlayListView::acceptDrag (QDropEvent * de) const { - QListViewItem * item = itemAt (contentsToViewport (de->pos ())); +KDE_NO_EXPORT bool PlayListView::acceptDrag (TQDropEvent * de) const { + TQListViewItem * item = itemAt (contentsToViewport (de->pos ())); if (item && (de->source () == this || isDragValid (de))) { RootPlayListItem * ritem = rootItem (item); return ritem->flags & AllowDrops; @@ -454,11 +454,11 @@ KDE_NO_EXPORT bool PlayListView::acceptDrag (QDropEvent * de) const { return false; } -KDE_NO_EXPORT void PlayListView::itemDropped (QDropEvent * de, QListViewItem *after) { +KDE_NO_EXPORT void PlayListView::itemDropped (TQDropEvent * de, TQListViewItem *after) { if (!after) { // could still be a descendent after = itemAt (contentsToViewport (de->pos ())); if (after) - after = after->parent (); + after = after->tqparent (); } if (after) { RootPlayListItem * ritem = rootItem (after); @@ -469,9 +469,9 @@ KDE_NO_EXPORT void PlayListView::itemDropped (QDropEvent * de, QListViewItem *af KURL::List sl; if (KURLDrag::canDecode (de)) { KURLDrag::decode (de, sl); - } else if (QTextDrag::canDecode (de)) { - QString text; - QTextDrag::decode (de, text); + } else if (TQTextDrag::canDecode (de)) { + TQString text; + TQTextDrag::decode (de, text); sl.push_back (KURL (text)); } if (valid && sl.size () > 0) { @@ -482,7 +482,7 @@ KDE_NO_EXPORT void PlayListView::itemDropped (QDropEvent * de, QListViewItem *af if (as_child) n->insertBefore (ni, n->firstChild ()); else - n->parentNode ()->insertBefore (ni, n->nextSibling ()); + n->tqparentNode ()->insertBefore (ni, n->nextSibling ()); } PlayListItem * citem = currentPlayListItem (); NodePtr cn; @@ -494,7 +494,7 @@ KDE_NO_EXPORT void PlayListView::itemDropped (QDropEvent * de, QListViewItem *af m_view->dropEvent (de); } -KDE_NO_EXPORT void PlayListView::itemIsRenamed (QListViewItem * qitem) { +KDE_NO_EXPORT void PlayListView::itemIsRenamed (TQListViewItem * qitem) { PlayListItem * item = static_cast (qitem); if (item->node) { RootPlayListItem * ri = rootItem (qitem); @@ -505,30 +505,30 @@ KDE_NO_EXPORT void PlayListView::itemIsRenamed (QListViewItem * qitem) { } else // restore damage .. updateTree (ri, item->node, true); } else if (item->m_attr) { - QString txt = item->text (0); - int pos = txt.find (QChar ('=')); + TQString txt = item->text (0); + int pos = txt.tqfind (TQChar ('=')); if (pos > -1) { item->m_attr->setName (txt.left (pos)); item->m_attr->setValue (txt.mid (pos + 1)); } else { item->m_attr->setName (txt); - item->m_attr->setValue (QString ("")); + item->m_attr->setValue (TQString ("")); } - PlayListItem * pi = static_cast (item->parent ()); + PlayListItem * pi = static_cast (item->tqparent ()); if (pi && pi->node) pi->node->document ()->m_tree_version++; } } -KDE_NO_EXPORT void PlayListView::itemIsSelected (QListViewItem * qitem) { +KDE_NO_EXPORT void PlayListView::itemIsSelected (TQListViewItem * qitem) { RootPlayListItem * ri = rootItem (qitem); setItemsRenameable (ri && (ri->flags & TreeEdit) && ri != qitem); } -KDE_NO_EXPORT void PlayListView::rename (QListViewItem * qitem, int c) { +KDE_NO_EXPORT void PlayListView::rename (TQListViewItem * qitem, int c) { PlayListItem * item = static_cast (qitem); if (rootItem (qitem)->show_all_nodes && item && item->m_attr) { - PlayListItem * pi = static_cast (qitem->parent ()); + PlayListItem * pi = static_cast (qitem->tqparent ()); if (pi && pi->node && pi->node->isEditable ()) KListView::rename (item, c); } else if (item && item->node && item->node->isEditable ()) { @@ -542,7 +542,7 @@ KDE_NO_EXPORT void PlayListView::rename (QListViewItem * qitem, int c) { } KDE_NO_EXPORT void PlayListView::editCurrent () { - QListViewItem * qitem = selectedItem (); + TQListViewItem * qitem = selectedItem (); if (qitem) { RootPlayListItem * ri = rootItem (qitem); if (ri && (ri->flags & TreeEdit) && ri != qitem) @@ -553,24 +553,24 @@ KDE_NO_EXPORT void PlayListView::editCurrent () { KDE_NO_EXPORT void PlayListView::slotFind () { m_current_find_elm = 0L; if (!m_find_dialog) { - m_find_dialog = new KFindDialog (false, this, "kde_kmplayer_find", KFindDialog::CaseSensitive); + m_find_dialog = new KFindDialog (false, this, "kde_kmplayer_tqfind", KFindDialog::CaseSensitive); m_find_dialog->setHasSelection (false); - connect(m_find_dialog, SIGNAL(okClicked ()), this, SLOT(slotFindOk ())); + connect(m_find_dialog, TQT_SIGNAL(okClicked ()), this, TQT_SLOT(slotFindOk ())); } else - m_find_dialog->setPattern (QString ()); + m_find_dialog->setPattern (TQString ()); m_find_dialog->show (); } -static QListViewItem * findNodeInTree (NodePtr n, QListViewItem * item) { +static TQListViewItem * findNodeInTree (NodePtr n, TQListViewItem * item) { //kdDebug () << "item:" << item->text (0) << " n:" << (n ? n->nodeName () : "null" ) < (item); if (!n || !pi->node) return 0L; if (n == pi->node) return item; - for (QListViewItem * ci = item->firstChild(); ci; ci = ci->nextSibling ()) { + for (TQListViewItem * ci = item->firstChild(); ci; ci = ci->nextSibling ()) { //kdDebug () << "ci:" << ci->text (0) << " n:" << n->nodeName () <node; current_find_tree_id = rootItem (lvi)->id; } else if (lvi && lvi->m_attr) { - PlayListItem*pi=static_cast(currentItem()->parent()); + PlayListItem*pi=static_cast(currentItem()->tqparent()); if (pi) { m_current_find_attr = lvi->m_attr; m_current_find_elm = pi->node; @@ -607,17 +607,17 @@ KDE_NO_EXPORT void PlayListView::slotFindOk () { slotFindNext (); } -/* A bit tricky, but between the find's PlayListItems might be gone, so +/* A bit tricky, but between the tqfind's PlayListItems might be gone, so * try to match on the generated tree following the source's document tree */ KDE_NO_EXPORT void PlayListView::slotFindNext () { if (!m_find_dialog) return; - QString str = m_find_dialog->pattern(); + TQString str = m_find_dialog->pattern(); if (!m_current_find_elm || str.isEmpty ()) return; long opt = m_find_dialog->options (); - QRegExp regexp; + TQRegExp regexp; if (opt & KFindDialog::RegularExpression) regexp = str; bool cs = (opt & KFindDialog::CaseSensitive); @@ -627,7 +627,7 @@ KDE_NO_EXPORT void PlayListView::slotFindNext () { while (!found && n) { if (ri->show_all_nodes || n->expose ()) { bool elm = n->isElementNode (); - QString val = n->nodeName (); + TQString val = n->nodeName (); if (elm && !ri->show_all_nodes) { Mrl * mrl = n->mrl (); if (mrl) { @@ -640,19 +640,19 @@ KDE_NO_EXPORT void PlayListView::slotFindNext () { } else if (!elm) val = n->nodeValue (); if (((opt & KFindDialog::RegularExpression) && - val.find (regexp, 0) > -1) || + val.tqfind (regexp, 0) > -1) || (!(opt & KFindDialog::RegularExpression) && - val.find (str, 0, cs) > -1)) { + val.tqfind (str, 0, cs) > -1)) { node = n; m_current_find_attr = 0L; found = true; } else if (elm && ri->show_all_nodes) { for (AttributePtr a = convertNode (n)->attributes ()->first (); a; a = a->nextSibling ()) { - QString attr = a->name ().toString (); + TQString attr = a->name ().toString (); if (((opt & KFindDialog::RegularExpression) && - (attr.find (regexp, 0) || a->value ().find (regexp, 0) > -1)) || + (attr.tqfind (regexp, 0) || a->value ().tqfind (regexp, 0) > -1)) || (!(opt & KFindDialog::RegularExpression) && - (attr.find (str, 0, cs) > -1 || a->value ().find (str, 0, cs) > -1))) { + (attr.tqfind (str, 0, cs) > -1 || a->value ().tqfind (str, 0, cs) > -1))) { node = n; m_current_find_attr = a; found = true; @@ -668,7 +668,7 @@ KDE_NO_EXPORT void PlayListView::slotFindNext () { } else if (n->previousSibling ()) { n = n->previousSibling (); } else { - for (n = n->parentNode (); n; n = n->parentNode ()) + for (n = n->tqparentNode (); n; n = n->tqparentNode ()) if (n->previousSibling ()) { n = n->previousSibling (); break; @@ -685,7 +685,7 @@ KDE_NO_EXPORT void PlayListView::slotFindNext () { } else if (n->nextSibling ()) { n = n->nextSibling (); } else { - for (n = n->parentNode (); n; n = n->parentNode ()) + for (n = n->tqparentNode (); n; n = n->tqparentNode ()) if (n->nextSibling ()) { n = n->nextSibling (); break; @@ -703,7 +703,7 @@ KDE_NO_EXPORT void PlayListView::slotFindNext () { m_current_find_elm = n; kdDebug () << " search for " << str << "=" << (node ? node->nodeName () : "not found") << " next:" << (n ? n->nodeName () : " not found") << endl; if (found) { - QListViewItem * fc = findNodeInTree (node, ri); + TQListViewItem * fc = findNodeInTree (node, ri); if (!fc) { m_current_find_elm = 0L; kdDebug () << "node not found in tree tree:" << ri->id << endl; diff --git a/src/playlistview.h b/src/playlistview.h index c7dbcd8..559e090 100644 --- a/src/playlistview.h +++ b/src/playlistview.h @@ -27,30 +27,30 @@ #include "kmplayerplaylist.h" -class QFont; -class QPixmap; -class QPainter; -class QPopupMenu; -class QDropEvent; +class TQFont; +class TQPixmap; +class TQPainter; +class TQPopupMenu; +class TQDropEvent; namespace KMPlayer { class View; class PlayListView; -bool isDragValid (QDropEvent * de) KMPLAYER_NO_MBR_EXPORT; +bool isDragValid (TQDropEvent * de) KMPLAYER_NO_MBR_EXPORT; /* * An item in the playlist */ -class KMPLAYER_NO_EXPORT PlayListItem : public QListViewItem { +class KMPLAYER_NO_EXPORT PlayListItem : public TQListViewItem { public: - PlayListItem (QListViewItem *p, const NodePtr & e, PlayListView * lv); - PlayListItem (QListViewItem *p, const AttributePtr & e, PlayListView * lv); - PlayListItem (PlayListView *v, const NodePtr & d, QListViewItem * b); + PlayListItem (TQListViewItem *p, const NodePtr & e, PlayListView * lv); + PlayListItem (TQListViewItem *p, const AttributePtr & e, PlayListView * lv); + PlayListItem (PlayListView *v, const NodePtr & d, TQListViewItem * b); KDE_NO_CDTOR_EXPORT ~PlayListItem () {} - void paintCell (QPainter * p, const QColorGroup & cg, int column, int width, int align); - void paintBranches(QPainter *p, const QColorGroup &cg, int w, int y, int h); + void paintCell (TQPainter * p, const TQColorGroup & cg, int column, int width, int align); + void paintBranches(TQPainter *p, const TQColorGroup &cg, int w, int y, int h); PlayListView * playListView () const; NodePtrW node; AttributePtrW m_attr; @@ -61,11 +61,11 @@ protected: class KMPLAYER_NO_EXPORT RootPlayListItem : public PlayListItem { public: - RootPlayListItem (int id, PlayListView *v, const NodePtr & d, QListViewItem * b, int flags); + RootPlayListItem (int id, PlayListView *v, const NodePtr & d, TQListViewItem * b, int flags); KDE_NO_CDTOR_EXPORT ~RootPlayListItem () {} - void paintCell (QPainter * p, const QColorGroup & cg, int column, int width, int align); - QString source; - QString icon; + void paintCell (TQPainter * p, const TQColorGroup & cg, int column, int width, int align); + TQString source; + TQString icon; int id; int flags; bool show_all_nodes; @@ -77,45 +77,46 @@ public: */ class KMPLAYER_EXPORT PlayListView : public KListView { Q_OBJECT + TQ_OBJECT public: enum Flags { AllowDrops = 0x01, AllowDrag = 0x02, InPlaceEdit = 0x04, TreeEdit = 0x08, Moveable = 0x10, Deleteable = 0x20 }; - PlayListView (QWidget * parent, View * view, KActionCollection * ac); + PlayListView (TQWidget * tqparent, View * view, KActionCollection * ac); ~PlayListView (); - void selectItem (const QString & txt); + void selectItem (const TQString & txt); void showAllNodes (RootPlayListItem *, bool show=true); - void setActiveForegroundColor (const QColor & c) { m_active_color = c; } - const QColor & activeColor () const { return m_active_color; } - int addTree (NodePtr r, const QString & src, const QString & ico, int flgs); - RootPlayListItem * rootItem (QListViewItem * item) const; + void setActiveForegroundColor (const TQColor & c) { m_active_color = c; } + const TQColor & activeColor () const { return m_active_color; } + int addTree (NodePtr r, const TQString & src, const TQString & ico, int flgs); + RootPlayListItem * rootItem (TQListViewItem * item) const; RootPlayListItem * rootItem (int id) const; - void setFont (const QFont &); + void setFont (const TQFont &); PlayListItem * currentPlayListItem () const; PlayListItem * selectedPlayListItem () const; NodePtr lastDragNode () const { return m_last_drag; } int lastDragTreeId () const { return last_drag_tree_id; } signals: - void addBookMark (const QString & title, const QString & url); - void prepareMenu (KMPlayer::PlayListItem * item, QPopupMenu * menu); + void addBookMark (const TQString & title, const TQString & url); + void prepareMenu (KMPlayer::PlayListItem * item, TQPopupMenu * menu); protected: - bool acceptDrag (QDropEvent* event) const; - QDragObject * dragObject (); + bool acceptDrag (TQDropEvent* event) const; + TQDragObject * dragObject (); public slots: void editCurrent (); - void rename (QListViewItem * item, int c); + void rename (TQListViewItem * item, int c); void updateTree (int id, NodePtr root, NodePtr active, bool sel, bool open); private slots: - void contextMenuItem (QListViewItem *, const QPoint &, int); - void itemExpanded (QListViewItem *); + void contextMenuItem (TQListViewItem *, const TQPoint &, int); + void itemExpanded (TQListViewItem *); void copyToClipboard (); void addBookMark (); void toggleShowAllNodes (); - void itemDropped (QDropEvent * e, QListViewItem * after); - void itemIsRenamed (QListViewItem * item); - void itemIsSelected (QListViewItem * item); + void itemDropped (TQDropEvent * e, TQListViewItem * after); + void itemIsRenamed (TQListViewItem * item); + void itemIsSelected (TQListViewItem * item); void updateTrees (); void slotFind (); void slotFindOk (); @@ -134,20 +135,20 @@ private: }; SharedPtr tree_update; View * m_view; - QPopupMenu * m_itemmenu; - KAction * m_find; + TQPopupMenu * m_itemmenu; + KAction * m_tqfind; KAction * m_find_next; KFindDialog * m_find_dialog; - QPixmap folder_pix; - QPixmap auxiliary_pix; - QPixmap video_pix; - QPixmap unknown_pix; - QPixmap menu_pix; - QPixmap config_pix; - QPixmap url_pix; - QPixmap info_pix; - QPixmap img_pix; - QColor m_active_color; + TQPixmap folder_pix; + TQPixmap auxiliary_pix; + TQPixmap video_pix; + TQPixmap unknown_pix; + TQPixmap menu_pix; + TQPixmap config_pix; + TQPixmap url_pix; + TQPixmap info_pix; + TQPixmap img_pix; + TQColor m_active_color; NodePtrW m_current_find_elm; NodePtrW m_last_drag; AttributePtrW m_current_find_attr; diff --git a/src/pref.cpp b/src/pref.cpp index ff39751..670f4aa 100644 --- a/src/pref.cpp +++ b/src/pref.cpp @@ -23,24 +23,24 @@ #ifdef HAVE_CONFIG_H #include #endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -66,14 +66,14 @@ KDE_NO_CDTOR_EXPORT Preferences::Preferences(PartBase * player, Settings * setti : KDialogBase (IconList, i18n ("Preferences"), Help|Default|Ok|Apply|Cancel, Ok, player->view (), 0, false) { - QFrame *frame; - QTabWidget * tab; - QStringList hierarchy; // typo? :) - QVBoxLayout *vlay; - - frame = addPage(i18n("General Options"), QString(), KGlobal::iconLoader()->loadIcon (QString ("kmplayer"), KIcon::NoGroup, 32)); - vlay = new QVBoxLayout(frame, marginHint(), spacingHint()); - tab = new QTabWidget (frame); + TQFrame *frame; + TQTabWidget * tab; + TQStringList hierarchy; // typo? :) + TQVBoxLayout *vlay; + + frame = addPage(i18n("General Options"), TQString(), KGlobal::iconLoader()->loadIcon (TQString ("kmplayer"), KIcon::NoGroup, 32)); + vlay = new TQVBoxLayout(frame, marginHint(), spacingHint()); + tab = new TQTabWidget (frame); vlay->addWidget (tab); m_GeneralPageGeneral = new PrefGeneralPageGeneral (tab, settings); tab->insertTab (m_GeneralPageGeneral, i18n("General")); @@ -84,17 +84,17 @@ KDE_NO_CDTOR_EXPORT Preferences::Preferences(PartBase * player, Settings * setti tab->insertTab (m_GeneralPageOutput, i18n("Output")); entries.insert (i18n("General Options"), tab); - frame = addPage (i18n ("Source"), QString(), KGlobal::iconLoader()->loadIcon (QString ("source"), KIcon::NoGroup, 32)); - vlay = new QVBoxLayout (frame, marginHint(), spacingHint()); - tab = new QTabWidget (frame); + frame = addPage (i18n ("Source"), TQString(), KGlobal::iconLoader()->loadIcon (TQString ("source"), KIcon::NoGroup, 32)); + vlay = new TQVBoxLayout (frame, marginHint(), spacingHint()); + tab = new TQTabWidget (frame); vlay->addWidget (tab); m_SourcePageURL = new PrefSourcePageURL (tab); tab->insertTab (m_SourcePageURL, i18n ("URL")); entries.insert (i18n("Source"), tab); - frame = addPage (i18n ("Recording"), QString(), KGlobal::iconLoader()->loadIcon (QString ("video"), KIcon::NoGroup, 32)); - vlay = new QVBoxLayout (frame, marginHint(), spacingHint()); - tab = new QTabWidget (frame); + frame = addPage (i18n ("Recording"), TQString(), KGlobal::iconLoader()->loadIcon (TQString ("video"), KIcon::NoGroup, 32)); + vlay = new TQVBoxLayout (frame, marginHint(), spacingHint()); + tab = new TQTabWidget (frame); vlay->addWidget (tab); int recorders_count = 3; @@ -120,9 +120,9 @@ KDE_NO_CDTOR_EXPORT Preferences::Preferences(PartBase * player, Settings * setti tab->setCurrentPage (0); entries.insert (i18n("Recording"), tab); - frame = addPage (i18n ("Output Plugins"), QString(), KGlobal::iconLoader()->loadIcon (QString ("image"), KIcon::NoGroup, 32)); - vlay = new QVBoxLayout(frame, marginHint(), spacingHint()); - tab = new QTabWidget (frame); + frame = addPage (i18n ("Output Plugins"), TQString(), KGlobal::iconLoader()->loadIcon (TQString ("image"), KIcon::NoGroup, 32)); + vlay = new TQVBoxLayout(frame, marginHint(), spacingHint()); + tab = new TQTabWidget (frame); vlay->addWidget (tab); m_OPPagePostproc = new PrefOPPagePostProc (tab); tab->insertTab (m_OPPagePostproc, i18n ("Postprocessing")); @@ -132,37 +132,37 @@ KDE_NO_CDTOR_EXPORT Preferences::Preferences(PartBase * player, Settings * setti addPrefPage (p); - connect (this, SIGNAL (defaultClicked ()), SLOT (confirmDefaults ())); + connect (this, TQT_SIGNAL (defaultClicked ()), TQT_SLOT (confirmDefaults ())); } KDE_NO_EXPORT void Preferences::setPage (const char * name) { - QObject * o = child (name, "QFrame"); + TQObject * o = child (name, TQFRAME_OBJECT_NAME_STRING); if (!o) return; - QFrame * page = static_cast (o); - QWidget * w = page->parentWidget (); - while (w && !w->inherits ("QTabWidget")) - w = w->parentWidget (); + TQFrame * page = static_cast (TQT_TQWIDGET(o)); + TQWidget * w = page->tqparentWidget (); + while (w && !w->inherits (TQTABWIDGET_OBJECT_NAME_STRING)) + w = w->tqparentWidget (); if (!w) return; - QTabWidget * t = static_cast (w); + TQTabWidget * t = static_cast (w); t->setCurrentPage (t->indexOf(page)); - if (!t->parentWidget() || !t->parentWidget()->inherits ("QFrame")) + if (!t->tqparentWidget() || !t->tqparentWidget()->inherits (TQFRAME_OBJECT_NAME_STRING)) return; - showPage (pageIndex (t->parentWidget ())); + showPage (pageIndex (t->tqparentWidget ())); } KDE_NO_EXPORT void Preferences::addPrefPage (PreferencesPage * page) { - QString item, subitem, icon; - QFrame * frame; - QTabWidget * tab; - QVBoxLayout *vlay; + TQString item, subitem, icon; + TQFrame * frame; + TQTabWidget * tab; + TQVBoxLayout *vlay; page->prefLocation (item, icon, subitem); if (item.isEmpty ()) return; - QMap::iterator en_it = entries.find (item); + TQMap::iterator en_it = entries.tqfind (item); if (en_it == entries.end ()) { - frame = addPage (item, QString(), KGlobal::iconLoader()->loadIcon ((icon), KIcon::NoGroup, 32)); - vlay = new QVBoxLayout (frame, marginHint(), spacingHint()); - tab = new QTabWidget (frame); + frame = addPage (item, TQString(), KGlobal::iconLoader()->loadIcon ((icon), KIcon::NoGroup, 32)); + vlay = new TQVBoxLayout (frame, marginHint(), spacingHint()); + tab = new TQTabWidget (frame); vlay->addWidget (tab); entries.insert (item, tab); } else @@ -172,25 +172,25 @@ KDE_NO_EXPORT void Preferences::addPrefPage (PreferencesPage * page) { } KDE_NO_EXPORT void Preferences::removePrefPage(PreferencesPage * page) { - QString item, subitem, icon; + TQString item, subitem, icon; page->prefLocation (item, icon, subitem); if (item.isEmpty ()) return; - QMap::iterator en_it = entries.find (item); + TQMap::iterator en_it = entries.tqfind (item); if (en_it == entries.end ()) return; - QTabWidget * tab = en_it.data (); + TQTabWidget * tab = en_it.data (); for (int i = 0; i < tab->count (); i++) if (tab->label (i) == subitem) { - QWidget * w = tab->page (i); + TQWidget * w = tab->page (i); tab->removePage (w); delete w; break; } if (!tab->count ()) { - QWidget * w = tab->parentWidget (); - while (w && !w->inherits ("QFrame")) - w = w->parentWidget (); + TQWidget * w = tab->tqparentWidget (); + while (w && !w->inherits (TQFRAME_OBJECT_NAME_STRING)) + w = w->tqparentWidget (); delete w; entries.erase (en_it); } @@ -199,106 +199,106 @@ KDE_NO_EXPORT void Preferences::removePrefPage(PreferencesPage * page) { KDE_NO_CDTOR_EXPORT Preferences::~Preferences() { } -KDE_NO_CDTOR_EXPORT PrefGeneralPageGeneral::PrefGeneralPageGeneral(QWidget *parent, Settings *) -: QFrame (parent, "GeneralPage") +KDE_NO_CDTOR_EXPORT PrefGeneralPageGeneral::PrefGeneralPageGeneral(TQWidget *tqparent, Settings *) +: TQFrame (tqparent, "GeneralPage") { - QVBoxLayout *layout = new QVBoxLayout(this, 5, 2); - - QGroupBox *windowbox = new QGroupBox(1, Qt::Vertical, i18n("Window"), this); - QWidget * wbox = new QWidget (windowbox); - QWidget * bbox = new QWidget (wbox); - QGridLayout * gridlayout = new QGridLayout (bbox, 2, 2); - keepSizeRatio = new QCheckBox (i18n ("Keep size ratio"), bbox, 0); - QWhatsThis::add(keepSizeRatio, i18n("When checked, movie will keep its aspect ratio\nwhen window is resized")); - dockSysTray = new QCheckBox (i18n ("Dock in system tray"), bbox, 0); - QWhatsThis::add (dockSysTray, i18n ("When checked, an icon of KMPlayer will be added to the system tray.\nWhen clicked it will hide KMPlayer's main window and removing KMPlayer's taskbar button.")); - autoResize = new QCheckBox (i18n ("Auto resize to video sizes"), bbox); - QWhatsThis::add (autoResize, i18n("When checked, KMPlayer will resize to movie sizes\nwhen video starts")); - gridlayout->addWidget (keepSizeRatio, 0, 0); - gridlayout->addWidget (dockSysTray, 1, 0); - gridlayout->addWidget (autoResize, 0, 1); - sizesChoice = new QButtonGroup (2, Qt::Vertical, wbox); - new QRadioButton (i18n("Remember window size on exit"), sizesChoice); - new QRadioButton (i18n("Always start with fixed size"), sizesChoice); - QVBoxLayout * vbox = new QVBoxLayout (wbox, 2, 2); + TQVBoxLayout *tqlayout = new TQVBoxLayout(this, 5, 2); + + TQGroupBox *windowbox = new TQGroupBox(1, Qt::Vertical, i18n("Window"), this); + TQWidget * wbox = new TQWidget (windowbox); + TQWidget * bbox = new TQWidget (wbox); + TQGridLayout * gridtqlayout = new TQGridLayout (bbox, 2, 2); + keepSizeRatio = new TQCheckBox (i18n ("Keep size ratio"), bbox, 0); + TQWhatsThis::add(keepSizeRatio, i18n("When checked, movie will keep its aspect ratio\nwhen window is resized")); + dockSysTray = new TQCheckBox (i18n ("Dock in system tray"), bbox, 0); + TQWhatsThis::add (dockSysTray, i18n ("When checked, an icon of KMPlayer will be added to the system tray.\nWhen clicked it will hide KMPlayer's main window and removing KMPlayer's taskbar button.")); + autoResize = new TQCheckBox (i18n ("Auto resize to video sizes"), bbox); + TQWhatsThis::add (autoResize, i18n("When checked, KMPlayer will resize to movie sizes\nwhen video starts")); + gridtqlayout->addWidget (keepSizeRatio, 0, 0); + gridtqlayout->addWidget (dockSysTray, 1, 0); + gridtqlayout->addWidget (autoResize, 0, 1); + sizesChoice = new TQButtonGroup (2, Qt::Vertical, wbox); + new TQRadioButton (i18n("Remember window size on exit"), sizesChoice); + new TQRadioButton (i18n("Always start with fixed size"), sizesChoice); + TQVBoxLayout * vbox = new TQVBoxLayout (wbox, 2, 2); vbox->addWidget (bbox); vbox->addWidget (sizesChoice); - QGroupBox *playbox =new QGroupBox(4, Qt::Vertical,i18n("Playing"),this); - loop = new QCheckBox (i18n("Loop"), playbox); - QWhatsThis::add(loop, i18n("Makes current movie loop")); - framedrop = new QCheckBox (i18n ("Allow framedrops"), playbox); - QWhatsThis::add (framedrop, i18n ("Allow dropping frames for better audio and video synchronization")); - adjustvolume = new QCheckBox(i18n("Auto set volume on start"), playbox); - QWhatsThis::add (adjustvolume, i18n ("When a new source is selected, the volume will be set according the volume control")); - adjustcolors = new QCheckBox(i18n("Auto set colors on start"), playbox); - QWhatsThis::add (adjustcolors, i18n ("When a movie starts, the colors will be set according the sliders for colors")); - - QGroupBox * gbox =new QGroupBox (1, Qt::Vertical, i18n("Control Panel"), this); - bbox =new QWidget (gbox); - //QGroupBox * bbox = gbox; - gridlayout = new QGridLayout (bbox, 3, 2); - showConfigButton = new QCheckBox(i18n("Show config button"), bbox); - QWhatsThis::add (showConfigButton, i18n ("Add a button that will popup a config menu")); - showPlaylistButton = new QCheckBox(i18n("Show playlist button"), bbox); - QWhatsThis::add (showPlaylistButton, i18n ("Add a playlist button to the control buttons")); - showRecordButton = new QCheckBox(i18n("Show record button"), bbox); - QWhatsThis::add (showRecordButton, i18n ("Add a record button to the control buttons")); - showBroadcastButton = new QCheckBox (i18n ("Show broadcast button"), bbox); - QWhatsThis::add (showBroadcastButton, i18n ("Add a broadcast button to the control buttons")); - gridlayout->addWidget (showConfigButton, 0, 0); - gridlayout->addWidget (showPlaylistButton, 0, 1); - gridlayout->addWidget (showRecordButton, 1, 0); - gridlayout->addWidget (showBroadcastButton, 1, 1); - //QWidget *seekingWidget = new QWidget (bbox); - QHBoxLayout *seekLayout = new QHBoxLayout (bbox); - seekLayout->addWidget(new QLabel(i18n("Forward/backward seek time:"),bbox)); - seekLayout->addItem(new QSpacerItem(0,0,QSizePolicy::Minimum, QSizePolicy::Minimum)); - seekTime = new QSpinBox(1, 600, 1, bbox); + TQGroupBox *playbox =new TQGroupBox(4, Qt::Vertical,i18n("Playing"),this); + loop = new TQCheckBox (i18n("Loop"), playbox); + TQWhatsThis::add(loop, i18n("Makes current movie loop")); + framedrop = new TQCheckBox (i18n ("Allow framedrops"), playbox); + TQWhatsThis::add (framedrop, i18n ("Allow dropping frames for better audio and video synchronization")); + adjustvolume = new TQCheckBox(i18n("Auto set volume on start"), playbox); + TQWhatsThis::add (adjustvolume, i18n ("When a new source is selected, the volume will be set according the volume control")); + adjustcolors = new TQCheckBox(i18n("Auto set colors on start"), playbox); + TQWhatsThis::add (adjustcolors, i18n ("When a movie starts, the colors will be set according the sliders for colors")); + + TQGroupBox * gbox =new TQGroupBox (1, Qt::Vertical, i18n("Control Panel"), this); + bbox =new TQWidget (gbox); + //TQGroupBox * bbox = gbox; + gridtqlayout = new TQGridLayout (bbox, 3, 2); + showConfigButton = new TQCheckBox(i18n("Show config button"), bbox); + TQWhatsThis::add (showConfigButton, i18n ("Add a button that will popup a config menu")); + showPlaylistButton = new TQCheckBox(i18n("Show playlist button"), bbox); + TQWhatsThis::add (showPlaylistButton, i18n ("Add a playlist button to the control buttons")); + showRecordButton = new TQCheckBox(i18n("Show record button"), bbox); + TQWhatsThis::add (showRecordButton, i18n ("Add a record button to the control buttons")); + showBroadcastButton = new TQCheckBox (i18n ("Show broadcast button"), bbox); + TQWhatsThis::add (showBroadcastButton, i18n ("Add a broadcast button to the control buttons")); + gridtqlayout->addWidget (showConfigButton, 0, 0); + gridtqlayout->addWidget (showPlaylistButton, 0, 1); + gridtqlayout->addWidget (showRecordButton, 1, 0); + gridtqlayout->addWidget (showBroadcastButton, 1, 1); + //TQWidget *seekingWidget = new TQWidget (bbox); + TQHBoxLayout *seekLayout = new TQHBoxLayout (bbox); + seekLayout->addWidget(new TQLabel(i18n("Forward/backward seek time:"),bbox)); + seekLayout->addItem(new TQSpacerItem(0,0,TQSizePolicy::Minimum, TQSizePolicy::Minimum)); + seekTime = new TQSpinBox(1, 600, 1, bbox); seekLayout->addWidget(seekTime); - seekLayout->addItem(new QSpacerItem(0,0,QSizePolicy::Minimum, QSizePolicy::Minimum)); - gridlayout->addMultiCellLayout (seekLayout, 2, 2, 0, 1); + seekLayout->addItem(new TQSpacerItem(0,0,TQSizePolicy::Minimum, TQSizePolicy::Minimum)); + gridtqlayout->addMultiCellLayout (seekLayout, 2, 2, 0, 1); - layout->addWidget (windowbox); - layout->addWidget (playbox); - layout->addWidget (gbox); - //layout->addWidget(autoHideSlider); - layout->addItem (new QSpacerItem (0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding)); + tqlayout->addWidget (windowbox); + tqlayout->addWidget (playbox); + tqlayout->addWidget (gbox); + //tqlayout->addWidget(autoHideSlider); + tqlayout->addItem (new TQSpacerItem (0, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding)); } -KDE_NO_CDTOR_EXPORT PrefGeneralPageLooks::PrefGeneralPageLooks (QWidget *parent, Settings * settings) - : QFrame (parent, "LooksPage"), +KDE_NO_CDTOR_EXPORT PrefGeneralPageLooks::PrefGeneralPageLooks (TQWidget *tqparent, Settings * settings) + : TQFrame (tqparent, "LooksPage"), colors (settings->colors), fonts (settings->fonts) { - QVBoxLayout *layout = new QVBoxLayout(this, 5, 2); + TQVBoxLayout *tqlayout = new TQVBoxLayout(this, 5, 2); - QGroupBox *colorbox= new QGroupBox(2, Qt::Horizontal, i18n("Colors"), this); - colorscombo = new QComboBox (colorbox); + TQGroupBox *colorbox= new TQGroupBox(2, Qt::Horizontal, i18n("Colors"), this); + colorscombo = new TQComboBox (colorbox); for (int i = 0; i < int (ColorSetting::last_target); i++) colorscombo->insertItem (colors[i].title); colorscombo->setCurrentItem (0); - connect (colorscombo, SIGNAL (activated (int)), - this, SLOT (colorItemChanged(int))); + connect (colorscombo, TQT_SIGNAL (activated (int)), + this, TQT_SLOT (colorItemChanged(int))); colorbutton = new KColorButton (colorbox); colorbutton->setColor (colors[0].color); - connect (colorbutton, SIGNAL (changed (const QColor &)), - this, SLOT (colorCanged (const QColor &))); + connect (colorbutton, TQT_SIGNAL (changed (const TQColor &)), + this, TQT_SLOT (colorCanged (const TQColor &))); - QGroupBox *fontbox = new QGroupBox (2,Qt::Horizontal, i18n ("Fonts"), this); - fontscombo = new QComboBox (fontbox); + TQGroupBox *fontbox = new TQGroupBox (2,Qt::Horizontal, i18n ("Fonts"), this); + fontscombo = new TQComboBox (fontbox); for (int i = 0; i < int (FontSetting::last_target); i++) fontscombo->insertItem (fonts[i].title); fontscombo->setCurrentItem (0); - connect (fontscombo, SIGNAL (activated (int)), - this, SLOT (fontItemChanged(int))); - fontbutton = new QPushButton (i18n ("AaBbCc"), fontbox); + connect (fontscombo, TQT_SIGNAL (activated (int)), + this, TQT_SLOT (fontItemChanged(int))); + fontbutton = new TQPushButton (i18n ("AaBbCc"), fontbox); fontbutton->setFlat (true); fontbutton->setFont (fonts[0].font); - connect (fontbutton, SIGNAL (clicked ()), this, SLOT (fontClicked ())); + connect (fontbutton, TQT_SIGNAL (clicked ()), this, TQT_SLOT (fontClicked ())); - layout->addWidget (colorbox); - layout->addWidget (fontbox); - layout->addItem (new QSpacerItem (0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding)); + tqlayout->addWidget (colorbox); + tqlayout->addWidget (fontbox); + tqlayout->addItem (new TQSpacerItem (0, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding)); } KDE_NO_EXPORT void PrefGeneralPageLooks::colorItemChanged (int c) { @@ -306,7 +306,7 @@ KDE_NO_EXPORT void PrefGeneralPageLooks::colorItemChanged (int c) { colorbutton->setColor (colors[c].newcolor); } -KDE_NO_EXPORT void PrefGeneralPageLooks::colorCanged (const QColor & c) { +KDE_NO_EXPORT void PrefGeneralPageLooks::colorCanged (const TQColor & c) { if (colorscombo->currentItem () < int (ColorSetting::last_target)) colors[colorscombo->currentItem ()].newcolor = c; } @@ -318,7 +318,7 @@ KDE_NO_EXPORT void PrefGeneralPageLooks::fontItemChanged (int f) { KDE_NO_EXPORT void PrefGeneralPageLooks::fontClicked () { if (fontscombo->currentItem () < int (FontSetting::last_target)) { - QFont myfont = fonts [fontscombo->currentItem ()].newfont; + TQFont myfont = fonts [fontscombo->currentItem ()].newfont; int res = KFontDialog::getFont (myfont, false, this); if (res == KFontDialog::Accepted) { fonts [fontscombo->currentItem ()].newfont = myfont; @@ -327,155 +327,155 @@ KDE_NO_EXPORT void PrefGeneralPageLooks::fontClicked () { } } -KDE_NO_CDTOR_EXPORT PrefSourcePageURL::PrefSourcePageURL (QWidget *parent) -: QFrame (parent, "URLPage") +KDE_NO_CDTOR_EXPORT PrefSourcePageURL::PrefSourcePageURL (TQWidget *tqparent) +: TQFrame (tqparent, "URLPage") { - QVBoxLayout *layout = new QVBoxLayout (this, 5, 5); - QHBoxLayout * urllayout = new QHBoxLayout (); - QHBoxLayout * sub_urllayout = new QHBoxLayout (); - QLabel *urlLabel = new QLabel (i18n ("Location:"), this, 0); + TQVBoxLayout *tqlayout = new TQVBoxLayout (this, 5, 5); + TQHBoxLayout * urltqlayout = new TQHBoxLayout (); + TQHBoxLayout * sub_urltqlayout = new TQHBoxLayout (); + TQLabel *urlLabel = new TQLabel (i18n ("Location:"), this, 0); urllist = new KComboBox (true, this); urllist->setMaxCount (20); urllist->setDuplicatesEnabled (false); // not that it helps much :( url = new KURLRequester (urllist, this); - QWhatsThis::add (url, i18n ("Location of the playable item")); + TQWhatsThis::add (url, i18n ("Location of the playable item")); //url->setShowLocalProtocol (true); - url->setSizePolicy (QSizePolicy (QSizePolicy::Expanding, QSizePolicy::Preferred)); - QLabel *sub_urlLabel = new QLabel (i18n ("Sub title:"), this, 0); + url->tqsetSizePolicy (TQSizePolicy (TQSizePolicy::Expanding, TQSizePolicy::Preferred)); + TQLabel *sub_urlLabel = new TQLabel (i18n ("Sub title:"), this, 0); sub_urllist = new KComboBox (true, this); sub_urllist->setMaxCount (20); sub_urllist->setDuplicatesEnabled (false); // not that it helps much :( sub_url = new KURLRequester (sub_urllist, this); - QWhatsThis::add (sub_url, i18n ("Optional location of a file containing the subtitles of the URL above")); - sub_url->setSizePolicy (QSizePolicy (QSizePolicy::Expanding, QSizePolicy::Preferred)); - backend = new QListBox (this); - allowhref = new QCheckBox (i18n ("Enable 'Click to Play' support"), this); - QWhatsThis::add (allowhref, i18n ("Support for WEB pages having a start image")); - layout->addWidget (allowhref); - urllayout->addWidget (urlLabel); - urllayout->addWidget (url); - layout->addLayout (urllayout); - sub_urllayout->addWidget (sub_urlLabel); - sub_urllayout->addWidget (sub_url); - layout->addLayout (sub_urllayout); - layout->addItem (new QSpacerItem (0, 10, QSizePolicy::Minimum, QSizePolicy::Minimum)); - QGridLayout * gridlayout = new QGridLayout (2, 2); - QLabel *backendLabel = new QLabel (i18n ("Use movie player:"), this, 0); - //QWhatsThis::add (allowhref, i18n ("Explain this in a few lines")); - gridlayout->addWidget (backendLabel, 0, 0); - gridlayout->addWidget (backend, 1, 0); - gridlayout->addMultiCell (new QSpacerItem (0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 1, 1, 1); - QGroupBox *cbox = new QGroupBox(1, Qt::Vertical, i18n("Network bandwidth"), this); - QWidget * wbox = new QWidget (cbox); - QGridLayout * bitratelayout = new QGridLayout (wbox, 2, 3, 5); - prefBitRate = new QLineEdit (wbox); - QWhatsThis::add (prefBitRate, i18n("Sometimes it is possible to choose between various streams given a particular bitrate.\nThis option sets how much bandwidth you would prefer to allocate to video.")); - maxBitRate = new QLineEdit (wbox); - QWhatsThis::add (maxBitRate, i18n("Sometimes it is possible to choose between various streams given a particular bitrate.\nThis option sets the maximum bandwidth you have available for video.")); - bitratelayout->addWidget(new QLabel(i18n("Preferred bitrate:"), wbox), 0, 0); - bitratelayout->addWidget (prefBitRate, 0, 1); - bitratelayout->addWidget (new QLabel (i18n ("kbit/s"), wbox), 0, 2); - bitratelayout->addWidget (new QLabel(i18n("Maximum bitrate:"), wbox), 1, 0); - bitratelayout->addWidget (maxBitRate, 1, 1); - bitratelayout->addWidget (new QLabel (i18n ("kbit/s"), wbox), 1, 2); - layout->addLayout (gridlayout); - layout->addWidget (cbox); - layout->addItem (new QSpacerItem (0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding)); - connect (urllist, SIGNAL(textChanged (const QString &)), - this, SLOT (slotTextChanged (const QString &))); - connect (sub_urllist, SIGNAL(textChanged (const QString &)), - this, SLOT (slotTextChanged (const QString &))); + TQWhatsThis::add (sub_url, i18n ("Optional location of a file containing the subtitles of the URL above")); + sub_url->tqsetSizePolicy (TQSizePolicy (TQSizePolicy::Expanding, TQSizePolicy::Preferred)); + backend = new TQListBox (this); + allowhref = new TQCheckBox (i18n ("Enable 'Click to Play' support"), this); + TQWhatsThis::add (allowhref, i18n ("Support for WEB pages having a start image")); + tqlayout->addWidget (allowhref); + urltqlayout->addWidget (urlLabel); + urltqlayout->addWidget (url); + tqlayout->addLayout (urltqlayout); + sub_urltqlayout->addWidget (sub_urlLabel); + sub_urltqlayout->addWidget (sub_url); + tqlayout->addLayout (sub_urltqlayout); + tqlayout->addItem (new TQSpacerItem (0, 10, TQSizePolicy::Minimum, TQSizePolicy::Minimum)); + TQGridLayout * gridtqlayout = new TQGridLayout (2, 2); + TQLabel *backendLabel = new TQLabel (i18n ("Use movie player:"), this, 0); + //TQWhatsThis::add (allowhref, i18n ("Explain this in a few lines")); + gridtqlayout->addWidget (backendLabel, 0, 0); + gridtqlayout->addWidget (backend, 1, 0); + gridtqlayout->addMultiCell (new TQSpacerItem (0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum), 0, 1, 1, 1); + TQGroupBox *cbox = new TQGroupBox(1, Qt::Vertical, i18n("Network bandwidth"), this); + TQWidget * wbox = new TQWidget (cbox); + TQGridLayout * bitratetqlayout = new TQGridLayout (wbox, 2, 3, 5); + prefBitRate = new TQLineEdit (wbox); + TQWhatsThis::add (prefBitRate, i18n("Sometimes it is possible to choose between various streams given a particular bitrate.\nThis option sets how much bandwidth you would prefer to allocate to video.")); + maxBitRate = new TQLineEdit (wbox); + TQWhatsThis::add (maxBitRate, i18n("Sometimes it is possible to choose between various streams given a particular bitrate.\nThis option sets the maximum bandwidth you have available for video.")); + bitratetqlayout->addWidget(new TQLabel(i18n("Preferred bitrate:"), wbox), 0, 0); + bitratetqlayout->addWidget (prefBitRate, 0, 1); + bitratetqlayout->addWidget (new TQLabel (i18n ("kbit/s"), wbox), 0, 2); + bitratetqlayout->addWidget (new TQLabel(i18n("Maximum bitrate:"), wbox), 1, 0); + bitratetqlayout->addWidget (maxBitRate, 1, 1); + bitratetqlayout->addWidget (new TQLabel (i18n ("kbit/s"), wbox), 1, 2); + tqlayout->addLayout (gridtqlayout); + tqlayout->addWidget (cbox); + tqlayout->addItem (new TQSpacerItem (0, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding)); + connect (urllist, TQT_SIGNAL(textChanged (const TQString &)), + this, TQT_SLOT (slotTextChanged (const TQString &))); + connect (sub_urllist, TQT_SIGNAL(textChanged (const TQString &)), + this, TQT_SLOT (slotTextChanged (const TQString &))); } KDE_NO_EXPORT void PrefSourcePageURL::slotBrowse () { } -KDE_NO_EXPORT void PrefSourcePageURL::slotTextChanged (const QString &) { +KDE_NO_EXPORT void PrefSourcePageURL::slotTextChanged (const TQString &) { changed = true; } -KDE_NO_CDTOR_EXPORT PrefRecordPage::PrefRecordPage (QWidget *parent, PartBase * player, RecorderPage * rl, int rec_len) : QFrame (parent, "RecordPage"), m_player (player), m_recorders (rl), m_recorders_length (rec_len) { - QVBoxLayout *layout = new QVBoxLayout (this, 5, 5); - QHBoxLayout * urllayout = new QHBoxLayout (); - QLabel *urlLabel = new QLabel (i18n ("Output file:"), this); +KDE_NO_CDTOR_EXPORT PrefRecordPage::PrefRecordPage (TQWidget *tqparent, PartBase * player, RecorderPage * rl, int rec_len) : TQFrame (tqparent, "RecordPage"), m_player (player), m_recorders (rl), m_recorders_length (rec_len) { + TQVBoxLayout *tqlayout = new TQVBoxLayout (this, 5, 5); + TQHBoxLayout * urltqlayout = new TQHBoxLayout (); + TQLabel *urlLabel = new TQLabel (i18n ("Output file:"), this); url = new KURLRequester ("", this); url->setShowLocalProtocol (true); - urllayout->addWidget (urlLabel); - urllayout->addWidget (url); - recordButton = new QPushButton (i18n ("Start &Recording"), this); - connect (recordButton, SIGNAL (clicked ()), this, SLOT (slotRecord ())); - QHBoxLayout *buttonlayout = new QHBoxLayout; - buttonlayout->addItem (new QSpacerItem (0, 0, QSizePolicy::Minimum, QSizePolicy::Minimum)); - buttonlayout->addWidget (recordButton); - source = new QLabel (i18n ("Current source: ") + m_player->source ()->prettyName (), this); - recorder = new QButtonGroup (m_recorders_length, Qt::Vertical, i18n ("Recorder"), this); + urltqlayout->addWidget (urlLabel); + urltqlayout->addWidget (url); + recordButton = new TQPushButton (i18n ("Start &Recording"), this); + connect (recordButton, TQT_SIGNAL (clicked ()), this, TQT_SLOT (slotRecord ())); + TQHBoxLayout *buttontqlayout = new TQHBoxLayout; + buttontqlayout->addItem (new TQSpacerItem (0, 0, TQSizePolicy::Minimum, TQSizePolicy::Minimum)); + buttontqlayout->addWidget (recordButton); + source = new TQLabel (i18n ("Current source: ") + m_player->source ()->prettyName (), this); + recorder = new TQButtonGroup (m_recorders_length, Qt::Vertical, i18n ("Recorder"), this); for (RecorderPage * p = m_recorders; p; p = p->next) - new QRadioButton (p->name (), recorder); + new TQRadioButton (p->name (), recorder); if (m_player->source ()) sourceChanged (0L, m_player->source ()); recorder->setButton(0); // for now - replay = new QButtonGroup (4, Qt::Vertical, i18n ("Auto Playback"), this); - new QRadioButton (i18n ("&No"), replay); - new QRadioButton (i18n ("&When recording finished"), replay); - new QRadioButton (i18n ("A&fter"), replay); - QWidget * customreplay = new QWidget (replay); - replaytime = new QLineEdit (customreplay); - QHBoxLayout *replaylayout = new QHBoxLayout (customreplay); - replaylayout->addWidget (new QLabel (i18n("Time (seconds):"), customreplay)); - replaylayout->addWidget (replaytime); - replaylayout->addItem (new QSpacerItem (0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum)); - layout->addWidget (source); - layout->addItem (new QSpacerItem (5, 0, QSizePolicy::Minimum, QSizePolicy::Minimum)); - layout->addLayout (urllayout); - layout->addItem (new QSpacerItem (5, 0, QSizePolicy::Minimum, QSizePolicy::Minimum)); - layout->addWidget (recorder); - layout->addItem (new QSpacerItem (5, 0, QSizePolicy::Minimum, QSizePolicy::Minimum)); - layout->addWidget (replay); - layout->addItem (new QSpacerItem (5, 0, QSizePolicy::Minimum, QSizePolicy::Minimum)); - layout->addLayout (buttonlayout); - layout->addItem (new QSpacerItem (5, 0, QSizePolicy::Minimum, QSizePolicy::Expanding)); - connect (m_player, SIGNAL (sourceChanged(KMPlayer::Source*,KMPlayer::Source*)), this, SLOT (sourceChanged(KMPlayer::Source*,KMPlayer::Source*))); + replay = new TQButtonGroup (4, Qt::Vertical, i18n ("Auto Playback"), this); + new TQRadioButton (i18n ("&No"), replay); + new TQRadioButton (i18n ("&When recording finished"), replay); + new TQRadioButton (i18n ("A&fter"), replay); + TQWidget * customreplay = new TQWidget (replay); + replaytime = new TQLineEdit (customreplay); + TQHBoxLayout *replaytqlayout = new TQHBoxLayout (customreplay); + replaytqlayout->addWidget (new TQLabel (i18n("Time (seconds):"), customreplay)); + replaytqlayout->addWidget (replaytime); + replaytqlayout->addItem (new TQSpacerItem (0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum)); + tqlayout->addWidget (source); + tqlayout->addItem (new TQSpacerItem (5, 0, TQSizePolicy::Minimum, TQSizePolicy::Minimum)); + tqlayout->addLayout (urltqlayout); + tqlayout->addItem (new TQSpacerItem (5, 0, TQSizePolicy::Minimum, TQSizePolicy::Minimum)); + tqlayout->addWidget (recorder); + tqlayout->addItem (new TQSpacerItem (5, 0, TQSizePolicy::Minimum, TQSizePolicy::Minimum)); + tqlayout->addWidget (replay); + tqlayout->addItem (new TQSpacerItem (5, 0, TQSizePolicy::Minimum, TQSizePolicy::Minimum)); + tqlayout->addLayout (buttontqlayout); + tqlayout->addItem (new TQSpacerItem (5, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding)); + connect (m_player, TQT_SIGNAL (sourceChanged(KMPlayer::Source*,KMPlayer::Source*)), this, TQT_SLOT (sourceChanged(KMPlayer::Source*,KMPlayer::Source*))); #ifdef HAVE_XINE - connect (recorder, SIGNAL (clicked(int)), this, SLOT(recorderClicked(int))); + connect (recorder, TQT_SIGNAL (clicked(int)), this, TQT_SLOT(recorderClicked(int))); #endif - connect (replay, SIGNAL (clicked (int)), this, SLOT (replayClicked (int))); + connect (replay, TQT_SIGNAL (clicked (int)), this, TQT_SLOT (replayClicked (int))); } KDE_NO_EXPORT void PrefRecordPage::recordingStarted () { recordButton->setText (i18n ("Stop Recording")); url->setEnabled (false); - topLevelWidget ()->hide (); + tqtopLevelWidget ()->hide (); } KDE_NO_EXPORT void PrefRecordPage::recordingFinished () { recordButton->setText (i18n ("Start Recording")); url->setEnabled (true); - QTimer::singleShot (0, m_player, SLOT(recordingStopped())); // removed from PartBase::setSource because PartBase::recordingStopped calls openURL and that will call PartBase::setSource and Qt doesn't like disconnecting/connecting a signal that is current + TQTimer::singleShot (0, m_player, TQT_SLOT(recordingStopped())); // removed from PartBase::setSource because PartBase::recordingStopped calls openURL and that will call PartBase::setSource and TQt doesn't like disconnecting/connecting a signal that is current } KDE_NO_EXPORT void PrefRecordPage::sourceChanged (Source * olds, Source * nws) { int id = 0; int nr_recs = 0; if (olds) { - disconnect(nws,SIGNAL(startRecording()),this, SLOT(recordingStarted())); - disconnect(nws,SIGNAL(stopRecording()),this, SLOT(recordingFinished())); + disconnect(nws,TQT_SIGNAL(startRecording()),this, TQT_SLOT(recordingStarted())); + disconnect(nws,TQT_SIGNAL(stopRecording()),this, TQT_SLOT(recordingFinished())); } if (nws) { for (RecorderPage * p = m_recorders; p; p = p->next, ++id) { - QButton * radio = recorder->find (id); + TQButton * radio = recorder->tqfind (id); bool b = m_player->recorders () [p->recorderName ()]->supports (nws->name ()); radio->setEnabled (b); if (b) nr_recs++; } source->setText (i18n ("Current Source: ") + nws->prettyName ()); - connect (nws, SIGNAL(startRecording()), this, SLOT(recordingStarted())); - connect (nws, SIGNAL(stopRecording()), this, SLOT(recordingFinished())); + connect (nws, TQT_SIGNAL(startRecording()), this, TQT_SLOT(recordingStarted())); + connect (nws, TQT_SIGNAL(stopRecording()), this, TQT_SLOT(recordingFinished())); } recordButton->setEnabled (nr_recs > 0); } KDE_NO_EXPORT void PrefRecordPage::recorderClicked (int id) { - bool b = recorder->find(id)->text().find (QString::fromLatin1("Xine")) > -1; + bool b = recorder->tqfind(id)->text().tqfind (TQString::tqfromLatin1("Xine")) > -1; replay->setEnabled (!b); if (b) replay->setButton (Settings::ReplayNo); @@ -487,8 +487,8 @@ KDE_NO_EXPORT void PrefRecordPage::replayClicked (int id) { } KDE_NO_EXPORT void PrefRecordPage::slotRecord () { - connect (m_player->source (), SIGNAL (stopPlaying ()), - this, SLOT (playingStopped ())); + connect (m_player->source (), TQT_SIGNAL (stopPlaying ()), + this, TQT_SLOT (playingStopped ())); if (m_player->process () && m_player->process ()->playing ()) m_player->process ()->quit (); else @@ -496,8 +496,8 @@ KDE_NO_EXPORT void PrefRecordPage::slotRecord () { } KDE_NO_EXPORT void PrefRecordPage::playingStopped () { - disconnect (m_player->source (), SIGNAL (stopPlaying ()), - this, SLOT (playingStopped ())); + disconnect (m_player->source (), TQT_SIGNAL (stopPlaying ()), + this, TQT_SLOT (playingStopped ())); if (!url->lineEdit()->text().isEmpty()) { m_player->settings ()->recordfile = url->lineEdit()->text(); m_player->settings ()->replaytime = replaytime->text ().toInt (); @@ -518,8 +518,8 @@ KDE_NO_EXPORT void PrefRecordPage::playingStopped () { } } -KDE_NO_CDTOR_EXPORT RecorderPage::RecorderPage (QWidget *parent, PartBase * player) - : QFrame (parent), next (0L), m_player (player) {} +KDE_NO_CDTOR_EXPORT RecorderPage::RecorderPage (TQWidget *tqparent, PartBase * player) + : TQFrame (tqparent), next (0L), m_player (player) {} KDE_NO_EXPORT void RecorderPage::record () { Process * proc = m_player->recorders () [recorderName ()]; @@ -537,20 +537,20 @@ KDE_NO_EXPORT void RecorderPage::record () { } } -KDE_NO_CDTOR_EXPORT PrefMEncoderPage::PrefMEncoderPage (QWidget *parent, PartBase * player) : RecorderPage (parent, player) { - QVBoxLayout *layout = new QVBoxLayout (this, 5, 5); - format = new QButtonGroup (3, Qt::Vertical, i18n ("Format"), this); - new QRadioButton (i18n ("Same as source"), format); - new QRadioButton (i18n ("Custom"), format); - QWidget * customopts = new QWidget (format); - QGridLayout *gridlayout = new QGridLayout (customopts, 1, 2, 2); - QLabel *argLabel = new QLabel (i18n("Mencoder arguments:"), customopts, 0); - arguments = new QLineEdit ("", customopts); - gridlayout->addWidget (argLabel, 0, 0); - gridlayout->addWidget (arguments, 0, 1); - layout->addWidget (format); - layout->addItem (new QSpacerItem (0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding)); - connect (format, SIGNAL (clicked (int)), this, SLOT (formatClicked (int))); +KDE_NO_CDTOR_EXPORT PrefMEncoderPage::PrefMEncoderPage (TQWidget *tqparent, PartBase * player) : RecorderPage (tqparent, player) { + TQVBoxLayout *tqlayout = new TQVBoxLayout (this, 5, 5); + format = new TQButtonGroup (3, Qt::Vertical, i18n ("Format"), this); + new TQRadioButton (i18n ("Same as source"), format); + new TQRadioButton (i18n ("Custom"), format); + TQWidget * customopts = new TQWidget (format); + TQGridLayout *gridtqlayout = new TQGridLayout (customopts, 1, 2, 2); + TQLabel *argLabel = new TQLabel (i18n("Mencoder arguments:"), customopts, 0); + arguments = new TQLineEdit ("", customopts); + gridtqlayout->addWidget (argLabel, 0, 0); + gridtqlayout->addWidget (arguments, 0, 1); + tqlayout->addWidget (format); + tqlayout->addItem (new TQSpacerItem (0, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding)); + connect (format, TQT_SIGNAL (clicked (int)), this, TQT_SLOT (formatClicked (int))); } KDE_NO_EXPORT void PrefMEncoderPage::formatClicked (int id) { @@ -567,27 +567,27 @@ KDE_NO_EXPORT void PrefMEncoderPage::record () { RecorderPage::record (); } -KDE_NO_EXPORT QString PrefMEncoderPage::name () { +KDE_NO_EXPORT TQString PrefMEncoderPage::name () { return i18n ("&MEncoder"); } -KDE_NO_CDTOR_EXPORT PrefMPlayerDumpstreamPage::PrefMPlayerDumpstreamPage (QWidget *parent, PartBase * player) : RecorderPage (parent, player) { +KDE_NO_CDTOR_EXPORT PrefMPlayerDumpstreamPage::PrefMPlayerDumpstreamPage (TQWidget *tqparent, PartBase * player) : RecorderPage (tqparent, player) { hide(); } -KDE_NO_EXPORT QString PrefMPlayerDumpstreamPage::name () { +KDE_NO_EXPORT TQString PrefMPlayerDumpstreamPage::name () { return i18n ("MPlayer -&dumpstream"); } -KDE_NO_CDTOR_EXPORT PrefFFMpegPage::PrefFFMpegPage (QWidget *parent, PartBase * player) : RecorderPage (parent, player) { - QVBoxLayout *layout = new QVBoxLayout (this, 5, 5); - QGridLayout *gridlayout = new QGridLayout (1, 2, 2); - QLabel *argLabel = new QLabel (i18n("FFMpeg arguments:"), this); - arguments = new QLineEdit ("", this); - gridlayout->addWidget (argLabel, 0, 0); - gridlayout->addWidget (arguments, 0, 1); - layout->addLayout (gridlayout); - layout->addItem (new QSpacerItem (0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding)); +KDE_NO_CDTOR_EXPORT PrefFFMpegPage::PrefFFMpegPage (TQWidget *tqparent, PartBase * player) : RecorderPage (tqparent, player) { + TQVBoxLayout *tqlayout = new TQVBoxLayout (this, 5, 5); + TQGridLayout *gridtqlayout = new TQGridLayout (1, 2, 2); + TQLabel *argLabel = new TQLabel (i18n("FFMpeg arguments:"), this); + arguments = new TQLineEdit ("", this); + gridtqlayout->addWidget (argLabel, 0, 0); + gridtqlayout->addWidget (arguments, 0, 1); + tqlayout->addLayout (gridtqlayout); + tqlayout->addItem (new TQSpacerItem (0, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding)); } KDE_NO_EXPORT void PrefFFMpegPage::record () { @@ -595,78 +595,78 @@ KDE_NO_EXPORT void PrefFFMpegPage::record () { RecorderPage::record (); } -KDE_NO_EXPORT QString PrefFFMpegPage::name () { +KDE_NO_EXPORT TQString PrefFFMpegPage::name () { return i18n ("&FFMpeg"); } #ifdef HAVE_XINE -KDE_NO_CDTOR_EXPORT PrefXinePage::PrefXinePage (QWidget *parent, PartBase * player) : RecorderPage (parent, player) { +KDE_NO_CDTOR_EXPORT PrefXinePage::PrefXinePage (TQWidget *tqparent, PartBase * player) : RecorderPage (tqparent, player) { hide(); } -KDE_NO_EXPORT QString PrefXinePage::name () { +KDE_NO_EXPORT TQString PrefXinePage::name () { return i18n ("&Xine"); } #endif -KDE_NO_CDTOR_EXPORT PrefGeneralPageOutput::PrefGeneralPageOutput(QWidget *parent, OutputDriver * ad, OutputDriver * vd) - : QFrame (parent) { - QGridLayout *layout = new QGridLayout (this, 2, 2, 5); +KDE_NO_CDTOR_EXPORT PrefGeneralPageOutput::PrefGeneralPageOutput(TQWidget *tqparent, OutputDriver * ad, OutputDriver * vd) + : TQFrame (tqparent) { + TQGridLayout *tqlayout = new TQGridLayout (this, 2, 2, 5); - videoDriver = new QListBox (this); + videoDriver = new TQListBox (this); for (int i = 0; vd[i].driver; i++) videoDriver->insertItem (vd[i].description, i); - QWhatsThis::add(videoDriver, i18n("Sets video driver. Recommended is XVideo, or, if it is not supported, X11, which is slower.")); - layout->addWidget (new QLabel (i18n ("Video driver:"), this), 0, 0); - layout->addWidget (videoDriver, 1, 0); + TQWhatsThis::add(videoDriver, i18n("Sets video driver. Recommended is XVideo, or, if it is not supported, X11, which is slower.")); + tqlayout->addWidget (new TQLabel (i18n ("Video driver:"), this), 0, 0); + tqlayout->addWidget (videoDriver, 1, 0); - audioDriver = new QListBox (this); + audioDriver = new TQListBox (this); for (int i = 0; ad[i].driver; i++) audioDriver->insertItem (ad[i].description, i); - layout->addWidget (new QLabel (i18n ("Audio driver:"), this), 0, 1); - layout->addWidget (audioDriver, 1, 1); - layout->addItem (new QSpacerItem (0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding)); + tqlayout->addWidget (new TQLabel (i18n ("Audio driver:"), this), 0, 1); + tqlayout->addWidget (audioDriver, 1, 1); + tqlayout->addItem (new TQSpacerItem (0, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding)); } -KDE_NO_CDTOR_EXPORT PrefOPPageGeneral::PrefOPPageGeneral(QWidget *parent) -: QFrame(parent) +KDE_NO_CDTOR_EXPORT PrefOPPageGeneral::PrefOPPageGeneral(TQWidget *tqparent) +: TQFrame(tqparent) { - QVBoxLayout *layout = new QVBoxLayout (this, 5); - layout->setAutoAdd (true); + TQVBoxLayout *tqlayout = new TQVBoxLayout (this, 5); + tqlayout->setAutoAdd (true); } -KDE_NO_CDTOR_EXPORT PrefOPPagePostProc::PrefOPPagePostProc(QWidget *parent) : QFrame(parent) +KDE_NO_CDTOR_EXPORT PrefOPPagePostProc::PrefOPPagePostProc(TQWidget *tqparent) : TQFrame(tqparent) { - QVBoxLayout *tabLayout = new QVBoxLayout (this, 5); - postProcessing = new QCheckBox (i18n ("Enable use of postprocessing filters"), this); + TQVBoxLayout *tabLayout = new TQVBoxLayout (this, 5); + postProcessing = new TQCheckBox (i18n ("Enable use of postprocessing filters"), this); postProcessing->setEnabled( true ); - disablePPauto = new QCheckBox (i18n ("Disable use of postprocessing when watching TV/DVD"), this); + disablePPauto = new TQCheckBox (i18n ("Disable use of postprocessing when watching TV/DVD"), this); tabLayout->addWidget( postProcessing ); tabLayout->addWidget( disablePPauto ); - tabLayout->addItem ( new QSpacerItem( 5, 5, QSizePolicy::Minimum, QSizePolicy::Minimum ) ); + tabLayout->addItem ( new TQSpacerItem( 5, 5, TQSizePolicy::Minimum, TQSizePolicy::Minimum ) ); - PostprocessingOptions = new QTabWidget( this, "PostprocessingOptions" ); + PostprocessingOptions = new TQTabWidget( this, "PostprocessingOptions" ); PostprocessingOptions->setEnabled (true); PostprocessingOptions->setAutoMask (false); - PostprocessingOptions->setTabPosition( QTabWidget::Top ); - PostprocessingOptions->setTabShape( QTabWidget::Rounded ); - PostprocessingOptions->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, PostprocessingOptions->sizePolicy().hasHeightForWidth() ) ); + PostprocessingOptions->setTabPosition( TQTabWidget::Top ); + PostprocessingOptions->setTabShape( TQTabWidget::Rounded ); + PostprocessingOptions->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, PostprocessingOptions->sizePolicy().hasHeightForWidth() ) ); - QWidget *presetSelectionWidget = new QWidget( PostprocessingOptions, "presetSelectionWidget" ); - QGridLayout *presetSelectionWidgetLayout = new QGridLayout( presetSelectionWidget, 1, 1, 1); + TQWidget *presetSelectionWidget = new TQWidget( PostprocessingOptions, "presetSelectionWidget" ); + TQGridLayout *presetSelectionWidgetLayout = new TQGridLayout( presetSelectionWidget, 1, 1, 1); - QButtonGroup *presetSelection = new QButtonGroup(3, Qt::Vertical, presetSelectionWidget); + TQButtonGroup *presetSelection = new TQButtonGroup(3, Qt::Vertical, presetSelectionWidget); presetSelection->setInsideSpacing(KDialog::spacingHint()); - defaultPreset = new QRadioButton (i18n ("Default"), presetSelection); + defaultPreset = new TQRadioButton (i18n ("Default"), presetSelection); defaultPreset->setChecked( true ); presetSelection->insert (defaultPreset); - customPreset = new QRadioButton (i18n ("Custom"), presetSelection); + customPreset = new TQRadioButton (i18n ("Custom"), presetSelection); presetSelection->insert (customPreset); - fastPreset = new QRadioButton (i18n ("Fast"), presetSelection); + fastPreset = new TQRadioButton (i18n ("Fast"), presetSelection); presetSelection->insert (fastPreset); presetSelection->setRadioButtonExclusive ( true); presetSelectionWidgetLayout->addWidget( presetSelection, 0, 0 ); @@ -675,120 +675,120 @@ KDE_NO_CDTOR_EXPORT PrefOPPagePostProc::PrefOPPagePostProc(QWidget *parent) : QF // // SECOND!!! // - /* I JUST WASN'T ABLE TO GET THIS WORKING WITH QGridLayouts */ + /* I JUST WASN'T ABLE TO GET THIS WORKING WITH TQGridLayouts */ - QWidget *customFiltersWidget = new QWidget( PostprocessingOptions, "customFiltersWidget" ); - QVBoxLayout *customFiltersWidgetLayout = new QVBoxLayout( customFiltersWidget ); + TQWidget *customFiltersWidget = new TQWidget( PostprocessingOptions, "customFiltersWidget" ); + TQVBoxLayout *customFiltersWidgetLayout = new TQVBoxLayout( customFiltersWidget ); - QGroupBox *customFilters = new QGroupBox(0, Qt::Vertical, customFiltersWidget, "customFilters" ); - customFilters->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)1, (QSizePolicy::SizeType)2)); + TQGroupBox *customFilters = new TQGroupBox(0, Qt::Vertical, customFiltersWidget, "customFilters" ); + customFilters->tqsetSizePolicy(TQSizePolicy((TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)2)); customFilters->setFlat(false); customFilters->setEnabled( false ); customFilters->setInsideSpacing(7); - QLayout *customFiltersLayout = customFilters->layout(); - QHBoxLayout *customFiltersLayout1 = new QHBoxLayout ( customFilters->layout() ); + TQLayout *customFiltersLayout = customFilters->tqlayout(); + TQHBoxLayout *customFiltersLayout1 = new TQHBoxLayout ( customFilters->tqlayout() ); - HzDeblockFilter = new QCheckBox (i18n ("Horizontal deblocking"), customFilters); - HzDeblockAQuality = new QCheckBox (i18n ("Auto quality"), customFilters); + HzDeblockFilter = new TQCheckBox (i18n ("Horizontal deblocking"), customFilters); + HzDeblockAQuality = new TQCheckBox (i18n ("Auto quality"), customFilters); HzDeblockAQuality->setEnabled (false); - HzDeblockCFiltering = new QCheckBox (i18n ("Chrominance filtering"), customFilters); + HzDeblockCFiltering = new TQCheckBox (i18n ("Chrominance filtering"), customFilters); HzDeblockCFiltering->setEnabled (false); customFiltersLayout1->addWidget( HzDeblockFilter ); - customFiltersLayout1->addItem( new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Minimum ) ); + customFiltersLayout1->addItem( new TQSpacerItem( 0, 0, TQSizePolicy::Minimum, TQSizePolicy::Minimum ) ); customFiltersLayout1->addWidget( HzDeblockAQuality ); customFiltersLayout1->addWidget( HzDeblockCFiltering ); - QFrame *line1 = new QFrame( customFilters, "line1" ); - line1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)2 ) ); - line1->setFrameShape( QFrame::HLine ); - line1->setFrameShadow( QFrame::Sunken ); + TQFrame *line1 = new TQFrame( customFilters, "line1" ); + line1->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)2 ) ); + line1->setFrameShape( TQFrame::HLine ); + line1->setFrameShadow( TQFrame::Sunken ); customFiltersLayout->add(line1); - QHBoxLayout *customFiltersLayout2 = new QHBoxLayout ( customFilters->layout() ); + TQHBoxLayout *customFiltersLayout2 = new TQHBoxLayout ( customFilters->tqlayout() ); - VtDeblockFilter = new QCheckBox(i18n("Vertical deblocking"), customFilters); - VtDeblockAQuality = new QCheckBox (i18n ("Auto quality"), customFilters); + VtDeblockFilter = new TQCheckBox(i18n("Vertical deblocking"), customFilters); + VtDeblockAQuality = new TQCheckBox (i18n ("Auto quality"), customFilters); VtDeblockAQuality->setEnabled (false); - VtDeblockCFiltering = new QCheckBox (i18n ("Chrominance filtering"), customFilters); + VtDeblockCFiltering = new TQCheckBox (i18n ("Chrominance filtering"), customFilters); VtDeblockCFiltering->setEnabled (false); customFiltersLayout2->addWidget( VtDeblockFilter ); - customFiltersLayout2->addItem( new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Minimum ) ); + customFiltersLayout2->addItem( new TQSpacerItem( 0, 0, TQSizePolicy::Minimum, TQSizePolicy::Minimum ) ); customFiltersLayout2->addWidget( VtDeblockAQuality ); customFiltersLayout2->addWidget( VtDeblockCFiltering ); - QFrame *line2 = new QFrame( customFilters, "line2" ); + TQFrame *line2 = new TQFrame( customFilters, "line2" ); - line2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)2 ) ); - line2->setFrameShape( QFrame::HLine ); - line2->setFrameShadow( QFrame::Sunken ); + line2->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)2 ) ); + line2->setFrameShape( TQFrame::HLine ); + line2->setFrameShadow( TQFrame::Sunken ); customFiltersLayout->add(line2); - QHBoxLayout *customFiltersLayout3 = new QHBoxLayout ( customFilters->layout() ); + TQHBoxLayout *customFiltersLayout3 = new TQHBoxLayout ( customFilters->tqlayout() ); - DeringFilter = new QCheckBox (i18n ("Dering filter"), customFilters); - DeringAQuality = new QCheckBox (i18n ("Auto quality"), customFilters); + DeringFilter = new TQCheckBox (i18n ("Dering filter"), customFilters); + DeringAQuality = new TQCheckBox (i18n ("Auto quality"), customFilters); DeringAQuality->setEnabled (false); - DeringCFiltering=new QCheckBox(i18n("Chrominance filtering"),customFilters); + DeringCFiltering=new TQCheckBox(i18n("Chrominance filtering"),customFilters); DeringCFiltering->setEnabled (false); customFiltersLayout3->addWidget( DeringFilter ); - customFiltersLayout3->addItem( new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Minimum ) ); + customFiltersLayout3->addItem( new TQSpacerItem( 0, 0, TQSizePolicy::Minimum, TQSizePolicy::Minimum ) ); customFiltersLayout3->addWidget( DeringAQuality ); customFiltersLayout3->addWidget( DeringCFiltering ); - QFrame *line3 = new QFrame( customFilters, "line3" ); - line3->setFrameShape( QFrame::HLine ); - line3->setFrameShadow( QFrame::Sunken ); - line3->setFrameShape( QFrame::HLine ); + TQFrame *line3 = new TQFrame( customFilters, "line3" ); + line3->setFrameShape( TQFrame::HLine ); + line3->setFrameShadow( TQFrame::Sunken ); + line3->setFrameShape( TQFrame::HLine ); customFiltersLayout->add(line3); - QHBoxLayout *customFiltersLayout4 =new QHBoxLayout(customFilters->layout()); + TQHBoxLayout *customFiltersLayout4 =new TQHBoxLayout(customFilters->tqlayout()); - AutolevelsFilter = new QCheckBox (i18n ("Auto brightness/contrast"), customFilters); - AutolevelsFullrange = new QCheckBox (i18n ("Stretch luminance to full range"), customFilters); + AutolevelsFilter = new TQCheckBox (i18n ("Auto brightness/contrast"), customFilters); + AutolevelsFullrange = new TQCheckBox (i18n ("Stretch luminance to full range"), customFilters); AutolevelsFullrange->setEnabled (false); customFiltersLayout4->addWidget(AutolevelsFilter); - customFiltersLayout4->addItem(new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Minimum )); + customFiltersLayout4->addItem(new TQSpacerItem( 0, 0, TQSizePolicy::Minimum, TQSizePolicy::Minimum )); customFiltersLayout4->addWidget(AutolevelsFullrange); - QHBoxLayout *customFiltersLayout5 = new QHBoxLayout (customFilters->layout()); + TQHBoxLayout *customFiltersLayout5 = new TQHBoxLayout (customFilters->tqlayout()); - TmpNoiseFilter =new QCheckBox(i18n("Temporal noise reducer"),customFilters); + TmpNoiseFilter =new TQCheckBox(i18n("Temporal noise reducer"),customFilters); /* Note: Change TmpNoiseFilter text back to "Label:" if this slider gets reactivated - TmpNoiseSlider = new QSlider( customFilters, "TmpNoiseSlider" ); + TmpNoiseSlider = new TQSlider( customFilters, "TmpNoiseSlider" ); TmpNoiseSlider->setEnabled( false ); TmpNoiseSlider->setMinValue( 1 ); TmpNoiseSlider->setMaxValue( 3 ); TmpNoiseSlider->setValue( 1 ); - TmpNoiseSlider->setOrientation( QSlider::Horizontal ); - TmpNoiseSlider->setTickmarks( QSlider::Left ); + TmpNoiseSlider->setOrientation( TQSlider::Horizontal ); + TmpNoiseSlider->setTickmarks( TQSlider::Left ); TmpNoiseSlider->setTickInterval( 1 ); - TmpNoiseSlider->setSizePolicy(QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1));*/ + TmpNoiseSlider->tqsetSizePolicy(TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1));*/ /*customFiltersLayout->addWidget(TmpNoiseFilter,7,0); customFiltersLayout->addWidget(TmpNoiseSlider,7,2);*/ customFiltersLayout5->addWidget(TmpNoiseFilter); - customFiltersLayout5->addItem(new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Minimum )); + customFiltersLayout5->addItem(new TQSpacerItem( 0, 0, TQSizePolicy::Minimum, TQSizePolicy::Minimum )); //customFiltersLayout5->addWidget(TmpNoiseSlider); customFiltersWidgetLayout->addWidget( customFilters ); PostprocessingOptions->insertTab( customFiltersWidget, "" ); // //THIRD!!! // - QWidget *deintSelectionWidget = new QWidget( PostprocessingOptions, "deintSelectionWidget" ); - QVBoxLayout *deintSelectionWidgetLayout = new QVBoxLayout( deintSelectionWidget); - QButtonGroup *deinterlacingGroup = new QButtonGroup(5, Qt::Vertical, deintSelectionWidget, "deinterlacingGroup" ); + TQWidget *deintSelectionWidget = new TQWidget( PostprocessingOptions, "deintSelectionWidget" ); + TQVBoxLayout *deintSelectionWidgetLayout = new TQVBoxLayout( deintSelectionWidget); + TQButtonGroup *deinterlacingGroup = new TQButtonGroup(5, Qt::Vertical, deintSelectionWidget, "deinterlacingGroup" ); - LinBlendDeinterlacer = new QCheckBox (i18n ("Linear blend deinterlacer"), deinterlacingGroup); - LinIntDeinterlacer = new QCheckBox (i18n ("Linear interpolating deinterlacer"), deinterlacingGroup); - CubicIntDeinterlacer = new QCheckBox (i18n ("Cubic interpolating deinterlacer"), deinterlacingGroup); - MedianDeinterlacer = new QCheckBox (i18n ("Median deinterlacer"), deinterlacingGroup); - FfmpegDeinterlacer = new QCheckBox (i18n ("FFmpeg deinterlacer"), deinterlacingGroup); + LinBlendDeinterlacer = new TQCheckBox (i18n ("Linear blend deinterlacer"), deinterlacingGroup); + LinIntDeinterlacer = new TQCheckBox (i18n ("Linear interpolating deinterlacer"), deinterlacingGroup); + CubicIntDeinterlacer = new TQCheckBox (i18n ("Cubic interpolating deinterlacer"), deinterlacingGroup); + MedianDeinterlacer = new TQCheckBox (i18n ("Median deinterlacer"), deinterlacingGroup); + FfmpegDeinterlacer = new TQCheckBox (i18n ("FFmpeg deinterlacer"), deinterlacingGroup); deinterlacingGroup->insert( LinBlendDeinterlacer ); deinterlacingGroup->insert( LinIntDeinterlacer ); @@ -803,39 +803,39 @@ KDE_NO_CDTOR_EXPORT PrefOPPagePostProc::PrefOPPagePostProc(QWidget *parent) : QF tabLayout->addWidget( PostprocessingOptions/*, 1, 0*/ ); PostprocessingOptions->setEnabled(false); - connect( customPreset, SIGNAL (toggled(bool) ), customFilters, SLOT(setEnabled(bool))); - connect( postProcessing, SIGNAL( toggled(bool) ), PostprocessingOptions, SLOT( setEnabled(bool) ) ); - connect( HzDeblockFilter, SIGNAL( toggled(bool) ), HzDeblockAQuality, SLOT( setEnabled(bool) ) ); - connect( HzDeblockFilter, SIGNAL( toggled(bool) ), HzDeblockCFiltering, SLOT( setEnabled(bool) ) ); - connect( VtDeblockFilter, SIGNAL( toggled(bool) ), VtDeblockCFiltering, SLOT( setEnabled(bool) ) ); - connect( VtDeblockFilter, SIGNAL( toggled(bool) ), VtDeblockAQuality, SLOT( setEnabled(bool) ) ); - connect( DeringFilter, SIGNAL( toggled(bool) ), DeringAQuality, SLOT( setEnabled(bool) ) ); - connect( DeringFilter, SIGNAL( toggled(bool) ), DeringCFiltering, SLOT( setEnabled(bool) ) ); - //connect( TmpNoiseFilter, SIGNAL( toggled(bool) ), TmpNoiseSlider, SLOT( setEnabled(bool) ) ); - - connect( AutolevelsFilter, SIGNAL( toggled(bool) ), AutolevelsFullrange, SLOT( setEnabled(bool) ) ); - - QWhatsThis::add( defaultPreset, i18n( "Enable mplayer's default postprocessing filters" ) ); - QWhatsThis::add( customPreset, i18n( "Enable custom postprocessing filters (See: Custom preset -tab)" ) ); - QWhatsThis::add( fastPreset, i18n( "Enable mplayer's fast postprocessing filters" ) ); + connect( customPreset, TQT_SIGNAL (toggled(bool) ), customFilters, TQT_SLOT(setEnabled(bool))); + connect( postProcessing, TQT_SIGNAL( toggled(bool) ), PostprocessingOptions, TQT_SLOT( setEnabled(bool) ) ); + connect( HzDeblockFilter, TQT_SIGNAL( toggled(bool) ), HzDeblockAQuality, TQT_SLOT( setEnabled(bool) ) ); + connect( HzDeblockFilter, TQT_SIGNAL( toggled(bool) ), HzDeblockCFiltering, TQT_SLOT( setEnabled(bool) ) ); + connect( VtDeblockFilter, TQT_SIGNAL( toggled(bool) ), VtDeblockCFiltering, TQT_SLOT( setEnabled(bool) ) ); + connect( VtDeblockFilter, TQT_SIGNAL( toggled(bool) ), VtDeblockAQuality, TQT_SLOT( setEnabled(bool) ) ); + connect( DeringFilter, TQT_SIGNAL( toggled(bool) ), DeringAQuality, TQT_SLOT( setEnabled(bool) ) ); + connect( DeringFilter, TQT_SIGNAL( toggled(bool) ), DeringCFiltering, TQT_SLOT( setEnabled(bool) ) ); + //connect( TmpNoiseFilter, TQT_SIGNAL( toggled(bool) ), TmpNoiseSlider, TQT_SLOT( setEnabled(bool) ) ); + + connect( AutolevelsFilter, TQT_SIGNAL( toggled(bool) ), AutolevelsFullrange, TQT_SLOT( setEnabled(bool) ) ); + + TQWhatsThis::add( defaultPreset, i18n( "Enable mplayer's default postprocessing filters" ) ); + TQWhatsThis::add( customPreset, i18n( "Enable custom postprocessing filters (See: Custom preset -tab)" ) ); + TQWhatsThis::add( fastPreset, i18n( "Enable mplayer's fast postprocessing filters" ) ); PostprocessingOptions->changeTab( presetSelectionWidget, i18n( "General" ) ); - customFilters->setTitle (QString ()); - QWhatsThis::add( HzDeblockAQuality, i18n( "Filter is used if there is enough CPU" ) ); - QWhatsThis::add( VtDeblockAQuality, i18n( "Filter is used if there is enough CPU" ) ); - QWhatsThis::add( DeringAQuality, i18n( "Filter is used if there is enough CPU" ) ); - //QWhatsThis::add( TmpNoiseSlider, i18n( "Strength of the noise reducer" ) ); - QWhatsThis::add( AutolevelsFullrange, i18n( "Stretches luminance to full range (0..255)" ) ); + customFilters->setTitle (TQString ()); + TQWhatsThis::add( HzDeblockAQuality, i18n( "Filter is used if there is enough CPU" ) ); + TQWhatsThis::add( VtDeblockAQuality, i18n( "Filter is used if there is enough CPU" ) ); + TQWhatsThis::add( DeringAQuality, i18n( "Filter is used if there is enough CPU" ) ); + //TQWhatsThis::add( TmpNoiseSlider, i18n( "Strength of the noise reducer" ) ); + TQWhatsThis::add( AutolevelsFullrange, i18n( "Stretches luminance to full range (0..255)" ) ); PostprocessingOptions->changeTab( customFiltersWidget, i18n( "Custom Preset" ) ); - deinterlacingGroup->setTitle (QString ()); + deinterlacingGroup->setTitle (TQString ()); PostprocessingOptions->changeTab( deintSelectionWidget, i18n( "Deinterlacing" ) ); PostprocessingOptions->adjustSize(); } KDE_NO_EXPORT void Preferences::confirmDefaults() { // TODO: Switch to KMessageBox - switch( QMessageBox::warning( this, i18n("Reset Settings?"), + switch( TQMessageBox::warning( this, i18n("Reset Settings?"), i18n("You are about to have all your settings overwritten with defaults.\nPlease confirm.\n"), - i18n ("&OK"), i18n ("&Cancel"), QString (), 0, 1)) { + i18n ("&OK"), i18n ("&Cancel"), TQString (), 0, 1)) { case 0: Preferences::setDefaults(); break; case 1: break; diff --git a/src/pref.h b/src/pref.h index c7d6166..adc1d5a 100644 --- a/src/pref.h +++ b/src/pref.h @@ -24,20 +24,20 @@ #include "kmplayer_def.h" #include -#include -#include - -class QTabWidget; -class QTable; -class QGroupBox; -class QCheckBox; -class QComboBox; -class QLineEdit; -class QRadioButton; -class QSlider; -class QSpinBox; -class QColor; -class QButtonGroup; +#include +#include + +class TQTabWidget; +class TQTable; +class TQGroupBox; +class TQCheckBox; +class TQComboBox; +class TQLineEdit; +class TQRadioButton; +class TQSlider; +class TQSpinBox; +class TQColor; +class TQButtonGroup; class KHistoryCombo; class KComboBox; class KURLRequester; @@ -68,6 +68,7 @@ class FontSetting; class KMPLAYER_NO_EXPORT Preferences : public KDialogBase { Q_OBJECT + TQ_OBJECT public: Preferences(PartBase *, Settings *); @@ -92,46 +93,48 @@ public: void removePrefPage (PreferencesPage *); RecorderPage * recorders; - QMap entries; + TQMap entries; public slots: void confirmDefaults(); }; -class KMPLAYER_NO_EXPORT PrefGeneralPageGeneral : public QFrame +class KMPLAYER_NO_EXPORT PrefGeneralPageGeneral : public TQFrame { Q_OBJECT + TQ_OBJECT public: - PrefGeneralPageGeneral(QWidget *parent, Settings *); + PrefGeneralPageGeneral(TQWidget *tqparent, Settings *); ~PrefGeneralPageGeneral() {} - QCheckBox *keepSizeRatio; - QCheckBox * autoResize; - QButtonGroup *sizesChoice; - QCheckBox *dockSysTray; - QCheckBox *loop; - QCheckBox *showConfigButton; - QCheckBox *showPlaylistButton; - QCheckBox *showRecordButton; - QCheckBox *showBroadcastButton; - QCheckBox *framedrop; - QCheckBox *adjustvolume; - QCheckBox *adjustcolors; - - QSpinBox *seekTime; + TQCheckBox *keepSizeRatio; + TQCheckBox * autoResize; + TQButtonGroup *sizesChoice; + TQCheckBox *dockSysTray; + TQCheckBox *loop; + TQCheckBox *showConfigButton; + TQCheckBox *showPlaylistButton; + TQCheckBox *showRecordButton; + TQCheckBox *showBroadcastButton; + TQCheckBox *framedrop; + TQCheckBox *adjustvolume; + TQCheckBox *adjustcolors; + + TQSpinBox *seekTime; }; -class KMPLAYER_NO_EXPORT PrefGeneralPageLooks : public QFrame { +class KMPLAYER_NO_EXPORT PrefGeneralPageLooks : public TQFrame { Q_OBJECT + TQ_OBJECT public: - PrefGeneralPageLooks (QWidget *parent, Settings *); + PrefGeneralPageLooks (TQWidget *tqparent, Settings *); ~PrefGeneralPageLooks () {} - QComboBox *colorscombo; + TQComboBox *colorscombo; KColorButton *colorbutton; - QComboBox *fontscombo; - QPushButton *fontbutton; + TQComboBox *fontscombo; + TQPushButton *fontbutton; public slots: void colorItemChanged (int); - void colorCanged (const QColor &); + void colorCanged (const TQColor &); void fontItemChanged (int); void fontClicked (); private: @@ -139,11 +142,12 @@ private: FontSetting * fonts; }; -class KMPLAYER_NO_EXPORT PrefSourcePageURL : public QFrame +class KMPLAYER_NO_EXPORT PrefSourcePageURL : public TQFrame { Q_OBJECT + TQ_OBJECT public: - PrefSourcePageURL (QWidget *parent); + PrefSourcePageURL (TQWidget *tqparent); ~PrefSourcePageURL () {} KURLRequester * url; @@ -151,29 +155,30 @@ public: KComboBox * urllist; KURLRequester * sub_url; KComboBox * sub_urllist; - QListBox * backend; - QCheckBox * allowhref; - QLineEdit * prefBitRate; - QLineEdit * maxBitRate; + TQListBox * backend; + TQCheckBox * allowhref; + TQLineEdit * prefBitRate; + TQLineEdit * maxBitRate; bool changed; private slots: void slotBrowse (); - void slotTextChanged (const QString &); + void slotTextChanged (const TQString &); }; -class KMPLAYER_NO_EXPORT PrefRecordPage : public QFrame +class KMPLAYER_NO_EXPORT PrefRecordPage : public TQFrame { Q_OBJECT + TQ_OBJECT public: - PrefRecordPage (QWidget *parent, PartBase *, RecorderPage *, int len); + PrefRecordPage (TQWidget *tqparent, PartBase *, RecorderPage *, int len); ~PrefRecordPage () {} KURLRequester * url; - QButtonGroup * recorder; - QButtonGroup * replay; - QLineEdit * replaytime; - QLabel * source; + TQButtonGroup * recorder; + TQButtonGroup * replay; + TQLineEdit * replaytime; + TQLabel * source; public slots: void replayClicked (int id); void recorderClicked (int id); @@ -186,18 +191,19 @@ private slots: private: PartBase * m_player; RecorderPage * m_recorders; - QPushButton * recordButton; + TQPushButton * recordButton; int m_recorders_length; }; -class KMPLAYER_NO_EXPORT RecorderPage : public QFrame +class KMPLAYER_NO_EXPORT RecorderPage : public TQFrame { Q_OBJECT + TQ_OBJECT public: - RecorderPage (QWidget *parent, PartBase *); + RecorderPage (TQWidget *tqparent, PartBase *); virtual ~RecorderPage () {}; virtual void record (); - virtual QString name () = 0; + virtual TQString name () = 0; virtual const char * recorderName () = 0; RecorderPage * next; protected: @@ -207,16 +213,17 @@ protected: class KMPLAYER_NO_EXPORT PrefMEncoderPage : public RecorderPage { Q_OBJECT + TQ_OBJECT public: - PrefMEncoderPage (QWidget *parent, PartBase *); + PrefMEncoderPage (TQWidget *tqparent, PartBase *); ~PrefMEncoderPage () {} void record (); - QString name (); + TQString name (); const char * recorderName () { return "mencoder"; } - QLineEdit * arguments; - QButtonGroup * format; + TQLineEdit * arguments; + TQButtonGroup * format; public slots: void formatClicked (int id); private: @@ -224,20 +231,20 @@ private: class KMPLAYER_NO_EXPORT PrefMPlayerDumpstreamPage : public RecorderPage { public: - PrefMPlayerDumpstreamPage (QWidget *parent, PartBase *); + PrefMPlayerDumpstreamPage (TQWidget *tqparent, PartBase *); ~PrefMPlayerDumpstreamPage () {} - QString name (); + TQString name (); const char * recorderName () { return "mplayerdumpstream"; } }; #ifdef HAVE_XINE class KMPLAYER_NO_EXPORT PrefXinePage : public RecorderPage { public: - PrefXinePage (QWidget *parent, PartBase *); + PrefXinePage (TQWidget *tqparent, PartBase *); ~PrefXinePage () {} - QString name (); + TQString name (); const char * recorderName () { return "xine"; } }; #endif @@ -245,74 +252,78 @@ public: class KMPLAYER_NO_EXPORT PrefFFMpegPage : public RecorderPage { Q_OBJECT + TQ_OBJECT public: - PrefFFMpegPage (QWidget *parent, PartBase *); + PrefFFMpegPage (TQWidget *tqparent, PartBase *); ~PrefFFMpegPage () {} void record (); - QString name (); + TQString name (); const char * recorderName () { return "ffmpeg"; } - QLineEdit * arguments; - QButtonGroup * format; + TQLineEdit * arguments; + TQButtonGroup * format; private: }; -class KMPLAYER_NO_EXPORT PrefGeneralPageOutput : public QFrame +class KMPLAYER_NO_EXPORT PrefGeneralPageOutput : public TQFrame { Q_OBJECT + TQ_OBJECT public: - PrefGeneralPageOutput (QWidget *parent, OutputDriver * ad, OutputDriver * vd); + PrefGeneralPageOutput (TQWidget *tqparent, OutputDriver * ad, OutputDriver * vd); ~PrefGeneralPageOutput() {} - QListBox *videoDriver; - QListBox *audioDriver; + TQListBox *videoDriver; + TQListBox *audioDriver; }; -class KMPLAYER_NO_EXPORT PrefOPPageGeneral : public QFrame +class KMPLAYER_NO_EXPORT PrefOPPageGeneral : public TQFrame { Q_OBJECT + TQ_OBJECT public: - PrefOPPageGeneral(QWidget *parent = 0); + PrefOPPageGeneral(TQWidget *tqparent = 0); ~PrefOPPageGeneral() {} }; -class KMPLAYER_NO_EXPORT PrefOPPagePostProc : public QFrame +class KMPLAYER_NO_EXPORT PrefOPPagePostProc : public TQFrame { Q_OBJECT + TQ_OBJECT public: - PrefOPPagePostProc(QWidget *parent = 0); + PrefOPPagePostProc(TQWidget *tqparent = 0); ~PrefOPPagePostProc() {} - QCheckBox* postProcessing; - QCheckBox* disablePPauto; - QTabWidget* PostprocessingOptions; - - QRadioButton* defaultPreset; - QRadioButton* customPreset; - QRadioButton* fastPreset; - - QCheckBox* HzDeblockFilter; - QCheckBox* VtDeblockFilter; - QCheckBox* DeringFilter; - QCheckBox* HzDeblockAQuality; - QCheckBox* VtDeblockAQuality; - QCheckBox* DeringAQuality; - - QCheckBox* AutolevelsFilter; - QCheckBox* AutolevelsFullrange; - QCheckBox* HzDeblockCFiltering; - QCheckBox* VtDeblockCFiltering; - QCheckBox* DeringCFiltering; - QCheckBox* TmpNoiseFilter; - QSlider* TmpNoiseSlider; - - QCheckBox* LinBlendDeinterlacer; - QCheckBox* CubicIntDeinterlacer; - QCheckBox* LinIntDeinterlacer; - QCheckBox* MedianDeinterlacer; - QCheckBox* FfmpegDeinterlacer; + TQCheckBox* postProcessing; + TQCheckBox* disablePPauto; + TQTabWidget* PostprocessingOptions; + + TQRadioButton* defaultPreset; + TQRadioButton* customPreset; + TQRadioButton* fastPreset; + + TQCheckBox* HzDeblockFilter; + TQCheckBox* VtDeblockFilter; + TQCheckBox* DeringFilter; + TQCheckBox* HzDeblockAQuality; + TQCheckBox* VtDeblockAQuality; + TQCheckBox* DeringAQuality; + + TQCheckBox* AutolevelsFilter; + TQCheckBox* AutolevelsFullrange; + TQCheckBox* HzDeblockCFiltering; + TQCheckBox* VtDeblockCFiltering; + TQCheckBox* DeringCFiltering; + TQCheckBox* TmpNoiseFilter; + TQSlider* TmpNoiseSlider; + + TQCheckBox* LinBlendDeinterlacer; + TQCheckBox* CubicIntDeinterlacer; + TQCheckBox* LinIntDeinterlacer; + TQCheckBox* MedianDeinterlacer; + TQCheckBox* FfmpegDeinterlacer; }; } // namespace diff --git a/src/triestring.cpp b/src/triestring.cpp index bf41506..3c74fb5 100644 --- a/src/triestring.cpp +++ b/src/triestring.cpp @@ -40,13 +40,13 @@ struct KMPLAYER_NO_EXPORT TrieNode { void unref (); void removeChild (TrieNode *); void dump (int lvl) { - QString indent (QString ().fill (QChar ('.'), lvl)); + TQString indent (TQString ().fill (TQChar ('.'), lvl)); printf("%s%s len:%4d rc:%4d\n", indent.ascii(), str, length, ref_count); } char * str; unsigned short length; unsigned short ref_count; - TrieNode * parent; + TrieNode * tqparent; TrieNode * first_child; TrieNode * next_sibling; }; @@ -70,7 +70,7 @@ KDE_NO_CDTOR_EXPORT TrieNode::TrieNode (const char * s) : str (s ? strdup (s) : 0L), length (s ? strlen (s) : 0), ref_count (1), - parent (0L), + tqparent (0L), first_child (0L), next_sibling (0L) {} @@ -81,7 +81,7 @@ KDE_NO_CDTOR_EXPORT TrieNode::~TrieNode () { KDE_NO_EXPORT void TrieNode::unref () { if (--ref_count <= 0 && !first_child) - parent->removeChild (this); + tqparent->removeChild (this); } KDE_NO_EXPORT void TrieNode::removeChild (TrieNode * node) { @@ -95,10 +95,10 @@ KDE_NO_EXPORT void TrieNode::removeChild (TrieNode * node) { } } delete node; - if (!parent) + if (!tqparent) return; if (!ref_count && !first_child) - parent->removeChild (this); // can this happen ? + tqparent->removeChild (this); // can this happen ? else if (!ref_count && !first_child->next_sibling) { // merge with child char * tmp = first_child->str; first_child->length = first_child->length + length; @@ -106,12 +106,12 @@ KDE_NO_EXPORT void TrieNode::removeChild (TrieNode * node) { strcpy (first_child->str, str); strcat (first_child->str, tmp); free (tmp); - first_child->parent = parent; + first_child->tqparent = tqparent; first_child->next_sibling = next_sibling; - if (parent->first_child == this) { - parent->first_child = first_child; + if (tqparent->first_child == this) { + tqparent->first_child = first_child; } else { - for (TrieNode *n = parent->first_child; n; n = n->next_sibling) + for (TrieNode *n = tqparent->first_child; n; n = n->next_sibling) if (n->next_sibling == this) { n->next_sibling = first_child; break; @@ -123,9 +123,9 @@ KDE_NO_EXPORT void TrieNode::removeChild (TrieNode * node) { static char * trieRetrieveString (TrieNode * node, int &len) { char *buf; - if (node->parent) { + if (node->tqparent) { len += node->length; - buf = trieRetrieveString (node->parent, len); + buf = trieRetrieveString (node->tqparent, len); strcat (buf, node->str); } else { buf = (char *) malloc (len + 1); @@ -138,8 +138,8 @@ static int trieStringCompare (TrieNode * node, const char * s, int &len) { int cmp = 0; if (!node) return !!s; - if (node->parent && node->parent != root_trie) - cmp = trieStringCompare (node->parent, s, len); + if (node->tqparent && node->tqparent != root_trie) + cmp = trieStringCompare (node->tqparent, s, len); if (!cmp) { #ifdef TEST_TRIE printf( "compare %s %s %d\n", node->str, s + len, node->length); @@ -153,8 +153,8 @@ static int trieStringCompare (TrieNode * node, const char * s, int &len) { static int trieStringCompare (TrieNode * n1, TrieNode * n2) { // pre n1 && n2 on same depth and not NIL int cmp = 0; - if (n1->parent && n1->parent != root_trie) - cmp = trieStringCompare (n1->parent, n2->parent); + if (n1->tqparent && n1->tqparent != root_trie) + cmp = trieStringCompare (n1->tqparent, n2->tqparent); if (!cmp && n1 != n2) { #ifdef TEST_TRIE printf( "compare %s %s", n1->str, n2->str); @@ -174,8 +174,8 @@ static int trieStringCompare (TrieNode * n1, TrieNode * n2) { static int trieStringStarts (TrieNode * node, const char * s, int & pos) { int cmp = -1; // -1 still matches, 0 no, 1 yes - if (node->parent && node->parent != root_trie) - cmp = trieStringStarts (node->parent, s, pos); + if (node->tqparent && node->tqparent != root_trie) + cmp = trieStringStarts (node->tqparent, s, pos); if (cmp == -1) { for (int i = 0; i < node->length; i++) if (node->str[i] != s[pos + i]) @@ -190,8 +190,8 @@ static TrieNode * trieInsert (const char * s) { root_trie = new TrieNode (0L); //printf("trieInsert %s\n", s); //dumpTrie(); - TrieNode * parent = root_trie; - for (TrieNode * c = parent->first_child; c; c = c->first_child) { + TrieNode * tqparent = root_trie; + for (TrieNode * c = tqparent->first_child; c; c = c->first_child) { TrieNode * prev = c; for (TrieNode * n = prev; n; n = n->next_sibling) { if (n->str[0] == s[0]) { // insert here @@ -206,13 +206,13 @@ static TrieNode * trieInsert (const char * s) { tmp[i] = 0; TrieNode * node = new TrieNode (tmp); free (tmp); - node->parent = parent; + node->tqparent = tqparent; node->next_sibling = n->next_sibling; if (prev != n) prev->next_sibling = node; else - parent->first_child = node; - n->parent = node; + tqparent->first_child = node; + n->tqparent = node; TrieNode * snode; if (!s[i]) { node->first_child = n; @@ -220,7 +220,7 @@ static TrieNode * trieInsert (const char * s) { snode = node; // s is complete in node } else { snode = new TrieNode (s+i); - snode->parent = node; + snode->tqparent = node; if (bigger) { // set n before snode node->first_child = n; n->next_sibling = snode; @@ -244,32 +244,32 @@ static TrieNode * trieInsert (const char * s) { return n; } else if (n->str[0] > s[0]) { // insert before TrieNode * node = new TrieNode (s); - node->parent = parent; + node->tqparent = tqparent; node->next_sibling = n; if (prev != n) prev->next_sibling = node; else - parent->first_child = node; + tqparent->first_child = node; return node; } prev = n; } if (prev) { // insert after TrieNode * node = new TrieNode (s); - node->parent = parent; + node->tqparent = tqparent; prev->next_sibling = node; return node; } - parent = c; + tqparent = c; } // hit an empty first_child, add s as first_child TrieNode * node = new TrieNode (s); - parent->first_child = node; - node->parent = parent; + tqparent->first_child = node; + node->tqparent = tqparent; return node; } -TrieString::TrieString (const QString & s) +TrieString::TrieString (const TQString & s) : node (s.isEmpty () ? 0L : trieInsert (s.utf8 ().data ())) {} @@ -288,7 +288,7 @@ TrieString::~TrieString () { } bool TrieString::startsWith (const TrieString & s) const { - for (TrieNode * n = node; n; n = n->parent) + for (TrieNode * n = node; n; n = n->tqparent) if (n == s.node) return true; return s.node ? false : true; @@ -327,12 +327,12 @@ TrieString & TrieString::operator = (const char * utf8) { return *this; } -QString TrieString::toString () const { - QString s; +TQString TrieString::toString () const { + TQString s; if (node) { int len = 0; char *utf8 = trieRetrieveString (node, len); - s = QString::fromUtf8 (utf8); + s = TQString::fromUtf8 (utf8); free (utf8); } return s; @@ -342,11 +342,11 @@ bool TrieString::operator < (const TrieString & s) const { if (node == s.node) return false; int depth1 = 0, depth2 = 0; - for (TrieNode * n = node; n; n = n->parent) + for (TrieNode * n = node; n; n = n->tqparent) depth1++; if (!depth1) return s.node ? true : false; - for (TrieNode * n = s.node; n; n = n->parent) + for (TrieNode * n = s.node; n; n = n->tqparent) depth2++; if (!depth2) return false; @@ -355,13 +355,13 @@ bool TrieString::operator < (const TrieString & s) const { while (depth1 > depth2) { if (n1 == n2) return false; - n1 = n1->parent; + n1 = n1->tqparent; depth1--; } while (depth2 > depth1) { if (n1 == n2) return true; - n2 = n2->parent; + n2 = n2->tqparent; depth2--; } int cmp = trieStringCompare (n1, n2); @@ -455,37 +455,37 @@ void KMPlayer::dumpTrie () { } #ifdef TEST_TRIE -// g++ triestring.cpp -o triestring -I$QTDIR/include -L$QTDIR/lib -lqt-mt -g -DTEST_TRIE +// g++ triestring.cpp -o triestring -I$TQTDIR/include -L$TQTDIR/lib -lqt-mt -g -DTEST_TRIE int main (int, char **) { StringPool::init(); { TrieString s1; - TrieString s1_1(QString ("region")); + TrieString s1_1(TQString ("region")); s1 = s1_1; - TrieString s2 (QString ("regionName")); - TrieString s3 (QString ("regPoint")); - TrieString s4 (QString ("regAlign")); - TrieString s6 (QString ("freeze")); - TrieString s7 (QString ("fit")); + TrieString s2 (TQString ("regionName")); + TrieString s3 (TQString ("regPoint")); + TrieString s4 (TQString ("regAlign")); + TrieString s6 (TQString ("freeze")); + TrieString s7 (TQString ("fit")); { - TrieString s7_1 (QString ("fit")); - TrieString s5 (QString ("fill")); + TrieString s7_1 (TQString ("fit")); + TrieString s5 (TQString ("fill")); dump (root_trie, 0); } dump (root_trie, 0); - TrieString s5 (QString ("fill")); - TrieString s8 (QString ("fontPtSize")); - TrieString s9 (QString ("fontSize")); - TrieString s10 (QString ("fontFace")); - TrieString s11 (QString ("fontColor")); - TrieString s12 (QString ("hAlign")); - TrieString s13 (QString ("region")); - TrieString s14 (QString ("ref")); - TrieString s15 (QString ("head")); + TrieString s5 (TQString ("fill")); + TrieString s8 (TQString ("fontPtSize")); + TrieString s9 (TQString ("fontSize")); + TrieString s10 (TQString ("fontFace")); + TrieString s11 (TQString ("fontColor")); + TrieString s12 (TQString ("hAlign")); + TrieString s13 (TQString ("region")); + TrieString s14 (TQString ("ref")); + TrieString s15 (TQString ("head")); dump (root_trie, 0); - QString qs1 = s1.toString (); - QString qs2 = s2.toString (); + TQString qs1 = s1.toString (); + TQString qs2 = s2.toString (); printf ("%s\n%s\n", qs1.ascii(), qs2.ascii()); printf("equal %s %s %d\n", qs2.ascii(), "regionName", s2 == "regionName"); printf("equal %s %s %d\n", qs2.ascii(), "zegionName", s2 == "zegionName"); diff --git a/src/triestring.h b/src/triestring.h index 84916d4..baa6911 100644 --- a/src/triestring.h +++ b/src/triestring.h @@ -20,7 +20,7 @@ #ifndef _TRIE_STRING_H_ #define _TRIE_STRING_H_ -#include +#include namespace KMPlayer { @@ -34,12 +34,12 @@ class KMPLAYER_EXPORT TrieString { friend bool operator != (const TrieString & s1, const TrieString & s2); public: TrieString (); - TrieString (const QString & s); + TrieString (const TQString & s); TrieString (const char * utf8); TrieString (const TrieString & s); ~TrieString (); - QString toString () const; + TQString toString () const; bool isNull () const; void clear (); bool startsWith (const TrieString & s) const; diff --git a/src/viewarea.cpp b/src/viewarea.cpp index de384d7..10f015c 100644 --- a/src/viewarea.cpp +++ b/src/viewarea.cpp @@ -22,12 +22,12 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -56,12 +56,12 @@ extern const char * playlist_xpm[]; //------------------------------------------------------------------------- namespace KMPlayer { - typedef QMap ImageDataMap; + typedef TQMap ImageDataMap; static KStaticDeleter imageCacheDeleter; static ImageDataMap * image_data_map; } -ImageData::ImageData( const QString & img) : +ImageData::ImageData( const TQString & img) : image (0L), url (img) { //if (img.isEmpty ()) @@ -77,12 +77,12 @@ ImageData::~ImageData() { } #ifdef HAVE_CAIRO -static void copyImage (Surface *s, int w, int h, QImage *img, cairo_surface_t *similar) { +static void copyImage (Surface *s, int w, int h, TQImage *img, cairo_surface_t *similar) { int iw = img->width (); int ih = img->height (); if (img->depth () < 24) { - QImage qi = img->convertDepth (32, 0); + TQImage qi = img->convertDepth (32, 0); *img = qi; } cairo_surface_t *sf = cairo_image_surface_create_for_data ( @@ -114,11 +114,11 @@ bool CachedImage::isEmpty () { return !data || !data->image; } -void CachedImage::setUrl (const QString & url) { +void CachedImage::setUrl (const TQString & url) { if (url.isEmpty ()) { data = ImageDataPtr (new ImageData (url)); } else { - ImageDataMap::iterator i = image_data_map->find (url); + ImageDataMap::iterator i = image_data_map->tqfind (url); if (i == image_data_map->end ()) { data = ImageDataPtr (new ImageData (url)); image_data_map->insert (url, ImageDataPtrW (data)); @@ -144,8 +144,8 @@ public: SurfacePtr createSurface (NodePtr owner, const SRect & rect); IRect toScreen (Single x, Single y, Single w, Single h); void resize (const SRect & rect); - void repaint (); - void repaint (const SRect &rect); + void tqrepaint (); + void tqrepaint (const SRect &rect); void video (); NodePtrW current_video; @@ -181,14 +181,14 @@ KDE_NO_EXPORT void ViewSurface::resize (const SRect &r) { #endif /*if (rect == nrect) ;//return; - SRect pr = rect.unite (nrect); // for repaint + SRect pr = rect.unite (nrect); // for tqrepaint rect = nrect;*/ } KDE_NO_EXPORT IRect ViewSurface::toScreen (Single x, Single y, Single w, Single h) { Matrix matrix (0, 0, xscale, yscale); matrix.translate (bounds.x (), bounds.y ()); - for (SurfacePtr s = parentNode(); s; s = s->parentNode()) { + for (SurfacePtr s = tqparentNode(); s; s = s->tqparentNode()) { matrix.transform(Matrix (0, 0, s->xscale, s->yscale)); matrix.translate (s->bounds.x (), s->bounds.y ()); } @@ -197,14 +197,14 @@ KDE_NO_EXPORT IRect ViewSurface::toScreen (Single x, Single y, Single w, Single } KDE_NO_EXPORT -void ViewSurface::repaint (const SRect &r) { +void ViewSurface::tqrepaint (const SRect &r) { markDirty (); view_widget->scheduleRepaint (toScreen (r.x (), r.y (), r.width (), r.height ())); - //kdDebug() << "Surface::repaint x:" << (int)x << " y:" << (int)y << " w:" << (int)w << " h:" << (int)h << endl; + //kdDebug() << "Surface::tqrepaint x:" << (int)x << " y:" << (int)y << " w:" << (int)w << " h:" << (int)h << endl; } KDE_NO_EXPORT -void ViewSurface::repaint () { +void ViewSurface::tqrepaint () { markDirty (); view_widget->scheduleRepaint (toScreen (0, 0, bounds.width (), bounds.height ())); } @@ -258,7 +258,7 @@ class KMPLAYER_NO_EXPORT CairoPaintVisitor : public Visitor { public: cairo_t * cr; CairoPaintVisitor (cairo_surface_t * cs, Matrix m, - const IRect & rect, QColor c=QColor(), bool toplevel=false); + const IRect & rect, TQColor c=TQColor(), bool toplevel=false); ~CairoPaintVisitor (); using Visitor::visit; void visit (Node * n); @@ -281,7 +281,7 @@ public: KDE_NO_CDTOR_EXPORT CairoPaintVisitor::CairoPaintVisitor (cairo_surface_t * cs, Matrix m, - const IRect & rect, QColor c, bool top) + const IRect & rect, TQColor c, bool top) : clip (rect), cairo_surface (cs), matrix (m), toplevel (top) { cr = cairo_create (cs); if (toplevel) { @@ -327,7 +327,7 @@ KDE_NO_EXPORT void CairoPaintVisitor::traverseRegion (SMIL::RegionBase * reg) { if (c->data) c->data->accept (this); } - // finally visit children, accounting for z-order FIXME optimize + // finally visit tqchildren, accounting for z-order FIXME optimize NodeRefList sorted; for (NodePtr n = reg->firstChild (); n; n = n->nextSibling ()) { if (n->id != SMIL::id_node_region) @@ -550,7 +550,7 @@ KDE_NO_EXPORT void CairoPaintVisitor::visit (SMIL::Transition *trans) { case SMIL::Transition::SubHorizontal: phi = 0; break; - default: // Vertical + default: //Qt::Vertical phi = -M_PI / 2; break; } @@ -707,31 +707,31 @@ KDE_NO_EXPORT void CairoPaintVisitor::visit (SMIL::TextMediaType * txt) { matrix.getXYWH (x, y, w, h); if (!s->surface) { //kdDebug() << "new txt surface " << td->text << endl; - /* QTextEdit * edit = new QTextEdit; + /* TQTextEdit * edit = new TQTextEdit; edit->setReadOnly (true); - edit->setHScrollBarMode (QScrollView::AlwaysOff); - edit->setVScrollBarMode (QScrollView::AlwaysOff); - edit->setFrameShape (QFrame::NoFrame); - edit->setFrameShadow (QFrame::Plain); + edit->setHScrollBarMode (TQScrollView::AlwaysOff); + edit->setVScrollBarMode (TQScrollView::AlwaysOff); + edit->setFrameShape (TQFrame::NoFrame); + edit->setFrameShadow (TQFrame::Plain); edit->setGeometry (0, 0, w, h); if (edit->length () == 0) edit->setText (text); if (w0 > 0) font.setPointSize (int (1.0 * w * font_size / w0)); edit->setFont (font); - QRect rect = p.clipRegion (QPainter::CoordPainter).boundingRect (); - rect = rect.intersect (QRect (xoff, yoff, w, h)); - QPixmap pix = QPixmap::grabWidget (edit, rect.x () - (int) xoff, + TQRect rect = p.clipRegion (TQPainter::CoordPainter).boundingRect (); + rect = rect.intersect (TQRect (xoff, yoff, w, h)); + TQPixmap pix = TQPixmap::grabWidget (edit, rect.x () - (int) xoff, rect.y () - (int) yoff, rect.width (), rect.height ());*/ float scale = 1.0 * w / rect.width (); // TODO: make an image cairo_set_font_size (cr, scale * td->font_size); cairo_font_extents_t txt_fnt; cairo_font_extents (cr, &txt_fnt); - QString str = td->text; + TQString str = td->text; struct Line { - Line (const QString & ln) : txt (ln), next(0) {} - QString txt; + Line (const TQString & ln) : txt (ln), next(0) {} + TQString txt; cairo_text_extents_t txt_ext; Single xoff; Line * next; @@ -741,13 +741,13 @@ KDE_NO_EXPORT void CairoPaintVisitor::visit (SMIL::TextMediaType * txt) { int line_count = 0; Single min_xoff = w; while (!str.isEmpty ()) { - int len = str.find (QChar ('\n')); + int len = str.tqfind (TQChar ('\n')); bool skip_cr = false; - if (len > 1 && str[len-1] == QChar ('\r')) { + if (len > 1 && str[len-1] == TQChar ('\r')) { --len; skip_cr = true; } - QString para = len > -1 ? str.left (len) : str; + TQString para = len > -1 ? str.left (len) : str; Line * line = new Line (para); ++line_count; if (!lines) @@ -764,7 +764,7 @@ KDE_NO_EXPORT void CairoPaintVisitor::visit (SMIL::TextMediaType * txt) { int br_pos = int (line->txt.length () * frag); //educated guess while (br_pos > 0) { line->txt.truncate (br_pos); - br_pos = line->txt.findRev (QChar (' ')); + br_pos = line->txt.tqfindRev (TQChar (' ')); if (br_pos < 1) break; line->txt.truncate (br_pos); @@ -853,7 +853,7 @@ KDE_NO_EXPORT void CairoPaintVisitor::visit (SMIL::Brush * brush) { SRect rect = s->bounds; Single x, y, w = rect.width(), h = rect.height(); matrix.getXYWH (x, y, w, h); - unsigned int color = QColor (brush->param ("color")).rgb (); + unsigned int color = TQColor (brush->param ("color")).rgb (); if (brush->active_trans) { cur_media = brush; cur_pat = NULL; @@ -1129,7 +1129,7 @@ public: void visit (SMIL::MediaType * n); void visit (SMIL::Anchor *); void visit (SMIL::Area *); - QCursor cursor; + TQCursor cursor; }; } // namespace @@ -1143,17 +1143,17 @@ KDE_NO_EXPORT void MouseVisitor::visit (Node * n) { kdDebug () << "Mouse event ignored for " << n->nodeName () << endl; } -KDE_NO_EXPORT void MouseVisitor::visit (SMIL::Layout * layout) { - if (layout->surface ()) { +KDE_NO_EXPORT void MouseVisitor::visit (SMIL::Layout * tqlayout) { + if (tqlayout->surface ()) { Matrix m = matrix; - SRect rect = layout->region_surface->bounds; + SRect rect = tqlayout->region_surface->bounds; matrix = Matrix (rect.x(), rect.y(), - layout->region_surface->xscale, layout->region_surface->yscale); + tqlayout->region_surface->xscale, tqlayout->region_surface->yscale); matrix.transform (m); NodePtr node_save = node; - node = layout; - for (NodePtr r = layout->firstChild (); r; r = r->nextSibling ()) { + node = tqlayout; + for (NodePtr r = tqlayout->firstChild (); r; r = r->nextSibling ()) { if (r->id == SMIL::id_node_region) r->accept (this); if (!node->active ()) @@ -1232,7 +1232,7 @@ static void followLink (SMIL::LinkingBase * link) { else kdError() << "In document jumps smil not found" << endl; } else - for (NodePtr p = link->parentNode (); p; p = p->parentNode ()) { + for (NodePtr p = link->tqparentNode (); p; p = p->tqparentNode ()) { if (n->mrl () && n->mrl ()->opener == p) { p->setState (Node::state_deferred); p->mrl ()->setParam (StringPool::attr_src, link->href, 0L); @@ -1251,7 +1251,7 @@ KDE_NO_EXPORT void MouseVisitor::visit (SMIL::Anchor * anchor) { } KDE_NO_EXPORT void MouseVisitor::visit (SMIL::Area * area) { - NodePtr n = area->parentNode (); + NodePtr n = area->tqparentNode (); if (n->id >= SMIL::id_node_first_mediatype && n->id < SMIL::id_node_last_mediatype) { SMIL::MediaType * mt = convertNode (n); @@ -1338,22 +1338,22 @@ KDE_NO_EXPORT void MouseVisitor::visit (SMIL::MediaType * mediatype) { //----------------------------------------------------------------------------- -KDE_NO_CDTOR_EXPORT ViewArea::ViewArea (QWidget * parent, View * view) - : QWidget (parent, "kde_kmplayer_viewarea", WResizeNoErase | WRepaintNoErase), - m_parent (parent), +KDE_NO_CDTOR_EXPORT ViewArea::ViewArea (TQWidget * tqparent, View * view) + : TQWidget (tqparent, "kde_kmplayer_viewarea", WResizeNoErase | WRepaintNoErase), + m_parent (tqparent), m_view (view), m_collection (new KActionCollection (this)), surface (new ViewSurface (this)), m_mouse_invisible_timer (0), - m_repaint_timer (0), + m_tqrepaint_timer (0), m_fullscreen_scale (100), scale_lbl_id (-1), scale_slider_id (-1), m_fullscreen (false), m_minimal (false) { - setEraseColor (QColor (0, 0, 0)); + setEraseColor (TQColor (0, 0, 0)); setAcceptDrops (true); - new KAction (i18n ("Fullscreen"), KShortcut (Qt::Key_F), this, SLOT (accelActivated ()), m_collection, "view_fullscreen_toggle"); + new KAction (i18n ("Fullscreen"), KShortcut (TQt::Key_F), TQT_TQOBJECT(this), TQT_SLOT (accelActivated ()), m_collection, "view_fullscreen_toggle"); setMouseTracking (true); if (!image_data_map) imageCacheDeleter.setObject (image_data_map, new ImageDataMap); @@ -1363,11 +1363,11 @@ KDE_NO_CDTOR_EXPORT ViewArea::~ViewArea () { } KDE_NO_EXPORT void ViewArea::fullScreen () { - killTimers (); - m_mouse_invisible_timer = m_repaint_timer = 0; + TQT_TQOBJECT(this)->killTimers (); + m_mouse_invisible_timer = m_tqrepaint_timer = 0; if (m_fullscreen) { showNormal (); - reparent (m_parent, 0, QPoint (0, 0), true); + reparent (m_parent, 0, TQPoint (0, 0), true); static_cast (m_parent)->setWidget (this); for (unsigned i = 0; i < m_collection->count (); ++i) m_collection->action (i)->setEnabled (false); @@ -1376,20 +1376,20 @@ KDE_NO_EXPORT void ViewArea::fullScreen () { m_view->controlPanel ()->popupMenu ()->removeItem (scale_slider_id); scale_lbl_id = scale_slider_id = -1; } - m_view->controlPanel ()->button (ControlPanel::button_playlist)->setIconSet (QIconSet (QPixmap (playlist_xpm))); + m_view->controlPanel ()->button (ControlPanel::button_playlist)->setIconSet (TQIconSet (TQPixmap (playlist_xpm))); } else { - m_topwindow_rect = topLevelWidget ()->geometry (); - reparent (0L, 0, qApp->desktop()->screenGeometry(this).topLeft(), true); + m_topwindow_rect = tqtopLevelWidget ()->tqgeometry (); + reparent (0L, 0, tqApp->desktop()->screenGeometry(this).topLeft(), true); showFullScreen (); for (unsigned i = 0; i < m_collection->count (); ++i) m_collection->action (i)->setEnabled (true); - QPopupMenu * menu = m_view->controlPanel ()->popupMenu (); - QLabel * lbl = new QLabel (i18n ("Scale:"), menu); + TQPopupMenu * menu = m_view->controlPanel ()->popupMenu (); + TQLabel * lbl = new TQLabel (i18n ("Scale:"), menu); scale_lbl_id = menu->insertItem (lbl, -1, 4); - QSlider * slider = new QSlider (50, 150, 10, m_fullscreen_scale, Qt::Horizontal, menu); - connect (slider, SIGNAL (valueChanged (int)), this, SLOT (scale (int))); + TQSlider * slider = new TQSlider (50, 150, 10, m_fullscreen_scale, Qt::Horizontal, menu); + connect (slider, TQT_SIGNAL (valueChanged (int)), this, TQT_SLOT (scale (int))); scale_slider_id = menu->insertItem (slider, -1, 5); - m_view->controlPanel ()->button (ControlPanel::button_playlist)->setIconSet (QIconSet (QPixmap (normal_window_xpm))); + m_view->controlPanel ()->button (ControlPanel::button_playlist)->setIconSet (TQIconSet (TQPixmap (normal_window_xpm))); } m_fullscreen = !m_fullscreen; m_view->controlPanel()->popupMenu ()->setItemChecked (ControlPanel::menu_fullscreen, m_fullscreen); @@ -1413,26 +1413,26 @@ KDE_NO_EXPORT void ViewArea::fullScreen () { void ViewArea::minimalMode () { m_minimal = !m_minimal; - killTimers (); - m_mouse_invisible_timer = m_repaint_timer = 0; + TQT_TQOBJECT(this)->killTimers (); + m_mouse_invisible_timer = m_tqrepaint_timer = 0; if (m_minimal) { m_view->setViewOnly (); m_view->setControlPanelMode (KMPlayer::View::CP_AutoHide); m_view->setNoInfoMessages (true); - m_view->controlPanel ()->button (ControlPanel::button_playlist)->setIconSet (QIconSet (QPixmap (normal_window_xpm))); + m_view->controlPanel ()->button (ControlPanel::button_playlist)->setIconSet (TQIconSet (TQPixmap (normal_window_xpm))); } else { m_view->setControlPanelMode (KMPlayer::View::CP_Show); m_view->setNoInfoMessages (false); - m_view->controlPanel ()->button (ControlPanel::button_playlist)->setIconSet (QIconSet (QPixmap (playlist_xpm))); + m_view->controlPanel ()->button (ControlPanel::button_playlist)->setIconSet (TQIconSet (TQPixmap (playlist_xpm))); } - m_topwindow_rect = topLevelWidget ()->geometry (); + m_topwindow_rect = tqtopLevelWidget ()->tqgeometry (); } KDE_NO_EXPORT void ViewArea::accelActivated () { m_view->controlPanel()->popupMenu ()->activateItemAt (m_view->controlPanel()->popupMenu ()->indexOf (ControlPanel::menu_fullscreen)); } -KDE_NO_EXPORT void ViewArea::mousePressEvent (QMouseEvent * e) { +KDE_NO_EXPORT void ViewArea::mousePressEvent (TQMouseEvent * e) { if (surface->node) { MouseVisitor visitor (event_pointer_clicked, e->x(), e->y()); surface->node->accept (&visitor); @@ -1440,14 +1440,14 @@ KDE_NO_EXPORT void ViewArea::mousePressEvent (QMouseEvent * e) { e->accept (); } -KDE_NO_EXPORT void ViewArea::mouseDoubleClickEvent (QMouseEvent *) { +KDE_NO_EXPORT void ViewArea::mouseDoubleClickEvent (TQMouseEvent *) { m_view->fullScreen (); // screensaver stuff } -KDE_NO_EXPORT void ViewArea::mouseMoveEvent (QMouseEvent * e) { +KDE_NO_EXPORT void ViewArea::mouseMoveEvent (TQMouseEvent * e) { if (e->state () == Qt::NoButton) { int vert_buttons_pos = height () - m_view->statusBarHeight (); - int cp_height = m_view->controlPanel ()->maximumSize ().height (); + int cp_height = m_view->controlPanel ()->tqmaximumSize ().height (); m_view->delayedShowButtons (e->y() > vert_buttons_pos-cp_height && e->y() < vert_buttons_pos); } @@ -1481,22 +1481,22 @@ KDE_NO_EXPORT void ViewArea::syncVisual (const IRect & rect) { if (surface->node) surface->node->accept (&visitor); #else - repaint (QRect(rect.x, rect.y, rect.w, rect.h), false); + tqrepaint (TQRect(rect.x, rect.y, rect.w, rect.h), false); #endif - if (m_repaint_timer) { - killTimer (m_repaint_timer); - m_repaint_timer = 0; + if (m_tqrepaint_timer) { + killTimer (m_tqrepaint_timer); + m_tqrepaint_timer = 0; } //XFlush (qt_xdisplay ()); } -KDE_NO_EXPORT void ViewArea::paintEvent (QPaintEvent * pe) { +KDE_NO_EXPORT void ViewArea::paintEvent (TQPaintEvent * pe) { #ifdef HAVE_CAIRO if (surface->node) scheduleRepaint (IRect (pe->rect ().x (), pe->rect ().y (), pe->rect ().width (), pe->rect ().height ())); else #endif - QWidget::paintEvent (pe); + TQWidget::paintEvent (pe); } KDE_NO_EXPORT void ViewArea::scale (int val) { @@ -1510,7 +1510,7 @@ KDE_NO_EXPORT void ViewArea::updateSurfaceBounds () { h -= m_view->controlPanel ()->isVisible () ? (m_view->controlPanelMode () == View::CP_Only ? h - : (Single) m_view->controlPanel()->maximumSize ().height ()) + : (Single) m_view->controlPanel()->tqmaximumSize ().height ()) : Single (0); surface->resize (SRect (x, y, w, h)); Mrl *mrl = surface->node ? surface->node->mrl () : NULL; @@ -1538,14 +1538,14 @@ KDE_NO_EXPORT void ViewArea::updateSurfaceBounds () { scheduleRepaint (IRect (0, 0, width (), height ())); } -KDE_NO_EXPORT void ViewArea::resizeEvent (QResizeEvent *) { +KDE_NO_EXPORT void ViewArea::resizeEvent (TQResizeEvent *) { if (!m_view->controlPanel ()) return; Single x, y, w = width (), h = height (); Single hsb = m_view->statusBarHeight (); Single hcp = m_view->controlPanel ()->isVisible () ? (m_view->controlPanelMode () == View::CP_Only ? h-hsb - : (Single) m_view->controlPanel()->maximumSize ().height ()) + : (Single) m_view->controlPanel()->tqmaximumSize ().height ()) : Single (0); Single wws = w; // move controlpanel over video when autohiding and playing @@ -1593,18 +1593,18 @@ void ViewArea::setAudioVideoGeometry (const IRect &rect, unsigned int * bg_color h = hfw; } } - m_av_geometry = QRect (x, y, w, h); - QRect wrect = m_view->widgetStack ()->geometry (); - if (m_av_geometry != wrect && - !(m_av_geometry.width() <= 0 && + m_av_tqgeometry = TQRect (x, y, w, h); + TQRect wrect = m_view->widgetStack ()->tqgeometry (); + if (m_av_tqgeometry != wrect && + !(m_av_tqgeometry.width() <= 0 && wrect.width() <= 1 && wrect.height() <= 1)) { m_view->widgetStack ()->setGeometry (x, y, w, h); - wrect.unite (m_av_geometry); + wrect.unite (m_av_tqgeometry); scheduleRepaint (IRect (wrect.x (), wrect.y (), wrect.width (), wrect.height ())); } if (bg_color) - if (QColor (QRgb (*bg_color)) != (m_view->viewer ()->paletteBackgroundColor ())) { - m_view->viewer()->setCurrentBackgroundColor (QColor (QRgb (*bg_color))); + if (TQColor (TQRgb (*bg_color)) != (m_view->viewer ()->paletteBackgroundColor ())) { + m_view->viewer()->setCurrentBackgroundColor (TQColor (TQRgb (*bg_color))); scheduleRepaint (IRect (x, y, w, h)); } } @@ -1625,19 +1625,19 @@ KDE_NO_EXPORT SurfacePtr ViewArea::getSurface (NodePtr node) { return 0L; } -KDE_NO_EXPORT void ViewArea::showEvent (QShowEvent *) { +KDE_NO_EXPORT void ViewArea::showEvent (TQShowEvent *) { resizeEvent (0L); } -KDE_NO_EXPORT void ViewArea::dropEvent (QDropEvent * de) { +KDE_NO_EXPORT void ViewArea::dropEvent (TQDropEvent * de) { m_view->dropEvent (de); } -KDE_NO_EXPORT void ViewArea::dragEnterEvent (QDragEnterEvent* dee) { +KDE_NO_EXPORT void ViewArea::dragEnterEvent (TQDragEnterEvent* dee) { m_view->dragEnterEvent (dee); } -KDE_NO_EXPORT void ViewArea::contextMenuEvent (QContextMenuEvent * e) { +KDE_NO_EXPORT void ViewArea::contextMenuEvent (TQContextMenuEvent * e) { m_view->controlPanel ()->popupMenu ()->exec (e->globalPos ()); } @@ -1651,40 +1651,40 @@ KDE_NO_EXPORT void ViewArea::mouseMoved () { } KDE_NO_EXPORT void ViewArea::scheduleRepaint (const IRect &rect) { - if (m_repaint_timer) { - m_repaint_rect = m_repaint_rect.unite (rect); + if (m_tqrepaint_timer) { + m_tqrepaint_rect = m_tqrepaint_rect.unite (rect); } else { - m_repaint_rect = rect; - m_repaint_timer = startTimer (10); // 100 per sec should do + m_tqrepaint_rect = rect; + m_tqrepaint_timer = startTimer (10); // 100 per sec should do } } -KDE_NO_EXPORT void ViewArea::timerEvent (QTimerEvent * e) { +KDE_NO_EXPORT void ViewArea::timerEvent (TQTimerEvent * e) { if (e->timerId () == m_mouse_invisible_timer) { killTimer (m_mouse_invisible_timer); m_mouse_invisible_timer = 0; if (m_fullscreen) setCursor (BlankCursor); - } else if (e->timerId () == m_repaint_timer) { - killTimer (m_repaint_timer); - m_repaint_timer = 0; - //repaint (m_repaint_rect, false); - syncVisual (m_repaint_rect.intersect (IRect (0, 0, width (), height ()))); + } else if (e->timerId () == m_tqrepaint_timer) { + killTimer (m_tqrepaint_timer); + m_tqrepaint_timer = 0; + //tqrepaint (m_tqrepaint_rect, false); + syncVisual (m_tqrepaint_rect.intersect (IRect (0, 0, width (), height ()))); } else { - kdError () << "unknown timer " << e->timerId () << " " << m_repaint_timer << endl; + kdError () << "unknown timer " << e->timerId () << " " << m_tqrepaint_timer << endl; killTimer (e->timerId ()); } } -KDE_NO_EXPORT void ViewArea::closeEvent (QCloseEvent * e) { +KDE_NO_EXPORT void ViewArea::closeEvent (TQCloseEvent * e) { //kdDebug () << "closeEvent" << endl; if (m_fullscreen) { fullScreen (); - if (!m_parent->topLevelWidget ()->isVisible ()) - m_parent->topLevelWidget ()->show (); + if (!m_parent->tqtopLevelWidget ()->isVisible ()) + m_parent->tqtopLevelWidget ()->show (); e->ignore (); } else - QWidget::closeEvent (e); + TQWidget::closeEvent (e); } diff --git a/src/viewarea.h b/src/viewarea.h index 6277b6e..4f859ce 100644 --- a/src/viewarea.h +++ b/src/viewarea.h @@ -20,7 +20,7 @@ #ifndef KMPLAYER_VIEW_AREA_H #define KMPLAYER_VIEW_AREA_H -#include +#include class KActionCollection; @@ -32,51 +32,52 @@ class ViewAreaPrivate; /* * The area in which the video widget and controlpanel are laid out */ -class KMPLAYER_EXPORT ViewArea : public QWidget { +class KMPLAYER_EXPORT ViewArea : public TQWidget { Q_OBJECT + TQ_OBJECT public: - ViewArea (QWidget * parent, View * view); + ViewArea (TQWidget * tqparent, View * view); ~ViewArea (); KDE_NO_EXPORT bool isFullScreen () const { return m_fullscreen; } KDE_NO_EXPORT bool isMinimalMode () const { return m_minimal; } KDE_NO_EXPORT KActionCollection * actionCollection () const { return m_collection; } - KDE_NO_EXPORT QRect topWindowRect () const { return m_topwindow_rect; } + KDE_NO_EXPORT TQRect topWindowRect () const { return m_topwindow_rect; } SurfacePtr getSurface (NodePtr node); void setAudioVideoGeometry (const IRect &rect, unsigned int * bg); void setAudioVideoNode (NodePtr n); void mouseMoved (); void scheduleRepaint (const IRect &rect); - void resizeEvent (QResizeEvent *); + void resizeEvent (TQResizeEvent *); void minimalMode (); public slots: void fullScreen (); void accelActivated (); void scale (int); protected: - void showEvent (QShowEvent *); - void mouseMoveEvent (QMouseEvent *); - void mousePressEvent (QMouseEvent *); - void mouseDoubleClickEvent (QMouseEvent *); - void dragEnterEvent (QDragEnterEvent *); - void dropEvent (QDropEvent *); - void contextMenuEvent (QContextMenuEvent * e); - void paintEvent (QPaintEvent *); - void timerEvent (QTimerEvent * e); - void closeEvent (QCloseEvent * e); + void showEvent (TQShowEvent *); + void mouseMoveEvent (TQMouseEvent *); + void mousePressEvent (TQMouseEvent *); + void mouseDoubleClickEvent (TQMouseEvent *); + void dragEnterEvent (TQDragEnterEvent *); + void dropEvent (TQDropEvent *); + void contextMenuEvent (TQContextMenuEvent * e); + void paintEvent (TQPaintEvent *); + void timerEvent (TQTimerEvent * e); + void closeEvent (TQCloseEvent * e); private: void syncVisual (const IRect & rect); void updateSurfaceBounds (); ViewAreaPrivate * d; - QWidget * m_parent; + TQWidget * m_parent; View * m_view; KActionCollection * m_collection; SurfacePtr surface; NodePtrW video_node; - QRect m_av_geometry; - IRect m_repaint_rect; - QRect m_topwindow_rect; + TQRect m_av_tqgeometry; + IRect m_tqrepaint_rect; + TQRect m_topwindow_rect; int m_mouse_invisible_timer; - int m_repaint_timer; + int m_tqrepaint_timer; int m_fullscreen_scale; int scale_lbl_id; int scale_slider_id; diff --git a/src/xineplayer.cpp b/src/xineplayer.cpp index 17e6fd2..8bb391f 100644 --- a/src/xineplayer.cpp +++ b/src/xineplayer.cpp @@ -23,13 +23,13 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include "kmplayer_backend.h" #include "kmplayer_callback_stub.h" #include "kmplayer_callback.h" @@ -62,7 +62,7 @@ typedef struct { static KXinePlayer * xineapp; static KMPlayer::Callback_stub * callback; -static QMutex mutex (true); +static TQMutex mutex (true); static xine_t *xine; static xine_stream_t *stream; @@ -97,31 +97,31 @@ static double pixel_aspect; static int running = 0; static volatile int firstframe = 0; -static const int event_finished = QEvent::User; -static const int event_progress = QEvent::User + 2; -static const int event_url = QEvent::User + 3; -static const int event_size = QEvent::User + 4; -static const int event_title = QEvent::User + 5; -static const int event_video = QEvent::User + 6; -static QString mrl; -static QString sub_mrl; -static QString rec_mrl; -static QString alang, slang; -static QStringList alanglist, slanglist; - -static QString elmentry ("entry"); -static QString elmitem ("item"); -static QString attname ("name"); -static QString atttype ("type"); -static QString attdefault ("DEFAULT"); -static QString attvalue ("value"); -static QString attstart ("START"); -static QString attend ("end"); -static QString valrange ("range"); -static QString valnum ("num"); -static QString valbool ("bool"); -static QString valenum ("enum"); -static QString valstring ("string"); +static const int event_finished = TQEvent::User; +static const int event_progress = TQEvent::User + 2; +static const int event_url = TQEvent::User + 3; +static const int event_size = TQEvent::User + 4; +static const int event_title = TQEvent::User + 5; +static const int event_video = TQEvent::User + 6; +static TQString mrl; +static TQString sub_mrl; +static TQString rec_mrl; +static TQString alang, slang; +static TQStringList alanglist, slanglist; + +static TQString elmentry ("entry"); +static TQString elmitem ("item"); +static TQString attname ("name"); +static TQString atttype ("type"); +static TQString attdefault ("DEFAULT"); +static TQString attvalue ("value"); +static TQString attstart ("START"); +static TQString attend ("end"); +static TQString valrange ("range"); +static TQString valnum ("num"); +static TQString valbool ("bool"); +static TQString valenum ("enum"); +static TQString valstring ("string"); extern "C" { @@ -146,7 +146,7 @@ static void frame_output_cb(void * /*data*/, int /*video_width*/, int /*video_he movie_width = xine_get_stream_info(stream, XINE_STREAM_INFO_VIDEO_WIDTH); movie_height = xine_get_stream_info(stream, XINE_STREAM_INFO_VIDEO_HEIGHT); mutex.unlock (); - QApplication::postEvent (xineapp, new XineMovieParamEvent (movie_length, movie_width, movie_height, alanglist, slanglist, true)); + TQApplication::postEvent (xineapp, new XineMovieParamEvent (movie_length, movie_width, movie_height, alanglist, slanglist, true)); } @@ -185,15 +185,15 @@ static void event_listener(void * /*user_data*/, const xine_event_t *event) { if (repeat_count-- > 0) xine_play (stream, 0, 0); else - QApplication::postEvent (xineapp, new QEvent ((QEvent::Type) event_finished)); + TQApplication::postEvent (xineapp, new TQEvent ((TQEvent::Type) event_finished)); break; case XINE_EVENT_PROGRESS: - QApplication::postEvent (xineapp, new XineProgressEvent (((xine_progress_data_t *) event->data)->percent)); + TQApplication::postEvent (xineapp, new XineProgressEvent (((xine_progress_data_t *) event->data)->percent)); break; case XINE_EVENT_MRL_REFERENCE: fprintf(stderr, "XINE_EVENT_MRL_REFERENCE %s\n", ((xine_mrl_reference_data_t*)event->data)->mrl); - QApplication::postEvent (xineapp, new XineURLEvent (QString::fromLocal8Bit (((xine_mrl_reference_data_t*)event->data)->mrl))); + TQApplication::postEvent (xineapp, new XineURLEvent (TQString::fromLocal8Bit (((xine_mrl_reference_data_t*)event->data)->mrl))); break; case XINE_EVENT_FRAME_FORMAT_CHANGE: fprintf (stderr, "XINE_EVENT_FRAME_FORMAT_CHANGE\n"); @@ -201,7 +201,7 @@ static void event_listener(void * /*user_data*/, const xine_event_t *event) { case XINE_EVENT_UI_SET_TITLE: { xine_ui_data_t * data = (xine_ui_data_t *) event->data; - QApplication::postEvent(xineapp, new XineTitleEvent(data->str)); + TQApplication::postEvent(xineapp, new XineTitleEvent(data->str)); fprintf (stderr, "Set title event %s\n", data->str); } break; @@ -221,7 +221,7 @@ static void event_listener(void * /*user_data*/, const xine_event_t *event) { for (int i = 0; i < nr; ++i) { if (!xine_get_audio_lang (stream, i, langstr)) continue; - QString ls = QString::fromLocal8Bit (langstr).stripWhiteSpace(); + TQString ls = TQString(TQString::fromLocal8Bit (langstr)).stripWhiteSpace(); if (ls.isEmpty ()) continue; if (!slang.isEmpty () && alang == ls) @@ -234,7 +234,7 @@ static void event_listener(void * /*user_data*/, const xine_event_t *event) { for (int i = 0; i < nr; ++i) { if (!xine_get_spu_lang (stream, i, langstr)) continue; - QString ls = QString::fromLocal8Bit (langstr).stripWhiteSpace(); + TQString ls = TQString(TQString::fromLocal8Bit (langstr)).stripWhiteSpace(); if (ls.isEmpty ()) continue; if (!slang.isEmpty () && slang == ls) @@ -247,7 +247,7 @@ static void event_listener(void * /*user_data*/, const xine_event_t *event) { movie_width = w; movie_height = h; movie_length = l; - QApplication::postEvent (xineapp, new XineMovieParamEvent (l, w, h, alanglist, slanglist, firstframe)); + TQApplication::postEvent (xineapp, new XineMovieParamEvent (l, w, h, alanglist, slanglist, firstframe)); if (running && firstframe) firstframe = 0; if (window_created && w > 0 && h > 0) { @@ -271,16 +271,16 @@ static void event_listener(void * /*user_data*/, const xine_event_t *event) { using namespace KMPlayer; Backend::Backend () - : DCOPObject (QCString ("Backend")) { + : DCOPObject (TQCString ("Backend")) { } Backend::~Backend () {} -void Backend::setURL (QString url) { +void Backend::setURL (TQString url) { mrl = url; } -void Backend::setSubTitleURL (QString url) { +void Backend::setSubTitleURL (TQString url) { sub_mrl = url; } @@ -289,7 +289,7 @@ void Backend::play (int repeat_count) { } void Backend::stop () { - QTimer::singleShot (0, xineapp, SLOT (stop ())); + TQTimer::singleShot (0, xineapp, TQT_SLOT (stop ())); } void Backend::pause () { @@ -323,11 +323,11 @@ void Backend::volume (int v, bool) { void Backend::frequency (int) { } -void Backend::setAudioLang (int id, QString al) { +void Backend::setAudioLang (int id, TQString al) { xineapp->setAudioLang (id, al); } -void Backend::setSubtitle (int id, QString sl) { +void Backend::setSubtitle (int id, TQString sl) { xineapp->setSubtitle (id, sl); } @@ -337,10 +337,10 @@ void Backend::quit () { if (running) stop (); else - QTimer::singleShot (0, qApp, SLOT (quit ())); + TQTimer::singleShot (0, tqApp, TQT_SLOT (quit ())); } -bool updateConfigEntry (const QString & name, const QString & value) { +bool updateConfigEntry (const TQString & name, const TQString & value) { fprintf (stderr, "%s=%s\n", name.ascii (), (const char *) value.local8Bit ()); bool changed = false; xine_cfg_entry_t cfg_entry; @@ -358,22 +358,22 @@ bool updateConfigEntry (const QString & name, const QString & value) { return changed; } -void Backend::setConfig (QByteArray data) { - QString err; +void Backend::setConfig (TQByteArray data) { + TQString err; int line, column; - QDomDocument dom; + TQDomDocument dom; if (dom.setContent (data, false, &err, &line, &column)) { if (dom.childNodes().length() == 1) { - for (QDomNode node = dom.firstChild().firstChild(); + for (TQDomNode node = dom.firstChild().firstChild(); !node.isNull (); node = node.nextSibling ()) { - QDomNamedNodeMap attr = node.attributes (); + TQDomNamedNodeMap attr = node.attributes (); updateConfigEntry (attr.namedItem (attname).nodeValue (), attr.namedItem (attvalue).nodeValue ()); } xine_config_save (xine, configfile); } else - err = QString ("invalid data"); + err = TQString ("invalid data"); } if (callback) callback->errorMessage (0, err); @@ -389,7 +389,7 @@ bool Backend::isPlaying () { } KXinePlayer::KXinePlayer (int _argc, char ** _argv) - : QApplication (_argc, _argv, false) { + : TQApplication (_argc, _argv, false) { } void KXinePlayer::init () { @@ -441,7 +441,7 @@ void KXinePlayer::init () { options[i+1] = 0L; xine_config_register_enum (xine, "audio.visualization", 0, (char ** ) options, 0L, 0L, 0, xine_config_cb, 0L); if (!callback) - QTimer::singleShot (10, this, SLOT (play ())); + TQTimer::singleShot (10, this, TQT_SLOT (play ())); } KXinePlayer::~KXinePlayer () { @@ -456,32 +456,32 @@ KXinePlayer::~KXinePlayer () { xineapp = 0L; } -void getConfigEntries (QByteArray & buf) { +void getConfigEntries (TQByteArray & buf) { xine_cfg_entry_t entry; - QDomDocument doc; - QDomElement root = doc.createElement (QString ("document")); + TQDomDocument doc; + TQDomElement root = doc.createElement (TQString ("document")); for (int i = xine_config_get_first_entry (xine, &entry); i; i = xine_config_get_next_entry (xine, &entry)) { - QDomElement elm = doc.createElement (elmentry); - elm.setAttribute (attname, QString (entry.key)); + TQDomElement elm = doc.createElement (elmentry); + elm.setAttribute (attname, TQString (entry.key)); if (entry.type == XINE_CONFIG_TYPE_STRING || entry.type == XINE_CONFIG_TYPE_UNKNOWN) { elm.setAttribute (atttype, valstring); - elm.setAttribute (attvalue, QString (entry.str_value)); + elm.setAttribute (attvalue, TQString (entry.str_value)); } else { - elm.setAttribute (attdefault, QString::number (entry.num_default)); - elm.setAttribute (attvalue, QString::number (entry.num_value)); + elm.setAttribute (attdefault, TQString::number (entry.num_default)); + elm.setAttribute (attvalue, TQString::number (entry.num_value)); switch (entry.type) { case XINE_CONFIG_TYPE_RANGE: elm.setAttribute (atttype, valrange); - elm.setAttribute (attstart, QString::number (entry.range_min)); - elm.setAttribute (attend, QString::number (entry.range_max)); + elm.setAttribute (attstart, TQString::number (entry.range_min)); + elm.setAttribute (attend, TQString::number (entry.range_max)); break; case XINE_CONFIG_TYPE_ENUM: elm.setAttribute (atttype, valenum); for (int i = 0; entry.enum_values[i]; i++) { - QDomElement item = doc.createElement (elmitem); - item.setAttribute (attvalue, QString (entry.enum_values[i])); + TQDomElement item = doc.createElement (elmitem); + item.setAttribute (attvalue, TQString (entry.enum_values[i])); elm.appendChild (item); } break; @@ -496,12 +496,12 @@ void getConfigEntries (QByteArray & buf) { } } if (entry.help) - elm.appendChild (doc.createTextNode (QString::fromUtf8 (entry.help))); + elm.appendChild (doc.createTextNode (TQString::fromUtf8 (entry.help))); root.appendChild (elm); } doc.appendChild (root); - QString exp = doc.toString (); - QCString cexp = exp.utf8 (); + TQString exp = doc.toString (); + TQCString cexp = exp.utf8 (); buf.duplicate (cexp); buf.resize (cexp.length ()); // strip terminating \0 } @@ -522,7 +522,7 @@ void KXinePlayer::play (int repeat) { movie_height = 0; if (mrl.startsWith ("cdda://")) - mrl = QString ("cdda:/") + mrl.mid (7); + mrl = TQString ("cdda:/") + mrl.mid (7); stream = xine_stream_new (xine, ao_port, vo_port); event_queue = xine_event_new_queue (stream); xine_event_create_listener_thread (event_queue, event_listener, NULL); @@ -531,12 +531,12 @@ void KXinePlayer::play (int repeat) { char ** mrls = xine_get_autoplay_mrls (xine, "CD", &nr); running = 1; for (int i = 0; i < nr; i++) { - QString m (mrls[i]); - QString title; + TQString m (mrls[i]); + TQString title; if (xine_open (stream, mrls[i])) { const char * t = xine_get_meta_info (stream, XINE_META_INFO_TITLE); if (t && t[0]) - title = QString::fromUtf8 (t); + title = TQString::fromUtf8 (t); xine_close (stream); } if (callback) @@ -552,14 +552,14 @@ void KXinePlayer::play (int repeat) { xine_gui_send_vo_data(stream, XINE_GUI_SEND_VIDEOWIN_VISIBLE, (void *) 1); running = 1; - QString mrlsetup = mrl; + TQString mrlsetup = mrl; if (!rec_mrl.isEmpty ()) { char * rm = strdup (rec_mrl.local8Bit ()); char *bn = basename (rm); char *dn = dirname (rm); if (bn) - updateConfigEntry (QString ("media.capture.save_dir"), QString::fromLocal8Bit (dn)); - mrlsetup += QString ("#save:") + QString::fromLocal8Bit (bn); + updateConfigEntry (TQString ("media.capture.save_dir"), TQString::fromLocal8Bit (dn)); + mrlsetup += TQString ("#save:") + TQString::fromLocal8Bit (bn); free (rm); } if (!xine_open (stream, (const char *) mrlsetup.local8Bit ())) { @@ -593,7 +593,7 @@ void KXinePlayer::play (int repeat) { } audio_vis = false; if (xine_get_stream_info (stream, XINE_STREAM_INFO_HAS_VIDEO)) - QApplication::postEvent(xineapp, new QEvent((QEvent::Type)event_video)); + TQApplication::postEvent(xineapp, new TQEvent((TQEvent::Type)event_video)); else audio_vis = xine_config_lookup_entry (xine, "audio.visualization", &audio_vis_cfg_entry); @@ -613,11 +613,11 @@ void KXinePlayer::stop () { xine_stop (sub_stream); xine_stop (stream); mutex.unlock (); - QTimer::singleShot (10, this, SLOT (postFinished ())); + TQTimer::singleShot (10, this, TQT_SLOT (postFinished ())); } void KXinePlayer::postFinished () { - QApplication::postEvent (xineapp, new QEvent ((QEvent::Type) event_finished)); + TQApplication::postEvent (xineapp, new TQEvent ((TQEvent::Type) event_finished)); } void KXinePlayer::pause () { @@ -633,10 +633,10 @@ void KXinePlayer::pause () { } void KXinePlayer::finished () { - QTimer::singleShot (10, this, SLOT (stop ())); + TQTimer::singleShot (10, this, TQT_SLOT (stop ())); } -void KXinePlayer::setAudioLang (int id, const QString & al) { +void KXinePlayer::setAudioLang (int id, const TQString & al) { alang = al; mutex.lock (); if (xine_get_status (stream) == XINE_STATUS_PLAY) @@ -644,7 +644,7 @@ void KXinePlayer::setAudioLang (int id, const QString & al) { mutex.unlock (); } -void KXinePlayer::setSubtitle (int id, const QString & sl) { +void KXinePlayer::setSubtitle (int id, const TQString & sl) { slang = sl; mutex.lock (); if (xine_get_status (stream) == XINE_STATUS_PLAY) @@ -662,7 +662,7 @@ void KXinePlayer::updatePosition () { movie_pos = pos; callback->moviePosition (pos/100); } - QTimer::singleShot (500, this, SLOT (updatePosition ())); + TQTimer::singleShot (500, this, TQT_SLOT (updatePosition ())); } void KXinePlayer::saturation (int val) { @@ -721,7 +721,7 @@ void KXinePlayer::seek (int val) { } } -bool KXinePlayer::event (QEvent * e) { +bool KXinePlayer::event (TQEvent * e) { switch (e->type()) { case event_finished: { fprintf (stderr, "event_finished\n"); @@ -748,7 +748,7 @@ bool KXinePlayer::event (QEvent * e) { if (callback) callback->finished (); else - QTimer::singleShot (0, this, SLOT (quit ())); + TQTimer::singleShot (0, this, TQT_SLOT (quit ())); break; } case event_size: { @@ -758,7 +758,7 @@ bool KXinePlayer::event (QEvent * e) { callback->movieParams (se->length/100, se->width, se->height, se->height ? 1.0*se->width/se->height : 1.0, se->alang, se->slang); if (se->first_frame) { callback->playing (); - QTimer::singleShot (500, this, SLOT (updatePosition ())); + TQTimer::singleShot (500, this, TQT_SLOT (updatePosition ())); } } break; @@ -772,7 +772,7 @@ bool KXinePlayer::event (QEvent * e) { case event_url: { XineURLEvent * ue = static_cast (e); if (callback) - callback->subMrl (ue->url, QString ()); + callback->subMrl (ue->url, TQString ()); break; } case event_title: { @@ -783,7 +783,7 @@ bool KXinePlayer::event (QEvent * e) { } case event_video: if (callback) - callback->statusMessage ((int) KMPlayer::Callback::stat_hasvideo, QString ()); + callback->statusMessage ((int) KMPlayer::Callback::stat_hasvideo, TQString ()); break; default: return false; @@ -791,33 +791,33 @@ bool KXinePlayer::event (QEvent * e) { return true; } -void KXinePlayer::saveState (QSessionManager & sm) { +void KXinePlayer::saveState (TQSessionManager & sm) { if (callback) - sm.setRestartHint (QSessionManager::RestartNever); + sm.setRestartHint (TQSessionManager::RestartNever); } -XineMovieParamEvent::XineMovieParamEvent(int l, int w, int h, const QStringList & a, const QStringList & s, bool ff) - : QEvent ((QEvent::Type) event_size), +XineMovieParamEvent::XineMovieParamEvent(int l, int w, int h, const TQStringList & a, const TQStringList & s, bool ff) + : TQEvent ((TQEvent::Type) event_size), length (l), width (w), height (h), alang (a), slang (s) , first_frame (ff) {} -XineURLEvent::XineURLEvent (const QString & u) - : QEvent ((QEvent::Type) event_url), url (u) +XineURLEvent::XineURLEvent (const TQString & u) + : TQEvent ((TQEvent::Type) event_url), url (u) {} XineTitleEvent::XineTitleEvent (const char * t) - : QEvent ((QEvent::Type) event_title), title (QString::fromUtf8 (t)) + : TQEvent ((TQEvent::Type) event_title), title (TQString::fromUtf8 (t)) { - QUrl::decode (title); + TQUrl::decode (title); } XineProgressEvent::XineProgressEvent (const int p) - : QEvent ((QEvent::Type) event_progress), progress (p) + : TQEvent ((TQEvent::Type) event_progress), progress (p) {} //static bool translateCoordinates (int wx, int wy, int mx, int my) { // movie_width -class XEventThread : public QThread { +class XEventThread : public TQThread { protected: void run () { Time prev_click_time = 0; @@ -1056,8 +1056,8 @@ int main(int argc, char **argv) { snprintf(configfile, sizeof (configfile), "%s%s", xine_get_homedir(), "/.xine/config2"); xineapp = new KXinePlayer (argc, argv); window_created = true; - QString vo_driver ("auto"); - QString ao_driver ("auto"); + TQString vo_driver ("auto"); + TQString ao_driver ("auto"); for (int i = 1; i < argc; i++) { if (!strcmp (argv [i], "-vo") && ++i < argc) { vo_driver = argv [i]; @@ -1079,9 +1079,9 @@ int main(int argc, char **argv) { } else if (!strcmp (argv [i], "-window")) { ; } else if (!strcmp (argv [i], "-sub") && ++i < argc) { - sub_mrl = QString (argv [i]); + sub_mrl = TQString (argv [i]); } else if (!strcmp (argv [i], "-lang") && ++i < argc) { - slang = alang = QString (argv [i]); + slang = alang = TQString (argv [i]); } else if (!strcmp (argv [i], "-v")) { xine_verbose = true; } else if (!strcmp (argv [i], "-vv")) { @@ -1092,15 +1092,15 @@ int main(int argc, char **argv) { strncpy (configfile, argv [i], sizeof (configfile)); configfile[sizeof (configfile) - 1] = 0; } else if (!strcmp (argv [i], "-cb") && ++i < argc) { - QString str = argv [i]; - int pos = str.find ('/'); + TQString str = argv [i]; + int pos = str.tqfind ('/'); if (pos > -1) { fprintf (stderr, "callback is %s %s\n", str.left (pos).ascii (), str.mid (pos + 1).ascii ()); callback = new KMPlayer::Callback_stub (str.left (pos).ascii (), str.mid (pos + 1).ascii ()); } } else if (!strcmp (argv [i], "-rec") && i < argc - 1) { - rec_mrl = QString::fromLocal8Bit (argv [++i]); + rec_mrl = TQString::fromLocal8Bit (argv [++i]); } else if (!strcmp (argv [i], "-loop") && i < argc - 1) { repeat_count = atol (argv [++i]); } else { @@ -1108,10 +1108,10 @@ int main(int argc, char **argv) { delete xineapp; return 1; } - mrl = QString::fromLocal8Bit (argv [i]); + mrl = TQString::fromLocal8Bit (argv [i]); } } - bool config_changed = !QFile (configfile).exists (); + bool config_changed = !TQFile (configfile).exists (); if (!callback && mrl.isEmpty ()) { fprintf (stderr, "usage: %s [-vo (xv|xshm)] [-ao (arts|esd|..)] " @@ -1141,16 +1141,16 @@ int main(int argc, char **argv) { xineapp->init (); if (dvd_device) - config_changed |= updateConfigEntry (QString ("input.dvd_device"), QString (dvd_device)); + config_changed |= updateConfigEntry (TQString ("input.dvd_device"), TQString (dvd_device)); if (vcd_device) - config_changed |= updateConfigEntry (QString ("input.vcd_device"), QString (vcd_device)); + config_changed |= updateConfigEntry (TQString ("input.vcd_device"), TQString (vcd_device)); if (grab_device) - config_changed |= updateConfigEntry (QString ("media.video4linux.video_device"), QString (grab_device)); + config_changed |= updateConfigEntry (TQString ("media.video4linux.video_device"), TQString (grab_device)); if (config_changed) xine_config_save (xine, configfile); - QStringList vos = QStringList::split (',', vo_driver); + TQStringList vos = TQStringList::split (',', vo_driver); for (int i = 0; i < vos.size (); i++) { if (vos[i] == "x11") vos[i] = "xshm"; @@ -1164,7 +1164,7 @@ int main(int argc, char **argv) { } if (!vo_port) fprintf (stderr, "no video driver found\n"); - QStringList aos = QStringList::split (',', ao_driver); + TQStringList aos = TQStringList::split (',', ao_driver); for (int i = 0; i < aos.size (); i++) { fprintf (stderr, "trying audio driver %s ..\n", aos[i].ascii ()); ao_port = xine_open_audio_driver (xine, aos[i].ascii (), NULL); @@ -1175,7 +1175,7 @@ int main(int argc, char **argv) { fprintf (stderr, "audio driver initialisation failed\n"); stream = xine_stream_new (xine, ao_port, vo_port); - QByteArray buf; + TQByteArray buf; if (wants_config) { /* TODO? Opening the output drivers in front, will add more config settings. Unfortunately, that also adds a second in startup.. @@ -1196,7 +1196,7 @@ int main(int argc, char **argv) { if (callback) callback->started (dcopclient.appId (), buf); else - ;//printf ("%s\n", QString (buf).ascii ()); + ;//printf ("%s\n", TQString (buf).ascii ()); xineapp->exec (); if (sub_stream) diff --git a/src/xineplayer.h b/src/xineplayer.h index fe7a785..0a40fc4 100644 --- a/src/xineplayer.h +++ b/src/xineplayer.h @@ -19,38 +19,39 @@ #ifndef _KXINEPLAYER_H_ #define _KXINEPLAYER_H_ -#include -#include -#include -#include +#include +#include +#include +#include -struct XineMovieParamEvent : public QEvent { - XineMovieParamEvent (int l, int w, int h, const QStringList & al, const QStringList & sl, bool ff=false); +struct XineMovieParamEvent : public TQEvent { + XineMovieParamEvent (int l, int w, int h, const TQStringList & al, const TQStringList & sl, bool ff=false); int length; int width; int height; - QStringList alang; - QStringList slang; + TQStringList alang; + TQStringList slang; bool first_frame; }; -struct XineURLEvent : public QEvent { - XineURLEvent (const QString & u); - QString url; +struct XineURLEvent : public TQEvent { + XineURLEvent (const TQString & u); + TQString url; }; -struct XineTitleEvent : public QEvent { +struct XineTitleEvent : public TQEvent { XineTitleEvent (const char *); - QString title; + TQString title; }; -struct XineProgressEvent : public QEvent { +struct XineProgressEvent : public TQEvent { XineProgressEvent (int p); int progress; }; -class KXinePlayer : public QApplication { +class KXinePlayer : public TQApplication { Q_OBJECT + TQ_OBJECT public: KXinePlayer (int argc, char ** argv); ~KXinePlayer (); @@ -63,9 +64,9 @@ public: void brightness (int val); void volume (int val); void seek (int val); - bool event (QEvent * e); - void setAudioLang (int, const QString &); - void setSubtitle (int, const QString &); + bool event (TQEvent * e); + void setAudioLang (int, const TQString &); + void setSubtitle (int, const TQString &); public slots: void play (int repeat_count); void stop (); @@ -73,7 +74,7 @@ public slots: void updatePosition (); void postFinished (); protected: - void saveState (QSessionManager & sm); + void saveState (TQSessionManager & sm); }; #endif //_KXINEPLAYER_H_ diff --git a/src/xvplayer.cpp b/src/xvplayer.cpp index 7c773c3..3319813 100644 --- a/src/xvplayer.cpp +++ b/src/xvplayer.cpp @@ -22,13 +22,13 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include "kmplayer_backend.h" #include "kmplayer_callback_stub.h" #include "kmplayer_callback.h" @@ -60,7 +60,7 @@ static bool reset_xv_autopaint_colorkey; static bool reset_xv_mute; static int xvport; static int xv_encoding = -1; -static QString xv_norm; +static TQString xv_norm; static int xv_frequency; static int screen; static int movie_width; @@ -84,21 +84,21 @@ enum { limit_last }; static struct Limit { int min; int max; } xv_limits [limit_last]; -static QString elmentry ("entry"); -static QString elmitem ("item"); -static QString attname ("name"); -static QString atttype ("type"); -static QString attdefault ("DEFAULT"); -static QString attvalue ("value"); -//static QString attstart ("START"); -//static QString attend ("END"); -//static QString valrange ("range"); -//static QString valnum ("num"); -//static QString valbool ("bool"); -//static QString valenum ("enum"); -//static QString valstring ("string"); -static QString valtree ("tree"); -static QByteArray config_buf; +static TQString elmentry ("entry"); +static TQString elmitem ("item"); +static TQString attname ("name"); +static TQString atttype ("type"); +static TQString attdefault ("DEFAULT"); +static TQString attvalue ("value"); +//static TQString attstart ("START"); +//static TQString attend ("END"); +//static TQString valrange ("range"); +//static TQString valnum ("num"); +//static TQString valbool ("bool"); +//static TQString valenum ("enum"); +//static TQString valstring ("string"); +static TQString valtree ("tree"); +static TQByteArray config_buf; extern "C" { @@ -113,15 +113,15 @@ static void putVideo () { using namespace KMPlayer; Backend::Backend () - : DCOPObject (QCString ("Backend")) { + : DCOPObject (TQCString ("Backend")) { } Backend::~Backend () {} -void Backend::setURL (QString) { +void Backend::setURL (TQString) { } -void Backend::setSubTitleURL (QString) { +void Backend::setSubTitleURL (TQString) { } void Backend::play (int) { @@ -129,7 +129,7 @@ void Backend::play (int) { } void Backend::stop () { - QTimer::singleShot (0, xvapp, SLOT (stop ())); + TQTimer::singleShot (0, xvapp, TQT_SLOT (stop ())); } void Backend::pause () { @@ -167,10 +167,10 @@ void Backend::frequency (int f) { xvapp->frequency (f); } -void Backend::setAudioLang (int, QString) { +void Backend::setAudioLang (int, TQString) { } -void Backend::setSubtitle (int, QString) { +void Backend::setSubtitle (int, TQString) { } void Backend::quit () { @@ -179,29 +179,29 @@ void Backend::quit () { if (running) stop (); else - QTimer::singleShot (0, qApp, SLOT (quit ())); + TQTimer::singleShot (0, tqApp, TQT_SLOT (quit ())); } -bool updateConfigEntry (const QString & name, const QString & value) { +bool updateConfigEntry (const TQString & name, const TQString & value) { fprintf (stderr, "%s=%s\n", name.ascii (), (const char *) value.local8Bit ()); return true; } -void Backend::setConfig (QByteArray data) { - QString err; +void Backend::setConfig (TQByteArray data) { + TQString err; int line, column; - QDomDocument dom; + TQDomDocument dom; if (dom.setContent (data, false, &err, &line, &column)) { if (dom.childNodes().length() == 1) { - for (QDomNode node = dom.firstChild().firstChild(); + for (TQDomNode node = dom.firstChild().firstChild(); !node.isNull (); node = node.nextSibling ()) { - QDomNamedNodeMap attr = node.attributes (); + TQDomNamedNodeMap attr = node.attributes (); updateConfigEntry (attr.namedItem (attname).nodeValue (), attr.namedItem (attvalue).nodeValue ()); } } else - err = QString ("invalid data"); + err = TQString ("invalid data"); } if (callback) callback->errorMessage (0, err); @@ -212,7 +212,7 @@ bool Backend::isPlaying () { } KXVideoPlayer::KXVideoPlayer (int _argc, char ** _argv) - : QApplication (_argc, _argv, false), mute_timer (0) { + : TQApplication (_argc, _argv, false), mute_timer (0) { } void KXVideoPlayer::init () { @@ -226,17 +226,17 @@ void KXVideoPlayer::init () { wid = XCreateSimpleWindow(display, XDefaultRootWindow(display), xpos, ypos, width, height, 1, 0, 0); if (!callback) - QTimer::singleShot (10, this, SLOT (play ())); + TQTimer::singleShot (10, this, TQT_SLOT (play ())); XSelectInput (display, wid, (PointerMotionMask | ExposureMask | KeyPressMask | ButtonPressMask | StructureNotifyMask)); // | SubstructureNotifyMask)); XvAdaptorInfo * ai; unsigned int adaptors; xv_success = true; - QDomDocument doc; - QDomElement root = doc.createElement (QString ("document")); + TQDomDocument doc; + TQDomElement root = doc.createElement (TQString ("document")); if (XvQueryAdaptors (display, XDefaultRootWindow (display), &adaptors, &ai) == Success) { - QDomElement elm = doc.createElement (elmentry); - elm.setAttribute (attname, QString ("XVideo")); + TQDomElement elm = doc.createElement (elmentry); + elm.setAttribute (attname, TQString ("XVideo")); elm.setAttribute (atttype, valtree); for (unsigned i = 0; i < adaptors; i++) { if ((ai[i].type & XvInputMask) && @@ -270,21 +270,21 @@ void KXVideoPlayer::init () { unsigned nr_encode; XvQueryEncodings (display, port, &nr_encode, &encodings); if (encodings) { - QDomElement port_item = doc.createElement (QString("Port")); - port_item.setAttribute (attvalue, QString::number (port)); + TQDomElement port_item = doc.createElement (TQString("Port")); + port_item.setAttribute (attvalue, TQString::number (port)); if (freq_found) - port_item.setAttribute (QString("FREQ"), QString("1")); + port_item.setAttribute (TQString("FREQ"), TQString("1")); for (unsigned i = 0; i < nr_encode; i++) { if (strcmp (encodings[i].name, "XV_IMAGE")) { - if (xvport == port && xv_encoding < 0 && !xv_norm.isEmpty () && QString (encodings[i].name).lower ().startsWith(xv_norm.lower ())) + if (xvport == port && xv_encoding < 0 && !xv_norm.isEmpty () && TQString (encodings[i].name).lower ().startsWith(xv_norm.lower ())) xv_encoding = encodings[i].encoding_id; if (port == xvport && encodings[i].encoding_id == xv_encoding) { movie_width = encodings[i].width; movie_height = encodings[i].height; } - QDomElement item = doc.createElement (QString ("Input")); - item.setAttribute (attvalue, QString::number (encodings[i].encoding_id)); - item.setAttribute (attname, QString (encodings[i].name)); + TQDomElement item = doc.createElement (TQString ("Input")); + item.setAttribute (attvalue, TQString::number (encodings[i].encoding_id)); + item.setAttribute (attname, TQString (encodings[i].name)); port_item.appendChild (item); fprintf (stderr, " encoding: %d %s\n", ( int ) encodings[i].encoding_id, encodings[i].name); } @@ -298,7 +298,7 @@ void KXVideoPlayer::init () { XvFreeAdaptorInfo(ai); } doc.appendChild (root); - QCString exp = doc.toCString (); + TQCString exp = doc.toCString (); config_buf = exp; //fprintf (stderr, "%s\n", (const char *)exp); config_buf.resize (exp.length ()); // strip terminating \0 @@ -332,11 +332,11 @@ KXVideoPlayer::~KXVideoPlayer () { xvapp = 0L; } -void getConfigEntries (QByteArray & buf) { - QDomDocument doc; - QDomElement root = doc.createElement (QString ("document")); +void getConfigEntries (TQByteArray & buf) { + TQDomDocument doc; + TQDomElement root = doc.createElement (TQString ("document")); doc.appendChild (root); - QCString exp = doc.toCString (); + TQCString exp = doc.toCString (); buf = exp; buf.resize (exp.length ()); // strip terminating \0 } @@ -346,7 +346,7 @@ void KXVideoPlayer::play () { if (!xv_success) return; if (callback && movie_width > 0 && movie_height > 0) - callback->movieParams (0, movie_width, movie_height, 1.0*movie_width/movie_height, QStringList (), QStringList ()); + callback->movieParams (0, movie_width, movie_height, 1.0*movie_width/movie_height, TQStringList (), TQStringList ()); XLockDisplay (display); if (!running && XvGrabPort (display, xvport, CurrentTime) == Success) { gc = XCreateGC (display, wid, 0, NULL); @@ -404,7 +404,7 @@ void KXVideoPlayer::play () { putVideo (); if (callback) { callback->playing (); - callback->statusMessage ((int) KMPlayer::Callback::stat_hasvideo, QString ()); + callback->statusMessage ((int) KMPlayer::Callback::stat_hasvideo, TQString ()); } } XUnlockDisplay (display); @@ -435,11 +435,11 @@ void KXVideoPlayer::stop () { if (callback) callback->finished (); else - QTimer::singleShot (0, qApp, SLOT (quit ())); + TQTimer::singleShot (0, tqApp, TQT_SLOT (quit ())); } void KXVideoPlayer::finished () { - QTimer::singleShot (10, this, SLOT (stop ())); + TQTimer::singleShot (10, this, TQT_SLOT (stop ())); } void KXVideoPlayer::saturation (int val) { @@ -502,12 +502,12 @@ void KXVideoPlayer::frequency (int val) { } } -void KXVideoPlayer::saveState (QSessionManager & sm) { +void KXVideoPlayer::saveState (TQSessionManager & sm) { if (callback) - sm.setRestartHint (QSessionManager::RestartNever); + sm.setRestartHint (TQSessionManager::RestartNever); } -void KXVideoPlayer::timerEvent (QTimerEvent * e) { +void KXVideoPlayer::timerEvent (TQTimerEvent * e) { if (e->timerId () == mute_timer) { int step = (current_volume - xv_limits[limit_volume].min) / 20; if (step > 0 && tmp_volume == xv_limits[limit_volume].min) { @@ -528,7 +528,7 @@ void KXVideoPlayer::timerEvent (QTimerEvent * e) { killTimer (e->timerId ()); } -class XEventThread : public QThread { +class XEventThread : public TQThread { protected: void run () { Time prev_click_time = 0; @@ -647,8 +647,8 @@ int main(int argc, char **argv) { strncpy (configfile, argv [++i], sizeof (configfile)); configfile[sizeof (configfile) - 1] = 0; } else if (!strcmp (argv [i], "-cb")) { - QString str = argv [++i]; - int pos = str.find ('/'); + TQString str = argv [++i]; + int pos = str.tqfind ('/'); if (pos > -1) { fprintf (stderr, "callback is %s %s\n", str.left (pos).ascii (), str.mid (pos + 1).ascii ()); callback = new KMPlayer::Callback_stub diff --git a/src/xvplayer.h b/src/xvplayer.h index 9782fc6..ece8475 100644 --- a/src/xvplayer.h +++ b/src/xvplayer.h @@ -20,12 +20,13 @@ #ifndef _K_XV_PLAYER_H_ #define _K_XV_PLAYER_H_ -#include -#include -#include +#include +#include +#include -class KXVideoPlayer : public QApplication { +class KXVideoPlayer : public TQApplication { Q_OBJECT + TQ_OBJECT public: KXVideoPlayer (int argc, char ** argv); ~KXVideoPlayer (); @@ -39,7 +40,7 @@ public: void volume (int val); void frequency (int val); //void seek (int val); - //bool event (QEvent * e); + //bool event (TQEvent * e); public slots: void play (); void stop (); @@ -47,8 +48,8 @@ public slots: //void updatePosition (); //void postFinished (); protected: - void saveState (QSessionManager & sm); - void timerEvent (QTimerEvent *); + void saveState (TQSessionManager & sm); + void timerEvent (TQTimerEvent *); private: int mute_timer; };