Mercurial > retraceit
diff src/imagelabel.h @ 3:248d5d1cdb38
Add functionalty to control buttons and make picture resizable
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Mon, 23 Mar 2015 19:10:01 +0100 |
parents | |
children | 64a51a42c01f |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/imagelabel.h Mon Mar 23 19:10:01 2015 +0100 @@ -0,0 +1,35 @@ +#ifndef IMAGELABEL_H +#define IMAGELABEL_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 <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