1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 15:35:23 +00:00
OpenMW/apps/opencs/view/widget/pushbutton.hpp

42 lines
963 B
C++
Raw Normal View History

2014-07-10 11:03:55 +02:00
#ifndef CSV_WIDGET_PUSHBUTTON_H
#define CSV_WIDGET_PUSHBUTTON_H
#include <QPushButton>
namespace CSVWidget
{
class PushButton : public QPushButton
{
Q_OBJECT
bool mKeepOpen;
2014-07-10 12:53:57 +02:00
bool mPush;
private:
void setExtendedToolTip (const std::string& text);
2014-07-10 11:03:55 +02:00
protected:
virtual void keyPressEvent (QKeyEvent *event);
virtual void keyReleaseEvent (QKeyEvent *event);
2014-07-10 11:03:55 +02:00
virtual void mouseReleaseEvent (QMouseEvent *event);
public:
/// \param push Do not maintain a toggle state
2014-07-10 12:53:57 +02:00
PushButton (const QIcon& icon, bool push = false, const std::string& tooltip = "",
QWidget *parent = 0);
/// \param push Do not maintain a toggle state
2014-07-10 12:53:57 +02:00
PushButton (bool push = false, const std::string& tooltip = "",
QWidget *parent = 0);
2014-07-10 11:03:55 +02:00
bool hasKeepOpen() const;
};
}
#endif