summaryrefslogtreecommitdiffstats
path: root/src/app/videoSettings.cpp
diff options
context:
space:
mode:
authorgregory guy <[email protected]>2020-06-13 16:09:24 +0200
committergregory guy <[email protected]>2020-06-13 16:09:24 +0200
commit2c9bc9b806f533df7b8f5349467d0f4be95314a4 (patch)
tree15f82ae94dd430374f3d939958912c4fb2855326 /src/app/videoSettings.cpp
parent38eaf7209a322a622e1b898eaa5477568ca9c6b6 (diff)
downloadcodeine-2c9bc9b806f533df7b8f5349467d0f4be95314a4.tar.gz
codeine-2c9bc9b806f533df7b8f5349467d0f4be95314a4.zip
Conversion qt3 -> tqt3
Signed-off-by: gregory guy <[email protected]>
Diffstat (limited to 'src/app/videoSettings.cpp')
-rw-r--r--src/app/videoSettings.cpp50
1 files changed, 25 insertions, 25 deletions
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" );