summaryrefslogtreecommitdiffstats
path: root/tests/manual/examples/widgets/touch/fingerpaint/mainwindow.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual/examples/widgets/touch/fingerpaint/mainwindow.h')
-rw-r--r--tests/manual/examples/widgets/touch/fingerpaint/mainwindow.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/tests/manual/examples/widgets/touch/fingerpaint/mainwindow.h b/tests/manual/examples/widgets/touch/fingerpaint/mainwindow.h
new file mode 100644
index 0000000000..a4aac1e36b
--- /dev/null
+++ b/tests/manual/examples/widgets/touch/fingerpaint/mainwindow.h
@@ -0,0 +1,51 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QList>
+#include <QMainWindow>
+
+class ScribbleArea;
+
+//! [0]
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+protected:
+ void closeEvent(QCloseEvent *event) override;
+
+private slots:
+ void open();
+ void save();
+ void about();
+
+private:
+ void createActions();
+ void createMenus();
+ bool maybeSave();
+ bool saveFile(const QByteArray &fileFormat);
+
+ ScribbleArea *scribbleArea;
+
+ QMenu *saveAsMenu;
+ QMenu *fileMenu;
+ QMenu *optionMenu;
+ QMenu *helpMenu;
+
+ QAction *openAct;
+ QList<QAction *> saveAsActs;
+ QAction *exitAct;
+ QAction *printAct;
+ QAction *clearScreenAct;
+ QAction *aboutAct;
+ QAction *aboutQtAct;
+};
+//! [0]
+
+#endif