annotate src/mainwindow.h @ 2:97d2c8869c39

First prototype implementation of table view and player
author Andre Heinecke <andre.heinecke@intevation.de>
date Mon, 23 Mar 2015 16:34:42 +0100
parents 147b08bc7d64
children 107e435cb569
rev   line source
0
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
1 /* Copyright (C) 2014 by Intevation GmbH
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
2 *
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
3 * This file is Free Software under the GNU GPL (v>=2)
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
4 * and comes with ABSOLUTELY NO WARRANTY!
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
5 * See LICENSE.txt for details.
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
6 */
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
7
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
8
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
9 /** @file The Main UI class.
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
10 *
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
11 * Parent class of all dialogs and graphical user interaction.
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
12 */
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
13 #include <QMainWindow>
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
14 #include <QSettings>
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
15
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
16 class QPushButton;
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
17 class QDropEvent;
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
18 class QDragLeaveEvent;
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
19 class QDragMoveEvent;
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
20 class QDragEnterEvent;
2
97d2c8869c39 First prototype implementation of table view and player
Andre Heinecke <andre.heinecke@intevation.de>
parents: 0
diff changeset
21 class MetaDataView;
97d2c8869c39 First prototype implementation of table view and player
Andre Heinecke <andre.heinecke@intevation.de>
parents: 0
diff changeset
22 class PNGPlayer;
0
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
23
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
24 class MainWindow : public QMainWindow
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
25 {
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
26 Q_OBJECT
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
27
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
28 public:
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
29 MainWindow();
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
30
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
31 protected:
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
32 /** @brief UI setup */
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
33 void setupGUI();
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
34
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
35 /** @brief Cleanup and save the current state */
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
36 virtual void closeEvent(QCloseEvent *event);
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
37
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
38 /** @brief Restores the last window state */
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
39 void readSettings();
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
40
2
97d2c8869c39 First prototype implementation of table view and player
Andre Heinecke <andre.heinecke@intevation.de>
parents: 0
diff changeset
41 /* The drag drop actions
0
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
42 void dragEnterEvent(QDragEnterEvent *event);
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
43 void dragMoveEvent(QDragMoveEvent *event);
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
44 void dragLeaveEvent(QDragLeaveEvent *event);
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
45 void dropEvent(QDropEvent *event);
2
97d2c8869c39 First prototype implementation of table view and player
Andre Heinecke <andre.heinecke@intevation.de>
parents: 0
diff changeset
46 */
0
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
47 public slots:
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
48 /** @brief set an absolute folder to read a metadata.csv from. */
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
49 void setFolder(const QString &folder);
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
50
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
51 protected slots:
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
52 /** @brief Show an error dialog to the user. */
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
53 void showErrorMessage(const QString& errMsg);
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
54
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
55 private:
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
56 QSettings mSettings;
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
57
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
58 QString mCurFolder;
2
97d2c8869c39 First prototype implementation of table view and player
Andre Heinecke <andre.heinecke@intevation.de>
parents: 0
diff changeset
59 MetaDataView *mDataView;
97d2c8869c39 First prototype implementation of table view and player
Andre Heinecke <andre.heinecke@intevation.de>
parents: 0
diff changeset
60 PNGPlayer *mPlayer;
0
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
61 };
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)