aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2014-01-15 13:04:01 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-01-16 10:12:30 +0700
commit6f7967e0e0e37926ff2e7fcc31f615567f31286d (patch)
tree0020df0b7f9e8a3794cbc049fd05d9da49305691 /qt-ui
parentc301367259ba46c8603d391b1ec7e489e06aa7de (diff)
downloadsubsurface-6f7967e0e0e37926ff2e7fcc31f615567f31286d.tar.gz
Added a Context menu so we can test the state switching.
The context menu added here should only be temporary, it's an easy and simple way to test the transitions of the items on screen. They seem a bit broken atm, I'll try to fix that. :) Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/profile/profilewidget2.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp
index f052c88c8..e2c2b96aa 100644
--- a/qt-ui/profile/profilewidget2.cpp
+++ b/qt-ui/profile/profilewidget2.cpp
@@ -9,6 +9,8 @@
#include <QStateMachine>
#include <QSignalTransition>
#include <QPropertyAnimation>
+#include <QMenu>
+#include <QContextMenuEvent>
ProfileWidget2::ProfileWidget2(QWidget *parent) :
QGraphicsView(parent),
@@ -216,7 +218,14 @@ void ProfileWidget2::settingsChanged()
void ProfileWidget2::contextMenuEvent(QContextMenuEvent* event)
{
-
+ // this menu should be completely replaced when things are working.
+ QMenu m;
+ m.addAction("Set Empty", this, SIGNAL(startEmptyState()));
+ m.addAction("Set Profile", this, SIGNAL(startProfileState()));
+ m.addAction("Set Add", this, SIGNAL(startAddState()));
+ m.addAction("Set Edit", this, SIGNAL(startEditState()));
+ m.addAction("Set Plan", this, SIGNAL(startPlanState()));
+ m.exec(event->globalPos());
}
void ProfileWidget2::resizeEvent(QResizeEvent* event)