summaryrefslogtreecommitdiffstats
path: root/kmix/mdwslider.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:49:11 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:49:11 -0600
commit83fbc82a101309e171089f0d5ed080f82a367345 (patch)
treec7b61083b6e2d4bfceaace9a7f018181ea36afec /kmix/mdwslider.cpp
parentb248983f92b865ef74636ab5a673ae3a88f79c20 (diff)
downloadtdemultimedia-83fbc82a101309e171089f0d5ed080f82a367345.tar.gz
tdemultimedia-83fbc82a101309e171089f0d5ed080f82a367345.zip
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'kmix/mdwslider.cpp')
-rw-r--r--kmix/mdwslider.cpp104
1 files changed, 52 insertions, 52 deletions
diff --git a/kmix/mdwslider.cpp b/kmix/mdwslider.cpp
index 8d363c5e..9e6fe11e 100644
--- a/kmix/mdwslider.cpp
+++ b/kmix/mdwslider.cpp
@@ -33,7 +33,7 @@
#include <tqcursor.h>
#include <tqslider.h>
#include <tqlabel.h>
-#include <tqlayout.h>
+#include <layout.h>
#include <tqpixmap.h>
#include <tqtooltip.h>
#include <tqwmatrix.h>
@@ -81,11 +81,11 @@ MDWSlider::MDWSlider(Mixer *mixer, MixDevice* md,
// create widgets
createWidgets( showMuteLED, showRecordLED );
- m_keys->insert( "Increase volume", i18n( "Increase Volume of '%1'" ).tqarg(m_mixdevice->name().utf8().data()), TQString(),
+ m_keys->insert( "Increase volume", i18n( "Increase Volume of '%1'" ).arg(m_mixdevice->name().utf8().data()), TQString(),
KShortcut(), KShortcut(), TQT_TQOBJECT(this), TQT_SLOT( increaseVolume() ) );
- m_keys->insert( "Decrease volume", i18n( "Decrease Volume of '%1'" ).tqarg(m_mixdevice->name().utf8().data()), TQString(),
+ m_keys->insert( "Decrease volume", i18n( "Decrease Volume of '%1'" ).arg(m_mixdevice->name().utf8().data()), TQString(),
KShortcut(), KShortcut(), TQT_TQOBJECT(this), TQT_SLOT( decreaseVolume() ) );
- m_keys->insert( "Toggle mute", i18n( "Toggle Mute of '%1'" ).tqarg(m_mixdevice->name().utf8().data()), TQString(),
+ m_keys->insert( "Toggle mute", i18n( "Toggle Mute of '%1'" ).arg(m_mixdevice->name().utf8().data()), TQString(),
KShortcut(), KShortcut(), TQT_TQOBJECT(this), TQT_SLOT( toggleMuted() ) );
installEventFilter( this ); // filter for popup
@@ -115,25 +115,25 @@ void MDWSlider::createWidgets( bool showMuteLED, bool showRecordLED )
{
if ( _orientation == Qt::Vertical ) {
_layout = new TQVBoxLayout( this );
- _layout->tqsetAlignment(TQt::AlignCenter);
+ _layout->setAlignment(TQt::AlignCenter);
}
else {
_layout = new TQHBoxLayout( this );
- _layout->tqsetAlignment(TQt::AlignCenter);
+ _layout->setAlignment(TQt::AlignCenter);
}
// -- MAIN SLIDERS LAYOUT ---
TQBoxLayout *slidersLayout;
if ( _orientation == Qt::Vertical ) {
slidersLayout = new TQHBoxLayout( _layout );
- slidersLayout->tqsetAlignment(TQt::AlignVCenter);
+ slidersLayout->setAlignment(TQt::AlignVCenter);
}
else {
slidersLayout = new TQVBoxLayout( _layout );
- slidersLayout->tqsetAlignment(TQt::AlignHCenter);
+ slidersLayout->setAlignment(TQt::AlignHCenter);
}
- /* cesken: This is inconsistent. Why should vertical and horizontal tqlayout differ?
+ /* 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 )
@@ -145,11 +145,11 @@ void MDWSlider::createWidgets( bool showMuteLED, bool showRecordLED )
TQBoxLayout *labelLayout;
if ( _orientation == Qt::Vertical ) {
labelLayout = new TQVBoxLayout( slidersLayout );
- labelLayout->tqsetAlignment(TQt::AlignHCenter);
+ labelLayout->setAlignment(TQt::AlignHCenter);
}
else {
labelLayout = new TQHBoxLayout( slidersLayout );
- labelLayout->tqsetAlignment(TQt::AlignVCenter);
+ labelLayout->setAlignment(TQt::AlignVCenter);
}
if ( _orientation == Qt::Vertical ) {
m_label = new VerticalText( this, m_mixdevice->name().utf8().data() );
@@ -183,22 +183,22 @@ void MDWSlider::createWidgets( bool showMuteLED, bool showRecordLED )
TQBoxLayout *sliLayout;
if ( _orientation == Qt::Vertical ) {
sliLayout = new TQVBoxLayout( slidersLayout );
- sliLayout->tqsetAlignment(TQt::AlignHCenter);
+ sliLayout->setAlignment(TQt::AlignHCenter);
}
else {
sliLayout = new TQHBoxLayout( slidersLayout );
- sliLayout->tqsetAlignment(TQt::AlignVCenter);
+ sliLayout->setAlignment(TQt::AlignVCenter);
}
// --- ICON ----------------------------
TQBoxLayout *iconLayout;
if ( _orientation == Qt::Vertical ) {
iconLayout = new TQHBoxLayout( sliLayout );
- iconLayout->tqsetAlignment(TQt::AlignVCenter);
+ iconLayout->setAlignment(TQt::AlignVCenter);
}
else {
iconLayout = new TQVBoxLayout( sliLayout );
- iconLayout->tqsetAlignment(TQt::AlignHCenter);
+ iconLayout->setAlignment(TQt::AlignHCenter);
}
m_iconLabel = 0L;
@@ -213,36 +213,36 @@ void MDWSlider::createWidgets( bool showMuteLED, bool showRecordLED )
// --- MUTE LED
if ( showMuteLED ) {
- TQBoxLayout *ledtqlayout;
+ TQBoxLayout *ledlayout;
if ( _orientation == Qt::Vertical ) {
- ledtqlayout = new TQHBoxLayout( sliLayout );
- ledtqlayout->tqsetAlignment(TQt::AlignVCenter);
+ ledlayout = new TQHBoxLayout( sliLayout );
+ ledlayout->setAlignment(TQt::AlignVCenter);
}
else {
- ledtqlayout = new TQVBoxLayout( sliLayout );
- ledtqlayout->tqsetAlignment(TQt::AlignHCenter);
+ ledlayout = new TQVBoxLayout( sliLayout );
+ ledlayout->setAlignment(TQt::AlignHCenter);
}
if( m_mixdevice->hasMute() )
{
- ledtqlayout->addStretch();
+ ledlayout->addStretch();
// create mute LED
m_muteLED = new KLedButton( TQt::green, KLed::On, KLed::Sunken,
KLed::Circular, this, "MuteLED" );
m_muteLED->setFixedSize( TQSize(16, 16) );
m_muteLED->resize( TQSize(16, 16) );
- ledtqlayout->addWidget( m_muteLED );
+ ledlayout->addWidget( m_muteLED );
TQToolTip::add( m_muteLED, i18n( "Mute" ) );
connect( m_muteLED, TQT_SIGNAL(stateChanged(bool)), this, TQT_SLOT(toggleMuted()) );
m_muteLED->installEventFilter( this );
- ledtqlayout->addStretch();
+ 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)
TQWidget *qw = new TQWidget(this, "Spacer");
qw->setFixedSize( TQSize(16, 16) );
- ledtqlayout->addWidget(qw);
+ ledlayout->addWidget(qw);
qw->installEventFilter( this );
} // has no Mute LED
@@ -253,11 +253,11 @@ void MDWSlider::createWidgets( bool showMuteLED, bool showRecordLED )
TQBoxLayout *volLayout;
if ( _orientation == Qt::Vertical ) {
volLayout = new TQHBoxLayout( sliLayout );
- volLayout->tqsetAlignment(TQt::AlignVCenter);
+ volLayout->setAlignment(TQt::AlignVCenter);
}
else {
volLayout = new TQVBoxLayout( sliLayout );
- volLayout->tqsetAlignment(TQt::AlignHCenter);
+ volLayout->setAlignment(TQt::AlignHCenter);
}
// Sliders and volume number indication
@@ -273,11 +273,11 @@ void MDWSlider::createWidgets( bool showMuteLED, bool showRecordLED )
if ( _orientation == Qt::Vertical ) {
slinumLayout = new TQVBoxLayout( volLayout );
- slinumLayout->tqsetAlignment(TQt::AlignHCenter);
+ slinumLayout->setAlignment(TQt::AlignHCenter);
}
else {
slinumLayout = new TQHBoxLayout( volLayout );
- slinumLayout->tqsetAlignment(TQt::AlignVCenter);
+ slinumLayout->setAlignment(TQt::AlignVCenter);
}
// create labels to hold volume values (taken from qamix/kamix)
@@ -285,7 +285,7 @@ void MDWSlider::createWidgets( bool showMuteLED, bool showRecordLED )
slinumLayout->addWidget( number );
number->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
number->setLineWidth( 2 );
- number->setMinimumWidth( number->tqsizeHint().width() );
+ number->setMinimumWidth( number->sizeHint().width() );
number->setPaletteBackgroundColor( TQColor(190, 250, 190) );
// don't show the value by default
number->hide();
@@ -302,7 +302,7 @@ void MDWSlider::createWidgets( bool showMuteLED, bool showRecordLED )
slider = new TQSlider( 0, maxvol, maxvol/10,
maxvol - m_mixdevice->getVolume( chid ), _orientation,
this, m_mixdevice->name().ascii() );
- slider->setMinimumSize( slider->tqsizeHint() );
+ slider->setMinimumSize( slider->sizeHint() );
}
slider->setBackgroundOrigin(AncestorOrigin);
@@ -314,7 +314,7 @@ void MDWSlider::createWidgets( bool showMuteLED, bool showRecordLED )
slider->hide();
number->hide();
}
- slinumLayout->addWidget( slider ); // add to tqlayout
+ slinumLayout->addWidget( slider ); // add to layout
m_sliders.append ( slider ); // add to list
_slidersChids.append(chid); // Remember slider-chid association
connect( slider, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(volumeChange(int)) );
@@ -327,27 +327,27 @@ void MDWSlider::createWidgets( bool showMuteLED, bool showRecordLED )
sliLayout->addSpacing( 5 );
// --- LED LAYOUT TO CENTER ---
- TQBoxLayout *rectqlayout;
+ TQBoxLayout *reclayout;
if ( _orientation == Qt::Vertical ) {
- rectqlayout = new TQHBoxLayout( sliLayout );
- rectqlayout->tqsetAlignment(TQt::AlignVCenter);
+ reclayout = new TQHBoxLayout( sliLayout );
+ reclayout->setAlignment(TQt::AlignVCenter);
}
else {
- rectqlayout = new TQVBoxLayout( sliLayout );
- rectqlayout->tqsetAlignment(TQt::AlignHCenter);
+ reclayout = new TQVBoxLayout( sliLayout );
+ reclayout->setAlignment(TQt::AlignHCenter);
}
if( m_mixdevice->isRecordable() ) {
- rectqlayout->addStretch();
+ reclayout->addStretch();
m_recordLED = new KLedButton( TQt::red,
m_mixdevice->isRecSource()?KLed::On:KLed::Off,
KLed::Sunken, KLed::Circular, this, "RecordLED" );
m_recordLED->setFixedSize( TQSize(16, 16) );
- rectqlayout->addWidget( m_recordLED );
+ reclayout->addWidget( m_recordLED );
connect(m_recordLED, TQT_SIGNAL(stateChanged(bool)), this, TQT_SLOT(setRecsrc(bool)));
m_recordLED->installEventFilter( this );
TQToolTip::add( m_recordLED, i18n( "Record" ) );
- rectqlayout->addStretch();
+ reclayout->addStretch();
}
else
{
@@ -355,12 +355,12 @@ void MDWSlider::createWidgets( bool showMuteLED, bool showRecordLED )
// !! possibly not neccesary any more (we are layouted)
TQWidget *qw = new TQWidget(this, "Spacer");
qw->setFixedSize( TQSize(16, 16) );
- rectqlayout->addWidget(qw);
+ reclayout->addWidget(qw);
qw->installEventFilter( this );
} // has no Record LED
} // showRecordLED
- tqlayout()->activate();
+ layout()->activate();
}
@@ -432,13 +432,13 @@ MDWSlider::setIcon( int icontype )
m_iconLabel->resize( 10, 10 );
} else
m_iconLabel->setPixmap( miniDevPM );
- m_iconLabel->tqsetAlignment( TQt::AlignCenter );
+ m_iconLabel->setAlignment( TQt::AlignCenter );
} else
{
kdError(67100) << "Pixmap missing." << endl;
}
- tqlayout()->activate();
+ layout()->activate();
}
bool
@@ -514,7 +514,7 @@ MDWSlider::setStereoLinked(bool value)
if( slider && static_cast<TQSlider *>(slider)->tickmarks() )
setTicks( true );
- tqlayout()->activate();
+ layout()->activate();
}
@@ -529,7 +529,7 @@ MDWSlider::setLabeled(bool value)
else
m_label->hide();
- tqlayout()->activate();
+ layout()->activate();
}
void
@@ -558,7 +558,7 @@ MDWSlider::setTicks( bool ticks )
}
}
- tqlayout()->activate();
+ layout()->activate();
}
void
@@ -579,7 +579,7 @@ MDWSlider::setValueStyle( ValueStyle valueStyle )
}
}
}
- tqlayout()->activate();
+ layout()->activate();
}
void
@@ -592,7 +592,7 @@ MDWSlider::setIcons(bool value)
else
m_iconLabel->hide();
- tqlayout()->activate();
+ layout()->activate();
}
} // if it has an icon
}
@@ -934,13 +934,13 @@ void MDWSlider::showContextMenu()
menu->popup( pos );
}
-TQSize MDWSlider::tqsizeHint() const {
+TQSize MDWSlider::sizeHint() const {
if ( _layout != 0 ) {
- return _layout->tqsizeHint();
+ return _layout->sizeHint();
}
else {
- // tqlayout not (yet) created
- return TQWidget::tqsizeHint();
+ // layout not (yet) created
+ return TQWidget::sizeHint();
}
}