diff options
Diffstat (limited to 'juk/slideraction.cpp')
-rw-r--r-- | juk/slideraction.cpp | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/juk/slideraction.cpp b/juk/slideraction.cpp index 561331d0..f16b21eb 100644 --- a/juk/slideraction.cpp +++ b/juk/slideraction.cpp @@ -41,19 +41,19 @@ class TrackPositionSlider : public TQSlider public: TrackPositionSlider(TQWidget *parent, const char *name) : TQSlider(parent, name) { - setFocusPolicy(TQ_NoFocus); + setFocusPolicy(TQWidget::NoFocus); } protected: virtual void mousePressEvent(TQMouseEvent *e) { - if(e->button() == Qt::LeftButton) { - TQMouseEvent reverse(TQEvent::MouseButtonPress, e->pos(), Qt::MidButton, e->state()); + if(e->button() == TQt::LeftButton) { + TQMouseEvent reverse(TQEvent::MouseButtonPress, e->pos(), TQt::MidButton, e->state()); TQSlider::mousePressEvent(&reverse); emit sliderPressed(); } - else if(e->button() == Qt::MidButton) { - TQMouseEvent reverse(TQEvent::MouseButtonPress, e->pos(), Qt::LeftButton, e->state()); + else if(e->button() == TQt::MidButton) { + TQMouseEvent reverse(TQEvent::MouseButtonPress, e->pos(), TQt::LeftButton, e->state()); TQSlider::mousePressEvent(&reverse); } } @@ -63,15 +63,15 @@ protected: // VolumeSlider implementation //////////////////////////////////////////////////////////////////////////////// -VolumeSlider::VolumeSlider(Qt::Orientation o, TQWidget *parent, const char *name) : +VolumeSlider::VolumeSlider(TQt::Orientation o, TQWidget *parent, const char *name) : TQSlider(o, parent, name) { - connect(this, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotValueChanged(int))); + connect(this, TQ_SIGNAL(valueChanged(int)), this, TQ_SLOT(slotValueChanged(int))); } void VolumeSlider::wheelEvent(TQWheelEvent *e) { - if(orientation() ==Qt::Horizontal) { + if(orientation() ==TQt::Horizontal) { TQWheelEvent transposed(e->pos(), -(e->delta()), e->state(), e->orientation()); TQSlider::wheelEvent(&transposed); } @@ -86,7 +86,7 @@ void VolumeSlider::focusInEvent(TQFocusEvent *) int VolumeSlider::volume() const { - if(orientation() ==Qt::Horizontal) + if(orientation() ==TQt::Horizontal) return value(); else return maxValue() - value(); @@ -94,13 +94,13 @@ int VolumeSlider::volume() const void VolumeSlider::setVolume(int value) { - if(orientation() ==Qt::Horizontal) + if(orientation() ==TQt::Horizontal) setValue(value); else setValue(maxValue() - value); } -void VolumeSlider::setOrientation(Qt::Orientation o) +void VolumeSlider::setOrientation(TQt::Orientation o) { if(o == orientation()) return; @@ -113,7 +113,7 @@ void VolumeSlider::setOrientation(Qt::Orientation o) void VolumeSlider::slotValueChanged(int value) { - if(orientation() ==Qt::Horizontal) + if(orientation() ==TQt::Horizontal) emit signalVolumeChanged(value); else emit signalVolumeChanged(maxValue() - value); @@ -162,11 +162,11 @@ int SliderAction::plug(TQWidget *parent, int index) addContainer(m_toolBar, id); - connect(m_toolBar, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotToolbarDestroyed())); - connect(m_toolBar, TQT_SIGNAL(orientationChanged(Qt::Orientation)), - this, TQT_SLOT(slotUpdateOrientation())); - connect(m_toolBar, TQT_SIGNAL(placeChanged(TQDockWindow::Place)), - this, TQT_SLOT(slotUpdateOrientation())); + connect(m_toolBar, TQ_SIGNAL(destroyed()), this, TQ_SLOT(slotToolbarDestroyed())); + connect(m_toolBar, TQ_SIGNAL(orientationChanged(TQt::Orientation)), + this, TQ_SLOT(slotUpdateOrientation())); + connect(m_toolBar, TQ_SIGNAL(placeChanged(TQDockWindow::Place)), + this, TQ_SLOT(slotUpdateOrientation())); slotUpdateOrientation(); return (containerCount() - 1); @@ -205,13 +205,13 @@ void SliderAction::slotUpdateOrientation() return; if(m_toolBar->barPos() == TDEToolBar::Right || m_toolBar->barPos() == TDEToolBar::Left) { - m_trackPositionSlider->setOrientation(Qt::Vertical); - m_volumeSlider->setOrientation(Qt::Vertical); + m_trackPositionSlider->setOrientation(TQt::Vertical); + m_volumeSlider->setOrientation(TQt::Vertical); m_layout->setDirection(TQBoxLayout::TopToBottom); } else { - m_trackPositionSlider->setOrientation(Qt::Horizontal); - m_volumeSlider->setOrientation(Qt::Horizontal); + m_trackPositionSlider->setOrientation(TQt::Horizontal); + m_volumeSlider->setOrientation(TQt::Horizontal); m_layout->setDirection(TQBoxLayout::LeftToRight); } slotUpdateSize(); @@ -233,12 +233,12 @@ TQWidget *SliderAction::createWidget(TQWidget *parent) // virtual -- used by bas if(toolBar) toolBar->setStretchableWidget(base); - Qt::Orientation orientation; + TQt::Orientation orientation; if(toolBar && toolBar->barPos() == TDEToolBar::Right || toolBar->barPos() == TDEToolBar::Left) - orientation =Qt::Vertical; + orientation =TQt::Vertical; else - orientation =Qt::Horizontal; + orientation =TQt::Horizontal; m_layout = new TQBoxLayout(base, TQBoxLayout::TopToBottom, 5, 5); @@ -254,8 +254,8 @@ TQWidget *SliderAction::createWidget(TQWidget *parent) // virtual -- used by bas m_trackPositionSlider->setMaxValue(maxPosition); TQToolTip::add(m_trackPositionSlider, i18n("Track position")); m_layout->addWidget(m_trackPositionSlider); - connect(m_trackPositionSlider, TQT_SIGNAL(sliderPressed()), this, TQT_SLOT(slotSliderPressed())); - connect(m_trackPositionSlider, TQT_SIGNAL(sliderReleased()), this, TQT_SLOT(slotSliderReleased())); + connect(m_trackPositionSlider, TQ_SIGNAL(sliderPressed()), this, TQ_SLOT(slotSliderPressed())); + connect(m_trackPositionSlider, TQ_SIGNAL(sliderReleased()), this, TQ_SLOT(slotSliderReleased())); m_layout->addItem(new TQSpacerItem(10, 1)); @@ -269,9 +269,9 @@ TQWidget *SliderAction::createWidget(TQWidget *parent) // virtual -- used by bas m_volumeSlider->setMaxValue(100); TQToolTip::add(m_volumeSlider, i18n("Volume")); m_layout->addWidget(m_volumeSlider); - connect(m_volumeSlider, TQT_SIGNAL(signalVolumeChanged(int)), TQT_SIGNAL(signalVolumeChanged(int))); - connect(m_volumeSlider, TQT_SIGNAL(sliderPressed()), this, TQT_SLOT(slotVolumeSliderPressed())); - connect(m_volumeSlider, TQT_SIGNAL(sliderReleased()), this, TQT_SLOT(slotVolumeSliderReleased())); + connect(m_volumeSlider, TQ_SIGNAL(signalVolumeChanged(int)), TQ_SIGNAL(signalVolumeChanged(int))); + connect(m_volumeSlider, TQ_SIGNAL(sliderPressed()), this, TQ_SLOT(slotVolumeSliderPressed())); + connect(m_volumeSlider, TQ_SIGNAL(sliderReleased()), this, TQ_SLOT(slotVolumeSliderReleased())); m_volumeSlider->setName("tde toolbar widget"); m_trackPositionSlider->setName("tde toolbar widget"); @@ -279,7 +279,7 @@ TQWidget *SliderAction::createWidget(TQWidget *parent) // virtual -- used by bas m_layout->setStretchFactor(m_trackPositionSlider, 4); m_layout->setStretchFactor(m_volumeSlider, 1); - connect(parent, TQT_SIGNAL(modechange()), this, TQT_SLOT(slotUpdateSize())); + connect(parent, TQ_SIGNAL(modechange()), this, TQ_SLOT(slotUpdateSize())); return base; } |