view src/imagelabel.h @ 107:788b5f239571

Be more robust in INSTALL and use different default prefix
author Andre Heinecke <andre.heinecke@intevation.de>
date Thu, 08 Dec 2016 15:22:18 +0100
parents 098a10fc2e83
children
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 QMouseEvent;

/**
 * @class ImageLabel
 * @brief Specialized label to dynamically layout images
 */
class ImageLabel : public QWidget
{
    Q_OBJECT

public:
    explicit ImageLabel(QWidget *parent = 0);
    const QPixmap* pixmap() const;

public slots:
    void setPixmap(const QPixmap&);

Q_SIGNALS:
    void doubleClicked();
    void closeRequested();

protected:
    void resizeEvent(QResizeEvent *);
    void mouseDoubleClickEvent(QMouseEvent * event);
    void closeEvent(QCloseEvent *);

private slots:
    void resizeImage();

private:
    QLabel *label;
};

#endif // IMAGELABEL_H
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)