diff --git a/include/pixmap_button.h b/include/pixmap_button.h index a93e8ced4..f99e69d4a 100644 --- a/include/pixmap_button.h +++ b/include/pixmap_button.h @@ -1,7 +1,7 @@ /* * pixmap_button.h - declaration of class pixmapButton * - * Copyright (c) 2004-2007 Tobias Doerffel + * Copyright (c) 2004-2008 Tobias Doerffel * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -35,7 +35,8 @@ class EXPORT pixmapButton : public automatableButton { Q_OBJECT public: - pixmapButton( QWidget * _parent, const QString & _name = QString::null ); + pixmapButton( QWidget * _parent, + const QString & _name = QString::null ); virtual ~pixmapButton(); void setActiveGraphic( const QPixmap & _pm ); @@ -44,7 +45,6 @@ public: signals: void doubleClicked( void ); - void ctrlClick( void ); protected: diff --git a/src/gui/widgets/pixmap_button.cpp b/src/gui/widgets/pixmap_button.cpp index a34faef6e..739888979 100644 --- a/src/gui/widgets/pixmap_button.cpp +++ b/src/gui/widgets/pixmap_button.cpp @@ -78,25 +78,19 @@ void pixmapButton::paintEvent( QPaintEvent * ) void pixmapButton::mousePressEvent( QMouseEvent * _me ) { - if( _me->button() == Qt::LeftButton && - engine::getMainWindow()->isCtrlPressed() ) + // Show pressing graphics if this isn't checkable + if( !isCheckable() ) { - emit( ctrlClick() ); - _me->accept(); + m_pressed = TRUE; + update(); } - else - { - // Show pressing graphics if this isn't checkable - if( !isCheckable() ) - { - m_pressed = TRUE; - update(); - } - automatableButton::mousePressEvent( _me ); - } + automatableButton::mousePressEvent( _me ); } + + + void pixmapButton::mouseReleaseEvent( QMouseEvent * _me ) { automatableButton::mouseReleaseEvent( _me ); @@ -108,6 +102,9 @@ void pixmapButton::mouseReleaseEvent( QMouseEvent * _me ) } } + + + void pixmapButton::mouseDoubleClickEvent( QMouseEvent * _me ) { emit doubleClicked();