ImageBox.h
Go to the documentation of this file.00001 #ifndef IMAGE_BOX_H
00002 #define IMAGE_BOX_H
00003
00004 #include <iostream.h>
00005 #include <qfileinfo.h>
00006 #include <qlabel.h>
00007 #include <qlayout.h>
00008 #include <qmovie.h>
00009 #include <qpixmap.h>
00010 #include <qpushbutton.h>
00011 #include <qtooltip.h>
00012 #include <qvbox.h>
00013 #include <qvgroupbox.h>
00014 #include <qwidgetstack.h>
00015 #include "Util.h"
00016
00017 class ImageBox : public QVGroupBox {
00018
00019 Q_OBJECT
00020
00021 public:
00022
00023 ImageBox( const QString& title, const QString& hiddenLabel, const QString& hiddenTooltip, QWidget* parent = 0, const char* name = 0 );
00024 ~ImageBox();
00025
00026 void setImage( const QString& path );
00027 bool isImageRevealed() const;
00028 bool containsValidImage() const;
00029
00030 virtual QSize sizeHint() const;
00031 virtual void show();
00032
00033 protected:
00034
00035 virtual void resizeEvent( QResizeEvent* evt );
00036
00037 public slots:
00038
00039 void revealImage();
00040 void hideImage();
00041
00042 private slots:
00043
00044 void restartMovie() const;
00045
00046 private:
00047
00048 int imageWidth;
00049 int imageHeight;
00050
00051 QWidgetStack* imageStack;
00052 QVBox* imageWrapper;
00053 QLabel* image;
00054 QPushButton* imageButton;
00055
00056 };
00057
00058 #endif
00059