summaryrefslogtreecommitdiffstats
path: root/src/app/videoWindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/videoWindow.cpp')
-rw-r--r--src/app/videoWindow.cpp72
1 files changed, 36 insertions, 36 deletions
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