Init
This commit is contained in:
31
checkboxmod.cpp
Normal file
31
checkboxmod.cpp
Normal file
@@ -0,0 +1,31 @@
|
||||
#include "checkboxmod.h"
|
||||
#include <QKeyEvent>
|
||||
|
||||
checkboxmod::checkboxmod(QWidget *parent) :
|
||||
QCheckBox(parent)
|
||||
{
|
||||
F11disabled = false;
|
||||
}
|
||||
|
||||
void checkboxmod::keyPressEvent(QKeyEvent *e)
|
||||
{
|
||||
|
||||
int c = e->key();
|
||||
|
||||
if ((c==Qt::Key_F11)&& !F11disabled)
|
||||
{
|
||||
this->animateClick();
|
||||
}
|
||||
|
||||
QCheckBox::keyPressEvent(e);
|
||||
}
|
||||
|
||||
bool checkboxmod::isF11disabled()
|
||||
{
|
||||
return F11disabled;
|
||||
}
|
||||
|
||||
void checkboxmod::setF11disabled(bool fl)
|
||||
{
|
||||
F11disabled = fl;
|
||||
}
|
||||
Reference in New Issue
Block a user