-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapply.cpp
More file actions
24 lines (20 loc) · 707 Bytes
/
Copy pathapply.cpp
File metadata and controls
24 lines (20 loc) · 707 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include "apply.h"
const QString ApplyFunctionSettings::alteredStyle = "background-color:red";
const QString ApplyFunctionSettings::defaultStyle = "background-color:white";
ApplyFunctionSettings::ApplyFunctionSettings(QWidget *parent):
QPushButton(parent) {
somethingChanged = false;
this->setStyleSheet(defaultStyle);
}
ApplyFunctionSettings::~ApplyFunctionSettings() {}
void ApplyFunctionSettings::s_functionAltered(QString &test) {
if(somethingChanged == false) {
somethingChanged = true;
this->setStyleSheet(alteredStyle);
}
}
void ApplyFunctionSettings::mousePressEvent(QMouseEvent *ev) {
somethingChanged = false;
this->setStyleSheet(defaultStyle);
QPushButton::mousePressEvent(ev);
}