Commit b4a1add2 authored by Christoffer Ackelman's avatar Christoffer Ackelman

QT: Style change on xtt_block widget.

parent 5de24943
......@@ -123,9 +123,13 @@ void BlockQtWidget::activate_ok()
}
}
BlockQt::~BlockQt()
{
delete wow;
}
void BlockQtWidget::closeEvent(QCloseEvent* event)
{
debug_print("BlockQtWidget::closeEvent\n");
delete block;
QWidget::closeEvent(event);
}
......@@ -148,7 +152,6 @@ BlockQt::BlockQt(void* b_parent_ctx, QWidget* b_parent_wid, pwr_sAttrRef* b_oar,
strcat(title, aname);
toplevel->setToolTip(fl("xtt_block widget"));
toplevel->setMinimumSize(500, 300);
toplevel->setWindowTitle(fl(title));
toplevel->setAttribute(Qt::WA_DeleteOnClose);
......
......@@ -50,6 +50,7 @@ class BlockQt : public Block {
public:
BlockQt(void* b_parent_ctx, QWidget* b_parent_wid, pwr_sAttrRef* b_oar,
char* name, unsigned int priv, pwr_tStatus* status);
~BlockQt();
int execute();
void update();
......
......@@ -660,7 +660,7 @@ void OpQt::update_alarm_info()
}
balarm_label->setText(convert_utf8(text));
modifyBackground(balarm_ebox, yellow_color);
modifyBackground(balarm_box, yellow_color);
balarm_box->setVisible(true);
balarm_mark->setText(fl("B"));
......@@ -696,7 +696,7 @@ void OpQt::update_alarm_info()
info.c_alarm_alias[0], ctext);
}
balarm_label->setText(convert_utf8(text));
modifyBackground(balarm_ebox, blue_color);
modifyBackground(balarm_box, blue_color);
balarm_box->setVisible(true);
balarm_mark->setText(fl("C"));
......@@ -732,7 +732,7 @@ void OpQt::update_alarm_info()
info.d_alarm_alias[0], ctext);
}
balarm_label->setText(convert_utf8(text));
modifyBackground(balarm_ebox, violet_color);
modifyBackground(balarm_box, violet_color);
balarm_box->setVisible(true);
balarm_mark->setText(fl("D"));
......@@ -766,10 +766,10 @@ void OpQt::update_alarm_info()
}
balarm_label->setText(convert_utf8(text));
if (balarm_type == evlist_eEventType_InfoSuccess) {
modifyBackground(balarm_ebox, green_color);
modifyBackground(balarm_box, green_color);
} else {
QColor white = QColor("white");
modifyBackground(balarm_ebox, white);
modifyBackground(balarm_box, white);
}
balarm_box->setVisible(true);
......@@ -787,7 +787,7 @@ void OpQt::update_alarm_info()
}
} else {
balarm_label->setText("");
modifyBackground(balarm_ebox, bg_color);
modifyBackground(balarm_box, bg_color);
balarm_mark->setText("");
balarm_box->setVisible(false);
......
......@@ -79,7 +79,6 @@ public:
QWidget* balarm_active;
QWidget* balarm_info;
QWidget* balarm_box;
QWidget* balarm_ebox;
QLabel* balarm_mark;
QVBoxLayout* appl_form;
QWidget* decr_button;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment