summaryrefslogtreecommitdiffstats
path: root/kmix/kmixdockwidget.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:43:15 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:43:15 +0000
commite654398e46e37abf457b2b1122ab898d2c51c49f (patch)
treed39ee6440f3c3663c3ead84a2d4cc2d034667e96 /kmix/kmixdockwidget.cpp
parente4f29b18e19394b9352f52a6c0d0d0e3932cf511 (diff)
downloadtdemultimedia-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/kmixdockwidget.cpp')
-rw-r--r--kmix/kmixdockwidget.cpp60
1 files changed, 30 insertions, 30 deletions
diff --git a/kmix/kmixdockwidget.cpp b/kmix/kmixdockwidget.cpp
index 19ef03e9..ae80ec49 100644
--- a/kmix/kmixdockwidget.cpp
+++ b/kmix/kmixdockwidget.cpp
@@ -34,9 +34,9 @@
#include <kdebug.h>
#include <kwin.h>
-#include <qapplication.h>
-#include <qcursor.h>
-#include <qtooltip.h>
+#include <tqapplication.h>
+#include <tqcursor.h>
+#include <tqtooltip.h>
#include <X11/Xlib.h>
#include <fixx11h.h>
@@ -47,7 +47,7 @@
#include "kwin.h"
#include "viewdockareapopup.h"
-KMixDockWidget::KMixDockWidget( Mixer *mixer, QWidget *parent, const char *name, bool volumePopup, bool dockIconMuting )
+KMixDockWidget::KMixDockWidget( Mixer *mixer, TQWidget *parent, const char *name, bool volumePopup, bool dockIconMuting )
: KSystemTray( parent, name ),
m_mixer(mixer),
_dockAreaPopup(0L),
@@ -68,7 +68,7 @@ KMixDockWidget::KMixDockWidget( Mixer *mixer, QWidget *parent, const char *name,
}
createActions();
createMasterVolWidget();
- connect(this, SIGNAL(quitSelected()), kapp, SLOT(quitExtended()));
+ connect(this, TQT_SIGNAL(quitSelected()), kapp, TQT_SLOT(quitExtended()));
}
KMixDockWidget::~KMixDockWidget()
@@ -80,7 +80,7 @@ KMixDockWidget::~KMixDockWidget()
void KMixDockWidget::createActions()
{
// Put "Mute" selector in context menu
- (void)new KToggleAction( i18n( "M&ute" ), 0, this, SLOT( dockMute() ),
+ (void)new KToggleAction( i18n( "M&ute" ), 0, this, TQT_SLOT( dockMute() ),
actionCollection(), "dock_mute" );
KAction *a = actionCollection()->action( "dock_mute" );
KPopupMenu *popupMenu = contextMenu();
@@ -88,7 +88,7 @@ void KMixDockWidget::createActions()
// Put "Select Master Channel" dialog in context menu
if ( m_mixer != 0 ) {
- (void)new KAction( i18n("Select Master Channel..."), 0, this, SLOT(selectMaster()),
+ (void)new KAction( i18n("Select Master Channel..."), 0, this, TQT_SLOT(selectMaster()),
actionCollection(), "select_master");
KAction *a2 = actionCollection()->action( "select_master" );
if (a2) a2->plug( popupMenu );
@@ -120,10 +120,10 @@ KMixDockWidget::createMasterVolWidget()
_dockAreaPopup = new ViewDockAreaPopup(0, "dockArea", m_mixer, 0, this);
_dockAreaPopup->createDeviceWidgets();
m_mixer->readSetFromHWforceUpdate(); // after changing the master device, make sure to re-read (otherwise no "changed()" signals might get sent by the Mixer
- /* With the recently introduced QSocketNotifier stuff, we can't rely on regular timer updates
+ /* With the recently introduced TQSocketNotifier stuff, we can't rely on regular timer updates
any longer. Also the readSetFromHWforceUpdate() won't be enough. As a workaround, we trigger
all "repaints" manually here.
- The call to m_mixer->readSetFromHWforceUpdate() is most likely superfluous, even if we don't use QSocketNotifier (e.g. in backends OSS, Solaris, ...)
+ The call to m_mixer->readSetFromHWforceUpdate() is most likely superfluous, even if we don't use TQSocketNotifier (e.g. in backends OSS, Solaris, ...)
*/
setVolumeTip();
updatePixmap(false);
@@ -133,9 +133,9 @@ KMixDockWidget::createMasterVolWidget()
* Refreshing the Icon
*
*/
- // connect( m_mixer, SIGNAL(newVolumeLevels()), _dockAreaPopup, SLOT(refreshVolumeLevels()) );
- connect( m_mixer, SIGNAL(newVolumeLevels()), this, SLOT(setVolumeTip() ) );
- connect( m_mixer, SIGNAL(newVolumeLevels()), this, SLOT(slotUpdatePixmap() ) );
+ // connect( m_mixer, TQT_SIGNAL(newVolumeLevels()), _dockAreaPopup, TQT_SLOT(refreshVolumeLevels()) );
+ connect( m_mixer, TQT_SIGNAL(newVolumeLevels()), this, TQT_SLOT(setVolumeTip() ) );
+ connect( m_mixer, TQT_SIGNAL(newVolumeLevels()), this, TQT_SLOT(slotUpdatePixmap() ) );
}
void KMixDockWidget::slotUpdatePixmap()
@@ -146,13 +146,13 @@ void KMixDockWidget::slotUpdatePixmap()
void KMixDockWidget::selectMaster()
{
DialogSelectMaster* dsm = new DialogSelectMaster(m_mixer);
- connect ( dsm, SIGNAL(newMasterSelected(int, QString&)), SLOT( handleNewMaster(int,QString&)) );
+ connect ( dsm, TQT_SIGNAL(newMasterSelected(int, TQString&)), TQT_SLOT( handleNewMaster(int,TQString&)) );
dsm->show();
// !! The dialog is modal. Does it delete itself?
}
-void KMixDockWidget::handleNewMaster(int soundcard_id, QString& channel_id) // !! @todo rework parameters
+void KMixDockWidget::handleNewMaster(int soundcard_id, TQString& channel_id) // !! @todo rework parameters
{
//kdDebug(67100) << "KMixDockWidget::handleNewMaster() soundcard_id=" << soundcard_id << " , channel_id=" << channel_id << endl;
Mixer *mixer = Mixer::mixers().at(soundcard_id);
@@ -174,7 +174,7 @@ KMixDockWidget::setVolumeTip()
if ( _dockAreaPopup != 0 ) {
md = _dockAreaPopup->dockDevice();
}
- QString tip = "";
+ TQString tip = "";
int newToolTipValue = 0;
if ( md == 0 )
@@ -204,9 +204,9 @@ KMixDockWidget::setVolumeTip()
// changed (or completely new tooltip)
if ( _oldToolTipValue >= 0 ) {
// there was an old Tooltip: remove it
- QToolTip::remove(this);
+ TQToolTip::remove(this);
}
- QToolTip::add(this, tip);
+ TQToolTip::add(this, tip);
}
_oldToolTipValue = newToolTipValue;
}
@@ -235,9 +235,9 @@ KMixDockWidget::updatePixmap(bool force)
if (( newPixmapType != _oldPixmapType ) || (force == true)) {
// Pixmap must be changed => do so
// Honor Free Desktop specifications that allow for arbitrary system tray icon sizes
- QPixmap origpixmap;
- QPixmap scaledpixmap;
- QImage newIcon;
+ TQPixmap origpixmap;
+ TQPixmap scaledpixmap;
+ TQImage newIcon;
switch ( newPixmapType ) {
case 'e': origpixmap = loadSizedIcon( "kmixdocked_error", width() ); break;
case 'm': origpixmap = loadSizedIcon( "kmixdocked_mute" , width() ); break;
@@ -252,13 +252,13 @@ KMixDockWidget::updatePixmap(bool force)
}
}
-void KMixDockWidget::resizeEvent ( QResizeEvent * )
+void KMixDockWidget::resizeEvent ( TQResizeEvent * )
{
updatePixmap(true);
}
void
-KMixDockWidget::mousePressEvent(QMouseEvent *me)
+KMixDockWidget::mousePressEvent(TQMouseEvent *me)
{
if ( _dockAreaPopup == 0 ) {
return KSystemTray::mousePressEvent(me);
@@ -284,8 +284,8 @@ KMixDockWidget::mousePressEvent(QMouseEvent *me)
}
int h = _dockAreaPopup->height();
- int x = this->mapToGlobal( QPoint( 0, 0 ) ).x() + this->width()/2 - _dockAreaPopup->width()/2;
- int y = this->mapToGlobal( QPoint( 0, 0 ) ).y() - h;
+ int x = this->mapToGlobal( TQPoint( 0, 0 ) ).x() + this->width()/2 - _dockAreaPopup->width()/2;
+ int y = this->mapToGlobal( TQPoint( 0, 0 ) ).y() - h;
if ( y < 0 )
y = y + h + this->height();
@@ -293,8 +293,8 @@ KMixDockWidget::mousePressEvent(QMouseEvent *me)
// Now handle Multihead displays. And also make sure that the dialog is not
// moved out-of-the screen on the right (see Bug 101742).
- QDesktopWidget* vdesktop = QApplication::desktop();
- const QRect& vScreenSize = vdesktop->screenGeometry(_dockAreaPopup);
+ TQDesktopWidget* vdesktop = TQApplication::desktop();
+ const TQRect& vScreenSize = vdesktop->screenGeometry(_dockAreaPopup);
if ( (x+_dockAreaPopup->width()) > (vScreenSize.width() + vScreenSize.x()) ) {
// move horizontally, so that it is completely visible
_dockAreaPopup->move(vScreenSize.width() + vScreenSize.x() - _dockAreaPopup->width() -1 , y);
@@ -307,7 +307,7 @@ KMixDockWidget::mousePressEvent(QMouseEvent *me)
_dockAreaPopup->show();
KWin::setState(_dockAreaPopup->winId(), NET::StaysOnTop | NET::SkipTaskbar | NET::SkipPager );
- QWidget::mousePressEvent(me); // KSystemTray's shouldn't do the default action for this
+ TQWidget::mousePressEvent(me); // KSystemTray's shouldn't do the default action for this
return;
} // LeftMouseButton pressed
else if ( me->button() == MidButton ) {
@@ -325,14 +325,14 @@ KMixDockWidget::mousePressEvent(QMouseEvent *me)
}
void
-KMixDockWidget::mouseReleaseEvent( QMouseEvent *me )
+KMixDockWidget::mouseReleaseEvent( TQMouseEvent *me )
{
KSystemTray::mouseReleaseEvent(me);
}
void
-KMixDockWidget::wheelEvent(QWheelEvent *e)
+KMixDockWidget::wheelEvent(TQWheelEvent *e)
{
MixDevice *md = 0;
if ( _dockAreaPopup != 0 ) {
@@ -360,7 +360,7 @@ KMixDockWidget::wheelEvent(QWheelEvent *e)
// Mhhh, it doesn't work. Qt does not show it again.
setVolumeTip();
// Simulate a mouse move to make Qt show the tooltip again
- QApplication::postEvent( this, new QMouseEvent( QEvent::MouseMove, QCursor::pos(), Qt::NoButton, Qt::NoButton ) );
+ TQApplication::postEvent( this, new TQMouseEvent( TQEvent::MouseMove, TQCursor::pos(), Qt::NoButton, Qt::NoButton ) );
}
}