Use dialog instead of popup menu.
[yandex-traffic] / menudialog.hpp
diff --git a/menudialog.hpp b/menudialog.hpp
new file mode 100644 (file)
index 0000000..be9878d
--- /dev/null
@@ -0,0 +1,24 @@
+#ifndef __MENUDIALOG_H__
+#define __MENUDIALOG_H__
+
+#include <QtGui>
+
+
+class MenuDialog : public QDialog
+{
+    Q_OBJECT
+private:
+    QList<QPushButton*> _buttons;
+    QBoxLayout* _layout;
+    int index;
+
+protected slots:
+    void buttonClicked ();
+
+public:
+    MenuDialog (const QString &title);
+    MenuDialog& addEntry (const QString &text);
+    int run ();
+};
+
+#endif // __MENUDIALOG_H__