diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:43:15 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:43:15 +0000 |
commit | e654398e46e37abf457b2b1122ab898d2c51c49f (patch) | |
tree | d39ee6440f3c3663c3ead84a2d4cc2d034667e96 /kmix/mdwswitch.cpp | |
parent | e4f29b18e19394b9352f52a6c0d0d0e3932cf511 (diff) | |
download | tdemultimedia-e654398e46e37abf457b2b1122ab898d2c51c49f.tar.gz tdemultimedia-e654398e46e37abf457b2b1122ab898d2c51c49f.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1157644 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmix/mdwswitch.cpp')
-rw-r--r-- | kmix/mdwswitch.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/kmix/mdwswitch.cpp b/kmix/mdwswitch.cpp index 3e630c18..ee590146 100644 --- a/kmix/mdwswitch.cpp +++ b/kmix/mdwswitch.cpp @@ -19,12 +19,12 @@ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qcursor.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qobject.h> -#include <qslider.h> -#include <qtooltip.h> +#include <tqcursor.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqobject.h> +#include <tqslider.h> +#include <tqtooltip.h> #include <klocale.h> #include <kconfig.h> @@ -43,25 +43,25 @@ /** * Class that represents a single Switch * The orientation (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). */ MDWSwitch::MDWSwitch(Mixer *mixer, MixDevice* md, 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), _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, SLOT(setDisabled()), _mdwActions, "hide" ); - new KAction( i18n("C&onfigure Shortcuts..."), 0, this, SLOT(defineKeys()), _mdwActions, "keys" ); + new KToggleAction( i18n("&Hide"), 0, this, TQT_SLOT(setDisabled()), _mdwActions, "hide" ); + new KAction( i18n("C&onfigure Shortcuts..."), 0, this, TQT_SLOT(defineKeys()), _mdwActions, "keys" ); // create widgets createWidgets(); - m_keys->insert( "Toggle switch", i18n( "Toggle Switch" ), QString::null, - KShortcut(), KShortcut(), this, SLOT( toggleSwitch() ) ); + m_keys->insert( "Toggle switch", i18n( "Toggle Switch" ), TQString::null, + KShortcut(), KShortcut(), this, TQT_SLOT( toggleSwitch() ) ); // The keys are loaded in KMixerWidget::loadConfig, see kmixerwidget.cpp (now: kmixtoolbox.cpp) //m_keys->readSettings(); @@ -78,14 +78,14 @@ MDWSwitch::~MDWSwitch() void MDWSwitch::createWidgets() { if ( _orientation == Qt::Vertical ) { - _layout = new QVBoxLayout( this ); + _layout = new TQVBoxLayout( this ); _layout->setAlignment(Qt::AlignHCenter); } else { - _layout = new QHBoxLayout( this ); + _layout = new TQHBoxLayout( this ); _layout->setAlignment(Qt::AlignVCenter); } - QToolTip::add( this, m_mixdevice->name() ); + TQToolTip::add( this, m_mixdevice->name() ); _layout->addSpacing( 4 ); @@ -116,7 +116,7 @@ void MDWSwitch::createWidgets() else _switchLED = new KLedButton( Qt::yellow, KLed::On, KLed::Sunken, KLed::Circular, this, "SwitchLED" ); _switchLED->setFixedSize(16,16); - _label = new QLabel(m_mixdevice->name(), this, "SwitchName"); + _label = new TQLabel(m_mixdevice->name(), this, "SwitchName"); _layout->addWidget( _switchLED ); _layout->addSpacing( 1 ); @@ -124,7 +124,7 @@ void MDWSwitch::createWidgets() _switchLED->installEventFilter( this ); _label->installEventFilter( this ); } - connect( _switchLED, SIGNAL(stateChanged(bool)), this, SLOT(toggleSwitch()) ); + connect( _switchLED, TQT_SIGNAL(stateChanged(bool)), this, TQT_SLOT(toggleSwitch()) ); _layout->addSpacing( 4 ); } @@ -160,17 +160,17 @@ void MDWSwitch::showContextMenu() KPopupMenu *menu = m_mixerwidget->getPopup(); - QPoint pos = QCursor::pos(); + TQPoint pos = TQCursor::pos(); menu->popup( pos ); } -QSize MDWSwitch::sizeHint() const { +TQSize MDWSwitch::sizeHint() const { if ( _layout != 0 ) { return _layout->sizeHint(); } else { // layout not (yet) created - return QWidget::sizeHint(); + return TQWidget::sizeHint(); } } @@ -216,16 +216,16 @@ void MDWSwitch::setDisabled( bool value ) { * An event filter for the various QWidgets. We watch for Mouse press Events, so * that we can popup the context menu. */ -bool MDWSwitch::eventFilter( QObject* obj, QEvent* e ) +bool MDWSwitch::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; } } - return QWidget::eventFilter(obj,e); + return TQWidget::eventFilter(obj,e); } #include "mdwswitch.moc" |