andre@3: #ifndef IMAGELABEL_H andre@3: #define IMAGELABEL_H andre@25: /* Copyright (C) 2015 by ETH Zürich andre@25: * Software engineering by Intevation GmbH andre@3: * andre@3: * This file is Free Software under the GNU GPL (v>=2) andre@3: * and comes with ABSOLUTELY NO WARRANTY! andre@3: * See LICENSE.txt for details. andre@3: */ andre@3: andre@3: #include andre@3: #include andre@3: #include andre@3: andre@3: class ImageLabel : public QWidget andre@3: { andre@3: Q_OBJECT andre@3: andre@3: public: andre@3: explicit ImageLabel(QWidget *parent = 0); andre@3: const QPixmap* pixmap() const; andre@3: andre@3: public slots: andre@3: void setPixmap(const QPixmap&); andre@3: andre@3: protected: andre@3: void resizeEvent(QResizeEvent *); andre@3: andre@3: private slots: andre@3: void resizeImage(); andre@3: andre@3: private: andre@3: QLabel *label; andre@3: }; andre@3: andre@3: #endif // IMAGELABEL_H