diff options
Diffstat (limited to 'src/app/volumeAction.cpp')
-rw-r--r-- | src/app/volumeAction.cpp | 56 |
1 files changed, 28 insertions, 28 deletions
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;*/ |