From 137196cec5eddbfda8ca5c296244151026d4670c Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Sun, 15 Jun 2008 12:49:04 +0000 Subject: [PATCH] removed removed obsolete ctrlClick() signal git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1131 0778d3d1-df1d-0410-868b-ea421aaaa00d --- include/pixmap_button.h | 6 +++--- src/gui/widgets/pixmap_button.cpp | 25 +++++++++++-------------- 2 files changed, 14 insertions(+), 17 deletions(-) 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();