annotate src/mainwindow.h @ 113:20ec21924338 tip

Added tag 1.4 for changeset 9daf778feaf1
author Andre Heinecke <andre.heinecke@intevation.de>
date Thu, 08 Dec 2016 15:34:30 +0100
parents 11aaa9214cfb
children
rev   line source
25
64a51a42c01f Assign copyright correctly
Andre Heinecke <andre.heinecke@intevation.de>
parents: 9
diff changeset
1 /* Copyright (C) 2015 by ETH Zürich
64a51a42c01f Assign copyright correctly
Andre Heinecke <andre.heinecke@intevation.de>
parents: 9
diff changeset
2 * Software engineering by Intevation GmbH
0
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
3 *
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
4 * 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
5 * and comes with ABSOLUTELY NO WARRANTY!
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
6 * See LICENSE.txt for details.
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
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
10 /** @file The Main UI class.
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
11 *
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
12 * 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
13 */
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
14 #include <QMainWindow>
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
15 #include <QSettings>
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
16
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
17 class QPushButton;
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
18 class QDropEvent;
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
19 class QDragLeaveEvent;
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
20 class QDragMoveEvent;
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
21 class QDragEnterEvent;
2
97d2c8869c39 First prototype implementation of table view and player
Andre Heinecke <andre.heinecke@intevation.de>
parents: 0
diff changeset
22 class MetaDataView;
97d2c8869c39 First prototype implementation of table view and player
Andre Heinecke <andre.heinecke@intevation.de>
parents: 0
diff changeset
23 class PNGPlayer;
0
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
24
66
098a10fc2e83 Add doxygen files and improve doxygen comments
Andre Heinecke <andre.heinecke@intevation.de>
parents: 44
diff changeset
25 /**
098a10fc2e83 Add doxygen files and improve doxygen comments
Andre Heinecke <andre.heinecke@intevation.de>
parents: 44
diff changeset
26 * @class MainWindow
098a10fc2e83 Add doxygen files and improve doxygen comments
Andre Heinecke <andre.heinecke@intevation.de>
parents: 44
diff changeset
27 * @brief The mainwindow of the application.
098a10fc2e83 Add doxygen files and improve doxygen comments
Andre Heinecke <andre.heinecke@intevation.de>
parents: 44
diff changeset
28 * @details Holds the pngplayer and the metadataview and binds them together.
098a10fc2e83 Add doxygen files and improve doxygen comments
Andre Heinecke <andre.heinecke@intevation.de>
parents: 44
diff changeset
29 */
0
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
30 class MainWindow : public QMainWindow
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
31 {
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
32 Q_OBJECT
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
33
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
34 public:
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
35 MainWindow();
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
36
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
37 protected:
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
38 /** @brief UI setup */
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
39 void setupGUI();
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
40
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
41 /** @brief Cleanup and save the current state */
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
42 virtual void closeEvent(QCloseEvent *event);
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
43
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
44 /** @brief Restores the last window state */
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
45 void readSettings();
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
46
2
97d2c8869c39 First prototype implementation of table view and player
Andre Heinecke <andre.heinecke@intevation.de>
parents: 0
diff changeset
47 /* The drag drop actions
0
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
48 void dragEnterEvent(QDragEnterEvent *event);
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
49 void dragMoveEvent(QDragMoveEvent *event);
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
50 void dragLeaveEvent(QDragLeaveEvent *event);
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
51 void dropEvent(QDropEvent *event);
2
97d2c8869c39 First prototype implementation of table view and player
Andre Heinecke <andre.heinecke@intevation.de>
parents: 0
diff changeset
52 */
32
179239c94740 (issue7-8) Add shortcuts for play/pause and next
Andre Heinecke <andre.heinecke@intevation.de>
parents: 25
diff changeset
53
179239c94740 (issue7-8) Add shortcuts for play/pause and next
Andre Heinecke <andre.heinecke@intevation.de>
parents: 25
diff changeset
54 void setupShortcuts();
179239c94740 (issue7-8) Add shortcuts for play/pause and next
Andre Heinecke <andre.heinecke@intevation.de>
parents: 25
diff changeset
55
0
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
56 public slots:
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
57 /** @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
58 void setFolder(const QString &folder);
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
59
9
e3c8f61e45a9 Implement folderselection dialogs
Andre Heinecke <andre.heinecke@intevation.de>
parents: 5
diff changeset
60 /** @brief set an absolute folder to check for subfolders. */
e3c8f61e45a9 Implement folderselection dialogs
Andre Heinecke <andre.heinecke@intevation.de>
parents: 5
diff changeset
61 void setRootFolder(const QString &folder);
e3c8f61e45a9 Implement folderselection dialogs
Andre Heinecke <andre.heinecke@intevation.de>
parents: 5
diff changeset
62
e3c8f61e45a9 Implement folderselection dialogs
Andre Heinecke <andre.heinecke@intevation.de>
parents: 5
diff changeset
63 public:
e3c8f61e45a9 Implement folderselection dialogs
Andre Heinecke <andre.heinecke@intevation.de>
parents: 5
diff changeset
64 /** @brief start the folder selection and show afterwards. */
e3c8f61e45a9 Implement folderselection dialogs
Andre Heinecke <andre.heinecke@intevation.de>
parents: 5
diff changeset
65 void showWithFolderSelect();
e3c8f61e45a9 Implement folderselection dialogs
Andre Heinecke <andre.heinecke@intevation.de>
parents: 5
diff changeset
66
e3c8f61e45a9 Implement folderselection dialogs
Andre Heinecke <andre.heinecke@intevation.de>
parents: 5
diff changeset
67 /** @brief start the subfolder selection and show afterwards. */
e3c8f61e45a9 Implement folderselection dialogs
Andre Heinecke <andre.heinecke@intevation.de>
parents: 5
diff changeset
68 void showSubFolderSelect();
e3c8f61e45a9 Implement folderselection dialogs
Andre Heinecke <andre.heinecke@intevation.de>
parents: 5
diff changeset
69
0
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
70 protected slots:
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
71 /** @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
72 void showErrorMessage(const QString& errMsg);
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
73
5
107e435cb569 Enable speed slider in pngplayer
Andre Heinecke <andre.heinecke@intevation.de>
parents: 2
diff changeset
74 /** @brief update the status bar for the image.
107e435cb569 Enable speed slider in pngplayer
Andre Heinecke <andre.heinecke@intevation.de>
parents: 2
diff changeset
75 *
107e435cb569 Enable speed slider in pngplayer
Andre Heinecke <andre.heinecke@intevation.de>
parents: 2
diff changeset
76 * Function signature is similar to showPicture in pngviewer
107e435cb569 Enable speed slider in pngplayer
Andre Heinecke <andre.heinecke@intevation.de>
parents: 2
diff changeset
77 */
107e435cb569 Enable speed slider in pngplayer
Andre Heinecke <andre.heinecke@intevation.de>
parents: 2
diff changeset
78 void showPictureNameStatus(const QString& fileName, int current,
44
73e6b6b12412 (issue 1,2) Make the column used for the Timestamp value configurable
Andre Heinecke <andre.heinecke@intevation.de>
parents: 32
diff changeset
79 int max, const QString& timestamp );
5
107e435cb569 Enable speed slider in pngplayer
Andre Heinecke <andre.heinecke@intevation.de>
parents: 2
diff changeset
80
83
11aaa9214cfb Add back to folder selection button
Andre Heinecke <andre.heinecke@intevation.de>
parents: 66
diff changeset
81 /** @brief Go back to the folder seleciton. */
11aaa9214cfb Add back to folder selection button
Andre Heinecke <andre.heinecke@intevation.de>
parents: 66
diff changeset
82 void goBack();
11aaa9214cfb Add back to folder selection button
Andre Heinecke <andre.heinecke@intevation.de>
parents: 66
diff changeset
83
0
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
84 private:
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
85 QSettings mSettings;
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
86
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
87 QString mCurFolder;
9
e3c8f61e45a9 Implement folderselection dialogs
Andre Heinecke <andre.heinecke@intevation.de>
parents: 5
diff changeset
88 QString mRootFolder;
e3c8f61e45a9 Implement folderselection dialogs
Andre Heinecke <andre.heinecke@intevation.de>
parents: 5
diff changeset
89 QString mSubFolder;
2
97d2c8869c39 First prototype implementation of table view and player
Andre Heinecke <andre.heinecke@intevation.de>
parents: 0
diff changeset
90 MetaDataView *mDataView;
97d2c8869c39 First prototype implementation of table view and player
Andre Heinecke <andre.heinecke@intevation.de>
parents: 0
diff changeset
91 PNGPlayer *mPlayer;
0
147b08bc7d64 Initial commit of a basic Application framework.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
92 };
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)