|
|
|
@ -11,11 +11,13 @@ SlugsPIDControl::SlugsPIDControl(QWidget *parent) :
@@ -11,11 +11,13 @@ SlugsPIDControl::SlugsPIDControl(QWidget *parent) :
|
|
|
|
|
ui(new Ui::SlugsPIDControl) |
|
|
|
|
{ |
|
|
|
|
ui->setupUi(this); |
|
|
|
|
setRedColorStyle(); |
|
|
|
|
// setGreenColorStyle();
|
|
|
|
|
|
|
|
|
|
//ORIGINcolorStyle = ui->AirSpeedHold_groupBox->styleSheet();
|
|
|
|
|
//connectButtons();
|
|
|
|
|
|
|
|
|
|
//this call functions is only an example to view the color in the groupBox
|
|
|
|
|
changeRedColor(ui->AirSpeedHold_groupBox); |
|
|
|
|
changeGreenColor(ui->HeightErrorLoPitch_groupBox); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
SlugsPIDControl::~SlugsPIDControl() |
|
|
|
@ -27,42 +29,37 @@ SlugsPIDControl::~SlugsPIDControl()
@@ -27,42 +29,37 @@ SlugsPIDControl::~SlugsPIDControl()
|
|
|
|
|
* Set the background color RED of the GroupBox PID based on the send Slugs PID message |
|
|
|
|
* |
|
|
|
|
*/ |
|
|
|
|
void SlugsPIDControl::changeRedColor(QGroupBox *group) |
|
|
|
|
void SlugsPIDControl::setRedColorStyle() |
|
|
|
|
{ |
|
|
|
|
// GroupBox Color
|
|
|
|
|
QColor groupColor = QColor(231,72,28); |
|
|
|
|
QString colorstyle; |
|
|
|
|
QString borderColor = "#FA4A4F"; //"#4A4A4F";
|
|
|
|
|
|
|
|
|
|
QString borderColor = "#FA4A4F"; |
|
|
|
|
|
|
|
|
|
groupColor = groupColor.darker(475); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
colorstyle = colorstyle.sprintf("QGroupBox {background-color: #%02X%02X%02X; border: 5px solid %s; }", |
|
|
|
|
REDcolorStyle = REDcolorStyle.sprintf("QGroupBox {background-color: #%02X%02X%02X; border: 5px solid %s; }", |
|
|
|
|
groupColor.red(), groupColor.green(), groupColor.blue(), borderColor.toStdString().c_str()); |
|
|
|
|
|
|
|
|
|
group->setStyleSheet(colorstyle); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Set the background color GREEN of the GroupBox PID based on the send Slugs PID message |
|
|
|
|
* |
|
|
|
|
*/ |
|
|
|
|
void SlugsPIDControl::changeGreenColor(QGroupBox *group) |
|
|
|
|
void SlugsPIDControl::setGreenColorStyle() |
|
|
|
|
{ |
|
|
|
|
// GroupBox Color
|
|
|
|
|
// create Green color style
|
|
|
|
|
QColor groupColor = QColor(30,124,16); |
|
|
|
|
QString colorstyle; |
|
|
|
|
QString borderColor = "#24AC23"; |
|
|
|
|
|
|
|
|
|
groupColor = groupColor.darker(475); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
colorstyle = colorstyle.sprintf("QGroupBox {background-color: #%02X%02X%02X; border: 5px solid %s; }", |
|
|
|
|
GREENcolorStyle = GREENcolorStyle.sprintf("QGroupBox {background-color: #%02X%02X%02X; border: 5px solid %s; }", |
|
|
|
|
groupColor.red(), groupColor.green(), groupColor.blue(), borderColor.toStdString().c_str()); |
|
|
|
|
|
|
|
|
|
group->setStyleSheet(colorstyle); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -75,4 +72,15 @@ void SlugsPIDControl::connectButtons()
@@ -75,4 +72,15 @@ void SlugsPIDControl::connectButtons()
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void SlugsPIDControl::connect_AirSpeed_LineEdit() |
|
|
|
|
{ |
|
|
|
|
connect(ui->dT_P_set,SIGNAL(editingFinished()),this, SLOT(changeColor_AirSpeed_groupBox())); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void SlugsPIDControl::changeColor_AirSpeed_groupBox() |
|
|
|
|
{ |
|
|
|
|
ui->AirSpeedHold_groupBox->setStyleSheet(REDcolorStyle); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|