summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/configdialogimpl.h2
-rw-r--r--src/kcmkommando.cpp2
-rw-r--r--src/kommando.cpp13
-rw-r--r--src/kommando.h4
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();