32 lines
465 B
C++
32 lines
465 B
C++
|
#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;
|
||
|
}
|