diff options
Diffstat (limited to 'kmix/mdwslider.cpp')
-rw-r--r-- | kmix/mdwslider.cpp | 244 |
1 files changed, 122 insertions, 122 deletions
diff --git a/kmix/mdwslider.cpp b/kmix/mdwslider.cpp index ea936e6a..9062c408 100644 --- a/kmix/mdwslider.cpp +++ b/kmix/mdwslider.cpp @@ -29,14 +29,14 @@ #include <kkeydialog.h> #include <kdebug.h> -#include <qobject.h> -#include <qcursor.h> -#include <qslider.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qpixmap.h> -#include <qtooltip.h> -#include <qwmatrix.h> +#include <tqobject.h> +#include <tqcursor.h> +#include <tqslider.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpixmap.h> +#include <tqtooltip.h> +#include <tqwmatrix.h> #include "mdwslider.h" #include "mixer.h" @@ -51,42 +51,42 @@ * Used in KMix main window and DockWidget and PanelApplet. * It can be configured to include or exclude the recordLED and the muteLED. * The direction (horizontal, vertical) can be configured and whether it should - * be "small" (uses KSmallSlider instead of QSlider then). + * be "small" (uses KSmallSlider instead of TQSlider then). * * Due to the many options, this is the most complicated MixDeviceWidget subclass. */ MDWSlider::MDWSlider(Mixer *mixer, MixDevice* md, bool showMuteLED, bool showRecordLED, bool small, Qt::Orientation orientation, - QWidget* parent, ViewBase* mw, const char* name) : + TQWidget* parent, ViewBase* mw, const char* name) : MixDeviceWidget(mixer,md,small,orientation,parent,mw,name), m_linked(true), m_valueStyle( NNONE), m_iconLabel( 0 ), m_muteLED( 0 ), m_recordLED( 0 ), m_label( 0 ), _layout(0) { // create actions (on _mdwActions, see MixDeviceWidget) - new KToggleAction( i18n("&Split Channels"), 0, this, SLOT(toggleStereoLinked()), + new KToggleAction( i18n("&Split Channels"), 0, this, TQT_SLOT(toggleStereoLinked()), _mdwActions, "stereo" ); - new KToggleAction( i18n("&Hide"), 0, this, SLOT(setDisabled()), _mdwActions, "hide" ); + new KToggleAction( i18n("&Hide"), 0, this, TQT_SLOT(setDisabled()), _mdwActions, "hide" ); KToggleAction *a = new KToggleAction(i18n("&Muted"), 0, 0, 0, _mdwActions, "mute" ); - connect( a, SIGNAL(toggled(bool)), SLOT(toggleMuted()) ); + connect( a, TQT_SIGNAL(toggled(bool)), TQT_SLOT(toggleMuted()) ); if( m_mixdevice->isRecordable() ) { a = new KToggleAction( i18n("Set &Record Source"), 0, 0, 0, _mdwActions, "recsrc" ); - connect( a, SIGNAL(toggled(bool)), SLOT( toggleRecsrc()) ); + connect( a, TQT_SIGNAL(toggled(bool)), TQT_SLOT( toggleRecsrc()) ); } - new KAction( i18n("C&onfigure Global Shortcuts..."), 0, this, SLOT(defineKeys()), _mdwActions, "keys" ); + new KAction( i18n("C&onfigure Global Shortcuts..."), 0, this, TQT_SLOT(defineKeys()), _mdwActions, "keys" ); // create widgets createWidgets( showMuteLED, showRecordLED ); - m_keys->insert( "Increase volume", i18n( "Increase Volume of '%1'" ).arg(m_mixdevice->name().utf8().data()), QString::null, - KShortcut(), KShortcut(), this, SLOT( increaseVolume() ) ); - m_keys->insert( "Decrease volume", i18n( "Decrease Volume of '%1'" ).arg(m_mixdevice->name().utf8().data()), QString::null, - KShortcut(), KShortcut(), this, SLOT( decreaseVolume() ) ); - m_keys->insert( "Toggle mute", i18n( "Toggle Mute of '%1'" ).arg(m_mixdevice->name().utf8().data()), QString::null, - KShortcut(), KShortcut(), this, SLOT( toggleMuted() ) ); + m_keys->insert( "Increase volume", i18n( "Increase Volume of '%1'" ).arg(m_mixdevice->name().utf8().data()), TQString::null, + KShortcut(), KShortcut(), this, TQT_SLOT( increaseVolume() ) ); + m_keys->insert( "Decrease volume", i18n( "Decrease Volume of '%1'" ).arg(m_mixdevice->name().utf8().data()), TQString::null, + KShortcut(), KShortcut(), this, TQT_SLOT( decreaseVolume() ) ); + m_keys->insert( "Toggle mute", i18n( "Toggle Mute of '%1'" ).arg(m_mixdevice->name().utf8().data()), TQString::null, + KShortcut(), KShortcut(), this, TQT_SLOT( toggleMuted() ) ); installEventFilter( this ); // filter for popup @@ -94,13 +94,13 @@ MDWSlider::MDWSlider(Mixer *mixer, MixDevice* md, } -QSizePolicy MDWSlider::sizePolicy() const +TQSizePolicy MDWSlider::sizePolicy() const { if ( _orientation == Qt::Vertical ) { - return QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Expanding ); + return TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Expanding ); } else { - return QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ); + return TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ); } } @@ -114,22 +114,22 @@ QSizePolicy MDWSlider::sizePolicy() const void MDWSlider::createWidgets( bool showMuteLED, bool showRecordLED ) { if ( _orientation == Qt::Vertical ) { - _layout = new QVBoxLayout( this ); + _layout = new TQVBoxLayout( this ); _layout->setAlignment(Qt::AlignCenter); } else { - _layout = new QHBoxLayout( this ); + _layout = new TQHBoxLayout( this ); _layout->setAlignment(Qt::AlignCenter); } // -- MAIN SLIDERS LAYOUT --- - QBoxLayout *slidersLayout; + TQBoxLayout *slidersLayout; if ( _orientation == Qt::Vertical ) { - slidersLayout = new QHBoxLayout( _layout ); + slidersLayout = new TQHBoxLayout( _layout ); slidersLayout->setAlignment(Qt::AlignVCenter); } else { - slidersLayout = new QVBoxLayout( _layout ); + slidersLayout = new TQVBoxLayout( _layout ); slidersLayout->setAlignment(Qt::AlignHCenter); } @@ -142,24 +142,24 @@ void MDWSlider::createWidgets( bool showMuteLED, bool showRecordLED ) // -- LABEL LAYOUT TO POSITION - QBoxLayout *labelLayout; + TQBoxLayout *labelLayout; if ( _orientation == Qt::Vertical ) { - labelLayout = new QVBoxLayout( slidersLayout ); + labelLayout = new TQVBoxLayout( slidersLayout ); labelLayout->setAlignment(Qt::AlignHCenter); } else { - labelLayout = new QHBoxLayout( slidersLayout ); + labelLayout = new TQHBoxLayout( slidersLayout ); labelLayout->setAlignment(Qt::AlignVCenter); } if ( _orientation == Qt::Vertical ) { m_label = new VerticalText( this, m_mixdevice->name().utf8().data() ); - QToolTip::add( m_label, m_mixdevice->name() ); + TQToolTip::add( m_label, m_mixdevice->name() ); } else { - m_label = new QLabel(this); - static_cast<QLabel*>(m_label) ->setText(m_mixdevice->name()); - QToolTip::add( m_label, m_mixdevice->name() ); + m_label = new TQLabel(this); + static_cast<TQLabel*>(m_label) ->setText(m_mixdevice->name()); + TQToolTip::add( m_label, m_mixdevice->name() ); } m_label->hide(); @@ -180,24 +180,24 @@ void MDWSlider::createWidgets( bool showMuteLED, bool showRecordLED ) */ // -- SLIDERS, LEDS AND ICON - QBoxLayout *sliLayout; + TQBoxLayout *sliLayout; if ( _orientation == Qt::Vertical ) { - sliLayout = new QVBoxLayout( slidersLayout ); + sliLayout = new TQVBoxLayout( slidersLayout ); sliLayout->setAlignment(Qt::AlignHCenter); } else { - sliLayout = new QHBoxLayout( slidersLayout ); + sliLayout = new TQHBoxLayout( slidersLayout ); sliLayout->setAlignment(Qt::AlignVCenter); } // --- ICON ---------------------------- - QBoxLayout *iconLayout; + TQBoxLayout *iconLayout; if ( _orientation == Qt::Vertical ) { - iconLayout = new QHBoxLayout( sliLayout ); + iconLayout = new TQHBoxLayout( sliLayout ); iconLayout->setAlignment(Qt::AlignVCenter); } else { - iconLayout = new QVBoxLayout( sliLayout ); + iconLayout = new TQVBoxLayout( sliLayout ); iconLayout->setAlignment(Qt::AlignHCenter); } @@ -213,13 +213,13 @@ void MDWSlider::createWidgets( bool showMuteLED, bool showRecordLED ) // --- MUTE LED if ( showMuteLED ) { - QBoxLayout *ledlayout; + TQBoxLayout *ledlayout; if ( _orientation == Qt::Vertical ) { - ledlayout = new QHBoxLayout( sliLayout ); + ledlayout = new TQHBoxLayout( sliLayout ); ledlayout->setAlignment(Qt::AlignVCenter); } else { - ledlayout = new QVBoxLayout( sliLayout ); + ledlayout = new TQVBoxLayout( sliLayout ); ledlayout->setAlignment(Qt::AlignHCenter); } @@ -229,19 +229,19 @@ void MDWSlider::createWidgets( bool showMuteLED, bool showRecordLED ) // create mute LED m_muteLED = new KLedButton( Qt::green, KLed::On, KLed::Sunken, KLed::Circular, this, "MuteLED" ); - m_muteLED->setFixedSize( QSize(16, 16) ); - m_muteLED->resize( QSize(16, 16) ); + m_muteLED->setFixedSize( TQSize(16, 16) ); + m_muteLED->resize( TQSize(16, 16) ); ledlayout->addWidget( m_muteLED ); - QToolTip::add( m_muteLED, i18n( "Mute" ) ); - connect( m_muteLED, SIGNAL(stateChanged(bool)), this, SLOT(toggleMuted()) ); + TQToolTip::add( m_muteLED, i18n( "Mute" ) ); + connect( m_muteLED, TQT_SIGNAL(stateChanged(bool)), this, TQT_SLOT(toggleMuted()) ); m_muteLED->installEventFilter( this ); ledlayout->addStretch(); } // has Mute LED else { // we don't have a MUTE LED. We create a dummy widget // !! possibly not neccesary any more (we are layouted) - QWidget *qw = new QWidget(this, "Spacer"); - qw->setFixedSize( QSize(16, 16) ); + TQWidget *qw = new TQWidget(this, "Spacer"); + qw->setFixedSize( TQSize(16, 16) ); ledlayout->addWidget(qw); qw->installEventFilter( this ); } // has no Mute LED @@ -250,18 +250,18 @@ void MDWSlider::createWidgets( bool showMuteLED, bool showRecordLED ) } // showMuteLED // --- SLIDERS --------------------------- - QBoxLayout *volLayout; + TQBoxLayout *volLayout; if ( _orientation == Qt::Vertical ) { - volLayout = new QHBoxLayout( sliLayout ); + volLayout = new TQHBoxLayout( sliLayout ); volLayout->setAlignment(Qt::AlignVCenter); } else { - volLayout = new QVBoxLayout( sliLayout ); + volLayout = new TQVBoxLayout( sliLayout ); volLayout->setAlignment(Qt::AlignHCenter); } // Sliders and volume number indication - QBoxLayout *slinumLayout; + TQBoxLayout *slinumLayout; for( int i = 0; i < m_mixdevice->getVolume().count(); i++ ) { Volume::ChannelID chid = Volume::ChannelID(i); @@ -272,34 +272,34 @@ void MDWSlider::createWidgets( bool showMuteLED, bool showRecordLED ) int minvol = m_mixdevice->getVolume().minVolume(); if ( _orientation == Qt::Vertical ) { - slinumLayout = new QVBoxLayout( volLayout ); + slinumLayout = new TQVBoxLayout( volLayout ); slinumLayout->setAlignment(Qt::AlignHCenter); } else { - slinumLayout = new QHBoxLayout( volLayout ); + slinumLayout = new TQHBoxLayout( volLayout ); slinumLayout->setAlignment(Qt::AlignVCenter); } // create labels to hold volume values (taken from qamix/kamix) - QLabel *number = new QLabel( "100", this ); + TQLabel *number = new TQLabel( "100", this ); slinumLayout->addWidget( number ); - number->setFrameStyle( QFrame::Panel | QFrame::Sunken ); + number->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); number->setLineWidth( 2 ); number->setMinimumWidth( number->sizeHint().width() ); - number->setPaletteBackgroundColor( QColor(190, 250, 190) ); + number->setPaletteBackgroundColor( TQColor(190, 250, 190) ); // don't show the value by default number->hide(); updateValue( number, chid ); _numbers.append( number ); - QWidget* slider; + TQWidget* slider; if ( m_small ) { slider = new KSmallSlider( minvol, maxvol, maxvol/10, m_mixdevice->getVolume( chid ), _orientation, this, m_mixdevice->name().ascii() ); } else { - slider = new QSlider( 0, maxvol, maxvol/10, + slider = new TQSlider( 0, maxvol, maxvol/10, maxvol - m_mixdevice->getVolume( chid ), _orientation, this, m_mixdevice->name().ascii() ); slider->setMinimumSize( slider->sizeHint() ); @@ -307,7 +307,7 @@ void MDWSlider::createWidgets( bool showMuteLED, bool showRecordLED ) slider->setBackgroundOrigin(AncestorOrigin); slider->installEventFilter( this ); - QToolTip::add( slider, m_mixdevice->name() ); + TQToolTip::add( slider, m_mixdevice->name() ); if( i>0 && isStereoLinked() ) { // show only one (the first) slider, when the user wants it so @@ -317,7 +317,7 @@ void MDWSlider::createWidgets( bool showMuteLED, bool showRecordLED ) slinumLayout->addWidget( slider ); // add to layout m_sliders.append ( slider ); // add to list _slidersChids.append(chid); // Remember slider-chid association - connect( slider, SIGNAL(valueChanged(int)), SLOT(volumeChange(int)) ); + connect( slider, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(volumeChange(int)) ); } // for all channels of this device @@ -327,13 +327,13 @@ void MDWSlider::createWidgets( bool showMuteLED, bool showRecordLED ) sliLayout->addSpacing( 5 ); // --- LED LAYOUT TO CENTER --- - QBoxLayout *reclayout; + TQBoxLayout *reclayout; if ( _orientation == Qt::Vertical ) { - reclayout = new QHBoxLayout( sliLayout ); + reclayout = new TQHBoxLayout( sliLayout ); reclayout->setAlignment(Qt::AlignVCenter); } else { - reclayout = new QVBoxLayout( sliLayout ); + reclayout = new TQVBoxLayout( sliLayout ); reclayout->setAlignment(Qt::AlignHCenter); } @@ -342,19 +342,19 @@ void MDWSlider::createWidgets( bool showMuteLED, bool showRecordLED ) m_recordLED = new KLedButton( Qt::red, m_mixdevice->isRecSource()?KLed::On:KLed::Off, KLed::Sunken, KLed::Circular, this, "RecordLED" ); - m_recordLED->setFixedSize( QSize(16, 16) ); + m_recordLED->setFixedSize( TQSize(16, 16) ); reclayout->addWidget( m_recordLED ); - connect(m_recordLED, SIGNAL(stateChanged(bool)), this, SLOT(setRecsrc(bool))); + connect(m_recordLED, TQT_SIGNAL(stateChanged(bool)), this, TQT_SLOT(setRecsrc(bool))); m_recordLED->installEventFilter( this ); - QToolTip::add( m_recordLED, i18n( "Record" ) ); + TQToolTip::add( m_recordLED, i18n( "Record" ) ); reclayout->addStretch(); } else { // we don't have a RECORD LED. We create a dummy widget // !! possibly not neccesary any more (we are layouted) - QWidget *qw = new QWidget(this, "Spacer"); - qw->setFixedSize( QSize(16, 16) ); + TQWidget *qw = new TQWidget(this, "Spacer"); + qw->setFixedSize( TQSize(16, 16) ); reclayout->addWidget(qw); qw->installEventFilter( this ); } // has no Record LED @@ -367,7 +367,7 @@ void MDWSlider::createWidgets( bool showMuteLED, bool showRecordLED ) QPixmap MDWSlider::icon( int icontype ) { - QPixmap miniDevPM; + TQPixmap miniDevPM; switch (icontype) { case MixDevice::AUDIO: miniDevPM = UserIcon("mix_audio"); break; @@ -415,18 +415,18 @@ MDWSlider::setIcon( int icontype ) { if( !m_iconLabel ) { - m_iconLabel = new QLabel(this); + m_iconLabel = new TQLabel(this); m_iconLabel->setBackgroundOrigin(AncestorOrigin); installEventFilter( m_iconLabel ); } - QPixmap miniDevPM = icon( icontype ); + TQPixmap miniDevPM = icon( icontype ); if ( !miniDevPM.isNull() ) { if ( m_small ) { // scale icon - QWMatrix t; + TQWMatrix t; t = t.scale( 10.0/miniDevPM.width(), 10.0/miniDevPM.height() ); m_iconLabel->setPixmap( miniDevPM.xForm( t ) ); m_iconLabel->resize( 10, 10 ); @@ -461,9 +461,9 @@ MDWSlider::setStereoLinked(bool value) { m_linked = value; - QWidget *slider = m_sliders.first(); - QLabel *number = _numbers.first(); - QString qs = number->text(); + TQWidget *slider = m_sliders.first(); + TQLabel *number = _numbers.first(); + TQString qs = number->text(); /*********************************************************** Remember value of first slider, so that it can be copied @@ -471,8 +471,8 @@ MDWSlider::setStereoLinked(bool value) ***********************************************************/ int firstSliderValue = 0; bool firstSliderValueValid = false; - if (slider->isA("QSlider") ) { - QSlider *sld = static_cast<QSlider*>(slider); + if (slider->isA("TQSlider") ) { + TQSlider *sld = static_cast<TQSlider*>(slider); firstSliderValue = sld->value(); firstSliderValueValid = true; } @@ -492,10 +492,10 @@ MDWSlider::setStereoLinked(bool value) // This might not be entirely true, but better than showing the random value // that was used to be shown before hot-fixing this. !! must be revised if ( firstSliderValueValid ) { - // Remark: firstSlider== 0 could happen, if the static_cast<QRangeControl*> above fails. + // Remark: firstSlider== 0 could happen, if the static_cast<TQRangeControl*> above fails. // It's a safety measure, if we got other Slider types in the future. - if (slider->isA("QSlider") ) { - QSlider *sld = static_cast<QSlider*>(slider); + if (slider->isA("TQSlider") ) { + TQSlider *sld = static_cast<TQSlider*>(slider); sld->setValue( firstSliderValue ); } if (slider->isA("KSmallSlider") ) { @@ -511,7 +511,7 @@ MDWSlider::setStereoLinked(bool value) } slider = m_sliders.last(); - if( slider && static_cast<QSlider *>(slider)->tickmarks() ) + if( slider && static_cast<TQSlider *>(slider)->tickmarks() ) setTicks( true ); layout()->activate(); @@ -535,26 +535,26 @@ MDWSlider::setLabeled(bool value) void MDWSlider::setTicks( bool ticks ) { - QWidget* slider; + TQWidget* slider; slider = m_sliders.first(); - if ( slider->inherits( "QSlider" ) ) + if ( slider->inherits( "TQSlider" ) ) { if( ticks ) if( isStereoLinked() ) - static_cast<QSlider *>(slider)->setTickmarks( QSlider::Right ); + static_cast<TQSlider *>(slider)->setTickmarks( TQSlider::Right ); else { - static_cast<QSlider *>(slider)->setTickmarks( QSlider::NoMarks ); + static_cast<TQSlider *>(slider)->setTickmarks( TQSlider::NoMarks ); slider = m_sliders.last(); - static_cast<QSlider *>(slider)->setTickmarks( QSlider::Left ); + static_cast<TQSlider *>(slider)->setTickmarks( TQSlider::Left ); } else { - static_cast<QSlider *>(slider)->setTickmarks( QSlider::NoMarks ); + static_cast<TQSlider *>(slider)->setTickmarks( TQSlider::NoMarks ); slider = m_sliders.last(); - static_cast<QSlider *>(slider)->setTickmarks( QSlider::NoMarks ); + static_cast<TQSlider *>(slider)->setTickmarks( TQSlider::NoMarks ); } } @@ -567,8 +567,8 @@ MDWSlider::setValueStyle( ValueStyle valueStyle ) m_valueStyle = valueStyle; int i = 0; - QValueList<Volume::ChannelID>::Iterator it = _slidersChids.begin(); - for(QLabel *number = _numbers.first(); number!=0; number = _numbers.next(), ++i, ++it) { + TQValueList<Volume::ChannelID>::Iterator it = _slidersChids.begin(); + for(TQLabel *number = _numbers.first(); number!=0; number = _numbers.next(), ++i, ++it) { Volume::ChannelID chid = *it; switch ( m_valueStyle ) { case NNONE: number->hide(); break; @@ -598,26 +598,26 @@ MDWSlider::setIcons(bool value) } void -MDWSlider::setColors( QColor high, QColor low, QColor back ) +MDWSlider::setColors( TQColor high, TQColor low, TQColor back ) { - for( QWidget *slider=m_sliders.first(); slider!=0; slider=m_sliders.next() ) { + for( TQWidget *slider=m_sliders.first(); slider!=0; slider=m_sliders.next() ) { KSmallSlider *smallSlider = dynamic_cast<KSmallSlider*>(slider); if ( smallSlider ) smallSlider->setColors( high, low, back ); } } void -MDWSlider::setMutedColors( QColor high, QColor low, QColor back ) +MDWSlider::setMutedColors( TQColor high, TQColor low, TQColor back ) { - for( QWidget *slider=m_sliders.first(); slider!=0; slider=m_sliders.next() ) { + for( TQWidget *slider=m_sliders.first(); slider!=0; slider=m_sliders.next() ) { KSmallSlider *smallSlider = dynamic_cast<KSmallSlider*>(slider); if ( smallSlider ) smallSlider->setGrayColors( high, low, back ); } } void -MDWSlider::updateValue( QLabel *value, Volume::ChannelID chid ) { - QString qs; +MDWSlider::updateValue( TQLabel *value, Volume::ChannelID chid ) { + TQString qs; Volume& vol = m_mixdevice->getVolume(); if (m_valueStyle == NABSOLUTE ) @@ -637,7 +637,7 @@ void MDWSlider::volumeChange( int ) // --- Step 2: Change the volumes directly in the Volume object to reflect the Sliders --- if ( isStereoLinked() ) { - QWidget *slider = m_sliders.first(); + TQWidget *slider = m_sliders.first(); Volume::ChannelID chid = _slidersChids.first(); int sliderValue = 0; @@ -649,7 +649,7 @@ void MDWSlider::volumeChange( int ) } } else { - QSlider *slider = dynamic_cast<QSlider *>(m_sliders.first()); + TQSlider *slider = dynamic_cast<TQSlider *>(m_sliders.first()); if (slider) { if ( _orientation == Qt::Vertical ) sliderValue= slider->maxValue() - slider->value(); @@ -676,9 +676,9 @@ void MDWSlider::volumeChange( int ) } // joined else { int n = 0; - QValueList<Volume::ChannelID>::Iterator it = _slidersChids.begin(); - QLabel *number = _numbers.first(); - for( QWidget *slider=m_sliders.first(); slider!=0 && number!=0; slider=m_sliders.next(), number=_numbers.next(), ++it ) + TQValueList<Volume::ChannelID>::Iterator it = _slidersChids.begin(); + TQLabel *number = _numbers.first(); + for( TQWidget *slider=m_sliders.first(); slider!=0 && number!=0; slider=m_sliders.next(), number=_numbers.next(), ++it ) { Volume::ChannelID chid = *it; if ( slider->inherits( "KSmallSlider" ) ) @@ -689,7 +689,7 @@ void MDWSlider::volumeChange( int ) } else { - QSlider *bigSlider = dynamic_cast<QSlider *>(slider); + TQSlider *bigSlider = dynamic_cast<TQSlider *>(slider); if (bigSlider) if ( _orientation == Qt::Vertical ) vol.setVolume( chid, bigSlider->maxValue() - bigSlider->value() ); @@ -791,7 +791,7 @@ void MDWSlider::decreaseVolume() /** This is called whenever there are volume updates pending from the hardware for this MDW. - At the moment it is called regulary via a QTimer (implicitely). + At the moment it is called regulary via a TQTimer (implicitely). */ void MDWSlider::update() { @@ -799,11 +799,11 @@ void MDWSlider::update() Volume vol = m_mixdevice->getVolume(); if( isStereoLinked() ) { - QValueList<Volume::ChannelID>::Iterator it = _slidersChids.begin(); + TQValueList<Volume::ChannelID>::Iterator it = _slidersChids.begin(); long avgVol = vol.getAvgVolume( Volume::MMAIN ); - QWidget *slider = m_sliders.first(); + TQWidget *slider = m_sliders.first(); if ( slider == 0 ) { return; // !!! Development version, check this !!! } @@ -817,7 +817,7 @@ void MDWSlider::update() } } // small slider else { - QSlider *bigSlider = dynamic_cast<QSlider *>(slider); + TQSlider *bigSlider = dynamic_cast<TQSlider *>(slider); if (bigSlider) { // In case of stereo linked and single slider, slider must @@ -835,9 +835,9 @@ void MDWSlider::update() slider->blockSignals( false ); } // only 1 slider (stereo-linked) else { - QValueList<Volume::ChannelID>::Iterator it = _slidersChids.begin(); + TQValueList<Volume::ChannelID>::Iterator it = _slidersChids.begin(); for( int i=0; i<vol.count(); i++, ++it ) { - QWidget *slider = m_sliders.at( i ); + TQWidget *slider = m_sliders.at( i ); Volume::ChannelID chid = *it; if (slider == 0) { // !!! not implemented !!! @@ -858,7 +858,7 @@ void MDWSlider::update() } else { - QSlider *bigSlider = dynamic_cast<QSlider *>(slider); + TQSlider *bigSlider = dynamic_cast<TQSlider *>(slider); if (bigSlider) if ( _orientation == Qt::Vertical ) { bigSlider->setValue( vol.maxVolume() - vol[i] ); @@ -930,17 +930,17 @@ void MDWSlider::showContextMenu() a->plug( menu ); } - QPoint pos = QCursor::pos(); + TQPoint pos = TQCursor::pos(); menu->popup( pos ); } -QSize MDWSlider::sizeHint() const { +TQSize MDWSlider::sizeHint() const { if ( _layout != 0 ) { return _layout->sizeHint(); } else { // layout not (yet) created - return QWidget::sizeHint(); + return TQWidget::sizeHint(); } } @@ -948,18 +948,18 @@ QSize MDWSlider::sizeHint() const { * An event filter for the various QWidgets. We watch for Mouse press Events, so * that we can popup the context menu. */ -bool MDWSlider::eventFilter( QObject* obj, QEvent* e ) +bool MDWSlider::eventFilter( TQObject* obj, TQEvent* e ) { - if (e->type() == QEvent::MouseButtonPress) { - QMouseEvent *qme = static_cast<QMouseEvent*>(e); + if (e->type() == TQEvent::MouseButtonPress) { + TQMouseEvent *qme = static_cast<TQMouseEvent*>(e); if (qme->button() == Qt::RightButton) { showContextMenu(); return true; } } // Attention: We don't filter WheelEvents for KSmallSlider, because it handles WheelEvents itself - else if ( (e->type() == QEvent::Wheel) && !obj->isA("KSmallSlider") ) { - QWheelEvent *qwe = static_cast<QWheelEvent*>(e); + else if ( (e->type() == TQEvent::Wheel) && !obj->isA("KSmallSlider") ) { + TQWheelEvent *qwe = static_cast<TQWheelEvent*>(e); if (qwe->delta() > 0) { increaseVolume(); } @@ -968,7 +968,7 @@ bool MDWSlider::eventFilter( QObject* obj, QEvent* e ) } return true; } - return QWidget::eventFilter(obj,e); + return TQWidget::eventFilter(obj,e); } #include "mdwslider.moc" |