summaryrefslogtreecommitdiffstats
path: root/kmix/mdwslider.cpp
diff options
context:
space:
mode:
authorMavridis Philippe <mavridisf@gmail.com>2022-04-16 21:53:46 +0300
committerMavridis Philippe <mavridisf@gmail.com>2023-06-22 15:18:13 +0300
commit2cc6752c15371d87a0c8cf774515b0b44fc768d9 (patch)
tree54a63dac6a5508912933592aec9a90b2289c34e1 /kmix/mdwslider.cpp
parent5d08ceabaf19206134b1bcd08c8642cdb0b41aa7 (diff)
downloadtdemultimedia-2cc6752c15371d87a0c8cf774515b0b44fc768d9.tar.gz
tdemultimedia-2cc6752c15371d87a0c8cf774515b0b44fc768d9.zip
KMix: ported settings to TDEConfigXT/Designer
This commit includes an improved Preferences dialog for KMix. It also exposes some previously hidden options and features, some of which experimental (build-time option, off by default). It also includes some minor UI improvements. Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
Diffstat (limited to 'kmix/mdwslider.cpp')
-rw-r--r--kmix/mdwslider.cpp47
1 files changed, 23 insertions, 24 deletions
diff --git a/kmix/mdwslider.cpp b/kmix/mdwslider.cpp
index 6b4c3f51..6170992a 100644
--- a/kmix/mdwslider.cpp
+++ b/kmix/mdwslider.cpp
@@ -57,7 +57,7 @@
*/
MDWSlider::MDWSlider(Mixer *mixer, MixDevice* md,
bool showMuteLED, bool showRecordLED,
- bool small, Qt::Orientation orientation,
+ bool small, TQt::Orientation orientation,
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)
@@ -96,7 +96,7 @@ MDWSlider::MDWSlider(Mixer *mixer, MixDevice* md,
TQSizePolicy MDWSlider::sizePolicy() const
{
- if ( _orientation == Qt::Vertical ) {
+ if ( _orientation == TQt::Vertical ) {
return TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Expanding );
}
else {
@@ -113,18 +113,17 @@ TQSizePolicy MDWSlider::sizePolicy() const
*/
void MDWSlider::createWidgets( bool showMuteLED, bool showRecordLED )
{
- if ( _orientation == Qt::Vertical ) {
- _layout = new TQVBoxLayout( this );
- _layout->setAlignment(TQt::AlignCenter);
+ if ( _orientation == TQt::Vertical ) {
+ _layout = new TQVBoxLayout( this );
}
else {
- _layout = new TQHBoxLayout( this );
- _layout->setAlignment(TQt::AlignCenter);
+ _layout = new TQHBoxLayout( this );
}
+ _layout->setAlignment(TQt::AlignCenter);
// -- MAIN SLIDERS LAYOUT ---
TQBoxLayout *slidersLayout;
- if ( _orientation == Qt::Vertical ) {
+ if ( _orientation == TQt::Vertical ) {
slidersLayout = new TQHBoxLayout( _layout );
slidersLayout->setAlignment(TQt::AlignVCenter);
}
@@ -136,14 +135,14 @@ void MDWSlider::createWidgets( bool showMuteLED, bool showRecordLED )
/* cesken: This is inconsistent. Why should vertical and horizontal layout differ?
* Also it eats too much space - especially when you don't show sliders at all.
* Even more on the vertical panel applet (see Bug #97667)
- if ( _orientation == Qt::Horizontal )
+ if ( _orientation == TQt::Horizontal )
slidersLayout->addSpacing( 10 );
*/
// -- LABEL LAYOUT TO POSITION
TQBoxLayout *labelLayout;
- if ( _orientation == Qt::Vertical ) {
+ if ( _orientation == TQt::Vertical ) {
labelLayout = new TQVBoxLayout( slidersLayout );
labelLayout->setAlignment(TQt::AlignHCenter);
}
@@ -151,7 +150,7 @@ void MDWSlider::createWidgets( bool showMuteLED, bool showRecordLED )
labelLayout = new TQHBoxLayout( slidersLayout );
labelLayout->setAlignment(TQt::AlignVCenter);
}
- if ( _orientation == Qt::Vertical ) {
+ if ( _orientation == TQt::Vertical ) {
m_label = new VerticalText( this, m_mixdevice->name().utf8().data() );
TQToolTip::add( m_label, m_mixdevice->name() );
@@ -166,7 +165,7 @@ void MDWSlider::createWidgets( bool showMuteLED, bool showRecordLED )
/* This addSpacing() looks VERY bizarre => removing it (cesken, 21.2.2006).
Also horizontal and vertical spacing differs. This doesn't look sensible.
- if ( _orientation == Qt::Horizontal )
+ if ( _orientation == TQt::Horizontal )
labelLayout->addSpacing( 36 );
*/
labelLayout->addWidget( m_label );
@@ -174,14 +173,14 @@ void MDWSlider::createWidgets( bool showMuteLED, bool showRecordLED )
/* This addSpacing() looks VERY bizarre => removing it (cesken, 21.2.2006)
Also horizontal and vertical spacing differs. This doesn't look sensible.
- if ( _orientation == Qt::Vertical ) {
+ if ( _orientation == TQt::Vertical ) {
labelLayout->addSpacing( 18 );
}
*/
// -- SLIDERS, LEDS AND ICON
TQBoxLayout *sliLayout;
- if ( _orientation == Qt::Vertical ) {
+ if ( _orientation == TQt::Vertical ) {
sliLayout = new TQVBoxLayout( slidersLayout );
sliLayout->setAlignment(TQt::AlignHCenter);
}
@@ -192,7 +191,7 @@ void MDWSlider::createWidgets( bool showMuteLED, bool showRecordLED )
// --- ICON ----------------------------
TQBoxLayout *iconLayout;
- if ( _orientation == Qt::Vertical ) {
+ if ( _orientation == TQt::Vertical ) {
iconLayout = new TQHBoxLayout( sliLayout );
iconLayout->setAlignment(TQt::AlignVCenter);
}
@@ -214,7 +213,7 @@ void MDWSlider::createWidgets( bool showMuteLED, bool showRecordLED )
// --- MUTE LED
if ( showMuteLED ) {
TQBoxLayout *ledlayout;
- if ( _orientation == Qt::Vertical ) {
+ if ( _orientation == TQt::Vertical ) {
ledlayout = new TQHBoxLayout( sliLayout );
ledlayout->setAlignment(TQt::AlignVCenter);
}
@@ -251,7 +250,7 @@ void MDWSlider::createWidgets( bool showMuteLED, bool showRecordLED )
// --- SLIDERS ---------------------------
TQBoxLayout *volLayout;
- if ( _orientation == Qt::Vertical ) {
+ if ( _orientation == TQt::Vertical ) {
volLayout = new TQHBoxLayout( sliLayout );
volLayout->setAlignment(TQt::AlignVCenter);
}
@@ -271,7 +270,7 @@ void MDWSlider::createWidgets( bool showMuteLED, bool showRecordLED )
int maxvol = m_mixdevice->getVolume().maxVolume();
int minvol = m_mixdevice->getVolume().minVolume();
- if ( _orientation == Qt::Vertical ) {
+ if ( _orientation == TQt::Vertical ) {
slinumLayout = new TQVBoxLayout( volLayout );
slinumLayout->setAlignment(TQt::AlignHCenter);
}
@@ -328,7 +327,7 @@ void MDWSlider::createWidgets( bool showMuteLED, bool showRecordLED )
// --- LED LAYOUT TO CENTER ---
TQBoxLayout *reclayout;
- if ( _orientation == Qt::Vertical ) {
+ if ( _orientation == TQt::Vertical ) {
reclayout = new TQHBoxLayout( sliLayout );
reclayout->setAlignment(TQt::AlignVCenter);
}
@@ -651,7 +650,7 @@ void MDWSlider::volumeChange( int )
else {
TQSlider *slider = dynamic_cast<TQSlider *>(m_sliders.first());
if (slider) {
- if ( _orientation == Qt::Vertical )
+ if ( _orientation == TQt::Vertical )
sliderValue= slider->maxValue() - slider->value();
else
sliderValue= slider->value();
@@ -691,7 +690,7 @@ void MDWSlider::volumeChange( int )
{
TQSlider *bigSlider = dynamic_cast<TQSlider *>(slider);
if (bigSlider)
- if ( _orientation == Qt::Vertical )
+ if ( _orientation == TQt::Vertical )
vol.setVolume( chid, bigSlider->maxValue() - bigSlider->value() );
else
vol.setVolume( chid, bigSlider->value() );
@@ -808,7 +807,7 @@ void MDWSlider::update()
// show the top of both volumes, and not strangely low down
// the main volume by half
- if ( _orientation == Qt::Vertical )
+ if ( _orientation == TQt::Vertical )
bigSlider->setValue( vol.maxVolume() - vol.getTopStereoVolume( Volume::MMAIN ) );
else
bigSlider->setValue( vol.getTopStereoVolume( Volume::MMAIN ) );
@@ -844,7 +843,7 @@ void MDWSlider::update()
{
TQSlider *bigSlider = dynamic_cast<TQSlider *>(slider);
if (bigSlider)
- if ( _orientation == Qt::Vertical ) {
+ if ( _orientation == TQt::Vertical ) {
bigSlider->setValue( vol.maxVolume() - vol[i] );
}
else {
@@ -936,7 +935,7 @@ bool MDWSlider::eventFilter( TQObject* obj, TQEvent* e )
{
if (e->type() == TQEvent::MouseButtonPress) {
TQMouseEvent *qme = TQT_TQMOUSEEVENT(e);
- if (qme->button() == Qt::RightButton) {
+ if (qme->button() == TQt::RightButton) {
showContextMenu();
return true;
}