summaryrefslogtreecommitdiffstats
path: root/kmix/mdwswitch.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 06:00:15 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 06:00:15 +0000
commitb1057f437bf65300831a0ccb45b920787c6b318d (patch)
treef8a73db06ca1180d0da0ba6dfbe786197b4f4bc3 /kmix/mdwswitch.cpp
parent4ddfca384ced9ad654213aef9dc2c3973720b980 (diff)
downloadtdemultimedia-b1057f437bf65300831a0ccb45b920787c6b318d.tar.gz
tdemultimedia-b1057f437bf65300831a0ccb45b920787c6b318d.zip
TQt4 port kdemultimedia
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1236079 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmix/mdwswitch.cpp')
-rw-r--r--kmix/mdwswitch.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/kmix/mdwswitch.cpp b/kmix/mdwswitch.cpp
index ee590146..7ee2b1e4 100644
--- a/kmix/mdwswitch.cpp
+++ b/kmix/mdwswitch.cpp
@@ -47,21 +47,21 @@
*/
MDWSwitch::MDWSwitch(Mixer *mixer, MixDevice* md,
bool small, Qt::Orientation orientation,
- TQWidget* parent, ViewBase* mw, const char* name) :
- MixDeviceWidget(mixer,md,small,orientation,parent,mw,name),
+ TQWidget* tqparent, ViewBase* mw, const char* name) :
+ MixDeviceWidget(mixer,md,small,orientation,tqparent,mw,name),
_label(0) , _labelV(0) , _switchLED(0), _layout(0)
{
// create actions (on _mdwActions, see MixDeviceWidget)
// KStdAction::showMenubar() is in MixDeviceWidget now
- new KToggleAction( i18n("&Hide"), 0, this, TQT_SLOT(setDisabled()), _mdwActions, "hide" );
- new KAction( i18n("C&onfigure Shortcuts..."), 0, this, TQT_SLOT(defineKeys()), _mdwActions, "keys" );
+ new KToggleAction( i18n("&Hide"), 0, TQT_TQOBJECT(this), TQT_SLOT(setDisabled()), _mdwActions, "hide" );
+ new KAction( i18n("C&onfigure Shortcuts..."), 0, TQT_TQOBJECT(this), TQT_SLOT(defineKeys()), _mdwActions, "keys" );
// create widgets
createWidgets();
- m_keys->insert( "Toggle switch", i18n( "Toggle Switch" ), TQString::null,
- KShortcut(), KShortcut(), this, TQT_SLOT( toggleSwitch() ) );
+ m_keys->insert( "Toggle switch", i18n( "Toggle Switch" ), TQString(),
+ KShortcut(), KShortcut(), TQT_TQOBJECT(this), TQT_SLOT( toggleSwitch() ) );
// The keys are loaded in KMixerWidget::loadConfig, see kmixerwidget.cpp (now: kmixtoolbox.cpp)
//m_keys->readSettings();
@@ -79,11 +79,11 @@ void MDWSwitch::createWidgets()
{
if ( _orientation == Qt::Vertical ) {
_layout = new TQVBoxLayout( this );
- _layout->setAlignment(Qt::AlignHCenter);
+ _layout->tqsetAlignment(TQt::AlignHCenter);
}
else {
_layout = new TQHBoxLayout( this );
- _layout->setAlignment(Qt::AlignVCenter);
+ _layout->tqsetAlignment(TQt::AlignVCenter);
}
TQToolTip::add( this, m_mixdevice->name() );
@@ -92,11 +92,11 @@ void MDWSwitch::createWidgets()
// --- LEDS --------------------------
if ( _orientation == Qt::Vertical ) {
if( m_mixdevice->isRecordable() )
- _switchLED = new KLedButton( Qt::red,
+ _switchLED = new KLedButton( TQt::red,
m_mixdevice->isRecSource()?KLed::On:KLed::Off,
KLed::Sunken, KLed::Circular, this, "RecordLED" );
else
- _switchLED = new KLedButton( Qt::yellow, KLed::On, KLed::Sunken, KLed::Circular, this, "SwitchLED" );
+ _switchLED = new KLedButton( TQt::yellow, KLed::On, KLed::Sunken, KLed::Circular, this, "SwitchLED" );
_switchLED->setFixedSize(16,16);
_labelV = new VerticalText( this, m_mixdevice->name().utf8().data() );
@@ -110,11 +110,11 @@ void MDWSwitch::createWidgets()
else
{
if( m_mixdevice->isRecordable() )
- _switchLED = new KLedButton( Qt::red,
+ _switchLED = new KLedButton( TQt::red,
m_mixdevice->isRecSource()?KLed::On:KLed::Off,
KLed::Sunken, KLed::Circular, this, "RecordLED" );
else
- _switchLED = new KLedButton( Qt::yellow, KLed::On, KLed::Sunken, KLed::Circular, this, "SwitchLED" );
+ _switchLED = new KLedButton( TQt::yellow, KLed::On, KLed::Sunken, KLed::Circular, this, "SwitchLED" );
_switchLED->setFixedSize(16,16);
_label = new TQLabel(m_mixdevice->name(), this, "SwitchName");
@@ -164,13 +164,13 @@ void MDWSwitch::showContextMenu()
menu->popup( pos );
}
-TQSize MDWSwitch::sizeHint() const {
+TQSize MDWSwitch::tqsizeHint() const {
if ( _layout != 0 ) {
- return _layout->sizeHint();
+ return _layout->tqsizeHint();
}
else {
- // layout not (yet) created
- return TQWidget::sizeHint();
+ // tqlayout not (yet) created
+ return TQWidget::tqsizeHint();
}
}
@@ -213,13 +213,13 @@ void MDWSwitch::setDisabled( bool value ) {
}
/**
- * An event filter for the various QWidgets. We watch for Mouse press Events, so
+ * An event filter for the various TQWidgets. We watch for Mouse press Events, so
* that we can popup the context menu.
*/
bool MDWSwitch::eventFilter( TQObject* obj, TQEvent* e )
{
if (e->type() == TQEvent::MouseButtonPress) {
- TQMouseEvent *qme = static_cast<TQMouseEvent*>(e);
+ TQMouseEvent *qme = TQT_TQMOUSEEVENT(e);
if (qme->button() == Qt::RightButton) {
showContextMenu();
return true;