48 lines
829 B
C
48 lines
829 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)
|
||
|
{
|
||
|
}
|
||
|
|
||
|
|
||
|
//TObserverClientModel* ObserverClientModel;
|
||
|
|
||
|
boost::function<void()> PressedHandler;
|
||
|
|
||
|
protected:
|
||
|
|
||
|
virtual void mouseReleaseEvent ( QMouseEvent * e )
|
||
|
{
|
||
|
QAbstractButton::mouseReleaseEvent(e);
|
||
|
/*
|
||
|
if (ObserverClientModel != NULL)
|
||
|
{
|
||
|
ObserverClientModel->OnConnectButtonPressed();
|
||
|
}*/
|
||
|
|
||
|
PressedHandler();
|
||
|
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
};
|
||
|
|
||
|
#endif // CUSTOMBUTTON_H
|