summaryrefslogtreecommitdiffstats
path: root/src/gui/softkeys
diff options
context:
space:
mode:
authorMarkku Luukkainen <markku.luukkainen@digia.com>2009-05-18 11:54:32 (GMT)
committerMarkku Luukkainen <markku.luukkainen@digia.com>2009-05-18 11:54:32 (GMT)
commit906c9646b448aeaaeba89bf66e9fc4ce2bb305c9 (patch)
tree059e65f8f2f05ea91a416c891eaab4955a409161 /src/gui/softkeys
parentbfe64f383c418b37a71ad2b395dc207d47916a90 (diff)
downloadQt-906c9646b448aeaaeba89bf66e9fc4ce2bb305c9.zip
Qt-906c9646b448aeaaeba89bf66e9fc4ce2bb305c9.tar.gz
Qt-906c9646b448aeaaeba89bf66e9fc4ce2bb305c9.tar.bz2
Catch actions coming from context sensitive menu items
Diffstat (limited to 'src/gui/softkeys')
-rw-r--r--src/gui/softkeys/main.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gui/softkeys/main.cpp b/src/gui/softkeys/main.cpp
index e89c737..6adbb2d 100644
--- a/src/gui/softkeys/main.cpp
+++ b/src/gui/softkeys/main.cpp
@@ -15,6 +15,12 @@ class MainWindow : public QMainWindow
{
Q_OBJECT
public:
+
+private slots:
+ void context1Slot();
+ void context3Slot();
+public:
+
MainWindow(QWidget *parent = 0);
~MainWindow();
QMenu *contextMenu;
@@ -54,6 +60,8 @@ MainWindow::MainWindow(QWidget *parent)
context2->setMenu(contextMenu);
contextMenu->addAction(context3);
+ connect(context1, SIGNAL(triggered()), this, SLOT(context1Slot()));
+ connect(context3, SIGNAL(triggered()), this, SLOT(context3Slot()));
action1 = new QSoftKeyAction(QSoftKeyAction::Ok, QString("Ok"), central);
action2 = new QSoftKeyAction(QSoftKeyAction::Back, QString("Back"), central);
action3 = new QSoftKeyAction(QSoftKeyAction::Cancel, QString("Cancel"), central);
@@ -91,6 +99,13 @@ MainWindow::~MainWindow()
delete contextMenu;
}
+void MainWindow::context1Slot()
+ {
+ }
+void MainWindow::context3Slot()
+ {
+ }
+
int main(int argc, char *argv[])
{
QApplication app(argc, argv);