Mercurial > retraceit
view src/imagelabel.h @ 36:92bb9687d716
(issue12) Count from 1 to max + 1
This is more intutive then counting from zero
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Wed, 06 May 2015 16:10:01 +0200 |
parents | 64a51a42c01f |
children | 26e1521b9afd |
line wrap: on
line source
#ifndef IMAGELABEL_H #define IMAGELABEL_H /* Copyright (C) 2015 by ETH Zürich * Software engineering 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 <QPixmap> #include <QLabel> class ImageLabel : public QWidget { Q_OBJECT public: explicit ImageLabel(QWidget *parent = 0); const QPixmap* pixmap() const; public slots: void setPixmap(const QPixmap&); protected: void resizeEvent(QResizeEvent *); private slots: void resizeImage(); private: QLabel *label; }; #endif // IMAGELABEL_H