PrismLauncher/launcher/ui/widgets/IconLabel.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

26 lines
515 B
C
Raw Normal View History

2014-05-17 15:23:48 +01:00
#pragma once
#include <QIcon>
#include <QWidget>
2014-05-17 15:23:48 +01:00
class QStyleOption;
/**
* This is a trivial widget that paints a QIcon of the specified size.
*/
class IconLabel : public QWidget {
2014-05-17 15:23:48 +01:00
Q_OBJECT
public:
2014-05-17 15:23:48 +01:00
/// Create a line separator. orientation is the orientation of the line.
explicit IconLabel(QWidget* parent, QIcon icon, QSize size);
2014-05-17 15:23:48 +01:00
virtual QSize sizeHint() const;
virtual void paintEvent(QPaintEvent*);
2014-05-17 15:23:48 +01:00
void setIcon(QIcon icon);
private:
2014-05-17 15:23:48 +01:00
QSize m_size;
QIcon m_icon;
};