mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 19:13:24 +00:00
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>
This commit is contained in:
parent
c301367259
commit
6f7967e0e0
1 changed files with 10 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue