#ifndef CUSTOMBUTTON_H #define CUSTOMBUTTON_H #include #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 PressedHandler; protected: virtual void mouseReleaseEvent ( QMouseEvent * e ) { QAbstractButton::mouseReleaseEvent(e); /* if (ObserverClientModel != NULL) { ObserverClientModel->OnConnectButtonPressed(); }*/ PressedHandler(); } }; #endif // CUSTOMBUTTON_H