2014-07-10 09:03:55 +00:00
|
|
|
#ifndef CSV_WIDGET_PUSHBUTTON_H
|
|
|
|
#define CSV_WIDGET_PUSHBUTTON_H
|
|
|
|
|
|
|
|
#include <QPushButton>
|
|
|
|
|
|
|
|
namespace CSVWidget
|
|
|
|
{
|
|
|
|
class PushButton : public QPushButton
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
bool mKeepOpen;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
virtual void keyPressEvent (QKeyEvent *event);
|
|
|
|
|
2014-07-10 09:32:20 +00:00
|
|
|
virtual void keyReleaseEvent (QKeyEvent *event);
|
|
|
|
|
2014-07-10 09:03:55 +00:00
|
|
|
virtual void mouseReleaseEvent (QMouseEvent *event);
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
2014-07-10 09:44:01 +00:00
|
|
|
/// \param push Do not maintain a toggle state
|
|
|
|
PushButton (const QIcon& icon, bool push = false, QWidget *parent = 0);
|
|
|
|
|
|
|
|
/// \param push Do not maintain a toggle state
|
|
|
|
PushButton (bool push = false, QWidget *parent = 0);
|
2014-07-10 09:03:55 +00:00
|
|
|
|
|
|
|
bool hasKeepOpen() const;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|