summaryrefslogtreecommitdiffstats
path: root/src/kmplayer_koffice_part.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-30 06:10:56 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-30 06:10:56 +0000
commit769e63d24adf5c844137484f06a972fcce732d6a (patch)
tree5185797dcb3ff4b1b3cb71d367123bf89eb2410f /src/kmplayer_koffice_part.cpp
parent0a8af92185eac74d48da1225e6053a0d66c078f5 (diff)
downloadkmplayer-769e63d24adf5c844137484f06a972fcce732d6a.tar.gz
kmplayer-769e63d24adf5c844137484f06a972fcce732d6a.zip
TQt4 port kmplayer
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kmplayer@1238840 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/kmplayer_koffice_part.cpp')
-rw-r--r--src/kmplayer_koffice_part.cpp80
1 files changed, 40 insertions, 40 deletions
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 <sys/types.h>
#include <signal.h>
-#include <qapplication.h>
-#include <qcstring.h>
-#include <qtimer.h>
-#include <qmultilineedit.h>
-#include <qpushbutton.h>
-#include <qpopupmenu.h>
-#include <qslider.h>
-#include <qvaluelist.h>
+#include <tqapplication.h>
+#include <tqcstring.h>
+#include <tqtimer.h>
+#include <tqmultilineedit.h>
+#include <tqpushbutton.h>
+#include <tqpopupmenu.h>
+#include <tqslider.h>
+#include <tqvaluelist.h>
#include <kprocess.h>
#include <kmessagebox.h>
@@ -48,11 +48,11 @@
#ifdef HAVE_KOFFICE
-#include <qdom.h>
-//#include <qmetaobject.h>
-#include <qlayout.h>
-#include <qptrlist.h>
-#include <qpainter.h>
+#include <tqdom.h>
+//#include <tqmetaobject.h>
+#include <tqlayout.h>
+#include <tqptrlist.h>
+#include <tqpainter.h>
#include <koFrame.h>
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 <KMPlayer::View*> (part->player ()->view ())) {
- kdDebug() << "KOfficeMPlayerView::KOfficeMPlayerView this:" << this << " parent:" << parent << endl;
- m_oldparent = static_cast <QWidget*> (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 <TQWidget*> (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"