diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-07-22 23:31:08 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-07-22 23:31:08 +0900 |
commit | 100a40e71a3f796a93675f9940c42ebe6429740e (patch) | |
tree | 7151220871015b8bb28b0a6f11163ca109848888 /src | |
parent | 33b26938657c9790eff9389ac23d9eb0205c9378 (diff) | |
download | kommando-100a40e71a3f796a93675f9940c42ebe6429740e.tar.gz kommando-100a40e71a3f796a93675f9940c42ebe6429740e.zip |
Updated to version 0.5.2 from https://store.kde.org/p/1081202. Code available under GPL2 license
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'src')
-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 |
4 files changed, 18 insertions, 3 deletions
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(); |