comparison src/pngplayer.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
children 248d5d1cdb38
comparison
equal deleted inserted replaced
1:7a2637c3eb83 2:97d2c8869c39
1 #ifndef PNGPLAYER_H
2 #define PNGPLAYER_H
3 /* Copyright (C) 2014 by Intevation GmbH
4 *
5 * This file is Free Software under the GNU GPL (v>=2)
6 * and comes with ABSOLUTELY NO WARRANTY!
7 * See LICENSE.txt for details.
8 */
9 #include <QWidget>
10 #include <QDir>
11 #include <QTimer>
12
13 class QLabel;
14
15 class PNGPlayer: public QWidget
16 {
17 Q_OBJECT
18
19 public:
20 PNGPlayer (QWidget * parent = 0, Qt::WindowFlags f = 0);
21
22 protected:
23 void setupGUI();
24
25 public slots:
26 /**@brief show a PNG in the viewer.
27 *
28 * @param fileName: The picture file to show.
29 * @param info: Additional meta data to show with the image.
30 */
31 void showPicture(const QString& fileName, const QString& info);
32
33 void setBaseDir(const QString& dirName) { mBaseDir.setPath(dirName); }
34
35 Q_SIGNALS:
36 /** @brief Emited if something went wrong. e.g. file not readable */
37 void error(const QString& msg);
38
39 /** @brief Emited if the player wants to advance to the next picture */
40 void advance();
41
42 protected:
43 QLabel * mPNGLabel;
44 QDir mBaseDir;
45 QTimer mAdvanceTimer;
46 };
47
48
49
50 #endif // PNGPLAYER_H
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)