diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | src/configdialogimpl.h | 2 | ||||
-rw-r--r-- | src/kcmkommando.cpp | 2 | ||||
-rw-r--r-- | src/kommando.cpp | 13 | ||||
-rw-r--r-- | src/kommando.h | 4 |
5 files changed, 24 insertions, 3 deletions
@@ -1,3 +1,9 @@ +21.08.2007 Kommando v0.5.2: + -clicking with the middle mousebutton excutes commands + +16.11.2006 Kommando v0.5.1: + -added a "add menu from kmenu" feature (again a patch by Sergio) + 14.11.2006 Kommando v0.5.0: -added context sensitive menus -running as kded module (huge thanks to Sergio Cambra) diff --git a/src/configdialogimpl.h b/src/configdialogimpl.h index 9149f26..ce5c397 100644 --- a/src/configdialogimpl.h +++ b/src/configdialogimpl.h @@ -38,7 +38,7 @@ class KShortcut; /** * @short Application Main Window * @author Daniel Stöckel <the_docter@gmx.net> - * @version 0.5.0 + * @version 0.5.2 */ class ConfigDialogImpl : public ConfigDialog diff --git a/src/kcmkommando.cpp b/src/kcmkommando.cpp index 50fb4e4..e3ef742 100644 --- a/src/kcmkommando.cpp +++ b/src/kcmkommando.cpp @@ -33,7 +33,7 @@ static const char description[] = I18N_NOOP("A wheelmenu for KDE powerusers"); -static const char version[] = "0.5.0"; +static const char version[] = "0.5.2"; typedef KGenericFactory<KCMKommando, QWidget> kommandoFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kommando, kommandoFactory("kcmkommando")) diff --git a/src/kommando.cpp b/src/kommando.cpp index 6996d1b..e4abda2 100644 --- a/src/kommando.cpp +++ b/src/kommando.cpp @@ -279,4 +279,17 @@ void Kommando::selectButton( int num ) actMenu->selectButton(num); } +void Kommando::mousePressEvent(QMouseEvent* evt) +{ + middleMouseButtonState = (evt->button() == Qt::MidButton); +} + +void Kommando::mouseReleaseEvent(QMouseEvent* evt) +{ + if(middleMouseButtonState && (evt->button() == Qt::MidButton)){ + middleMouseButtonState = false; + slotNavClick(); + } +} + #include "kommando.moc" diff --git a/src/kommando.h b/src/kommando.h index 65f5849..8d3d629 100644 --- a/src/kommando.h +++ b/src/kommando.h @@ -65,6 +65,7 @@ class Kommando : public QWidget Menu* actMenu; QPtrList<Menu> mTopLevelMenus; RoundButton navbutton; + bool middleMouseButtonState; int oldNavbuttonIconType; //holds whether the icon should be changed KPixmap mScreenshot; @@ -73,7 +74,8 @@ class Kommando : public QWidget virtual void windowActivationChange ( bool oldActive ); virtual void wheelEvent (QWheelEvent * evt); virtual void keyPressEvent(QKeyEvent* evt); - + virtual void mousePressEvent(QMouseEvent* evt); + virtual void mouseReleaseEvent(QMouseEvent* evt); protected slots: virtual void slotOnClick(); |