tahoma2d/toonz/sources/include/toonzqt/checkbox.h

52 lines
1 KiB
C
Raw Normal View History

2016-03-19 06:57:51 +13:00
#ifndef CHECKBOX_H
#define CHECKBOX_H
#include "tcommon.h"
#include <QCheckBox>
#undef DVAPI
#undef DVVAR
#ifdef TOONZQT_EXPORTS
#define DVAPI DV_EXPORT_API
#define DVVAR DV_EXPORT_VAR
#else
#define DVAPI DV_IMPORT_API
#define DVVAR DV_IMPORT_VAR
#endif
//=============================================================================
namespace DVGui
{
//=============================================================================
/*! \brief It's a \b QCheckBox that change state also with click in text.
Inherits \b QCheckBox.
*/
class DVAPI CheckBox : public QCheckBox
{
Q_OBJECT
public:
CheckBox(QWidget *parent = 0);
CheckBox(const QString &text, QWidget *parent = 0);
~CheckBox() {}
protected:
void mousePressEvent(QMouseEvent *e);
void mouseReleaseEvent(QMouseEvent *e);
void mouseMoveEvent(QMouseEvent *);
};
//-----------------------------------------------------------------------------
} //namespace DVGui
//-----------------------------------------------------------------------------
#endif // CHECKBOX_H