38 lines
641 B
C++
38 lines
641 B
C++
#ifndef CUSTOMBUTTON_H
|
|
#define CUSTOMBUTTON_H
|
|
|
|
#include <QtGui/QtGui>
|
|
|
|
#include "observerclientmodel.h"
|
|
|
|
class TCustomButton : public QPushButton
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
|
|
explicit TCustomButton(QWidget *parent=0)
|
|
: QPushButton(parent)
|
|
{
|
|
}
|
|
|
|
explicit TCustomButton(const QString &text, QWidget *parent=0)
|
|
: QPushButton(text, parent)
|
|
{
|
|
}
|
|
|
|
boost::function<void()> PressedHandler;
|
|
|
|
protected:
|
|
|
|
virtual void mouseReleaseEvent ( QMouseEvent * e )
|
|
{
|
|
QAbstractButton::mouseReleaseEvent(e);
|
|
|
|
PressedHandler();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
#endif // CUSTOMBUTTON_H
|