summaryrefslogtreecommitdiffstats
path: root/src/part
diff options
context:
space:
mode:
authorgregory guy <[email protected]>2020-06-13 16:09:24 +0200
committergregory guy <[email protected]>2020-06-13 16:09:24 +0200
commit2c9bc9b806f533df7b8f5349467d0f4be95314a4 (patch)
tree15f82ae94dd430374f3d939958912c4fb2855326 /src/part
parent38eaf7209a322a622e1b898eaa5477568ca9c6b6 (diff)
downloadcodeine-2c9bc9b806f533df7b8f5349467d0f4be95314a4.tar.gz
codeine-2c9bc9b806f533df7b8f5349467d0f4be95314a4.zip
Conversion qt3 -> tqt3
Signed-off-by: gregory guy <[email protected]>
Diffstat (limited to 'src/part')
-rw-r--r--src/part/SConscript2
-rw-r--r--src/part/part.cpp20
-rw-r--r--src/part/part.h8
-rw-r--r--src/part/toolbar.cpp18
-rw-r--r--src/part/toolbar.h4
-rw-r--r--src/part/videoWindow.cpp32
-rw-r--r--src/part/videoWindow.h18
-rw-r--r--src/part/xineEngine.cpp50
8 files changed, 76 insertions, 76 deletions
diff --git a/src/part/SConscript b/src/part/SConscript
index c2bce67..978d490 100644
--- a/src/part/SConscript
+++ b/src/part/SConscript
@@ -7,6 +7,6 @@ myenv=env.Copy()
## Always add '../' (top-level directory) because moc makes code that needs it
KDEaddpaths( ['./', '../', '../../'], myenv )
-KDEaddlibs( ['qt-mt', 'kdecore', 'kdeui', 'kparts', 'xine'], myenv )
+KDEaddlibs( ['tqt-mt', 'kdecore', 'kdeui', 'kparts', 'xine'], myenv )
KDEshlib( "libcodeine", Split( "part.cpp xineEngine.cpp videoWindow.cpp toolbar.cpp ../mxcl.library.cpp" ), myenv )
diff --git a/src/part/part.cpp b/src/part/part.cpp
index 20d1577..1b4b878 100644
--- a/src/part/part.cpp
+++ b/src/part/part.cpp
@@ -6,12 +6,12 @@
#include <kaboutdata.h>
#include <kparts/genericfactory.h>
#include "part.h"
-#include <qtimer.h>
+#include <ntqtimer.h>
#include "toolbar.h"
#include "videoWindow.h"
#include <kaction.h>
-#include <qslider.h>
+#include <ntqslider.h>
namespace Codeine
{
@@ -24,7 +24,7 @@ K_EXPORT_COMPONENT_FACTORY( libcodeine, Codeine::Factory )
namespace Codeine
{
- Part::Part( QWidget *parentWidget, const char *widgetName, QObject *parent, const char *name, const QStringList& )
+ Part::Part( TQWidget *parentWidget, const char *widgetName, TQObject *parent, const char *name, const TQStringList& )
: ReadOnlyPart( parent, name )
, m_statusBarExtension( new KParts::StatusBarExtension( this ) )
{
@@ -35,19 +35,19 @@ namespace Codeine
//FIXME this will terminate the host, eg Konqueror
Debug::fatal() << "Couldn't init xine!\n";
- KAction *play = new KToggleAction( i18n("Play"), "player_play", Qt::Key_Space, videoWindow(), SLOT(togglePlay()), actionCollection(), "play" );
- KAction *mute = new KToggleAction( i18n("Mute"), "player_mute", Qt::Key_M, videoWindow(), SLOT(toggleMute()), actionCollection(), "mute" );
+ KAction *play = new KToggleAction( i18n("Play"), "player_play", TQt::Key_Space, videoWindow(), SLOT(togglePlay()), actionCollection(), "play" );
+ KAction *mute = new KToggleAction( i18n("Mute"), "player_mute", TQt::Key_M, videoWindow(), SLOT(toggleMute()), actionCollection(), "mute" );
KToolBar *toolBar = new MouseOverToolBar( widget() );
play->plug( toolBar );
mute->plug( toolBar );
- m_slider = new QSlider( Qt::Horizontal, toolBar, "slider" );
+ m_slider = new TQSlider( TQt::Horizontal, toolBar, "slider" );
m_slider->setMaxValue( 65535 );
toolBar->setStretchableWidget( m_slider );
toolBar->addSeparator(); //FIXME ugly
- QObject *o = (QObject*)statusBar();
- connect( videoWindow(), SIGNAL(statusMessage( const QString& )), o, SLOT(message( const QString& )) );
- connect( videoWindow(), SIGNAL(titleChanged( const QString& )), o, SLOT(message( const QString& )) ); //FIXME
+ TQObject *o = (TQObject*)statusBar();
+ connect( videoWindow(), SIGNAL(statusMessage( const TQString& )), o, SLOT(message( const TQString& )) );
+ connect( videoWindow(), SIGNAL(titleChanged( const TQString& )), o, SLOT(message( const TQString& )) ); //FIXME
}
bool
@@ -76,7 +76,7 @@ namespace Codeine
}
void
- Part::timerEvent( QTimerEvent* )
+ Part::timerEvent( TQTimerEvent* )
{
m_slider->setValue( videoWindow()->position() );
}
diff --git a/src/part/part.h b/src/part/part.h
index 30467ac..d998664 100644
--- a/src/part/part.h
+++ b/src/part/part.h
@@ -9,7 +9,7 @@
#include <kurl.h>
class KAboutData;
-class QSlider;
+class TQSlider;
namespace Codeine
@@ -17,7 +17,7 @@ namespace Codeine
class Part : public KParts::ReadOnlyPart
{
public:
- Part( QWidget*, const char*, QObject*, const char*, const QStringList& );
+ Part( TQWidget*, const char*, TQObject*, const char*, const TQStringList& );
virtual bool openFile() { return false; } //pure virtual in base class
virtual bool openURL( const KURL& );
@@ -27,11 +27,11 @@ namespace Codeine
private:
KParts::StatusBarExtension *m_statusBarExtension;
- QSlider *m_slider;
+ TQSlider *m_slider;
KStatusBar *statusBar() { return m_statusBarExtension->statusBar(); }
- virtual void timerEvent( QTimerEvent* );
+ virtual void timerEvent( TQTimerEvent* );
};
}
diff --git a/src/part/toolbar.cpp b/src/part/toolbar.cpp
index 8939074..e998244 100644
--- a/src/part/toolbar.cpp
+++ b/src/part/toolbar.cpp
@@ -2,37 +2,37 @@
// See COPYING file for licensing information
#include <kpushbutton.h>
-#include <qapplication.h>
-#include <qevent.h>
+#include <ntqapplication.h>
+#include <ntqevent.h>
#include "toolbar.h"
-MouseOverToolBar::MouseOverToolBar( QWidget *parent )
+MouseOverToolBar::MouseOverToolBar( TQWidget *parent )
: KToolBar( parent )
{
parent->installEventFilter( this );
move( 0, 0 ); //TODO necessary?
hide();
- setPalette( QApplication::palette() ); //videoWindow palette has a black background
+ setPalette( TQApplication::palette() ); //videoWindow palette has a black background
}
bool
-MouseOverToolBar::eventFilter( QObject *o, QEvent *e )
+MouseOverToolBar::eventFilter( TQObject *o, TQEvent *e )
{
Q_ASSERT( o == parent() );
switch( e->type() )
{
- case QEvent::Resize:
- resize( static_cast<QResizeEvent*>(e)->size().width(), sizeHint().height() );
+ case TQEvent::Resize:
+ resize( static_cast<TQResizeEvent*>(e)->size().width(), sizeHint().height() );
break;
- case QEvent::Enter:
+ case TQEvent::Enter:
show();
break;
- case QEvent::Leave:
+ case TQEvent::Leave:
hide();
break;
diff --git a/src/part/toolbar.h b/src/part/toolbar.h
index cd189d4..58a3a57 100644
--- a/src/part/toolbar.h
+++ b/src/part/toolbar.h
@@ -9,10 +9,10 @@
class MouseOverToolBar : public KToolBar
{
- virtual bool eventFilter( QObject*, QEvent* );
+ virtual bool eventFilter( TQObject*, TQEvent* );
public:
- MouseOverToolBar( QWidget *parent );
+ MouseOverToolBar( TQWidget *parent );
};
#endif
diff --git a/src/part/videoWindow.cpp b/src/part/videoWindow.cpp
index d798b36..97b87cd 100644
--- a/src/part/videoWindow.cpp
+++ b/src/part/videoWindow.cpp
@@ -5,9 +5,9 @@
#include <cstdlib>
#include "debug.h"
-#include <qapplication.h> //sendEvent()
-#include <qcursor.h>
-#include <qevent.h>
+#include <ntqapplication.h> //sendEvent()
+#include <ntqcursor.h>
+#include <ntqevent.h>
#include "videoWindow.h"
#include <X11/Xlib.h> //TODO this breaks compile for lots of people due to excessive macro content
#include <xine.h> //x11_visual_t
@@ -26,8 +26,8 @@ namespace X
}
-VideoWindow::VideoWindow( QWidget *parent, const char *name )
- : QWidget( parent, name )
+VideoWindow::VideoWindow( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
, m_osd( 0 )
, m_stream( 0 )
, m_eventQueue( 0 )
@@ -44,11 +44,11 @@ VideoWindow::VideoWindow( QWidget *parent, const char *name )
show();
- setWFlags( Qt::WNoAutoErase );
+ setWFlags( TQt::WNoAutoErase );
setMouseTracking( true );
setAcceptDrops( true );
- setUpdatesEnabled( false ); //to stop Qt drawing over us
- setPaletteBackgroundColor( Qt::black );
+ setUpdatesEnabled( false ); //to stop TQt drawing over us
+ setPaletteBackgroundColor( TQt::black );
X::d = XOpenDisplay( std::getenv("DISPLAY") );
X::s = DefaultScreen( X::d );
@@ -146,22 +146,22 @@ VideoWindow::frameOutputCallBack(
}
bool
-VideoWindow::event( QEvent *e )
+VideoWindow::event( TQEvent *e )
{
switch( e->type() )
{
- case QEvent::MouseMove:
- case QEvent::MouseButtonPress:
+ case TQEvent::MouseMove:
+ case TQEvent::MouseButtonPress:
unsetCursor();
m_timer.start( CURSOR_HIDE_TIMEOUT, true );
break;
- case QEvent::Close:
- case QEvent::Hide:
+ case TQEvent::Close:
+ case TQEvent::Hide:
xine_stop( m_stream );
break;
- case QEvent::Leave:
+ case TQEvent::Leave:
m_timer.stop();
break;
@@ -169,7 +169,7 @@ VideoWindow::event( QEvent *e )
;
}
- return QWidget::event( e );
+ return TQWidget::event( e );
}
bool
@@ -186,7 +186,7 @@ VideoWindow::x11Event( XEvent *e )
void
VideoWindow::hideCursor()
{
- setCursor( Qt::BlankCursor );
+ setCursor( TQt::BlankCursor );
}
} //namespace Codeine
diff --git a/src/part/videoWindow.h b/src/part/videoWindow.h
index 7db72ab..0d0e4d5 100644
--- a/src/part/videoWindow.h
+++ b/src/part/videoWindow.h
@@ -5,8 +5,8 @@
#define CODEINE_VIDEO_WINDOW_H
#include "../codeine.h"
-#include <qtimer.h>
-#include <qwidget.h>
+#include <ntqtimer.h>
+#include <ntqwidget.h>
#include <kurl.h>
typedef struct xine_s xine_t;
@@ -20,7 +20,7 @@ typedef struct xine_osd_s xine_osd_t;
namespace Codeine
{
- class VideoWindow : public QWidget
+ class VideoWindow : public TQWidget
{
Q_OBJECT
@@ -30,7 +30,7 @@ namespace Codeine
friend VideoWindow* const videoWindow();
public:
- VideoWindow( QWidget *parent, const char *name );
+ VideoWindow( TQWidget *parent, const char *name );
~VideoWindow();
bool init();
@@ -41,8 +41,8 @@ namespace Codeine
int position();
signals:
- void statusMessage( const QString& );
- void titleChanged( const QString& );
+ void statusMessage( const TQString& );
+ void titleChanged( const TQString& );
private:
/// @see xineEngine.cpp
@@ -52,9 +52,9 @@ namespace Codeine
void showErrorMessage(); //TODO don't use this, just show delayed message
- virtual void customEvent( QCustomEvent* );
+ virtual void customEvent( TQCustomEvent* );
virtual bool x11Event( XEvent* );
- virtual bool event( QEvent* );
+ virtual bool event( TQEvent* );
xine_osd_t *m_osd;
xine_stream_t *m_stream;
@@ -72,7 +72,7 @@ namespace Codeine
static void frameOutputCallBack( void*, int, int, double, int*, int*, int*, int*, double*, int*, int* );
double m_displayRatio;
- QTimer m_timer;
+ TQTimer m_timer;
public slots:
void togglePlay();
diff --git a/src/part/xineEngine.cpp b/src/part/xineEngine.cpp
index 2365f83..149ad1f 100644
--- a/src/part/xineEngine.cpp
+++ b/src/part/xineEngine.cpp
@@ -7,9 +7,9 @@
#include <kglobalsettings.h>
#include <klocale.h>
#include "mxcl.library.h"
-#include <qapplication.h> //::sendEvent()
-#include <qdatetime.h> //::play()
-#include <qdir.h> //QDir::homeDir()
+#include <ntqapplication.h> //::sendEvent()
+#include <ntqdatetime.h> //::play()
+#include <ntqdir.h> //TQDir::homeDir()
#include <xine.h>
#include "videoWindow.h"
@@ -28,7 +28,7 @@ VideoWindow::init()
return false;
debug() << "xine_config_load()\n";
- xine_config_load( m_xine, QFile::encodeName( QDir::homeDirPath() + "/.xine/config" ) );
+ xine_config_load( m_xine, TQFile::encodeName( TQDir::homeDirPath() + "/.xine/config" ) );
debug() << "xine_init()\n";
xine_init( m_xine );
@@ -65,8 +65,8 @@ VideoWindow::init()
xine_cfg_entry_t config;
if( xine_config_lookup_entry( m_xine, "misc.save_dir", &config ) ) {
- const QCString dir = KGlobalSettings::desktopPath().local8Bit();
- config.str_value = qstrdup( dir );
+ const TQCString dir = KGlobalSettings::desktopPath().local8Bit();
+ config.str_value = tqstrdup( dir );
xine_config_update_entry( m_xine, &config );
}
}
@@ -87,14 +87,14 @@ VideoWindow::play( KURL url )
if( url.protocol() == "http" ) {
/// automatically save http streams to Desktop folder
- const QString fileName = url.filename();
+ const TQString fileName = url.filename();
- QString
+ TQString
u = url.url();
u += "#save:";
u += url.host();
u += " [";
- u += QDate::currentDate().toString();
+ u += TQDate::currentDate().toString();
u += ']';
u += fileName.mid( fileName.findRev( '.' ) + 1 ).lower();
@@ -151,7 +151,7 @@ VideoWindow::position()
void
VideoWindow::showErrorMessage()
{
- const QString filename = m_url.fileName();
+ const TQString filename = m_url.fileName();
debug() << "xine_get_error()\n";
@@ -180,7 +180,7 @@ VideoWindow::showErrorMessage()
}
void
-VideoWindow::customEvent( QCustomEvent *e )
+VideoWindow::customEvent( TQCustomEvent *e )
{
switch( e->type() - 2000 ) {
case XINE_EVENT_UI_PLAYBACK_FINISHED:
@@ -188,7 +188,7 @@ VideoWindow::customEvent( QCustomEvent *e )
break;
case 1000:
- #define message static_cast<QString*>(e->data())
+ #define message static_cast<TQString*>(e->data())
emit statusMessage( *message );
delete message;
break;
@@ -238,29 +238,29 @@ VideoWindow::xineEventListener( void *p, const xine_event_t* xineEvent )
case XINE_EVENT_FRAME_FORMAT_CHANGE:
case XINE_EVENT_UI_CHANNELS_CHANGED:
{
- QCustomEvent *ce;
- ce = new QCustomEvent( 2000 + xineEvent->type );
+ TQCustomEvent *ce;
+ ce = new TQCustomEvent( 2000 + xineEvent->type );
ce->setData( const_cast<xine_event_t*>(xineEvent) );
- QApplication::postEvent( engine, ce );
+ TQApplication::postEvent( engine, ce );
break;
}
case XINE_EVENT_UI_SET_TITLE:
- QApplication::postEvent( engine, new QCustomEvent(
- QEvent::Type(3002),
- new QString( QString::fromUtf8( static_cast<xine_ui_data_t*>(xineEvent->data)->str ) ) ) );
+ TQApplication::postEvent( engine, new TQCustomEvent(
+ TQEvent::Type(3002),
+ new TQString( TQString::fromUtf8( static_cast<xine_ui_data_t*>(xineEvent->data)->str ) ) ) );
break;
case XINE_EVENT_PROGRESS:
{
xine_progress_data_t* pd = (xine_progress_data_t*)xineEvent->data;
- QString
+ TQString
msg = "%1 %2%";
- msg = msg.arg( QString::fromUtf8( pd->description ) )
+ msg = msg.arg( TQString::fromUtf8( pd->description ) )
.arg( KGlobal::locale()->formatNumber( pd->percent, 0 ) );
- QApplication::postEvent( engine, new QCustomEvent( QEvent::Type(3000), new QString( msg ) ) );
+ TQApplication::postEvent( engine, new TQCustomEvent( TQEvent::Type(3000), new TQString( msg ) ) );
break;
}
case XINE_EVENT_UI_MESSAGE:
@@ -268,7 +268,7 @@ VideoWindow::xineEventListener( void *p, const xine_event_t* xineEvent )
debug() << "Message received from xine\n";
xine_ui_message_data_t *data = (xine_ui_message_data_t *)xineEvent->data;
- QString message;
+ TQString message;
switch( data->type ) {
case XINE_MSG_NO_ERROR:
@@ -313,7 +313,7 @@ VideoWindow::xineEventListener( void *p, const xine_event_t* xineEvent )
if(data->explanation)
{
message += "<b>";
- message += QString::fromUtf8( (char*) data + data->explanation );
+ message += TQString::fromUtf8( (char*) data + data->explanation );
message += "</b>";
}
else break; //if no explanation then why bother!
@@ -328,12 +328,12 @@ VideoWindow::xineEventListener( void *p, const xine_event_t* xineEvent )
if(data->parameters)
{
message += "xine says: <i>";
- message += QString::fromUtf8( (char*) data + data->parameters);
+ message += TQString::fromUtf8( (char*) data + data->parameters);
message += "</i>";
}
else message += i18n("Sorry, no additional information is available.");
- QApplication::postEvent( engine, new QCustomEvent(QEvent::Type(3001), new QString(message)) );
+ TQApplication::postEvent( engine, new TQCustomEvent(TQEvent::Type(3001), new TQString(message)) );
}
} //case