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