equal
deleted
inserted
replaced
17 */ |
17 */ |
18 |
18 |
19 #ifndef _SQUARELABEL_H |
19 #ifndef _SQUARELABEL_H |
20 #define _SQUARELABEL_H |
20 #define _SQUARELABEL_H |
21 |
21 |
22 #include <QLabel> |
22 #include <QWidget> |
|
23 #include <QPixmap> |
23 |
24 |
24 class SquareLabel : public QLabel |
25 class SquareLabel : public QWidget |
25 { |
26 { |
26 Q_OBJECT |
27 Q_OBJECT |
27 |
28 |
28 public: |
29 public: |
29 SquareLabel(QWidget * parent = 0); |
30 SquareLabel(QWidget * parent = 0); |
30 |
31 |
|
32 void setPixmap(const QPixmap & pixmap); |
31 protected: |
33 protected: |
32 virtual void paintEvent(QPaintEvent * event); |
34 virtual void paintEvent(QPaintEvent * event); |
|
35 |
|
36 private: |
|
37 QPixmap pixmap; |
|
38 |
33 }; |
39 }; |
34 |
40 |
35 #endif // _SQUARELABEL_H |
41 #endif // _SQUARELABEL_H |