| 1 |
#ifndef _AEROBUTTON_H_ |
| 2 |
#define _AEROBUTTON_H_ |
| 3 |
|
| 4 |
#include <QPushButton> |
| 5 |
|
| 6 |
namespace SIF { |
| 7 |
|
| 8 |
class AeroButton : public QPushButton |
| 9 |
{ |
| 10 |
Q_OBJECT |
| 11 |
|
| 12 |
public: |
| 13 |
AeroButton(QWidget * parent = 0); |
| 14 |
AeroButton(const QString & text, QWidget * parent = 0); |
| 15 |
AeroButton(const QIcon & icon, const QString & text, QWidget * parent = 0); |
| 16 |
|
| 17 |
~AeroButton(); |
| 18 |
|
| 19 |
void setColor(const QColor &color); |
| 20 |
void setHighlight(const QColor &highlight); |
| 21 |
void setShadow(const QColor &shadow); |
| 22 |
|
| 23 |
|
| 24 |
void setOpacity(qreal opacity); |
| 25 |
|
| 26 |
|
| 27 |
void setRoundness(int roundness); |
| 28 |
|
| 29 |
protected: |
| 30 |
virtual void paintEvent(QPaintEvent * pe); |
| 31 |
|
| 32 |
virtual void enterEvent(QEvent * e); |
| 33 |
virtual void leaveEvent(QEvent * e); |
| 34 |
|
| 35 |
virtual void mousePressEvent(QMouseEvent * e); |
| 36 |
virtual void mouseReleaseEvent(QMouseEvent * e); |
| 37 |
|
| 38 |
private: |
| 39 |
struct Private; |
| 40 |
Private *const d; |
| 41 |
}; |
| 42 |
|
| 43 |
} |
| 44 |
|
| 45 |
#endif // _AEROBUTTON_H_ |