mirror of
https://github.com/lostjared/Acid.Cam.v2.Qt.git
synced 2025-12-18 21:00:13 +01:00
working on enable/disable keys
This commit is contained in:
@@ -110,6 +110,7 @@ void ChromaWindow::createControls() {
|
||||
connect(color_okay, SIGNAL(clicked()), this, SLOT(colorSet()));
|
||||
connect(lowButton, SIGNAL(clicked()), this, SLOT(setColorLow()));
|
||||
connect(highButton, SIGNAL(clicked()), this, SLOT(setColorHigh()));
|
||||
connect(keys_enabled, SIGNAL(clicked()), this, SLOT(toggleKey()));
|
||||
}
|
||||
|
||||
|
||||
@@ -251,3 +252,20 @@ void ChromaWindow::setColorHigh() {
|
||||
}
|
||||
}
|
||||
|
||||
void ChromaWindow::enableKey(bool op) {
|
||||
if(op) {
|
||||
if(colorkeys_vec.size()==0) {
|
||||
QMessageBox::information(this, "Needs a Key", "Please set a key to enable this feature");
|
||||
keys_enabled->setChecked(false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ChromaWindow::toggleKey() {
|
||||
if(keys_enabled->isChecked()) {
|
||||
enableKey(true);
|
||||
} else {
|
||||
enableKey(false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user