summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgregory guy <gregory-tde@laposte.net>2020-06-13 16:09:24 +0200
committergregory guy <gregory-tde@laposte.net>2020-06-13 16:09:24 +0200
commit2c9bc9b806f533df7b8f5349467d0f4be95314a4 (patch)
tree15f82ae94dd430374f3d939958912c4fb2855326
parent38eaf7209a322a622e1b898eaa5477568ca9c6b6 (diff)
downloadcodeine-2c9bc9b806f533df7b8f5349467d0f4be95314a4.tar.gz
codeine-2c9bc9b806f533df7b8f5349467d0f4be95314a4.zip
Conversion qt3 -> tqt3
Signed-off-by: gregory guy <gregory-tde@laposte.net>
-rw-r--r--scons/codeine.py4
-rw-r--r--scons/kde.py8
-rw-r--r--src/app/SConscript2
-rw-r--r--src/app/actions.cpp10
-rw-r--r--src/app/actions.h2
-rw-r--r--src/app/adjustSizeButton.cpp52
-rw-r--r--src/app/adjustSizeButton.h18
-rw-r--r--src/app/analyzer.cpp26
-rw-r--r--src/app/analyzer.h28
-rw-r--r--src/app/captureFrame.cpp62
-rw-r--r--src/app/config.h2
-rw-r--r--src/app/extern.h10
-rw-r--r--src/app/fullScreenAction.cpp22
-rw-r--r--src/app/fullScreenAction.h6
-rw-r--r--src/app/insertAspectRatioMenuItems.cpp6
-rw-r--r--src/app/listView.cpp16
-rw-r--r--src/app/mainWindow.cpp128
-rw-r--r--src/app/mainWindow.h28
-rw-r--r--src/app/playDialog.cpp52
-rw-r--r--src/app/playDialog.h16
-rw-r--r--src/app/playlistFile.cpp22
-rw-r--r--src/app/playlistFile.h10
-rw-r--r--src/app/slider.cpp64
-rw-r--r--src/app/slider.h24
-rw-r--r--src/app/stateChange.cpp34
-rw-r--r--src/app/theStream.cpp42
-rw-r--r--src/app/theStream.h10
-rw-r--r--src/app/videoSettings.cpp50
-rw-r--r--src/app/videoSettings.h4
-rw-r--r--src/app/videoWindow.cpp72
-rw-r--r--src/app/volumeAction.cpp56
-rw-r--r--src/app/volumeAction.h6
-rw-r--r--src/app/xineConfig.cpp144
-rw-r--r--src/app/xineConfig.h28
-rw-r--r--src/app/xineEngine.cpp96
-rw-r--r--src/app/xineEngine.h34
-rw-r--r--src/codeine.h4
-rw-r--r--src/debug.h38
-rw-r--r--src/mxcl.library.cpp6
-rw-r--r--src/mxcl.library.h8
-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
48 files changed, 701 insertions, 701 deletions
diff --git a/scons/codeine.py b/scons/codeine.py
index 742cc78..f65d97c 100644
--- a/scons/codeine.py
+++ b/scons/codeine.py
@@ -16,7 +16,7 @@ def generate( env ):
if 'configure' in env['TARGS']:
xine_lib_test_source_file = """
- #include <qstring.h>
+ #include <ntqstring.h>
#include <xine.h>
int main( int argc, char **argv )
@@ -58,7 +58,7 @@ def generate( env ):
# this seems to import the user's CXXFLAGS, etc., which may break
confenv = env.Copy()
configure = confenv.Configure(custom_tests = {'CheckXineLib' : CheckXineLib, 'CheckKdeLibs' : CheckKdeLibs}, log_file='configure.log')
- confenv.AppendUnique(LIBS = 'qt-mt')
+ confenv.AppendUnique(LIBS = 'tqt-mt')
confenv.AppendUnique(LINKFLAGS = '-L/usr/X11R6/lib')
if not configure.CheckKdeLibs():
diff --git a/scons/kde.py b/scons/kde.py
index 8fa492b..33f9f3a 100644
--- a/scons/kde.py
+++ b/scons/kde.py
@@ -146,15 +146,15 @@ def detect_kde(env):
## check for the qt and kde includes
print "Checking for the qt includes : ",
- if qtincludes and os.path.isfile(qtincludes + "/qlayout.h"):
+ if qtincludes and os.path.isfile(qtincludes + "/ntqlayout.h"):
# The user told where to look for and it looks valid
print GREEN + "ok " + qtincludes + NORMAL
else:
- if os.path.isfile(qtdir + "/include/qlayout.h"):
+ if os.path.isfile(qtdir + "/include/ntqlayout.h"):
# Automatic detection
print GREEN + "ok " + qtdir + "/include/ " + NORMAL
qtincludes = qtdir + "/include/"
- elif os.path.isfile("/usr/include/qt3/qlayout.h"):
+ elif os.path.isfile("/usr/include/qt3/ntqlayout.h"):
# Debian probably
print YELLOW + "the qt headers were found in /usr/include/qt3/ " + NORMAL
qtincludes = "/usr/include/qt3"
@@ -448,7 +448,7 @@ ie: """+BOLD+"""scons configure libdir=/usr/local/lib qtincludes=/usr/include/qt
env['QT_UIC_HFLAGS'] = '-L $QTPLUGINS -nounload'
env['QT_UIC_CFLAGS'] = '$QT_UIC_HFLAGS -tr tr2i18n'
- env['QT_LIBS'] = 'qt-mt'
+ env['QT_LIBS'] = 'tqt-mt'
env['LIBTOOL_FLAGS'] = '--silent --mode=compile --tag=CXX'
diff --git a/src/app/SConscript b/src/app/SConscript
index 3c35c32..9b7600d 100644
--- a/src/app/SConscript
+++ b/src/app/SConscript
@@ -50,7 +50,7 @@ KDEprogram( "codeine", app_sources, myenv )
KDEaddpaths( ['./', '../', '../../'], myenv )
## Necessary libraries to link against
-KDEaddlibs( ['qt-mt', 'kio', 'kdecore', 'kdeui', 'xine', 'Xtst'], myenv )
+KDEaddlibs( ['tqt-mt', 'kio', 'kdecore', 'kdeui', 'xine', 'Xtst'], myenv )
## This shows how to add other link flags to the program
myenv['LINKFLAGS'].append('-L/usr/X11R6/lib')
diff --git a/src/app/actions.cpp b/src/app/actions.cpp
index a767a2c..3fd0971 100644
--- a/src/app/actions.cpp
+++ b/src/app/actions.cpp
@@ -4,22 +4,22 @@
#include "actions.h"
#include "debug.h"
#include "mxcl.library.h"
-#include <qtoolbutton.h>
+#include <ntqtoolbutton.h>
#include "xineEngine.h"
namespace Codeine
{
- PlayAction::PlayAction( QObject *receiver, const char *slot, KActionCollection *ac )
- : KToggleAction( i18n("Play"), "player_play", Qt::Key_Space, receiver, slot, ac, "play" )
+ PlayAction::PlayAction( TQObject *receiver, const char *slot, KActionCollection *ac )
+ : KToggleAction( i18n("Play"), "player_play", TQt::Key_Space, receiver, slot, ac, "play" )
{}
void
PlayAction::setChecked( bool b )
{
- if( videoWindow()->state() == Engine::Empty && sender() && QCString(sender()->className()) == "KToolBarButton" ) {
+ if( videoWindow()->state() == Engine::Empty && sender() && TQCString(sender()->className()) == "KToolBarButton" ) {
// clicking play when empty means open PlayMediaDialog, but we have to uncheck the toolbar button
// as KDElibs sets that checked automatically..
- ((QToolButton*)sender())->setOn( false );
+ ((TQToolButton*)sender())->setOn( false );
}
else
KToggleAction::setChecked( b );
diff --git a/src/app/actions.h b/src/app/actions.h
index 4f2f589..4d8a121 100644
--- a/src/app/actions.h
+++ b/src/app/actions.h
@@ -16,7 +16,7 @@ namespace Codeine
class PlayAction : public KToggleAction
{
public:
- PlayAction( QObject *receiver, const char *slot, KActionCollection* );
+ PlayAction( TQObject *receiver, const char *slot, KActionCollection* );
protected:
virtual void setChecked( bool );
diff --git a/src/app/adjustSizeButton.cpp b/src/app/adjustSizeButton.cpp
index 041b01c..3a5c1dd 100644
--- a/src/app/adjustSizeButton.cpp
+++ b/src/app/adjustSizeButton.cpp
@@ -4,50 +4,50 @@
#include "adjustSizeButton.h"
#include "extern.h"
#include <kpushbutton.h>
-#include <qapplication.h>
-#include <qevent.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpainter.h>
+#include <ntqapplication.h>
+#include <ntqevent.h>
+#include <ntqlabel.h>
+#include <ntqlayout.h>
+#include <ntqpainter.h>
#include "theStream.h"
#include "xineEngine.h" //videoWindow()
-QString i18n( const char *text );
+TQString i18n( const char *text );
namespace Codeine
{
- AdjustSizeButton::AdjustSizeButton( QWidget *parent )
- : QFrame( parent )
+ AdjustSizeButton::AdjustSizeButton( TQWidget *parent )
+ : TQFrame( parent )
, m_counter( 0 )
, m_stage( 1 )
, m_offset( 0 )
{
parent->installEventFilter( this );
- setPalette( QApplication::palette() ); //videoWindow has different palette
- setFrameStyle( QFrame::Plain | QFrame::Box );
+ setPalette( TQApplication::palette() ); //videoWindow has different palette
+ setFrameStyle( TQFrame::Plain | TQFrame::Box );
m_preferred = new KPushButton( KGuiItem( i18n("Preferred Scale"), "viewmag" ), this );
- connect( m_preferred, SIGNAL(clicked()), qApp->mainWidget(), SLOT(adjustSize()) );
+ connect( m_preferred, SIGNAL(clicked()), tqApp->mainWidget(), SLOT(adjustSize()) );
connect( m_preferred, SIGNAL(clicked()), SLOT(deleteLater()) );
m_oneToOne = new KPushButton( KGuiItem( i18n("Scale 100%"), "viewmag1" ), this );
- connect( m_oneToOne, SIGNAL(clicked()), (QObject*)videoWindow(), SLOT(resetZoom()) );
+ connect( m_oneToOne, SIGNAL(clicked()), (TQObject*)videoWindow(), SLOT(resetZoom()) );
connect( m_oneToOne, SIGNAL(clicked()), SLOT(deleteLater()) );
- QBoxLayout *hbox = new QHBoxLayout( this, 8, 6 );
- QBoxLayout *vbox = new QVBoxLayout( hbox );
- vbox->addWidget( new QLabel( i18n( "<b>Adjust video scale?" ), this ) );
+ TQBoxLayout *hbox = new TQHBoxLayout( this, 8, 6 );
+ TQBoxLayout *vbox = new TQVBoxLayout( hbox );
+ vbox->addWidget( new TQLabel( i18n( "<b>Adjust video scale?" ), this ) );
vbox->addWidget( m_preferred );
vbox->addWidget( m_oneToOne );
- hbox->addWidget( m_thingy = new QFrame( this ) );
+ hbox->addWidget( m_thingy = new TQFrame( this ) );
m_thingy->setFixedWidth( fontMetrics().width( "X" ) );
- m_thingy->setFrameStyle( QFrame::Plain | QFrame::Box );
+ m_thingy->setFrameStyle( TQFrame::Plain | TQFrame::Box );
m_thingy->setPaletteForegroundColor( paletteBackgroundColor().dark() );
- QEvent e( QEvent::Resize );
+ TQEvent e( TQEvent::Resize );
eventFilter( 0, &e );
adjustSize();
@@ -57,9 +57,9 @@ namespace Codeine
}
void
- AdjustSizeButton::timerEvent( QTimerEvent* )
+ AdjustSizeButton::timerEvent( TQTimerEvent* )
{
- QFrame *&h = m_thingy;
+ TQFrame *&h = m_thingy;
switch( m_stage )
{
@@ -76,7 +76,7 @@ namespace Codeine
case 2: //fill in pause timer bar
if( m_counter < h->height() - 3 )
- QPainter( h ).fillRect( 2, 2, h->width() - 4, m_counter, palette().active().highlight() );
+ TQPainter( h ).fillRect( 2, 2, h->width() - 4, m_counter, palette().active().highlight() );
if( !hasMouse() )
m_counter++;
@@ -104,12 +104,12 @@ namespace Codeine
}
bool
- AdjustSizeButton::eventFilter( QObject *o, QEvent *e )
+ AdjustSizeButton::eventFilter( TQObject *o, TQEvent *e )
{
- if( e->type() == QEvent::Resize ) {
- const QSize preferredSize = TheStream::profile()->readSizeEntry( "Preferred Size" );
- const QSize defaultSize = TheStream::defaultVideoSize();
- const QSize parentSize = parentWidget()->size();
+ if( e->type() == TQEvent::Resize ) {
+ const TQSize preferredSize = TheStream::profile()->readSizeEntry( "Preferred Size" );
+ const TQSize defaultSize = TheStream::defaultVideoSize();
+ const TQSize parentSize = parentWidget()->size();
m_preferred->setEnabled( preferredSize.isValid() && parentSize != preferredSize && defaultSize != preferredSize );
m_oneToOne->setEnabled( defaultSize != parentSize );
diff --git a/src/app/adjustSizeButton.h b/src/app/adjustSizeButton.h
index 6eed27c..9becd95 100644
--- a/src/app/adjustSizeButton.h
+++ b/src/app/adjustSizeButton.h
@@ -4,32 +4,32 @@
#ifndef CODEINE_ADJUST_SIZE_BUTTON_H
#define CODEINE_ADJUST_SIZE_BUTTON_H
-#include <qframe.h>
+#include <ntqframe.h>
namespace Codeine
{
- class AdjustSizeButton : public QFrame
+ class AdjustSizeButton : public TQFrame
{
int m_counter;
int m_stage;
int m_offset;
int m_timerId;
- QWidget *m_preferred;
- QWidget *m_oneToOne;
+ TQWidget *m_preferred;
+ TQWidget *m_oneToOne;
- QFrame *m_thingy;
+ TQFrame *m_thingy;
public:
- AdjustSizeButton( QWidget *parent );
+ AdjustSizeButton( TQWidget *parent );
private:
- virtual void timerEvent( QTimerEvent* );
- virtual bool eventFilter( QObject*, QEvent* );
+ virtual void timerEvent( TQTimerEvent* );
+ virtual bool eventFilter( TQObject*, TQEvent* );
inline void move()
{
- QWidget::move( parentWidget()->width() - width(), parentWidget()->height() - m_offset );
+ TQWidget::move( parentWidget()->width() - width(), parentWidget()->height() - m_offset );
}
};
}
diff --git a/src/app/analyzer.cpp b/src/app/analyzer.cpp
index c9b8637..593bd16 100644
--- a/src/app/analyzer.cpp
+++ b/src/app/analyzer.cpp
@@ -5,26 +5,26 @@
#include "codeine.h"
#include "debug.h"
#include <math.h> //interpolate()
-#include <qevent.h> //event()
+#include <ntqevent.h> //event()
#include "xineEngine.h"
#include "fht.cpp"
template<class W>
-Analyzer::Base<W>::Base( QWidget *parent, uint timeout )
+Analyzer::Base<W>::Base( TQWidget *parent, uint timeout )
: W( parent, "Analyzer" )
, m_timeout( timeout )
{}
template<class W> bool
-Analyzer::Base<W>::event( QEvent *e )
+Analyzer::Base<W>::event( TQEvent *e )
{
switch( e->type() ) {
- case QEvent::Hide:
+ case TQEvent::Hide:
m_timer.stop();
break;
- case QEvent::Show:
+ case TQEvent::Show:
m_timer.start( timeout() );
break;
@@ -32,14 +32,14 @@ Analyzer::Base<W>::event( QEvent *e )
;
}
- return QWidget::event( e );
+ return TQWidget::event( e );
}
-Analyzer::Base2D::Base2D( QWidget *parent, uint timeout )
- : Base<QWidget>( parent, timeout )
+Analyzer::Base2D::Base2D( TQWidget *parent, uint timeout )
+ : Base<TQWidget>( parent, timeout )
{
- setWFlags( Qt::WNoAutoErase ); //no flicker
+ setWFlags( TQt::WNoAutoErase ); //no flicker
connect( &m_timer, SIGNAL(timeout()), SLOT(draw()) );
}
@@ -72,7 +72,7 @@ Analyzer::Base2D::draw()
}
void
-Analyzer::Base2D::resizeEvent( QResizeEvent* )
+Analyzer::Base2D::resizeEvent( TQResizeEvent* )
{
m_canvas.resize( size() );
m_canvas.fill( colorGroup().background() );
@@ -83,9 +83,9 @@ Analyzer::Base2D::resizeEvent( QResizeEvent* )
// Author: Max Howell <max.howell@methylblue.com>, (C) 2003
// Copyright: See COPYING file that comes with this distribution
-#include <qpainter.h>
+#include <ntqpainter.h>
-Analyzer::Block::Block( QWidget *parent )
+Analyzer::Block::Block( TQWidget *parent )
: Analyzer::Base2D( parent, 20 )
{
setMinimumWidth( 64 ); //-1 is padding, no drawing takes place there
@@ -114,7 +114,7 @@ Analyzer::Block::analyze( const Analyzer::Scope &s )
{
canvas()->fill( colorGroup().foreground().light() );
- QPainter p( canvas() );
+ TQPainter p( canvas() );
p.setPen( colorGroup().background() );
const double F = double(height()) / (log10( 256 ) * 1.1 /*<- max. amplitude*/);
diff --git a/src/app/analyzer.h b/src/app/analyzer.h
index 6fdb12f..edd526e 100644
--- a/src/app/analyzer.h
+++ b/src/app/analyzer.h
@@ -8,9 +8,9 @@
#include <sys/types.h>
#endif
-#include <qpixmap.h> //stack allocated and convenience
-#include <qtimer.h> //stack allocated
-#include <qwidget.h> //baseclass
+#include <ntqpixmap.h> //stack allocated and convenience
+#include <ntqtimer.h> //stack allocated
+#include <ntqwidget.h> //baseclass
#include <vector> //included for convenience
namespace Analyzer
@@ -23,44 +23,44 @@ namespace Analyzer
uint timeout() const { return m_timeout; }
protected:
- Base( QWidget*, uint );
+ Base( TQWidget*, uint );
virtual void transform( Scope& ) = 0;
virtual void analyze( const Scope& ) = 0;
private:
- virtual bool event( QEvent* );
+ virtual bool event( TQEvent* );
protected:
- QTimer m_timer;
+ TQTimer m_timer;
uint m_timeout;
};
- class Base2D : public Base<QWidget>
+ class Base2D : public Base<TQWidget>
{
Q_OBJECT
public:
- const QPixmap *canvas() const { return &m_canvas; }
+ const TQPixmap *canvas() const { return &m_canvas; }
private slots:
void draw();
protected:
- Base2D( QWidget*, uint timeout );
+ Base2D( TQWidget*, uint timeout );
- QPixmap *canvas() { return &m_canvas; }
+ TQPixmap *canvas() { return &m_canvas; }
- void paintEvent( QPaintEvent* ) { if( !m_canvas.isNull() ) bitBlt( this, 0, 0, canvas() ); }
- void resizeEvent( QResizeEvent* );
+ void paintEvent( TQPaintEvent* ) { if( !m_canvas.isNull() ) bitBlt( this, 0, 0, canvas() ); }
+ void resizeEvent( TQResizeEvent* );
private:
- QPixmap m_canvas;
+ TQPixmap m_canvas;
};
class Block : public Analyzer::Base2D
{
public:
- Block( QWidget* );
+ Block( TQWidget* );
protected:
virtual void transform( Analyzer::Scope& );
diff --git a/src/app/captureFrame.cpp b/src/app/captureFrame.cpp
index 4cba5fd..1456817 100644
--- a/src/app/captureFrame.cpp
+++ b/src/app/captureFrame.cpp
@@ -9,13 +9,13 @@
#include <kstdguiitem.h>
#include "mainWindow.h"
#include "mxcl.library.h"
-#include <qdialog.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qimage.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qstringlist.h>
+#include <ntqdialog.h>
+#include <ntqhbox.h>
+#include <ntqlabel.h>
+#include <ntqimage.h>
+#include <ntqlayout.h>
+#include <ntqpainter.h>
+#include <ntqstringlist.h>
#include "theStream.h"
#include "xineEngine.h"
#include <xine.h>
@@ -25,26 +25,26 @@ namespace Codeine {
class FrameCapturePreview : public KPreviewWidgetBase
{
- QImage m_frame;
+ TQImage m_frame;
virtual void showPreview( const KURL& ) {}
virtual void clearPreview() {}
- virtual void paintEvent( QPaintEvent* )
+ virtual void paintEvent( TQPaintEvent* )
{
- QPainter painter( this );
+ TQPainter painter( this );
const uint h = int( double(m_frame.height()) / m_frame.width() * (width()-5) );
const uint y = (height() - h) / 2;
- painter.drawImage( QRect( 5, y, width(), h ), m_frame );
+ painter.drawImage( TQRect( 5, y, width(), h ), m_frame );
- const QString text = QString("%1x%2").arg( m_frame.width() ).arg( m_frame.height() );
+ const TQString text = TQString("%1x%2").arg( m_frame.width() ).arg( m_frame.height() );
const uint x = (width() - fontMetrics().width( text ))/2;
painter.drawText( x, y + h + fontMetrics().height() + 5, text );
}
public:
- FrameCapturePreview( const QImage& frame, QWidget *parent )
+ FrameCapturePreview( const TQImage& frame, TQWidget *parent )
: KPreviewWidgetBase( parent )
, m_frame( frame )
{
@@ -53,25 +53,25 @@ public:
};
-class FrameCaptureDialog : public QDialog
+class FrameCaptureDialog : public TQDialog
{
- const QImage m_frame;
- const QString m_time;
- const QString m_title;
+ const TQImage m_frame;
+ const TQString m_time;
+ const TQString m_title;
- void message( const QString &text ) { ((MainWindow*)parentWidget())->statusBar()->message( text, 4000 ); }
+ void message( const TQString &text ) { ((MainWindow*)parentWidget())->statusBar()->message( text, 4000 ); }
public:
- FrameCaptureDialog( const QImage &frame, const QString &time, MainWindow *parent )
- : QDialog( parent, 0, false /*modal*/, Qt::WDestructiveClose )
+ FrameCaptureDialog( const TQImage &frame, const TQString &time, MainWindow *parent )
+ : TQDialog( parent, 0, false /*modal*/, TQt::WDestructiveClose )
, m_frame( frame )
, m_time( time )
, m_title( TheStream::prettyTitle() )
{
- (new QVBoxLayout( this ))->setAutoAdd( true );
- (new QLabel( this ))->setPixmap( frame );
+ (new TQVBoxLayout( this ))->setAutoAdd( true );
+ (new TQLabel( this ))->setPixmap( frame );
- QHBox *box = new QHBox( this );
+ TQHBox *box = new TQHBox( this );
KPushButton *o = new KPushButton( KStdGuiItem::save(), box );
connect( o, SIGNAL(clicked()), SLOT(accept()) );
@@ -102,11 +102,11 @@ public:
dialog.setPreviewWidget( new FrameCapturePreview( m_frame, &dialog ) );
if( dialog.exec() == Accepted ) {
- const QString fileName = dialog.selectedFile();
+ const TQString fileName = dialog.selectedFile();
if( fileName.isEmpty() )
return;
- const QString type = dialog.currentFilter().remove( 0, 2 ).upper();
+ const TQString type = dialog.currentFilter().remove( 0, 2 ).upper();
if( m_frame.save( fileName, type ) )
message( i18n("%1 saved successfully").arg( fileName ) );
else
@@ -235,19 +235,19 @@ yv12ToRgb( uint8_t *src_y, uint8_t *src_u, uint8_t *src_v, const int w, const in
/************************************************************/
-QImage
+TQImage
VideoWindow::captureFrame() const
{
DEBUG_BLOCK
int ratio, format, w, h;
if( !xine_get_current_frame( *engine(), &w, &h, &ratio, &format, NULL ) )
- return QImage();
+ return TQImage();
uint8_t *yuv = new uint8_t[((w+8) * (h+1) * 2)];
if( yuv == 0 ) {
Debug::error() << "Not enough memory to make screenframe!\n";
- return QImage(); }
+ return TQImage(); }
xine_get_current_frame( *engine(), &w, &h, &ratio, &format, yuv );
@@ -262,7 +262,7 @@ VideoWindow::captureFrame() const
if( yuv == 0 ) {
Debug::error() << "Not enough memory to make screenframe!\n";
delete [] yuy2;
- return QImage(); }
+ return TQImage(); }
y = yuv;
u = yuv + w * h;
@@ -282,12 +282,12 @@ VideoWindow::captureFrame() const
default:
Debug::warning() << "Format " << format << " not supported!\n";
delete [] yuv;
- return QImage();
+ return TQImage();
}
// convert to rgb
uchar *rgb = yv12ToRgb( y, u, v, w, h );
- QImage frame( rgb, w, h, 32, 0, 0, QImage::IgnoreEndian );
+ TQImage frame( rgb, w, h, 32, 0, 0, TQImage::IgnoreEndian );
delete [] yuv;
return frame;
diff --git a/src/app/config.h b/src/app/config.h
index fbab5e8..d4a466a 100644
--- a/src/app/config.h
+++ b/src/app/config.h
@@ -9,7 +9,7 @@
namespace Codeine
{
- static inline KConfig *config( const QString &group )
+ static inline KConfig *config( const TQString &group )
{
KConfig* const instance = KGlobal::config();
instance->setGroup( group );
diff --git a/src/app/extern.h b/src/app/extern.h
index 20e49fd..442b4d3 100644
--- a/src/app/extern.h
+++ b/src/app/extern.h
@@ -9,8 +9,8 @@ extern "C"
typedef struct xine_s xine_t;
}
-class QPopupMenu;
-class QWidget;
+class TQPopupMenu;
+class TQWidget;
namespace Codeine
{
@@ -20,9 +20,9 @@ namespace Codeine
VideoWindow* const engine(); //defined in xineEngine.h
VideoWindow* const videoWindow(); //defined in xineEngine.h
- void showVideoSettingsDialog( QWidget* );
- void showXineConfigurationDialog( QWidget*, xine_t* );
- void insertAspectRatioMenuItems( QPopupMenu* );
+ void showVideoSettingsDialog( TQWidget* );
+ void showXineConfigurationDialog( TQWidget*, xine_t* );
+ void insertAspectRatioMenuItems( TQPopupMenu* );
}
#endif
diff --git a/src/app/fullScreenAction.cpp b/src/app/fullScreenAction.cpp
index f28da84..62ba4fa 100644
--- a/src/app/fullScreenAction.cpp
+++ b/src/app/fullScreenAction.cpp
@@ -5,12 +5,12 @@
#include "fullScreenAction.h"
#include <klocale.h>
#include <kwin.h>
-#include <qwidget.h>
+#include <ntqwidget.h>
#include "xineEngine.h" //videoWindow()
-FullScreenAction::FullScreenAction( QWidget* window, KActionCollection *parent )
- : KToggleAction( QString::null, Key_F, 0, 0, parent, "fullscreen" )
+FullScreenAction::FullScreenAction( TQWidget* window, KActionCollection *parent )
+ : KToggleAction( TQString::null, Key_F, 0, 0, parent, "fullscreen" )
, m_window( window )
, m_shouldBeDisabled( false )
, m_state( 0 )
@@ -57,7 +57,7 @@ FullScreenAction::setEnabled( bool setEnabled )
//FIXME Codeine specific (because videoWindow isn't the window we control, we control the KMainWindow)
//NOTE also if the videoWindow is hidden at some point, this is broken..
//TODO new type of actionclass that event filters and is always correct state
- if( setEnabled && reinterpret_cast<QWidget*>(Codeine::videoWindow())->isHidden() )
+ if( setEnabled && reinterpret_cast<TQWidget*>(Codeine::videoWindow())->isHidden() )
setEnabled = false;
m_shouldBeDisabled = false;
@@ -66,17 +66,17 @@ FullScreenAction::setEnabled( bool setEnabled )
}
bool
-FullScreenAction::eventFilter( QObject *o, QEvent *e )
+FullScreenAction::eventFilter( TQObject *o, TQEvent *e )
{
if( o == m_window )
switch( e->type() ) {
- #if QT_VERSION >= 0x030300
- case QEvent::WindowStateChange:
+ #if TQT_VERSION >= 0x030300
+ case TQEvent::WindowStateChange:
#else
- case QEvent::ShowFullScreen:
- case QEvent::ShowNormal:
- case QEvent::ShowMaximized:
- case QEvent::ShowMinimized:
+ case TQEvent::ShowFullScreen:
+ case TQEvent::ShowNormal:
+ case TQEvent::ShowMaximized:
+ case TQEvent::ShowMinimized:
#endif
if (m_window->isFullScreen() != isChecked())
slotActivated(); // setChecked( window->isFullScreen()) wouldn't emit signals
diff --git a/src/app/fullScreenAction.h b/src/app/fullScreenAction.h
index 4234633..199fcfd 100644
--- a/src/app/fullScreenAction.h
+++ b/src/app/fullScreenAction.h
@@ -12,16 +12,16 @@
class FullScreenAction : public KToggleAction
{
public:
- FullScreenAction( QWidget *window, KActionCollection* );
+ FullScreenAction( TQWidget *window, KActionCollection* );
virtual void setChecked( bool );
virtual void setEnabled( bool );
protected:
- virtual bool eventFilter( QObject* o, QEvent* e );
+ virtual bool eventFilter( TQObject* o, TQEvent* e );
private:
- QWidget *m_window;
+ TQWidget *m_window;
bool m_shouldBeDisabled;
unsigned long m_state;
};
diff --git a/src/app/insertAspectRatioMenuItems.cpp b/src/app/insertAspectRatioMenuItems.cpp
index 353fe43..2e2824c 100644
--- a/src/app/insertAspectRatioMenuItems.cpp
+++ b/src/app/insertAspectRatioMenuItems.cpp
@@ -1,16 +1,16 @@
// Copyright 2005 Max Howell (max.howell@methylblue.com)
// See COPYING file for licensing information
-#include <qpopupmenu.h>
+#include <ntqpopupmenu.h>
#include <xine.h>
-QString i18n( const char *text );
+TQString i18n( const char *text );
namespace Codeine
{
void
- insertAspectRatioMenuItems( QPopupMenu *menu )
+ insertAspectRatioMenuItems( TQPopupMenu *menu )
{
menu->insertItem( i18n( "Determine &Automatically" ), XINE_VO_ASPECT_AUTO );
menu->insertSeparator();
diff --git a/src/app/listView.cpp b/src/app/listView.cpp
index b7990ec..e5dd74a 100644
--- a/src/app/listView.cpp
+++ b/src/app/listView.cpp
@@ -11,27 +11,27 @@ namespace Codeine
class ListView : public KListView
{
public:
- ListView( QWidget *parent ) : KListView( parent )
+ ListView( TQWidget *parent ) : KListView( parent )
{
- addColumn( QString::null, 0 );
- addColumn( QString::null );
+ addColumn( TQString::null, 0 );
+ addColumn( TQString::null );
setResizeMode( LastColumn );
setMargin( 2 );
setSorting( -1 );
- setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum );
+ setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum );
setAllColumnsShowFocus( true );
setItemMargin( 3 );
}
- virtual QSize sizeHint() const
+ virtual TQSize sizeHint() const
{
- const QSize sh = KListView::sizeHint();
+ const TQSize sh = KListView::sizeHint();
- return QSize( sh.width(),
+ return TQSize( sh.width(),
childCount() == 0
? 50
- : QMIN( sh.height(), childCount() * (firstChild()->height()) + margin() * 2 + 4 + reinterpret_cast<QWidget*>(header())->height() ) );
+ : TQMIN( sh.height(), childCount() * (firstChild()->height()) + margin() * 2 + 4 + reinterpret_cast<TQWidget*>(header())->height() ) );
}
};
}
diff --git a/src/app/mainWindow.cpp b/src/app/mainWindow.cpp
index 856e0b6..bd16fc8 100644
--- a/src/app/mainWindow.cpp
+++ b/src/app/mainWindow.cpp
@@ -24,12 +24,12 @@
#include "playDialog.h" //::play()
#include "playlistFile.h"
#include "mxcl.library.h"
-#include <qcstring.h>
-#include <qdesktopwidget.h>
-#include <qevent.h> //::stateChanged()
-#include <qlayout.h> //ctor
-#include <qpopupmenu.h> //because XMLGUI is poorly designed
-#include <qobjectlist.h>
+#include <ntqcstring.h>
+#include <ntqdesktopwidget.h>
+#include <ntqevent.h> //::stateChanged()
+#include <ntqlayout.h> //ctor
+#include <ntqpopupmenu.h> //because XMLGUI is poorly designed
+#include <ntqobjectlist.h>
#include "slider.h"
#include "theStream.h"
#include "volumeAction.h"
@@ -48,13 +48,13 @@ namespace Codeine {
/// @see codeine.h
- QWidget *mainWindow() { return kapp->mainWidget(); }
+ TQWidget *mainWindow() { return kapp->mainWidget(); }
MainWindow::MainWindow()
: KMainWindow()
, m_positionSlider( new Slider( this, 65535 ) )
- , m_timeLabel( new QLabel( " 0:00:00 ", this ) )
+ , m_timeLabel( new TQLabel( " 0:00:00 ", this ) )
, m_titleLabel( new KSqueezedTextLabel( this ) )
{
DEBUG_BLOCK
@@ -65,11 +65,11 @@ MainWindow::MainWindow()
new VideoWindow( this );
setCentralWidget( videoWindow() );
- setFocusProxy( videoWindow() ); // essential! See VideoWindow::event(), QEvent::FocusOut
+ setFocusProxy( videoWindow() ); // essential! See VideoWindow::event(), TQEvent::FocusOut
// these have no affect beccause "KDE Knows Best" FFS
- setDockEnabled( toolBar(), Qt::DockRight, false ); //doesn't make sense due to our large horizontal slider
- setDockEnabled( toolBar(), Qt::DockLeft, false ); //as above
+ setDockEnabled( toolBar(), TQt::DockRight, false ); //doesn't make sense due to our large horizontal slider
+ setDockEnabled( toolBar(), TQt::DockLeft, false ); //as above
m_titleLabel->setMargin( 2 );
m_timeLabel->setFont( KGlobalSettings::fixedFont() );
@@ -78,7 +78,7 @@ MainWindow::MainWindow()
// work around a bug in KStatusBar
// sizeHint width of statusbar seems to get stupidly large quickly
- statusBar()->setSizePolicy( QSizePolicy::Ignored, QSizePolicy::Maximum );
+ statusBar()->setSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Maximum );
statusBar()->addWidget( m_titleLabel, 1, false );
statusBar()->addWidget( m_analyzer = new Analyzer::Block( this ), 0, true );
@@ -90,16 +90,16 @@ MainWindow::MainWindow()
// only show dvd button when playing a dvd
{
- struct KdeIsTehSuck : public QObject
+ struct KdeIsTehSuck : public TQObject
{
- virtual bool eventFilter( QObject*, QEvent *e )
+ virtual bool eventFilter( TQObject*, TQEvent *e )
{
- if (e->type() != QEvent::LayoutHint)
+ if (e->type() != TQEvent::LayoutHint)
return false;
// basically, KDE shows all tool-buttons, even if they are
// hidden after it does any layout operation. Yay for KDE. Yay.
- QWidget *button = (QWidget*)((KMainWindow*)mainWindow())->toolBar()->child( "toolbutton_toggle_dvd_menu" );
+ TQWidget *button = (TQWidget*)((KMainWindow*)mainWindow())->toolBar()->child( "toolbutton_toggle_dvd_menu" );
if (button)
button->setShown( TheStream::url().protocol() == "dvd" );
return false;
@@ -111,11 +111,11 @@ MainWindow::MainWindow()
}
{
- QPopupMenu *menu = 0, *settings = static_cast<QPopupMenu*>(factory()->container( "settings", this ));
+ TQPopupMenu *menu = 0, *settings = static_cast<TQPopupMenu*>(factory()->container( "settings", this ));
int id = SubtitleChannelsMenuItemId, index = 0;
#define make_menu( name, text ) \
- menu = new QPopupMenu( this, name ); \
+ menu = new TQPopupMenu( this, name ); \
menu->setCheckable( true ); \
connect( menu, SIGNAL(activated( int )), engine(), SLOT(setStreamParameter( int )) ); \
connect( menu, SIGNAL(aboutToShow()), SLOT(aboutToShowMenu()) ); \
@@ -133,7 +133,7 @@ MainWindow::MainWindow()
settings->insertSeparator( index );
}
- QObjectList *list = toolBar()->queryList( "KToolBarButton" );
+ TQObjectList *list = toolBar()->queryList( "KToolBarButton" );
if (list->isEmpty()) {
MessageBox::error( i18n(
"<qt>" PRETTY_NAME " could not load its interface, this probably means that " PRETTY_NAME " is not "
@@ -154,8 +154,8 @@ MainWindow::MainWindow()
else {
//"faster" startup
//TODO if we have a size stored for this video, do the "faster" route
- QTimer::singleShot( 0, this, SLOT(init()) );
- QApplication::setOverrideCursor( KCursor::waitCursor() ); }
+ TQTimer::singleShot( 0, this, SLOT(init()) );
+ TQApplication::setOverrideCursor( KCursor::waitCursor() ); }
}
void
@@ -163,10 +163,10 @@ MainWindow::init()
{
DEBUG_BLOCK
- connect( engine(), SIGNAL(statusMessage( const QString& )), this, SLOT(engineMessage( const QString& )) );
+ connect( engine(), SIGNAL(statusMessage( const TQString& )), this, SLOT(engineMessage( const TQString& )) );
connect( engine(), SIGNAL(stateChanged( Engine::State )), this, SLOT(engineStateChanged( Engine::State )) );
- connect( engine(), SIGNAL(channelsChanged( const QStringList& )), this, SLOT(setChannels( const QStringList& )) );
- connect( engine(), SIGNAL(titleChanged( const QString& )), m_titleLabel, SLOT(setText( const QString& )) );
+ connect( engine(), SIGNAL(channelsChanged( const TQStringList& )), this, SLOT(setChannels( const TQStringList& )) );
+ connect( engine(), SIGNAL(titleChanged( const TQString& )), m_titleLabel, SLOT(setText( const TQString& )) );
connect( m_positionSlider, SIGNAL(valueChanged( int )), this, SLOT(showTime( int )) );
if( !engine()->init() ) {
@@ -179,9 +179,9 @@ MainWindow::init()
//would be dangerous for these to65535 happen before the videoWindow() is initialised
setAcceptDrops( true );
connect( m_positionSlider, SIGNAL(sliderReleased( uint )), engine(), SLOT(seek( uint )) );
- connect( statusBar(), SIGNAL(messageChanged( const QString& )), engine(), SLOT(showOSD( const QString& )) );
+ connect( statusBar(), SIGNAL(messageChanged( const TQString& )), engine(), SLOT(showOSD( const TQString& )) );
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
if( !kapp->isRestored() ) {
KCmdLineArgs &args = *KCmdLineArgs::parsedArgs();
@@ -221,10 +221,10 @@ MainWindow::queryExit()
// saving the window state without any controls
fullScreenToggled( false );
showNormal();
- QApplication::sendPostedEvents( this, 0 );
+ TQApplication::sendPostedEvents( this, 0 );
// otherwise KMainWindow saves the screensize as maximised
Codeine::MessageBox::sorry(
- "This annoying messagebox is to get round a bug in either KDE or Qt. "
+ "This annoying messagebox is to get round a bug in either KDE or TQt. "
"Just press OK and Codeine will quit." );
//NOTE not actually needed
saveAutoSaveSettings();
@@ -278,7 +278,7 @@ MainWindow::readProperties( KConfig *config )
}
void
-MainWindow::timerEvent( QTimerEvent* )
+MainWindow::timerEvent( TQTimerEvent* )
{
static int counter = 0;
@@ -310,24 +310,24 @@ MainWindow::timerEvent( QTimerEvent* )
void
MainWindow::showTime( int pos )
{
- #define zeroPad( n ) n < 10 ? QString("0%1").arg( n ) : QString::number( n )
+ #define zeroPad( n ) n < 10 ? TQString("0%1").arg( n ) : TQString::number( n )
const int ms = (pos == -1) ? engine()->time() : int(engine()->length() * (pos / 65535.0));
const int s = ms / 1000;
const int m = s / 60;
const int h = m / 60;
- QString time = zeroPad( s % 60 ); //seconds
+ TQString time = zeroPad( s % 60 ); //seconds
time.prepend( ':' );
time.prepend( zeroPad( m % 60 ) ); //minutes
time.prepend( ':' );
- time.prepend( QString::number( h ) ); //hours
+ time.prepend( TQString::number( h ) ); //hours
m_timeLabel->setText( time );
}
void
-MainWindow::engineMessage( const QString &message )
+MainWindow::engineMessage( const TQString &message )
{
statusBar()->message( message, 3500 );
}
@@ -418,7 +418,7 @@ MainWindow::playMedia( bool show_welcome_dialog )
switch( dialog.exec() ) {
case PlayDialog::FILE: {
- const QString filter = engine()->fileFilter() + '|' + i18n("Supported Media Formats") + "\n*|" + i18n("All Files");
+ const TQString filter = engine()->fileFilter() + '|' + i18n("Supported Media Formats") + "\n*|" + i18n("All Files");
const KURL url = KFileDialog::getOpenURL( ":default", filter, this, i18n("Select A File To Play") );
open( url );
} break;
@@ -437,16 +437,16 @@ MainWindow::playMedia( bool show_welcome_dialog )
}
}
-class FullScreenToolBarHandler : QObject
+class FullScreenToolBarHandler : TQObject
{
KToolBar *m_toolbar;
int m_timer_id;
bool m_stay_hidden_for_a_bit;
- QPoint m_home;
+ TQPoint m_home;
public:
FullScreenToolBarHandler( KMainWindow *parent )
- : QObject( parent )
+ : TQObject( parent )
, m_toolbar( parent->toolBar() )
, m_timer_id( 0 )
, m_stay_hidden_for_a_bit( false )
@@ -457,12 +457,12 @@ public:
m_toolbar->installEventFilter( this );
}
- bool eventFilter( QObject *o, QEvent *e )
+ bool eventFilter( TQObject *o, TQEvent *e )
{
- if (o == parent() && e->type() == QEvent::MouseMove) {
+ if (o == parent() && e->type() == TQEvent::MouseMove) {
killTimer( m_timer_id );
- QMouseEvent const * const me = (QMouseEvent*)e;
+ TQMouseEvent const * const me = (TQMouseEvent*)e;
if (m_stay_hidden_for_a_bit) {
// wait for a small pause before showing the toolbar again
// usage = user removes mouse from toolbar after using it
@@ -485,7 +485,7 @@ public:
// then cursor has moved far enough to trigger show toolbar
show_toolbar:
m_toolbar->show(),
- m_home = QPoint();
+ m_home = TQPoint();
else
// cursor hasn't moved far enough yet
// don't reset timer below, return instead
@@ -497,22 +497,22 @@ show_toolbar:
}
}
- if (o == parent() && e->type() == QEvent::Resize)
+ if (o == parent() && e->type() == TQEvent::Resize)
{
//we aren't managed by mainWindow when at FullScreen
videoWindow()->move( 0, 0 );
- videoWindow()->resize( ((QWidget*)o)->size() );
+ videoWindow()->resize( ((TQWidget*)o)->size() );
videoWindow()->lower();
}
if (o == m_toolbar)
switch (e->type()) {
- case QEvent::Enter:
+ case TQEvent::Enter:
m_stay_hidden_for_a_bit = false;
killTimer( m_timer_id );
break;
- case QEvent::Leave:
+ case TQEvent::Leave:
m_toolbar->hide();
m_stay_hidden_for_a_bit = true;
killTimer( m_timer_id );
@@ -525,7 +525,7 @@ show_toolbar:
return false;
}
- void timerEvent( QTimerEvent* )
+ void timerEvent( TQTimerEvent* )
{
if (m_stay_hidden_for_a_bit)
;
@@ -546,8 +546,8 @@ MainWindow::fullScreenToggled( bool isFullScreen )
DEBUG_FUNC_INFO
if( isFullScreen )
- toolBar()->setPalette( palette() ), // due to 2px spacing in QMainWindow :(
- setPaletteBackgroundColor( Qt::black ); // due to 2px spacing
+ toolBar()->setPalette( palette() ), // due to 2px spacing in TQMainWindow :(
+ setPaletteBackgroundColor( TQt::black ); // due to 2px spacing
else
toolBar()->unsetPalette(),
unsetPalette();
@@ -555,7 +555,7 @@ MainWindow::fullScreenToggled( bool isFullScreen )
toolBar()->setMovingEnabled( !isFullScreen );
toolBar()->setHidden( isFullScreen && engine()->state() == Engine::Playing );
- reinterpret_cast<QWidget*>(menuBar())->setHidden( isFullScreen );
+ reinterpret_cast<TQWidget*>(menuBar())->setHidden( isFullScreen );
statusBar()->setHidden( isFullScreen );
setMouseTracking( isFullScreen ); /// @see mouseMoveEvent()
@@ -572,7 +572,7 @@ MainWindow::fullScreenToggled( bool isFullScreen )
void
MainWindow::configure()
{
- const QCString sender = this->sender()->name();
+ const TQCString sender = this->sender()->name();
if( sender == "video_settings" )
Codeine::showVideoSettingsDialog( this );
@@ -588,15 +588,15 @@ MainWindow::streamInformation()
}
void
-MainWindow::setChannels( const QStringList &channels )
+MainWindow::setChannels( const TQStringList &channels )
{
DEBUG_FUNC_INFO
//TODO -1 = auto
- QStringList::ConstIterator it = channels.begin();
+ TQStringList::ConstIterator it = channels.begin();
- QPopupMenu *menu = (QPopupMenu*)child( (*it).latin1() );
+ TQPopupMenu *menu = (TQPopupMenu*)child( (*it).latin1() );
menu->clear();
menu->insertItem( i18n("&Determine Automatically"), 1 );
@@ -604,10 +604,10 @@ MainWindow::setChannels( const QStringList &channels )
//the id is crucial, since the slot this menu is connected to requires
//that information to set the correct channel
- //NOTE we subtract 2 in xineEngine because QMenuData doesn't allow negative id
+ //NOTE we subtract 2 in xineEngine because TQMenuData doesn't allow negative id
int id = 2;
++it;
- for( QStringList::ConstIterator const end = channels.end(); it != end; ++it, ++id )
+ for( TQStringList::ConstIterator const end = channels.end(); it != end; ++it, ++id )
menu->insertItem( *it, id );
menu->insertSeparator();
@@ -620,8 +620,8 @@ MainWindow::setChannels( const QStringList &channels )
void
MainWindow::aboutToShowMenu()
{
- QPopupMenu *menu = (QPopupMenu*)sender();
- QCString name( sender() ? sender()->name() : 0 );
+ TQPopupMenu *menu = (TQPopupMenu*)sender();
+ TQCString name( sender() ? sender()->name() : 0 );
// uncheck all items first
for( uint x = 0; x < menu->count(); ++x )
@@ -639,13 +639,13 @@ MainWindow::aboutToShowMenu()
}
void
-MainWindow::dragEnterEvent( QDragEnterEvent *e )
+MainWindow::dragEnterEvent( TQDragEnterEvent *e )
{
e->accept( KURLDrag::canDecode( e ) );
}
void
-MainWindow::dropEvent( QDropEvent *e )
+MainWindow::dropEvent( TQDropEvent *e )
{
KURL::List list;
KURLDrag::decode( e, list );
@@ -657,7 +657,7 @@ MainWindow::dropEvent( QDropEvent *e )
}
void
-MainWindow::keyPressEvent( QKeyEvent *e )
+MainWindow::keyPressEvent( TQKeyEvent *e )
{
#define seek( step ) { \
const int new_pos = m_positionSlider->value() step; \
@@ -666,8 +666,8 @@ MainWindow::keyPressEvent( QKeyEvent *e )
switch( e->key() )
{
- case Qt::Key_Left: seek( -500 ); break;
- case Qt::Key_Right: seek( +500 ); break;
+ case TQt::Key_Left: seek( -500 ); break;
+ case TQt::Key_Right: seek( +500 ); break;
case Key_Escape: KWin::clearState( winId(), NET::FullScreen );
default: ;
}
@@ -675,11 +675,11 @@ MainWindow::keyPressEvent( QKeyEvent *e )
#undef seek
}
-QPopupMenu*
+TQPopupMenu*
MainWindow::menu( const char *name )
{
// KXMLGUI is "really good".
- return static_cast<QPopupMenu*>(factory()->container( name, this ));
+ return static_cast<TQPopupMenu*>(factory()->container( name, this ));
}
diff --git a/src/app/mainWindow.h b/src/app/mainWindow.h
index 63d8468..3c2770f 100644
--- a/src/app/mainWindow.h
+++ b/src/app/mainWindow.h
@@ -8,9 +8,9 @@
#include <kmainwindow.h>
class KURL;
-class QLabel;
-class QPopupMenu;
-class QSlider;
+class TQLabel;
+class TQPopupMenu;
+class TQSlider;
namespace Codeine
@@ -35,11 +35,11 @@ namespace Codeine
void captureFrame();
private slots:
- void engineMessage( const QString& );
+ void engineMessage( const TQString& );
void engineStateChanged( Engine::State );
void init();
void showTime( int = -1 );
- void setChannels( const QStringList& );
+ void setChannels( const TQStringList& );
void aboutToShowMenu();
void fullScreenToggled( bool );
@@ -49,22 +49,22 @@ namespace Codeine
bool load( const KURL& );
bool open( const KURL& );
- QPopupMenu *menu( const char *name );
+ TQPopupMenu *menu( const char *name );
- virtual void timerEvent( QTimerEvent* );
- virtual void dragEnterEvent( QDragEnterEvent* );
- virtual void dropEvent( QDropEvent* );
- virtual void keyPressEvent( QKeyEvent* );
+ virtual void timerEvent( TQTimerEvent* );
+ virtual void dragEnterEvent( TQDragEnterEvent* );
+ virtual void dropEvent( TQDropEvent* );
+ virtual void keyPressEvent( TQKeyEvent* );
virtual void saveProperties( KConfig* );
virtual void readProperties( KConfig* );
virtual bool queryExit();
- QSlider *m_positionSlider;
- QLabel *m_timeLabel;
- QLabel *m_titleLabel;
- QWidget *m_analyzer;
+ TQSlider *m_positionSlider;
+ TQLabel *m_timeLabel;
+ TQLabel *m_titleLabel;
+ TQWidget *m_analyzer;
//undefined
MainWindow( const MainWindow& );
diff --git a/src/app/playDialog.cpp b/src/app/playDialog.cpp
index 50a9ca2..36bd29c 100644
--- a/src/app/playDialog.cpp
+++ b/src/app/playDialog.cpp
@@ -11,53 +11,53 @@
#include <kstdguiitem.h>
#include "playDialog.h"
#include "mxcl.library.h"
-#include <qfile.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qsignalmapper.h>
+#include <ntqfile.h>
+#include <ntqlabel.h>
+#include <ntqlayout.h>
+#include <ntqsignalmapper.h>
-QString i18n( const char *text );
+TQString i18n( const char *text );
namespace Codeine {
-PlayDialog::PlayDialog( QWidget *parent, bool be_welcome_dialog )
- : QDialog( parent )
+PlayDialog::PlayDialog( TQWidget *parent, bool be_welcome_dialog )
+ : TQDialog( parent )
{
setCaption( kapp->makeStdCaption( i18n("Play Media") ) );
- QSignalMapper *mapper = new QSignalMapper( this );
- QWidget *o, *closeButton = new KPushButton( KStdGuiItem::close(), this );
- QBoxLayout *hbox, *vbox = new QVBoxLayout( this, 15, 20 );
+ TQSignalMapper *mapper = new TQSignalMapper( this );
+ TQWidget *o, *closeButton = new KPushButton( KStdGuiItem::close(), this );
+ TQBoxLayout *hbox, *vbox = new TQVBoxLayout( this, 15, 20 );
- vbox->addWidget( new QLabel( i18n( "What media would you like to play?" ), this ) );
+ vbox->addWidget( new TQLabel( i18n( "What media would you like to play?" ), this ) );
- QGridLayout *grid = new QGridLayout( vbox, 1, 3, 20 );
+ TQGridLayout *grid = new TQGridLayout( vbox, 1, 3, 20 );
//TODO use the kguiItems from the actions
mapper->setMapping( o = new KPushButton( KGuiItem( i18n("Play File..."), "fileopen" ), this ), FILE );
connect( o, SIGNAL(clicked()), mapper, SLOT(map()) );
- grid->QLayout::add( o );
+ grid->TQLayout::add( o );
mapper->setMapping( o = new KPushButton( KGuiItem( i18n("Play VCD"), "cdaudio_unmount" ), this ), VCD );
connect( o, SIGNAL(clicked()), mapper, SLOT(map()) );
- grid->QLayout::add( o );
+ grid->TQLayout::add( o );
mapper->setMapping( o = new KPushButton( KGuiItem( i18n("Play DVD"), "dvd_unmount" ), this ), DVD );
connect( o, SIGNAL(clicked()), mapper, SLOT(map()) );
- grid->QLayout::add( o );
+ grid->TQLayout::add( o );
- mapper->setMapping( closeButton, QDialog::Rejected );
+ mapper->setMapping( closeButton, TQDialog::Rejected );
connect( closeButton, SIGNAL(clicked()), mapper, SLOT(map()) );
createRecentFileWidget( vbox );
- hbox = new QHBoxLayout( vbox );
- hbox->addItem( new QSpacerItem( 10, 10, QSizePolicy::Expanding ) );
+ hbox = new TQHBoxLayout( vbox );
+ hbox->addItem( new TQSpacerItem( 10, 10, TQSizePolicy::Expanding ) );
if( be_welcome_dialog ) {
- QWidget *w = new KPushButton( KStdGuiItem::quit(), this );
+ TQWidget *w = new KPushButton( KStdGuiItem::quit(), this );
hbox->addWidget( w );
connect( w, SIGNAL(clicked()), kapp, SLOT(quit()) );
}
@@ -68,13 +68,13 @@ PlayDialog::PlayDialog( QWidget *parent, bool be_welcome_dialog )
}
void
-PlayDialog::createRecentFileWidget( QBoxLayout *layout )
+PlayDialog::createRecentFileWidget( TQBoxLayout *layout )
{
KListView *lv;
lv = new Codeine::ListView( this );
lv->setColumnText( 1, i18n("Recently Played Media") );
- const QStringList list1 = Codeine::config( "General" )->readPathListEntry( "Recent Urls" );
+ const TQStringList list1 = Codeine::config( "General" )->readPathListEntry( "Recent Urls" );
KURL::List urls;
foreach( list1 )
@@ -84,7 +84,7 @@ PlayDialog::createRecentFileWidget( QBoxLayout *layout )
if( urls.contains( *it ) > 1 )
//remove duplicates
it = urls.remove( it );
- else if( (*it).protocol() == "file" && !QFile::exists( (*it).path() ) )
+ else if( (*it).protocol() == "file" && !TQFile::exists( (*it).path() ) )
//remove stale entries
it = urls.remove( it );
else
@@ -92,23 +92,23 @@ PlayDialog::createRecentFileWidget( QBoxLayout *layout )
}
for( KURL::List::ConstIterator it = urls.begin(), end = urls.end(); it != end; ++it ) {
- const QString fileName = (*it).fileName();
+ const TQString fileName = (*it).fileName();
new KListViewItem( lv, 0, (*it).url(), fileName.isEmpty() ? (*it).prettyURL() : fileName );
}
if( lv->childCount() ) {
layout->addWidget( lv, 1 );
- connect( lv, SIGNAL(executed( QListViewItem* )), SLOT(done( QListViewItem* )) );
+ connect( lv, SIGNAL(executed( TQListViewItem* )), SLOT(done( TQListViewItem* )) );
}
else
delete lv;
}
void
-PlayDialog::done( QListViewItem *item )
+PlayDialog::done( TQListViewItem *item )
{
m_url = item->text( 0 );
- QDialog::done( RECENT_FILE );
+ TQDialog::done( RECENT_FILE );
}
}
diff --git a/src/app/playDialog.h b/src/app/playDialog.h
index 020f9f1..c6a1d04 100644
--- a/src/app/playDialog.h
+++ b/src/app/playDialog.h
@@ -5,29 +5,29 @@
#define CODEINEPLAYDIALOG_H
#include <kurl.h>
-#include <qdialog.h>
+#include <ntqdialog.h>
class KListView;
-class QBoxLayout;
-class QListViewItem;
+class TQBoxLayout;
+class TQListViewItem;
namespace Codeine
{
- class PlayDialog : public QDialog
+ class PlayDialog : public TQDialog
{
Q_OBJECT
public:
- PlayDialog( QWidget*, bool show_welcome_dialog = false );
+ PlayDialog( TQWidget*, bool show_welcome_dialog = false );
const KURL &url() const { return m_url; }
- enum DialogCode { FILE = QDialog::Accepted + 2, VCD, CDDA, DVD, RECENT_FILE };
+ enum DialogCode { FILE = TQDialog::Accepted + 2, VCD, CDDA, DVD, RECENT_FILE };
private slots:
- void done( QListViewItem* );
+ void done( TQListViewItem* );
private:
- void createRecentFileWidget( QBoxLayout* );
+ void createRecentFileWidget( TQBoxLayout* );
KURL m_url;
};
diff --git a/src/app/playlistFile.cpp b/src/app/playlistFile.cpp
index 19acd30..323643d 100644
--- a/src/app/playlistFile.cpp
+++ b/src/app/playlistFile.cpp
@@ -9,8 +9,8 @@
#include "debug.h"
#include <kio/netaccess.h>
#include "playlistFile.h"
-#include <qfile.h>
-#include <qtextstream.h>
+#include <ntqfile.h>
+#include <ntqtextstream.h>
#include <mxcl.library.h>
@@ -21,7 +21,7 @@ PlaylistFile::PlaylistFile( const KURL &url )
{
mxcl::WaitCursor allocateOnStack;
- QString &path = m_path = url.path();
+ TQString &path = m_path = url.path();
if( path.endsWith( ".pls", false ) )
m_type = PLS; else
@@ -34,16 +34,16 @@ PlaylistFile::PlaylistFile( const KURL &url )
}
if( m_isRemoteFile ) {
- path = QString();
+ path = TQString();
if( !KIO::NetAccess::download( url, path, Codeine::mainWindow() ) ) {
m_error = i18n( "Codeine could not download the remote playlist: %1" ).arg( url.prettyURL() );
return;
}
}
- QFile file( path );
+ TQFile file( path );
if( file.open( IO_ReadOnly ) ) {
- QTextStream stream( &file );
+ TQTextStream stream( &file );
switch( m_type ) {
case M3U: parseM3uFile( stream ); break;
case PLS: parsePlsFile( stream ); break;
@@ -67,15 +67,15 @@ PlaylistFile::~PlaylistFile()
void
-PlaylistFile::parsePlsFile( QTextStream &stream )
+PlaylistFile::parsePlsFile( TQTextStream &stream )
{
DEBUG_BLOCK
- for( QString line = stream.readLine(); !line.isNull(); )
+ for( TQString line = stream.readLine(); !line.isNull(); )
{
if( line.startsWith( "File" ) ) {
const KURL url = line.section( '=', -1 );
- const QString title = stream.readLine().section( '=', -1 );
+ const TQString title = stream.readLine().section( '=', -1 );
debug() << url << endl << title << endl;
@@ -90,11 +90,11 @@ PlaylistFile::parsePlsFile( QTextStream &stream )
void
-PlaylistFile::parseM3uFile( QTextStream &stream )
+PlaylistFile::parseM3uFile( TQTextStream &stream )
{
DEBUG_BLOCK
- for( QString line; !stream.atEnd(); )
+ for( TQString line; !stream.atEnd(); )
{
line = stream.readLine();
diff --git a/src/app/playlistFile.h b/src/app/playlistFile.h
index 0302a85..7e468af 100644
--- a/src/app/playlistFile.h
+++ b/src/app/playlistFile.h
@@ -17,19 +17,19 @@ public:
bool isPlaylist() const { return m_type != Unknown; }
bool isValid() const { return m_isValid; }
KURL firstUrl() const { return m_contents.isEmpty() ? KURL() : m_contents.first(); }
- QString error() const { return m_error; }
+ TQString error() const { return m_error; }
private:
/// both only return first url currently
- void parsePlsFile( QTextStream& );
- void parseM3uFile( QTextStream& );
+ void parsePlsFile( TQTextStream& );
+ void parseM3uFile( TQTextStream& );
KURL m_url;
bool m_isRemoteFile;
bool m_isValid;
- QString m_error;
+ TQString m_error;
FileFormat m_type;
- QString m_path;
+ TQString m_path;
KURL::List m_contents;
};
diff --git a/src/app/slider.cpp b/src/app/slider.cpp
index 89b5ced..205a3b8 100644
--- a/src/app/slider.cpp
+++ b/src/app/slider.cpp
@@ -3,12 +3,12 @@
#include "debug.h"
#include "slider.h"
-#include <qapplication.h>
-#include <qlabel.h>
-#include <qsize.h>
-#include <qtooltip.h>
+#include <ntqapplication.h>
+#include <ntqlabel.h>
+#include <ntqsize.h>
+#include <ntqtooltip.h>
-#include <qpainter.h>
+#include <ntqpainter.h>
#include "xineEngine.h"
using Codeine::Slider;
@@ -17,8 +17,8 @@ using Codeine::Slider;
Slider *Slider::s_instance = 0;
-Slider::Slider( QWidget *parent, uint max )
- : QSlider( Qt::Horizontal, parent )
+Slider::Slider( TQWidget *parent, uint max )
+ : TQSlider( TQt::Horizontal, parent )
, m_sliding( false )
, m_outside( false )
, m_prevValue( 0 )
@@ -27,34 +27,34 @@ Slider::Slider( QWidget *parent, uint max )
setRange( 0, max );
setFocusPolicy( NoFocus );
- setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding );
+ setSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding );
}
void
-Slider::wheelEvent( QWheelEvent *e )
+Slider::wheelEvent( TQWheelEvent *e )
{
//if you use this class elsewhere, NOTE this is Codeine specific
e->ignore(); //pass to VideoWindow
}
void
-Slider::mouseMoveEvent( QMouseEvent *e )
+Slider::mouseMoveEvent( TQMouseEvent *e )
{
if( m_sliding )
{
//feels better, but using set value of 20 is bad of course
- QRect rect = this->rect();
+ TQRect rect = this->rect();
rect.addCoords( -20, -20, 20, 20 );
if( !rect.contains( e->pos() ) ) {
if( !m_outside )
- QSlider::setValue( m_prevValue );
+ TQSlider::setValue( m_prevValue );
m_outside = true;
} else {
m_outside = false;
- QSlider::setValue(
- QRangeControl::valueFromPosition(
+ TQSlider::setValue(
+ TQRangeControl::valueFromPosition(
e->pos().x() - sliderRect().width()/2,
width() - sliderRect().width() ) );
@@ -62,43 +62,43 @@ Slider::mouseMoveEvent( QMouseEvent *e )
}
}
else
- QSlider::mouseMoveEvent( e );
+ TQSlider::mouseMoveEvent( e );
}
void
-Slider::mousePressEvent( QMouseEvent *e )
+Slider::mousePressEvent( TQMouseEvent *e )
{
m_sliding = true;
- m_prevValue = QSlider::value();
+ m_prevValue = TQSlider::value();
if( !sliderRect().contains( e->pos() ) )
mouseMoveEvent( e );
}
void
-Slider::mouseReleaseEvent( QMouseEvent* )
+Slider::mouseReleaseEvent( TQMouseEvent* )
{
- if( !m_outside && QSlider::value() != m_prevValue )
+ if( !m_outside && TQSlider::value() != m_prevValue )
emit sliderReleased( value() );
m_sliding = false;
m_outside = false;
}
-static inline QString timeAsString( const int s )
+static inline TQString timeAsString( const int s )
{
- #define zeroPad( n ) n < 10 ? QString("0%1").arg( n ) : QString::number( n )
+ #define zeroPad( n ) n < 10 ? TQString("0%1").arg( n ) : TQString::number( n )
using Codeine::engine;
const int m = s / 60;
const int h = m / 60;
- QString time;
+ TQString time;
time.prepend( zeroPad( s % 60 ) ); //seconds
time.prepend( ':' );
time.prepend( zeroPad( m % 60 ) ); //minutes
time.prepend( ':' );
- time.prepend( QString::number( h ) ); //hours
+ time.prepend( TQString::number( h ) ); //hours
return time;
}
@@ -106,17 +106,17 @@ static inline QString timeAsString( const int s )
void
Slider::setValue( int newValue )
{
- static QLabel *w1 = 0;
- static QLabel *w2 = 0;
+ static TQLabel *w1 = 0;
+ static TQLabel *w2 = 0;
if (!w1) {
- w1 = new QLabel( this );
- w1->setPalette( QToolTip::palette() );
- w1->setFrameStyle( QFrame::Plain | QFrame::Box );
+ w1 = new TQLabel( this );
+ w1->setPalette( TQToolTip::palette() );
+ w1->setFrameStyle( TQFrame::Plain | TQFrame::Box );
- w2 = new QLabel( this );
- w2->setPalette( QToolTip::palette() );
- w2->setFrameStyle( QFrame::Plain | QFrame::Box );
+ w2 = new TQLabel( this );
+ w2->setPalette( TQToolTip::palette() );
+ w2->setFrameStyle( TQFrame::Plain | TQFrame::Box );
}
//TODO stupidly inefficeint! :)
@@ -131,7 +131,7 @@ Slider::setValue( int newValue )
const int left = int(l * (newValue / 65535.0));
const int right = l - left;
- QSlider::setValue( newValue );
+ TQSlider::setValue( newValue );
w1->move( 0, height() - w1->height() - 1 );
w1->setText( timeAsString( left ) + ' ' );
w1->adjustSize();
diff --git a/src/app/slider.h b/src/app/slider.h
index 7e06b6b..b7cbae0 100644
--- a/src/app/slider.h
+++ b/src/app/slider.h
@@ -4,11 +4,11 @@
#ifndef CODEINESLIDER_H
#define CODEINESLIDER_H
-#include <qslider.h>
+#include <ntqslider.h>
namespace Codeine
{
- class Slider : public QSlider
+ class Slider : public TQSlider
{
Q_OBJECT
@@ -16,25 +16,25 @@ namespace Codeine
static Slider *instance() { return s_instance; }
public:
- Slider( QWidget*, uint max = 0 );
+ Slider( TQWidget*, uint max = 0 );
virtual void setValue( int );
signals:
//we emit this when the user has specifically changed the slider
//so connect to it if valueChanged() is too generic
- //Qt also emits valueChanged( int )
+ //TQt also emits valueChanged( int )
void sliderReleased( uint );
protected:
- virtual void wheelEvent( QWheelEvent* );
- virtual void mouseMoveEvent( QMouseEvent* );
- virtual void mouseReleaseEvent( QMouseEvent* );
- virtual void mousePressEvent( QMouseEvent* );
- virtual void keyPressEvent( QKeyEvent *e ) { e->ignore(); } //so that MainWindow gets the keypress
-
- virtual QSize sizeHint() const { return QSlider::sizeHint() + QSize( 0, 6 ); }
- virtual QSize minimumSizeHint() const { return sizeHint(); }
+ virtual void wheelEvent( TQWheelEvent* );
+ virtual void mouseMoveEvent( TQMouseEvent* );
+ virtual void mouseReleaseEvent( TQMouseEvent* );
+ virtual void mousePressEvent( TQMouseEvent* );
+ virtual void keyPressEvent( TQKeyEvent *e ) { e->ignore(); } //so that MainWindow gets the keypress
+
+ virtual TQSize sizeHint() const { return TQSlider::sizeHint() + TQSize( 0, 6 ); }
+ virtual TQSize minimumSizeHint() const { return sizeHint(); }
bool m_sliding;
diff --git a/src/app/stateChange.cpp b/src/app/stateChange.cpp
index be15aeb..36d7e42 100644
--- a/src/app/stateChange.cpp
+++ b/src/app/stateChange.cpp
@@ -8,11 +8,11 @@
#include <kconfig.h>
#include <kglobal.h>
#include "mxcl.library.h"
-#include <qapplication.h>
-#include <qevent.h>
-#include <qlabel.h>
-#include <qpopupmenu.h>
-#include <qslider.h>
+#include <ntqapplication.h>
+#include <ntqevent.h>
+#include <ntqlabel.h>
+#include <ntqpopupmenu.h>
+#include <ntqslider.h>
#include "theStream.h"
#include "videoSettings.h" //FIXME unfortunate
#include "xineEngine.h"
@@ -36,7 +36,7 @@ MainWindow::engineStateChanged( Engine::State state )
KURL const &url = TheStream::url();
bool const isFullScreen = toggleAction("fullscreen")->isChecked();
- QWidget *const toolbar = reinterpret_cast<QWidget*>(toolBar());
+ TQWidget *const toolbar = reinterpret_cast<TQWidget*>(toolBar());
Debug::Block block( state == Engine::Empty
? "State: Empty" : state == Engine::Loaded
@@ -62,7 +62,7 @@ MainWindow::engineStateChanged( Engine::State state )
toggleAction( "play" )->setChecked( state == Playing );
//FIXME bad design to do this way
- QSlider *volume = (QSlider*)toolBar()->child( "volume" );
+ TQSlider *volume = (TQSlider*)toolBar()->child( "volume" );
if (volume)
volume->setValue( engine()->volume() );
}
@@ -78,8 +78,8 @@ MainWindow::engineStateChanged( Engine::State state )
// the toolbar play button is always enabled, but the menu item
// is disabled if we are empty, this looks more sensible
- QPopupMenu * const file_menu = menu( "file" );
- QPopupMenu * const settings_menu = menu( "settings" );
+ TQPopupMenu * const file_menu = menu( "file" );
+ TQPopupMenu * const settings_menu = menu( "settings" );
const int play_id = file_menu->idAt( 2 );
file_menu->setItemEnabled( play_id, state != Empty );
@@ -95,7 +95,7 @@ MainWindow::engineStateChanged( Engine::State state )
// set correct aspect ratio
if( state == Loaded )
- static_cast<QPopupMenu*>(child( "aspect_ratio_menu" ))->setItemChecked( TheStream::aspectRatio(), true );
+ static_cast<TQPopupMenu*>(child( "aspect_ratio_menu" ))->setItemChecked( TheStream::aspectRatio(), true );
}
@@ -130,20 +130,20 @@ MainWindow::engineStateChanged( Engine::State state )
#ifndef NO_SKIP_PR0N
// ;-)
- const QString url_string = url.url();
+ const TQString url_string = url.url();
if( !(url_string.contains( "porn", false ) || url_string.contains( "pr0n", false )) )
#endif
if( url.protocol() != "dvd" && url.protocol() != "vcd" ) {
KConfig *config = Codeine::config( "General" );
- const QString prettyUrl = url.prettyURL();
+ const TQString prettyUrl = url.prettyURL();
- QStringList urls = config->readPathListEntry( "Recent Urls" );
+ TQStringList urls = config->readPathListEntry( "Recent Urls" );
urls.remove( prettyUrl );
config->writePathEntry( "Recent Urls", urls << prettyUrl );
}
if( TheStream::hasVideo() && !isFullScreen )
- new AdjustSizeButton( reinterpret_cast<QWidget*>(videoWindow()) );
+ new AdjustSizeButton( reinterpret_cast<TQWidget*>(videoWindow()) );
}
@@ -165,7 +165,7 @@ MainWindow::engineStateChanged( Engine::State state )
/// set toolbar states
- QWidget *dvd_button = (QWidget*)toolBar()->child( "toolbutton_toggle_dvd_menu" );
+ TQWidget *dvd_button = (TQWidget*)toolBar()->child( "toolbutton_toggle_dvd_menu" );
if (dvd_button)
dvd_button->setShown( state != Engine::Empty && url.protocol() == "dvd" );
@@ -176,8 +176,8 @@ MainWindow::engineStateChanged( Engine::State state )
if( videoWindow()->isActiveWindow() ) {
//FIXME dual-screen this seems to still show
- QContextMenuEvent e( QContextMenuEvent::Other, QPoint(), Qt::MetaButton );
- QApplication::sendEvent( videoWindow(), &e );
+ TQContextMenuEvent e( TQContextMenuEvent::Other, TQPoint(), TQt::MetaButton );
+ TQApplication::sendEvent( videoWindow(), &e );
}
break;
case Engine::Empty:
diff --git a/src/app/theStream.cpp b/src/app/theStream.cpp
index 5d60d76..dac877e 100644
--- a/src/app/theStream.cpp
+++ b/src/app/theStream.cpp
@@ -16,7 +16,7 @@ namespace Codeine
{
//TODO a unique id for discs, and then even to also record chapters etc.
// if( url().protocol() == "dvd" )
-// return Codeine::config( QString( "dvd:/" ) + prettyTitle() );
+// return Codeine::config( TQString( "dvd:/" ) + prettyTitle() );
// else
return Codeine::config( url().prettyURL() );
}
@@ -38,12 +38,12 @@ namespace Codeine
TheStream::hasVideo()
{ return xine_get_stream_info( e->m_stream, XINE_STREAM_INFO_HAS_VIDEO ); }
- QSize
+ TQSize
TheStream::defaultVideoSize()
{
return !e->m_stream
- ? QSize()
- : QSize(
+ ? TQSize()
+ : TQSize(
xine_get_stream_info( e->m_stream, XINE_STREAM_INFO_VIDEO_WIDTH ),
xine_get_stream_info( e->m_stream, XINE_STREAM_INFO_VIDEO_HEIGHT ) );
}
@@ -57,35 +57,35 @@ namespace Codeine
int TheStream::audioChannel()
{ return xine_get_param( e->m_stream, XINE_PARAM_AUDIO_CHANNEL_LOGICAL ); }
- QString
+ TQString
TheStream::prettyTitle()
{
const KURL &url = e->m_url;
- const QString artist = QString::fromUtf8( xine_get_meta_info( e->m_stream, XINE_META_INFO_ARTIST ) );
- const QString title = QString::fromUtf8( xine_get_meta_info( e->m_stream, XINE_META_INFO_TITLE ) );
+ const TQString artist = TQString::fromUtf8( xine_get_meta_info( e->m_stream, XINE_META_INFO_ARTIST ) );
+ const TQString title = TQString::fromUtf8( xine_get_meta_info( e->m_stream, XINE_META_INFO_TITLE ) );
if (hasVideo() && !title.isEmpty())
return title;
else if (!title.isEmpty() && !artist.isEmpty())
return artist + " - " + title;
else if (url.protocol() != "http" && !url.fileName().isEmpty()) {
- const QString n = url.fileName();
+ const TQString n = url.fileName();
return KURL::decode_string( n.left( n.findRev( '.' ) ).replace( '_', ' ' ) ); }
else
return url.prettyURL();
}
- static inline QString
- entryHelper( const QString &plate, const QString &s1, const QString &s2 )
+ static inline TQString
+ entryHelper( const TQString &plate, const TQString &s1, const TQString &s2 )
{
return s2.isEmpty() ? s2 : plate.arg( s1 ).arg( s2 );
}
- static inline QString
- sectionHelper( const QString &sectionTitle, const QStringList &entries )
+ static inline TQString
+ sectionHelper( const TQString &sectionTitle, const TQStringList &entries )
{
- QString s;
+ TQString s;
foreach( entries )
if( !(*it).isEmpty() )
@@ -94,18 +94,18 @@ namespace Codeine
return s.isEmpty() ? s : "<h2>" + sectionTitle + "</h2>" + s;
}
- QString
+ TQString
TheStream::information()
{
#define meta( x ) xine_get_meta_info( e->m_stream, x )
#define info( x, y ) x.arg( xine_get_stream_info( e->m_stream, y ) )
- #define simple( x ) QString::number( xine_get_stream_info( e->m_stream, x ) )
+ #define simple( x ) TQString::number( xine_get_stream_info( e->m_stream, x ) )
- const QString plate = "<p><b>%1</b>: %2</p>";
- QString s;
+ const TQString plate = "<p><b>%1</b>: %2</p>";
+ TQString s;
s += sectionHelper( i18n("Metadata"),
- QStringList()
+ TQStringList()
<< entryHelper( plate, i18n("Title"), meta( XINE_META_INFO_TITLE ) )
<< entryHelper( plate, i18n("Comment"), meta( XINE_META_INFO_COMMENT ) )
<< entryHelper( plate, i18n("Artist"), meta( XINE_META_INFO_ARTIST ) )
@@ -114,19 +114,19 @@ namespace Codeine
<< entryHelper( plate, i18n("Year"), meta( XINE_META_INFO_YEAR ) ) );
s += sectionHelper( i18n("Audio Properties"),
- QStringList()
+ TQStringList()
<< entryHelper( plate, i18n("Bitrate"), info( i18n("%1 bps"), XINE_STREAM_INFO_AUDIO_BITRATE ) )
<< entryHelper( plate, i18n("Sample-rate"), info( i18n("%1 Hz"), XINE_STREAM_INFO_AUDIO_SAMPLERATE ) ) );
s += sectionHelper( i18n("Technical Information"),
- QStringList()
+ TQStringList()
<< entryHelper( plate, i18n("Video Codec"), meta( XINE_META_INFO_VIDEOCODEC ) )
<< entryHelper( plate, i18n("Audio Codec"), meta( XINE_META_INFO_AUDIOCODEC ) )
<< entryHelper( plate, i18n("System Layer"), meta( XINE_META_INFO_SYSTEMLAYER ) )
<< entryHelper( plate, i18n("Input Plugin"), meta( XINE_META_INFO_INPUT_PLUGIN ))
<< entryHelper( plate, i18n("CDINDEX_DISCID"), meta( XINE_META_INFO_CDINDEX_DISCID ) ) );
- QStringList texts;
+ TQStringList texts;
texts << "BITRATE" << "SEEKABLE" << "VIDEO_WIDTH" << "VIDEO_HEIGHT" << "VIDEO_RATIO" << "VIDEO_CHANNELS" << "VIDEO_STREAMS" << "VIDEO_BITRATE" << "VIDEO_FOURCC" << "VIDEO_HANDLED" << "FRAME_DURATION" << "AUDIO_CHANNELS" << "AUDIO_BITS" << "-AUDIO_SAMPLERATE" << "-AUDIO_BITRATE" << "AUDIO_FOURCC" << "AUDIO_HANDLED" << "HAS_CHAPTERS" << "HAS_VIDEO" << "HAS_AUDIO" << "-IGNORE_VIDEO" << "-IGNORE_AUDIO" << "-IGNORE_SPU" << "VIDEO_HAS_STILL" << "MAX_AUDIO_CHANNEL" << "MAX_SPU_CHANNEL" << "AUDIO_MODE" << "SKIPPED_FRAMES" << "DISCARDED_FRAMES";
s += "<h2>Other</h2>";
diff --git a/src/app/theStream.h b/src/app/theStream.h
index 0ffe64f..9a04249 100644
--- a/src/app/theStream.h
+++ b/src/app/theStream.h
@@ -6,8 +6,8 @@
#include "config.h" // needed for inline functions
#include <kurl.h> // larger :( but no macros at least
-#include <qsize.h> // small header
-#include <qstring.h> // small header
+#include <ntqsize.h> // small header
+#include <ntqstring.h> // small header
/// for purely static classes
#define CODEINE_NO_EXPORT( T ) \
@@ -31,14 +31,14 @@ namespace Codeine
static bool hasAudio();
static bool hasVideo();
- static QSize defaultVideoSize();
+ static TQSize defaultVideoSize();
static int aspectRatio();
static int subtitleChannel();
static int audioChannel();
- static QString prettyTitle();
- static QString information();
+ static TQString prettyTitle();
+ static TQString information();
static inline bool hasProfile()
{ return KGlobal::config()->hasGroup( url().prettyURL() ); }
diff --git a/src/app/videoSettings.cpp b/src/app/videoSettings.cpp
index 945e4d3..b25ec1d 100644
--- a/src/app/videoSettings.cpp
+++ b/src/app/videoSettings.cpp
@@ -3,9 +3,9 @@
#include <kwin.h>
#include "mxcl.library.h"
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qslider.h>
+#include <ntqlabel.h>
+#include <ntqlayout.h>
+#include <ntqslider.h>
#include "videoSettings.h"
#include <xine.h>
#include "xineEngine.h"
@@ -13,7 +13,7 @@
extern "C"
{
// #include <X11/Xlib.h> is just dangerous! Here, there is a macro for Below that conflicts
- // with QSlider::Below. Stupid X11 people.
+ // with TQSlider::Below. Stupid X11 people.
typedef unsigned long XID;
typedef XID Window;
extern int XSetTransientForHint( Display*, Window, Window );
@@ -24,61 +24,61 @@ extern "C"
//TODO show a warning that when paused the changes aren't updated to the display, show an unpause button too
-class SnapSlider : public QSlider
+class SnapSlider : public TQSlider
{
int m_offset;
public:
- SnapSlider( const int value, QWidget *parent, const char *name )
- : QSlider( (65536/4)-1, (3*(65536/4))-1, 1000, value, Qt::Horizontal, parent, name )
+ SnapSlider( const int value, TQWidget *parent, const char *name )
+ : TQSlider( (65536/4)-1, (3*(65536/4))-1, 1000, value, TQt::Horizontal, parent, name )
, m_offset( 0 )
{
- setTickmarks( QSlider::Below );
+ setTickmarks( TQSlider::Below );
setTickInterval( 65536 / 4 );
setMinimumWidth( fontMetrics().width( name ) * 3 );
connect( this, SIGNAL(valueChanged( int )), Codeine::engine(), SLOT(setStreamParameter( int )) );
}
- virtual void mousePressEvent( QMouseEvent *e )
+ virtual void mousePressEvent( TQMouseEvent *e )
{
m_offset = e->pos().x() - (sliderStart() + (sliderRect().width()/2));
- QSlider::mousePressEvent( e );
+ TQSlider::mousePressEvent( e );
}
- virtual void mouseMoveEvent( QMouseEvent *e )
+ virtual void mouseMoveEvent( TQMouseEvent *e )
{
const int MIDDLE = width() / 2;
const int x = e->pos().x() - m_offset;
const int F = sliderRect().width() / 2;
if( x > MIDDLE - F && x < MIDDLE + F ) {
- QMouseEvent e2( e->type(), QPoint( MIDDLE + m_offset, e->pos().y() ), e->button(), e->state() );
- QSlider::mouseMoveEvent( &e2 );
- QRangeControl::setValue( 65536 / 2 - 1 ); // to ensure we are absolutely exact
+ TQMouseEvent e2( e->type(), TQPoint( MIDDLE + m_offset, e->pos().y() ), e->button(), e->state() );
+ TQSlider::mouseMoveEvent( &e2 );
+ TQRangeControl::setValue( 65536 / 2 - 1 ); // to ensure we are absolutely exact
}
else
- QSlider::mouseMoveEvent( e );
+ TQSlider::mouseMoveEvent( e );
}
};
-Codeine::VideoSettingsDialog::VideoSettingsDialog( QWidget *parent )
+Codeine::VideoSettingsDialog::VideoSettingsDialog( TQWidget *parent )
: KDialog( parent, "video_settings_dialog", false, WType_TopLevel | WDestructiveClose )
{
XSetTransientForHint( x11Display(), winId(), parent->winId() );
KWin::setType( winId(), NET::Utility );
KWin::setState( winId(), NET::SkipTaskbar );
- QFrame *frame = new QFrame( this );
- (new QVBoxLayout( this, 10 ))->addWidget( frame );
- frame->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
+ TQFrame *frame = new TQFrame( this );
+ (new TQVBoxLayout( this, 10 ))->addWidget( frame );
+ frame->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken );
frame->setPaletteBackgroundColor( backgroundColor().dark( 102 ) );
- QGridLayout *grid = new QGridLayout( frame, 4, 2, 15, 10 );
+ TQGridLayout *grid = new TQGridLayout( frame, 4, 2, 15, 10 );
grid->setAutoAdd( true );
#define makeSlider( PARAM, name ) \
- new QLabel( name, frame ); \
+ new TQLabel( name, frame ); \
new SnapSlider( xine_get_param( *Codeine::engine(), PARAM ), frame, name );
makeSlider( XINE_PARAM_VO_BRIGHTNESS, "brightness" );
@@ -95,9 +95,9 @@ Codeine::VideoSettingsDialog::VideoSettingsDialog( QWidget *parent )
}
void
-Codeine::VideoSettingsDialog::stateChanged( QWidget *parent, Engine::State state ) //static
+Codeine::VideoSettingsDialog::stateChanged( TQWidget *parent, Engine::State state ) //static
{
- QWidget *me = (QWidget*)parent->child( "video_settings_dialog" );
+ TQWidget *me = (TQWidget*)parent->child( "video_settings_dialog" );
if( !me )
return;
@@ -110,7 +110,7 @@ Codeine::VideoSettingsDialog::stateChanged( QWidget *parent, Engine::State state
break;
case Engine::Loaded:
- #define update( param, name ) static_cast<QSlider*>(me->child( name ))->setValue( xine_get_param( *Codeine::engine(), param ) );
+ #define update( param, name ) static_cast<TQSlider*>(me->child( name ))->setValue( xine_get_param( *Codeine::engine(), param ) );
update( XINE_PARAM_VO_BRIGHTNESS, "brightness" );
update( XINE_PARAM_VO_CONTRAST, "contrast" );
update( XINE_PARAM_VO_SATURATION, "saturation" );
@@ -125,7 +125,7 @@ Codeine::VideoSettingsDialog::stateChanged( QWidget *parent, Engine::State state
namespace Codeine
{
- void showVideoSettingsDialog( QWidget *parent )
+ void showVideoSettingsDialog( TQWidget *parent )
{
// ensure that the dialog is shown by deleting the old one
delete parent->child( "video_settings_dialog" );
diff --git a/src/app/videoSettings.h b/src/app/videoSettings.h
index 20e01ff..c781169 100644
--- a/src/app/videoSettings.h
+++ b/src/app/videoSettings.h
@@ -17,9 +17,9 @@ namespace Codeine
VideoSettingsDialog &operator=( const VideoSettingsDialog& ); //disable
public:
- VideoSettingsDialog( QWidget *parent );
+ VideoSettingsDialog( TQWidget *parent );
- static void stateChanged( QWidget *parent, Engine::State );
+ static void stateChanged( TQWidget *parent, Engine::State );
};
}
diff --git a/src/app/videoWindow.cpp b/src/app/videoWindow.cpp
index 00f2542..d344181 100644
--- a/src/app/videoWindow.cpp
+++ b/src/app/videoWindow.cpp
@@ -13,8 +13,8 @@
#include <kpopupmenu.h>
#include <kwin.h>
#include "mxcl.library.h"
-#include <qcursor.h>
-#include <qevent.h>
+#include <ntqcursor.h>
+#include <ntqevent.h>
#include "slider.h"
#include "theStream.h"
#include <X11/Xlib.h>
@@ -125,7 +125,7 @@ VideoWindow::frameOutputCallBack(
}
void
-VideoWindow::contextMenuEvent( QContextMenuEvent *e )
+VideoWindow::contextMenuEvent( TQContextMenuEvent *e )
{
e->accept();
@@ -150,7 +150,7 @@ VideoWindow::contextMenuEvent( QContextMenuEvent *e )
action( "fullscreen" )->plug( &popup );
//show zoom information?
- if( e->state() & Qt::MetaButton ) { //only on track end, or for special users
+ if( e->state() & TQt::MetaButton ) { //only on track end, or for special users
popup.insertSeparator();
action( "file_quit" )->plug( &popup );
}
@@ -162,7 +162,7 @@ VideoWindow::contextMenuEvent( QContextMenuEvent *e )
}
bool
-VideoWindow::event( QEvent *e )
+VideoWindow::event( TQEvent *e )
{
//TODO it would perhaps make things more responsive to
// deactivate mouse tracking and use the x11Event() function to transfer mouse move events?
@@ -170,14 +170,14 @@ VideoWindow::event( QEvent *e )
switch( e->type() )
{
- case QEvent::DragEnter:
- case QEvent::Drop:
+ case TQEvent::DragEnter:
+ case TQEvent::Drop:
//FIXME why don't we just ignore the event? It should propogate down
- return QApplication::sendEvent( qApp->mainWidget(), e );
+ return TQApplication::sendEvent( tqApp->mainWidget(), e );
- case QEvent::Resize:
+ case TQEvent::Resize:
if( !TheStream::url().isEmpty() ) {
- const QSize defaultSize = TheStream::defaultVideoSize();
+ const TQSize defaultSize = TheStream::defaultVideoSize();
const bool notDefaultSize = width() != defaultSize.width() && height() != defaultSize.height();
Codeine::action( "reset_zoom" )->setEnabled( notDefaultSize );
@@ -186,27 +186,27 @@ VideoWindow::event( QEvent *e )
}
break;
- case QEvent::Leave:
+ case TQEvent::Leave:
m_timer.stop();
break;
// Xlib.h sucks fucking balls!!!!11!!1!
#undef FocusOut
- case QEvent::FocusOut:
+ case TQEvent::FocusOut:
// if the user summons some dialog via a shortcut or whatever we need to ensure
// the mouse gets shown, because if it is modal, we won't get mouse events after
// it is shown! This works because we are always the focus widget.
// @see MainWindow::MainWindow where we setFocusProxy()
- case QEvent::Enter:
- case QEvent::MouseMove:
- case QEvent::MouseButtonPress:
+ case TQEvent::Enter:
+ case TQEvent::MouseMove:
+ case TQEvent::MouseButtonPress:
unsetCursor();
if( hasFocus() )
// see above comment
m_timer.start( CURSOR_HIDE_TIMEOUT, true );
break;
- case QEvent::MouseButtonDblClick:
+ case TQEvent::MouseButtonDblClick:
Codeine::action( "fullscreen" )->activate();
break;
@@ -214,11 +214,11 @@ VideoWindow::event( QEvent *e )
}
if( !m_xine )
- return QWidget::event( e );
+ return TQWidget::event( e );
switch( e->type() )
{
- case QEvent::Close:
+ case TQEvent::Close:
stop();
return false;
@@ -229,10 +229,10 @@ VideoWindow::event( QEvent *e )
// Xlib.h sucks fucking balls!!!!11!!1!
#undef KeyPress
- case QEvent::KeyPress: {
+ case TQEvent::KeyPress: {
if( m_url.protocol() != "dvd" )
// let MainWindow handle this
- return QWidget::event( e );
+ return TQWidget::event( e );
//FIXME left and right keys don't work during DVDs
@@ -244,7 +244,7 @@ VideoWindow::event( QEvent *e )
//#define XINE_EVENT_INPUT_RIGHT 113
//#define XINE_EVENT_INPUT_SELECT 114
- switch( static_cast<QKeyEvent*>(e)->key() ) {
+ switch( static_cast<TQKeyEvent*>(e)->key() ) {
case Key_Return:
case Key_Enter: keyCode++;
case Key_Right: keyCode++;
@@ -270,18 +270,18 @@ VideoWindow::event( QEvent *e )
}
}
- case QEvent::MouseButtonPress:
+ case TQEvent::MouseButtonPress:
- #define mouseEvent static_cast<QMouseEvent*>(e)
+ #define mouseEvent static_cast<TQMouseEvent*>(e)
- if( mouseEvent->button() != Qt::LeftButton )
+ if( mouseEvent->button() != TQt::LeftButton )
return false;
mouseEvent->accept();
//FALL THROUGH
- case QEvent::MouseMove:
+ case TQEvent::MouseMove:
{
x11_rectangle_t x11Rect;
xine_event_t xineEvent;
@@ -294,27 +294,27 @@ VideoWindow::event( QEvent *e )
xine_gui_send_vo_data( m_stream, XINE_GUI_SEND_TRANSLATE_GUI_TO_VIDEO, (void*)&x11Rect );
- xineEvent.type = e->type() == QEvent::MouseMove ? XINE_EVENT_INPUT_MOUSE_MOVE : XINE_EVENT_INPUT_MOUSE_BUTTON;
+ xineEvent.type = e->type() == TQEvent::MouseMove ? XINE_EVENT_INPUT_MOUSE_MOVE : XINE_EVENT_INPUT_MOUSE_BUTTON;
xineEvent.data = &xineInput;
xineEvent.data_length = sizeof( xine_input_data_t );
- xineInput.button = 1; //HACK e->type() == QEvent::MouseMove ? 0 : 1;
+ xineInput.button = 1; //HACK e->type() == TQEvent::MouseMove ? 0 : 1;
xineInput.x = x11Rect.x;
xineInput.y = x11Rect.y;
xine_event_send( m_stream, &xineEvent );
- return e->type() == QEvent::MouseMove ? false : true;
+ return e->type() == TQEvent::MouseMove ? false : true;
#undef mouseEvent
}
- case QEvent::Wheel:
+ case TQEvent::Wheel:
{
//TODO seek amount should depend on the length, basically seek at most say 30s, and at least 0.5s
//TODO this is replicated (somewhat) in MainWindow::keyPressEvent
int pos, time, length;
xine_get_pos_length( m_stream, &pos, &time, &length );
- pos += int(std::log10( (double)length ) * static_cast<QWheelEvent*>(e)->delta());
+ pos += int(std::log10( (double)length ) * static_cast<TQWheelEvent*>(e)->delta());
seek( pos > 0 ? (uint)pos : 0 );
@@ -324,7 +324,7 @@ VideoWindow::event( QEvent *e )
default: ;
}
- return QWidget::event( e );
+ return TQWidget::event( e );
}
bool
@@ -345,13 +345,13 @@ VideoWindow::x11Event( XEvent *e )
void
VideoWindow::hideCursor()
{
- setCursor( Qt::BlankCursor );
+ setCursor( TQt::BlankCursor );
}
-QSize
+TQSize
VideoWindow::sizeHint() const //virtual
{
- QSize s = TheStream::profile()->readSizeEntry( "Preferred Size" );
+ TQSize s = TheStream::profile()->readSizeEntry( "Preferred Size" );
if( !s.isValid() )
s = TheStream::defaultVideoSize();
@@ -362,12 +362,12 @@ VideoWindow::sizeHint() const //virtual
return minimumSizeHint();
}
-QSize
+TQSize
VideoWindow::minimumSizeHint() const //virtual
{
const int x = fontMetrics().width( "x" ) * 4;
- return QSize( x * 12, x * 4 ); //FIXME
+ return TQSize( x * 12, x * 4 ); //FIXME
}
void
diff --git a/src/app/volumeAction.cpp b/src/app/volumeAction.cpp
index 4215640..fb33c7d 100644
--- a/src/app/volumeAction.cpp
+++ b/src/app/volumeAction.cpp
@@ -3,10 +3,10 @@
#include <klocale.h>
#include <ktoolbar.h>
-#include <qevent.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qslider.h>
+#include <ntqevent.h>
+#include <ntqlabel.h>
+#include <ntqlayout.h>
+#include <ntqslider.h>
#include "debug.h"
#include "volumeAction.h"
@@ -14,35 +14,35 @@
#include "xineEngine.h"
-class VolumeSlider : public QFrame
+class VolumeSlider : public TQFrame
{
public:
- VolumeSlider( QWidget *parent )
- : QFrame( parent )
+ VolumeSlider( TQWidget *parent )
+ : TQFrame( parent )
{
- slider = new QSlider( Qt::Vertical, this, "volume" );
- label = new QLabel( this );
+ slider = new TQSlider( TQt::Vertical, this, "volume" );
+ label = new TQLabel( this );
- QBoxLayout *lay = new QVBoxLayout( this );
- lay->addWidget( slider, 0, Qt::AlignHCenter );
- lay->addWidget( label, 0, Qt::AlignHCenter );
+ TQBoxLayout *lay = new TQVBoxLayout( this );
+ lay->addWidget( slider, 0, TQt::AlignHCenter );
+ lay->addWidget( label, 0, TQt::AlignHCenter );
lay->setMargin( 4 );
slider->setRange( 0, 100 );
- setFrameStyle( QFrame::Plain | QFrame::Box );
- setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Fixed );
+ setFrameStyle( TQFrame::Plain | TQFrame::Box );
+ setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed );
hide();
}
- QLabel *label;
- QSlider *slider;
+ TQLabel *label;
+ TQSlider *slider;
};
VolumeAction::VolumeAction( KToolBar *bar, KActionCollection *ac )
- : KToggleAction( i18n("Volume"), "volume", Qt::Key_1, 0, 0, ac, "volume" )
+ : KToggleAction( i18n("Volume"), "volume", TQt::Key_1, 0, 0, ac, "volume" )
, m_anchor( 0 )
{
m_widget = new VolumeSlider( bar->topLevelWidget() );
@@ -54,13 +54,13 @@ VolumeAction::VolumeAction( KToolBar *bar, KActionCollection *ac )
}
int
-VolumeAction::plug( QWidget *bar, int index )
+VolumeAction::plug( TQWidget *bar, int index )
{
DEBUG_BLOCK
int const id = KAction::plug( bar, index );
- m_anchor = (QWidget*)bar->child( "toolbutton_volume" ); //KAction creates it with this name
+ m_anchor = (TQWidget*)bar->child( "toolbutton_volume" ); //KAction creates it with this name
m_anchor->installEventFilter( this ); //so we can keep m_widget anchored
return id;
@@ -78,33 +78,33 @@ VolumeAction::toggled( bool const b )
void
VolumeAction::sliderMoved( int v )
{
- v = 100 - v; //Qt sliders are wrong way round when vertical
+ v = 100 - v; //TQt sliders are wrong way round when vertical
- QString const t = QString::number( v ) + '%';
+ TQString const t = TQString::number( v ) + '%';
setToolTip( i18n( "Volume: %1" ).arg( t ) );
m_widget->label->setText( t );
}
bool
-VolumeAction::eventFilter( QObject *o, QEvent *e )
+VolumeAction::eventFilter( TQObject *o, TQEvent *e )
{
switch (e->type()) {
- case QEvent::Move:
- case QEvent::Resize: {
- QWidget const * const &a = m_anchor;
+ case TQEvent::Move:
+ case TQEvent::Resize: {
+ TQWidget const * const &a = m_anchor;
- m_widget->move( a->mapTo( m_widget->parentWidget(), QPoint( 0, a->height() ) ) );
+ m_widget->move( a->mapTo( m_widget->parentWidget(), TQPoint( 0, a->height() ) ) );
m_widget->resize( a->width(), m_widget->sizeHint().height() );
return false;
}
//TODO one click method, flawed currently in fullscreen mode by palette change in mainwindow.cpp
-/* case QEvent::MouseButtonPress:
+/* case TQEvent::MouseButtonPress:
m_widget->show();
break;
- case QEvent::MouseButtonRelease:
+ case TQEvent::MouseButtonRelease:
m_widget->hide();
break;*/
diff --git a/src/app/volumeAction.h b/src/app/volumeAction.h
index 6c0c376..aef3434 100644
--- a/src/app/volumeAction.h
+++ b/src/app/volumeAction.h
@@ -10,12 +10,12 @@ class VolumeAction : public KToggleAction
{
Q_OBJECT
- QWidget *m_anchor;
+ TQWidget *m_anchor;
class VolumeSlider *m_widget;
- virtual bool eventFilter( QObject *o, QEvent *e );
+ virtual bool eventFilter( TQObject *o, TQEvent *e );
- virtual int plug( QWidget*, int );
+ virtual int plug( TQWidget*, int );
private slots:
void toggled( bool );
diff --git a/src/app/xineConfig.cpp b/src/app/xineConfig.cpp
index 70ca11a..abeca50 100644
--- a/src/app/xineConfig.cpp
+++ b/src/app/xineConfig.cpp
@@ -8,18 +8,18 @@
#include <klineedit.h>
#include <kseparator.h>
#include <kstdguiitem.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qscrollview.h>
-#include <qspinbox.h>
-#include <qtabwidget.h>
-#include <qtooltip.h>
-#include <qvbox.h>
+#include <ntqcheckbox.h>
+#include <ntqlabel.h>
+#include <ntqlayout.h>
+#include <ntqscrollview.h>
+#include <ntqspinbox.h>
+#include <ntqtabwidget.h>
+#include <ntqtooltip.h>
+#include <ntqvbox.h>
#include <xine.h>
#include "xineConfig.h"
-QString i18n(const char *text);
+TQString i18n(const char *text);
KDialogBase *XineConfigDialog::s_instance = 0;
@@ -28,33 +28,33 @@ KDialogBase *XineConfigDialog::s_instance = 0;
namespace Codeine
{
void
- showXineConfigurationDialog( QWidget *parent, xine_t *xine )
+ showXineConfigurationDialog( TQWidget *parent, xine_t *xine )
{
XineConfigDialog d( xine, parent );
- if( d.exec() == QDialog::Accepted )
+ if( d.exec() == TQDialog::Accepted )
d.saveSettings();
}
}
-class TabWidget : public QTabWidget
+class TabWidget : public TQTabWidget
{
public:
- TabWidget( QWidget *parent ) : QTabWidget( parent ) {}
+ TabWidget( TQWidget *parent ) : TQTabWidget( parent ) {}
- virtual QSize sizeHint() const
+ virtual TQSize sizeHint() const
{
- // Qt gives a stupid default sizeHint for this widget
- return QSize(
- reinterpret_cast<QWidget*>(tabBar())->sizeHint().width() + 5,
- QTabWidget::sizeHint().height() );
+ // TQt gives a stupid default sizeHint for this widget
+ return TQSize(
+ reinterpret_cast<TQWidget*>(tabBar())->sizeHint().width() + 5,
+ TQTabWidget::sizeHint().height() );
}
};
///@class XineConfigDialog
-XineConfigDialog::XineConfigDialog( xine_t *xine, QWidget *parent )
+XineConfigDialog::XineConfigDialog( xine_t *xine, TQWidget *parent )
: KDialogBase( parent, "xine_config_dialog",
true, //modal
i18n("Configure xine"), User1 | Stretch | Ok | Cancel,
@@ -69,22 +69,22 @@ XineConfigDialog::XineConfigDialog( xine_t *xine, QWidget *parent )
const int METRIC = fontMetrics().width( 'x' );
const int METRIC_3B2 = (3*METRIC)/2;
- QVBox *box = new QVBox( this );
+ TQVBox *box = new TQVBox( this );
box->setSpacing( METRIC );
setMainWidget( box );
{
- QHBox *hbox = new QHBox( box );
+ TQHBox *hbox = new TQHBox( box );
hbox->setSpacing( METRIC_3B2 );
hbox->setMargin( METRIC_3B2 );
- QPixmap info = kapp->iconLoader()->loadIcon( "messagebox_info", KIcon::NoGroup, KIcon::SizeMedium, KIcon::DefaultState, 0, true );
- QLabel *label = new QLabel( hbox );
+ TQPixmap info = kapp->iconLoader()->loadIcon( "messagebox_info", KIcon::NoGroup, KIcon::SizeMedium, KIcon::DefaultState, 0, true );
+ TQLabel *label = new TQLabel( hbox );
label->setPixmap( info );
- label->setSizePolicy( QSizePolicy::Maximum, QSizePolicy::Maximum );
- label = new QLabel( i18n(
+ label->setSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Maximum );
+ label = new TQLabel( i18n(
"xine's defaults are usually sensible and should not require modification. "
"However, full configurability is provided for your pleasure ;-)." ), hbox );
- label->setAlignment( QLabel::WordBreak | QLabel::AlignVCenter );
+ label->setAlignment( TQLabel::WordBreak | TQLabel::AlignVCenter );
}
//FIXME after many hours I have discovered that this
@@ -104,16 +104,16 @@ XineConfigDialog::XineConfigDialog( xine_t *xine, QWidget *parent )
};
- QGridLayout *grid = 0;
- QString currentPage;
- QScrollView *view = 0;
+ TQGridLayout *grid = 0;
+ TQString currentPage;
+ TQScrollView *view = 0;
parent = 0;
for( XineConfigEntryIterator it( m_xine ); *it; ++it )
{
- const QString pageName = QString::fromUtf8( (*it)->key ).section( '.', 0, 0 );
+ const TQString pageName = TQString::fromUtf8( (*it)->key ).section( '.', 0, 0 );
- if( (QStringList() << "ui" << "effects" << "subtitles").contains( pageName ) )
+ if( (TQStringList() << "ui" << "effects" << "subtitles").contains( pageName ) )
continue;
if( pageName != currentPage ) {
@@ -121,21 +121,21 @@ XineConfigDialog::XineConfigDialog( xine_t *xine, QWidget *parent )
//NOTE won't be executed for last tab
view->viewport()->setMinimumWidth( grid->sizeHint().width() ); // seems necessary
- QString pageTitle = pageName;
+ TQString pageTitle = pageName;
pageTitle[0] = pageTitle[0].upper();
- tabs->addTab( view = new QScrollView, pageTitle );
- view->setResizePolicy( QScrollView::AutoOneFit );
- view->setHScrollBarMode( QScrollView::AlwaysOff );
- view->setFrameShape( QFrame::NoFrame );
- view->addChild( parent = new QWidget( view->viewport() ) );
+ tabs->addTab( view = new TQScrollView, pageTitle );
+ view->setResizePolicy( TQScrollView::AutoOneFit );
+ view->setHScrollBarMode( TQScrollView::AlwaysOff );
+ view->setFrameShape( TQFrame::NoFrame );
+ view->addChild( parent = new TQWidget( view->viewport() ) );
- QBoxLayout *layout = new QVBoxLayout( parent, /*margin*/METRIC_3B2, /*spacing*/0 );
+ TQBoxLayout *layout = new TQVBoxLayout( parent, /*margin*/METRIC_3B2, /*spacing*/0 );
- parent = new QFrame( parent );
- static_cast<QFrame*>(parent)->setFrameStyle( QFrame::Panel | QFrame::Raised );
- static_cast<QFrame*>(parent)->setLineWidth( 2 );
- grid = new QGridLayout( parent, /*rows*/0, /*cols*/2, /*margin*/20, /*spacing*/int(METRIC*2.5) );
+ parent = new TQFrame( parent );
+ static_cast<TQFrame*>(parent)->setFrameStyle( TQFrame::Panel | TQFrame::Raised );
+ static_cast<TQFrame*>(parent)->setLineWidth( 2 );
+ grid = new TQGridLayout( parent, /*rows*/0, /*cols*/2, /*margin*/20, /*spacing*/int(METRIC*2.5) );
grid->setColStretch( 0, 3 );
grid->setColStretch( 1, 2 );
@@ -169,7 +169,7 @@ XineConfigDialog::slotHelp()
void
XineConfigDialog::slotUser1()
{
- for( QPtrListIterator<XineConfigEntry> it( m_entrys ); *it != 0; ++it )
+ for( TQPtrListIterator<XineConfigEntry> it( m_entrys ); *it != 0; ++it )
(*it)->reset();
slotHelp();
@@ -178,14 +178,14 @@ XineConfigDialog::slotUser1()
bool
XineConfigDialog::isUnsavedSettings() const
{
- for( QPtrListIterator<XineConfigEntry> it( m_entrys ); *it != 0; ++it )
+ for( TQPtrListIterator<XineConfigEntry> it( m_entrys ); *it != 0; ++it )
if( (*it)->isChanged() )
return true;
return false;
}
-#include <qdir.h>
+#include <ntqdir.h>
void
XineConfigDialog::saveSettings()
{
@@ -193,56 +193,56 @@ XineConfigDialog::saveSettings()
if( entry->isChanged() )
entry->save( m_xine );
- xine_config_save( m_xine, QFile::encodeName( QDir::homeDirPath() + "/.xine/config" ) );
+ xine_config_save( m_xine, TQFile::encodeName( TQDir::homeDirPath() + "/.xine/config" ) );
}
///@class XineConfigEntry
-XineConfigEntry::XineConfigEntry( QWidget *parent, QGridLayout *grid, xine_cfg_entry_t *entry )
+XineConfigEntry::XineConfigEntry( TQWidget *parent, TQGridLayout *grid, xine_cfg_entry_t *entry )
: m_widget( 0 )
, m_key( entry->key )
, m_string( entry->str_value )
, m_number( entry->num_value )
{
- QWidget *&w = m_widget;
+ TQWidget *&w = m_widget;
const char *signal = 0;
const int row = grid->numRows();
- QString description_text = QString::fromUtf8( entry->description );
+ TQString description_text = TQString::fromUtf8( entry->description );
description_text[0] = description_text[0].upper();
switch( entry->type )
{
case XINE_CONFIG_TYPE_STRING: {
w = new KLineEdit( m_string, parent );
- signal = SIGNAL(textChanged( const QString& ));
+ signal = SIGNAL(textChanged( const TQString& ));
break;
}
case XINE_CONFIG_TYPE_ENUM: {
w = new KComboBox( parent );
for( int i = 0; entry->enum_values[i]; ++i )
- ((KComboBox*)w)->insertItem( QString::fromUtf8( entry->enum_values[i] ) );
+ ((KComboBox*)w)->insertItem( TQString::fromUtf8( entry->enum_values[i] ) );
((KComboBox*)w)->setCurrentItem( m_number );
signal = SIGNAL(activated( int ));
break;
}
case XINE_CONFIG_TYPE_RANGE:
case XINE_CONFIG_TYPE_NUM: {
- w = new QSpinBox(
- QMIN( m_number, entry->range_min ), // xine bug, sometimes the min and max ranges
- QMAX( m_number, entry->range_max ), // are both 0 even though this is bullshit
+ w = new TQSpinBox(
+ TQMIN( m_number, entry->range_min ), // xine bug, sometimes the min and max ranges
+ TQMAX( m_number, entry->range_max ), // are both 0 even though this is bullshit
1, parent );
- ((QSpinBox*)w)->setValue( m_number );
+ ((TQSpinBox*)w)->setValue( m_number );
signal = SIGNAL(valueChanged( int ));
break;
}
case XINE_CONFIG_TYPE_BOOL: {
- w = new QCheckBox( description_text, parent );
- ((QCheckBox*)w)->setChecked( m_number );
+ w = new TQCheckBox( description_text, parent );
+ ((TQCheckBox*)w)->setChecked( m_number );
connect( w, SIGNAL(toggled( bool )), XineConfigDialog::instance(), SLOT(slotHelp()) );
- QToolTip::add( w, "<qt>" + QString::fromUtf8( entry->help ) );
+ TQToolTip::add( w, "<qt>" + TQString::fromUtf8( entry->help ) );
grid->addMultiCellWidget( w, row, row, 0, 1 );
return; //no need for a description label
}
@@ -252,15 +252,15 @@ XineConfigEntry::XineConfigEntry( QWidget *parent, QGridLayout *grid, xine_cfg_e
connect( w, signal, XineConfigDialog::instance(), SLOT(slotHelp()) );
- QLabel *description = new QLabel( description_text + ':', parent );
- description->setAlignment( QLabel::WordBreak | QLabel::AlignVCenter );
+ TQLabel *description = new TQLabel( description_text + ':', parent );
+ description->setAlignment( TQLabel::WordBreak | TQLabel::AlignVCenter );
- const QString tip = "<qt>" + QString::fromUtf8( entry->help );
- QToolTip::add( w, tip );
- QToolTip::add( description, tip );
+ const TQString tip = "<qt>" + TQString::fromUtf8( entry->help );
+ TQToolTip::add( w, tip );
+ TQToolTip::add( description, tip );
-// grid->addWidget( description, row, 0, Qt::AlignVCenter );
- grid->addWidget( w, row, 1, Qt::AlignTop );
+// grid->addWidget( description, row, 0, TQt::AlignVCenter );
+ grid->addWidget( w, row, 1, TQt::AlignTop );
}
bool
@@ -271,8 +271,8 @@ XineConfigEntry::isChanged() const
switch( classType( m_widget->className() ) ) {
case LineEdit: return _(KLineEdit)->text().utf8() != m_string;
case ComboBox: return _(KComboBox)->currentItem() != m_number;
- case SpinBox: return _(QSpinBox)->value() != m_number;
- case CheckBox: return _(QCheckBox)->isChecked() != m_number;
+ case SpinBox: return _(TQSpinBox)->value() != m_number;
+ case CheckBox: return _(TQCheckBox)->isChecked() != m_number;
}
return false;
}
@@ -288,8 +288,8 @@ XineConfigEntry::reset()
switch( classType( m_widget->className() ) ) {
case LineEdit: _(KLineEdit)->setText( m_string ); break;
case ComboBox: _(KComboBox)->setCurrentItem( m_number ); break;
- case SpinBox: _(QSpinBox)->setValue( m_number ); break;
- case CheckBox: _(QCheckBox)->setChecked( (bool)m_number ); break;
+ case SpinBox: _(TQSpinBox)->setValue( m_number ); break;
+ case CheckBox: _(TQCheckBox)->setChecked( (bool)m_number ); break;
}
m_widget->blockSignals( false );
}
@@ -304,11 +304,11 @@ XineConfigEntry::save( xine_t *xine )
switch( classType( m_widget->className() ) ) {
case LineEdit: m_string = _(KLineEdit)->text().utf8(); break;
case ComboBox: m_number = _(KComboBox)->currentItem(); break;
- case SpinBox: m_number = _(QSpinBox)->value(); break;
- case CheckBox: m_number = _(QCheckBox)->isChecked(); break;
+ case SpinBox: m_number = _(TQSpinBox)->value(); break;
+ case CheckBox: m_number = _(TQCheckBox)->isChecked(); break;
}
- ent.str_value = qstrdup( m_string );
+ ent.str_value = tqstrdup( m_string );
ent.num_value = m_number;
debug() << "Saving setting: " << key() << endl;
diff --git a/src/app/xineConfig.h b/src/app/xineConfig.h
index d7999d5..7eb9ab8 100644
--- a/src/app/xineConfig.h
+++ b/src/app/xineConfig.h
@@ -5,13 +5,13 @@
#define XINECONFIG_H
#include <kdialogbase.h>
-#include <qptrlist.h>
+#include <ntqptrlist.h>
class KComboBox;
class KLineEdit;
-class QCheckBox;
-class QGridLayout;
-class QSpinBox;
+class TQCheckBox;
+class TQGridLayout;
+class TQSpinBox;
typedef struct xine_s xine_t;
typedef struct xine_cfg_entry_s xine_cfg_entry_t;
@@ -19,30 +19,30 @@ typedef struct xine_cfg_entry_s xine_cfg_entry_t;
///stores a single config entry of the config file
-class XineConfigEntry : public QObject
+class XineConfigEntry : public TQObject
{
enum ClassType { LineEdit, ComboBox, SpinBox, CheckBox };
- QWidget *m_widget;
- QCString m_key;
- QCString m_string;
+ TQWidget *m_widget;
+ TQCString m_key;
+ TQCString m_string;
int m_number;
- static inline ClassType classType( const QCString &name )
+ static inline ClassType classType( const TQCString &name )
{
return name == "KLineEdit" ? LineEdit
: name == "KComboBox" ? ComboBox
- : name == "QSpinBox" ? SpinBox : CheckBox;
+ : name == "TQSpinBox" ? SpinBox : CheckBox;
}
public:
- XineConfigEntry( QWidget *parent, QGridLayout*, xine_cfg_entry_t* );
+ XineConfigEntry( TQWidget *parent, TQGridLayout*, xine_cfg_entry_t* );
bool isChanged() const;
void save( xine_t* );
void reset();
- inline const QCString &key() const { return m_key; }
+ inline const TQCString &key() const { return m_key; }
};
@@ -50,11 +50,11 @@ class XineConfigDialog : public KDialogBase
{
static KDialogBase *s_instance;
- QPtrList<XineConfigEntry> m_entrys;
+ TQPtrList<XineConfigEntry> m_entrys;
xine_t *m_xine;
public:
- XineConfigDialog( xine_t *xine, QWidget *parent );
+ XineConfigDialog( xine_t *xine, TQWidget *parent );
bool isUnsavedSettings() const;
void saveSettings();
diff --git a/src/app/xineEngine.cpp b/src/app/xineEngine.cpp
index efc9612..ba3c76b 100644
--- a/src/app/xineEngine.cpp
+++ b/src/app/xineEngine.cpp
@@ -10,9 +10,9 @@
#include <limits>
#include <klocale.h>
#include "mxcl.library.h"
-#include <qapplication.h> //::sendEvent()
-#include <qdatetime.h> //record()
-#include <qdir.h> //::exists()
+#include <ntqapplication.h> //::sendEvent()
+#include <ntqdatetime.h> //record()
+#include <ntqdir.h> //::exists()
#include "slider.h"
#include "theStream.h"
#include <xine.h>
@@ -33,8 +33,8 @@ namespace Codeine {
VideoWindow *VideoWindow::s_instance = 0;
-VideoWindow::VideoWindow( QWidget *parent )
- : QWidget( parent, "VideoWindow" )
+VideoWindow::VideoWindow( TQWidget *parent )
+ : TQWidget( parent, "VideoWindow" )
, m_osd( 0 )
, m_stream( 0 )
, m_eventQueue( 0 )
@@ -48,11 +48,11 @@ VideoWindow::VideoWindow( QWidget *parent )
s_instance = this;
- 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 );
setFocusPolicy( ClickFocus );
//TODO sucks
@@ -116,7 +116,7 @@ VideoWindow::init()
#endif
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 );
@@ -160,7 +160,7 @@ VideoWindow::init()
{
- typedef QValueList<int> List;
+ typedef TQValueList<int> List;
List params( List()
<< XINE_PARAM_VO_HUE << XINE_PARAM_VO_SATURATION << XINE_PARAM_VO_CONTRAST << XINE_PARAM_VO_BRIGHTNESS
<< XINE_PARAM_SPU_CHANNEL << XINE_PARAM_AUDIO_CHANNEL_LOGICAL << XINE_PARAM_VO_ASPECT_RATIO );
@@ -193,7 +193,7 @@ VideoWindow::eject()
#define writeParameter( param, default ) { \
const int value = xine_get_param( m_stream, param ); \
- const QString key = QString::number( param ); \
+ const TQString key = TQString::number( param ); \
if( value != default ) \
profile->writeEntry( key, value ); \
else \
@@ -216,8 +216,8 @@ VideoWindow::eject()
else
profile->deleteEntry( "Position" );
- const QSize s = videoWindow()->size();
- const QSize defaultSize = TheStream::defaultVideoSize();
+ const TQSize s = videoWindow()->size();
+ const TQSize defaultSize = TheStream::defaultVideoSize();
if( s.width() == defaultSize.width() || s.height() == defaultSize.height() )
profile->deleteEntry( "Preferred Size" );
else
@@ -246,7 +246,7 @@ VideoWindow::load( const KURL &url )
if( xine_open( m_stream, url.url().local8Bit() ) )
{
KConfig *profile = TheStream::profile();
- #define setParameter( param, default ) xine_set_param( m_stream, param, profile->readNumEntry( QString::number( param ), default ) );
+ #define setParameter( param, default ) xine_set_param( m_stream, param, profile->readNumEntry( TQString::number( param ), default ) );
setParameter( XINE_PARAM_VO_HUE, 32768 );
setParameter( XINE_PARAM_VO_SATURATION, 32772 );
setParameter( XINE_PARAM_VO_CONTRAST, 32772 );
@@ -327,20 +327,20 @@ VideoWindow::record()
if( xine_config_lookup_entry( m_xine, "misc.save_dir", &config ) )
{
//TODO which fricking KDE function tells me this? Who can tell, stupid KDE API
- QDir d( QDir::home().filePath( "Desktop" ) );
- config.str_value = qstrdup( d.exists() //FIXME tiny-mem-leak, *shrug*
+ TQDir d( TQDir::home().filePath( "Desktop" ) );
+ config.str_value = tqstrdup( d.exists() //FIXME tiny-mem-leak, *shrug*
? d.path().utf8()
- : QDir::homeDirPath().utf8() );
+ : TQDir::homeDirPath().utf8() );
xine_config_update_entry( m_xine, &config );
- const QString fileName = m_url.filename();
+ const TQString fileName = m_url.filename();
- QString
+ TQString
url = m_url.url();
url += "#save:";
url += m_url.host();
url += " [";
- url += QDate::currentDate().toString();
+ url += TQDate::currentDate().toString();
url += ']';
url += fileName.mid( fileName.findRev( '.' ) + 1 ).lower();
@@ -390,7 +390,7 @@ VideoWindow::pause()
void
VideoWindow::showErrorMessage()
{
- const QString name = m_url.fileName();
+ const TQString name = m_url.fileName();
debug() << "xine_get_error()\n";
switch( xine_get_error( m_stream ) )
@@ -501,14 +501,14 @@ VideoWindow::seek( uint pos )
//better feedback
//NOTE doesn't work! I can't tell why..
- Slider::instance()->QSlider::setValue( pos );
+ Slider::instance()->TQSlider::setValue( pos );
Slider::instance()->repaint( false );
const bool fullscreen = toggleAction("fullscreen")->isChecked();
if( fullscreen ) {
//TODO don't use OSD (sucks) show slider widget instead
- QString osd = "[";
- QChar separator = '|';
+ TQString osd = "[";
+ TQChar separator = '|';
for( uint x = 0, y = int(pos / (65535.0/20.0)); x < 20; x++ ) {
if( x > y )
@@ -536,7 +536,7 @@ VideoWindow::seek( uint pos )
void
VideoWindow::setStreamParameter( int value )
{
- QCString sender = this->sender()->name();
+ TQCString sender = this->sender()->name();
int parameter;
if( sender == "hue" )
@@ -624,7 +624,7 @@ VideoWindow::scope()
}
void
-VideoWindow::timerEvent( QTimerEvent* )
+VideoWindow::timerEvent( TQTimerEvent* )
{
/// here we prune the buffer list regularly
#ifndef XINE_SAFE_MODE
@@ -654,7 +654,7 @@ VideoWindow::timerEvent( QTimerEvent* )
}
void
-VideoWindow::customEvent( QCustomEvent *e )
+VideoWindow::customEvent( TQCustomEvent *e )
{
switch( e->type() - 2000 ) {
case XINE_EVENT_UI_PLAYBACK_FINISHED:
@@ -671,7 +671,7 @@ VideoWindow::customEvent( QCustomEvent *e )
char s[128]; //apparently sufficient
{
- QStringList languages( "subtitle_channels_menu" );
+ TQStringList languages( "subtitle_channels_menu" );
int channels = xine_get_stream_info( m_stream, XINE_STREAM_INFO_MAX_SPU_CHANNEL );
for( int j = 0; j < channels; j++ )
languages += xine_get_spu_lang( m_stream, j, s ) ? s : i18n("Channel %1").arg( j+1 );
@@ -679,7 +679,7 @@ VideoWindow::customEvent( QCustomEvent *e )
}
{
- QStringList languages( "audio_channels_menu" );
+ TQStringList languages( "audio_channels_menu" );
int channels = xine_get_stream_info( m_stream, XINE_STREAM_INFO_MAX_AUDIO_CHANNEL );
for( int j = 0; j < channels; j++ )
languages += xine_get_audio_lang( m_stream, j, s ) ? s : i18n("Channel %1").arg( j+1 );
@@ -689,7 +689,7 @@ VideoWindow::customEvent( QCustomEvent *e )
}
case 1000:
- #define message static_cast<QString*>(e->data())
+ #define message static_cast<TQString*>(e->data())
emit statusMessage( *message );
delete message;
break;
@@ -723,8 +723,8 @@ VideoWindow::xineEventListener( void *p, const xine_event_t* xineEvent )
case XINE_EVENT_MRL_REFERENCE: {
//FIXME this is not the right way, it will have bugs
debug() << "XINE_EVENT_MRL_REFERENCE\n";
- engine->m_url = QString::fromUtf8( ((xine_mrl_reference_data_t*)xineEvent->data)->mrl );
- QTimer::singleShot( 0, engine, SLOT(play()) );
+ engine->m_url = TQString::fromUtf8( ((xine_mrl_reference_data_t*)xineEvent->data)->mrl );
+ TQTimer::singleShot( 0, engine, SLOT(play()) );
break;
}
case XINE_EVENT_DROPPED_FRAMES: debug() << "XINE_EVENT_DROPPED_FRAMES\n"; break;
@@ -733,29 +733,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:
@@ -763,7 +763,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:
@@ -808,7 +808,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!
@@ -823,12 +823,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
@@ -849,7 +849,7 @@ VideoWindow::toggleDVDMenu()
}
void
-VideoWindow::showOSD( const QString &message )
+VideoWindow::showOSD( const TQString &message )
{
if( m_osd ) {
xine_osd_clear( m_osd );
@@ -859,12 +859,12 @@ VideoWindow::showOSD( const QString &message )
}
}
-QString
+TQString
VideoWindow::fileFilter() const
{
char *supportedExtensions = xine_get_file_extensions( m_xine );
- QString filter( "*." );
+ TQString filter( "*." );
filter.append( supportedExtensions );
filter.remove( "txt" );
filter.remove( "png" );
diff --git a/src/app/xineEngine.h b/src/app/xineEngine.h
index ffe3f02..f1b49c3 100644
--- a/src/app/xineEngine.h
+++ b/src/app/xineEngine.h
@@ -5,8 +5,8 @@
#define CODEINE_VIDEOWINDOW_H
#include "codeine.h"
-#include <qtimer.h>
-#include <qwidget.h>
+#include <ntqtimer.h>
+#include <ntqwidget.h>
#include <kurl.h>
#include <stdint.h>
#include <vector>
@@ -30,7 +30,7 @@ namespace Codeine
* xineEngine.cpp
* videoWindow.cpp
*/
- class VideoWindow : public QWidget
+ class VideoWindow : public TQWidget
{
Q_OBJECT
@@ -46,7 +46,7 @@ namespace Codeine
friend VideoWindow* const videoWindow();
public:
- VideoWindow( QWidget *parent );
+ VideoWindow( TQWidget *parent );
~VideoWindow();
bool init();
@@ -78,9 +78,9 @@ namespace Codeine
signals:
void stateChanged( Engine::State );
- void statusMessage( const QString& );
- void titleChanged( const QString& );
- void channelsChanged( const QStringList& );
+ void statusMessage( const TQString& );
+ void titleChanged( const TQString& );
+ void channelsChanged( const TQStringList& );
private:
#ifdef HAVE_XINE_H
@@ -90,8 +90,8 @@ namespace Codeine
uint posTimeLength( PosTimeLength ) const;
void showErrorMessage();
- virtual void customEvent( QCustomEvent* );
- virtual void timerEvent( QTimerEvent* );
+ virtual void customEvent( TQCustomEvent* );
+ virtual void timerEvent( TQTimerEvent* );
void eject();
@@ -110,11 +110,11 @@ namespace Codeine
KURL m_url;
public:
- QString fileFilter() const;
+ TQString fileFilter() const;
public slots:
void toggleDVDMenu();
- void showOSD( const QString& );
+ void showOSD( const TQString& );
/// Stuff to do with video and the video window/widget
private:
@@ -127,12 +127,12 @@ namespace Codeine
public:
static const uint CURSOR_HIDE_TIMEOUT = 2000;
- virtual QSize sizeHint() const;
- virtual QSize minimumSizeHint() const;
+ virtual TQSize sizeHint() const;
+ virtual TQSize minimumSizeHint() const;
void *x11Visual() const;
void becomePreferredSize();
- QImage captureFrame() const;
+ TQImage captureFrame() const;
enum { ExposeEvent = 3000 };
@@ -143,12 +143,12 @@ namespace Codeine
void hideCursor();
private:
- virtual void contextMenuEvent( QContextMenuEvent* );
- virtual bool event( QEvent* );
+ virtual void contextMenuEvent( TQContextMenuEvent* );
+ virtual bool event( TQEvent* );
virtual bool x11Event( XEvent* );
double m_displayRatio;
- QTimer m_timer;
+ TQTimer m_timer;
};
//global function for general use by Codeine
diff --git a/src/codeine.h b/src/codeine.h
index 24e0659..8280b6a 100644
--- a/src/codeine.h
+++ b/src/codeine.h
@@ -20,7 +20,7 @@ namespace Engine
};
}
-class QWidget;
+class TQWidget;
namespace Analyzer
{
@@ -30,7 +30,7 @@ namespace Analyzer
namespace Codeine
{
- QWidget *mainWindow(); //defined in mainWindow.cpp
+ TQWidget *mainWindow(); //defined in mainWindow.cpp
}
/// used by mainWindow.h and xineEngine.h
diff --git a/src/debug.h b/src/debug.h
index a6b9baa..da63e8d 100644
--- a/src/debug.h
+++ b/src/debug.h
@@ -6,12 +6,12 @@
#define CODEINE_DEBUG_H
#include <kdebug.h>
-#include <qcstring.h>
-#include <qvariant.h>
+#include <ntqcstring.h>
+#include <ntqvariant.h>
#include <sys/time.h>
-class QApplication; ///@see Debug::Indent
-extern QApplication *qApp;
+class TQApplication; ///@see Debug::Indent
+extern TQApplication *tqApp;
/**
@@ -47,9 +47,9 @@ extern QApplication *qApp;
namespace Debug
{
- inline QCString &indent()
+ inline TQCString &indent()
{
- static QCString indent;
+ static TQCString indent;
return indent;
#if 0
static timeval *stamp = 0;
@@ -62,7 +62,7 @@ namespace Debug
gettimeofday( &now, 0 );
now.tv_sec -= stamp->tv_sec;
- QString time( "[%1:%2]" );
+ TQString time( "[%1:%2]" );
return time.arg( now.tv_sec / 60, 2 ).arg( now.tv_sec % 60, 2 ).latin1() + indent;
#endif
@@ -74,7 +74,7 @@ namespace Debug
static inline kndbgstream error() { return kndbgstream(); }
static inline kndbgstream fatal() { return kndbgstream(); }
- static inline void debug1( QVariant v ) {}
+ static inline void debug1( TQVariant v ) {}
typedef kndbgstream Stream;
#else
@@ -98,7 +98,7 @@ namespace Debug
static inline kdbgstream fatal() { return kdbgstream( indent(), 0, KDEBUG_FATAL ) << AMK_PREFIX; }
/// convenience function
- static inline void debug1( QVariant v ) { kdbgstream( indent(), 0, KDEBUG_INFO ) << v << endl; }
+ static inline void debug1( TQVariant v ) { kdbgstream( indent(), 0, KDEBUG_INFO ) << v << endl; }
typedef kdbgstream Stream;
@@ -121,7 +121,7 @@ using Debug::debug1;
#define DEBUG_BLOCK Debug::Block uniquelyNamedStackAllocatedStandardBlock( __PRETTY_FUNCTION__ );
#define DEBUG_INDENT Debug::indent() += " ";
-#define DEBUG_UNINDENT { QCString &s = Debug::indent(); s.truncate( s.length() - 2 ); }
+#define DEBUG_UNINDENT { TQCString &s = Debug::indent(); s.truncate( s.length() - 2 ); }
/// Use this to remind yourself to finish the implementation of a function
#define DEBUG_NOTIMPLEMENTED warning() << "NOT-IMPLEMENTED: " << __PRETTY_FUNCTION__ << endl;
@@ -187,7 +187,7 @@ namespace Debug
DEBUG_UNINDENT
kdDebug() << indent() << "END__: " << m_label
- << " - Took " << QString::number( duration, 'g', 3 ) << "s\n";
+ << " - Took " << TQString::number( duration, 'g', 3 ) << "s\n";
}
};
@@ -227,10 +227,10 @@ namespace Debug
* @class Debug::List
* @short You can pass anything to this and it will output it as a list
*
- * debug() << (Debug::List() << anInt << aString << aQStringList << aDouble) << endl;
+ * debug() << (Debug::List() << anInt << aString << aTQStringList << aDouble) << endl;
*/
- typedef QValueList<QVariant> List;
+ typedef TQValueList<TQVariant> List;
}
@@ -243,19 +243,19 @@ namespace Codeine
namespace MessageBox
{
- static inline void error( const QString &message )
+ static inline void error( const TQString &message )
{
- KMessageBox::error( (QWidget*)videoWindow(), message );
+ KMessageBox::error( (TQWidget*)videoWindow(), message );
}
- static inline void sorry( const QString &message )
+ static inline void sorry( const TQString &message )
{
- KMessageBox::error( (QWidget*)videoWindow(), message );
+ KMessageBox::error( (TQWidget*)videoWindow(), message );
}
- static inline void information( const QString &message, const QString &title )
+ static inline void information( const TQString &message, const TQString &title )
{
- KMessageBox::information( (QWidget*)videoWindow(), message, title );
+ KMessageBox::information( (TQWidget*)videoWindow(), message, title );
}
}
}
diff --git a/src/mxcl.library.cpp b/src/mxcl.library.cpp
index 597a548..45c8ce4 100644
--- a/src/mxcl.library.cpp
+++ b/src/mxcl.library.cpp
@@ -2,18 +2,18 @@
// See COPYING file for licensing information
#include "mxcl.library.h"
-#include <qapplication.h>
+#include <ntqapplication.h>
#include <kcursor.h>
namespace mxcl
{
WaitCursor::WaitCursor()
{
- QApplication::setOverrideCursor( KCursor::waitCursor() );
+ TQApplication::setOverrideCursor( KCursor::waitCursor() );
}
WaitCursor::~WaitCursor()
{
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
}
}
diff --git a/src/mxcl.library.h b/src/mxcl.library.h
index feb71ef..87eea65 100644
--- a/src/mxcl.library.h
+++ b/src/mxcl.library.h
@@ -17,12 +17,12 @@ namespace mxcl
/// almost always negates the need to #include <klocale.h> in implementations
-#include <qstring.h>
-QString i18n( const char *text );
+#include <ntqstring.h>
+TQString i18n( const char *text );
-/// very useful for QStringLists
+/// very useful for TQStringLists
#define foreach( x ) \
- for( QStringList::ConstIterator it = x.constBegin(), end = x.constEnd(); it != end; ++it )
+ for( TQStringList::ConstIterator it = x.constBegin(), end = x.constEnd(); it != end; ++it )
#endif
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