Mercurial > retraceit
view 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 |
line wrap: on
line source
#ifndef PNGPLAYER_H #define PNGPLAYER_H /* Copyright (C) 2014 by Intevation GmbH * * This file is Free Software under the GNU GPL (v>=2) * and comes with ABSOLUTELY NO WARRANTY! * See LICENSE.txt for details. */ #include <QWidget> #include <QDir> #include <QTimer> class QLabel; class PNGPlayer: public QWidget { Q_OBJECT public: PNGPlayer (QWidget * parent = 0, Qt::WindowFlags f = 0); protected: void setupGUI(); public slots: /**@brief show a PNG in the viewer. * * @param fileName: The picture file to show. * @param info: Additional meta data to show with the image. */ void showPicture(const QString& fileName, const QString& info); void setBaseDir(const QString& dirName) { mBaseDir.setPath(dirName); } Q_SIGNALS: /** @brief Emited if something went wrong. e.g. file not readable */ void error(const QString& msg); /** @brief Emited if the player wants to advance to the next picture */ void advance(); protected: QLabel * mPNGLabel; QDir mBaseDir; QTimer mAdvanceTimer; }; #endif // PNGPLAYER_H