summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2023-07-22 23:31:08 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2023-07-22 23:31:08 +0900
commit100a40e71a3f796a93675f9940c42ebe6429740e (patch)
tree7151220871015b8bb28b0a6f11163ca109848888
parent33b26938657c9790eff9389ac23d9eb0205c9378 (diff)
downloadkommando-100a40e7.tar.gz
kommando-100a40e7.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>
-rw-r--r--ChangeLog6
-rw-r--r--src/configdialogimpl.h2
-rw-r--r--src/kcmkommando.cpp2
-rw-r--r--src/kommando.cpp13
-rw-r--r--src/kommando.h4
5 files changed, 24 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index e044dfa..ac92577 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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();