Improve readability of gvar tab in the simulator

This commit is contained in:
Romolo Manfredini
2015-04-26 18:48:34 +02:00
parent c57dc13d14
commit 1ecbd4fc33
3 changed files with 22 additions and 24 deletions
+6 -12
View File
@@ -1232,7 +1232,7 @@ QPushButton:checked {
</size> </size>
</property> </property>
<property name="currentIndex"> <property name="currentIndex">
<number>2</number> <number>0</number>
</property> </property>
<widget class="QWidget" name="simu"> <widget class="QWidget" name="simu">
<attribute name="title"> <attribute name="title">
@@ -1457,17 +1457,11 @@ QPushButton:checked {
<attribute name="title"> <attribute name="title">
<string>Gvars</string> <string>Gvars</string>
</attribute> </attribute>
<widget class="QWidget" name="gridLayoutWidget"> <layout class="QGridLayout" name="gridLayout_4">
<property name="geometry"> <item row="0" column="0">
<rect> <layout class="QGridLayout" name="gvarsLayout"/>
<x>10</x> </item>
<y>10</y> </layout>
<width>711</width>
<height>211</height>
</rect>
</property>
<layout class="QGridLayout" name="gvarsLayout"/>
</widget>
</widget> </widget>
</widget> </widget>
</item> </item>
@@ -70,7 +70,7 @@
</size> </size>
</property> </property>
<property name="currentIndex"> <property name="currentIndex">
<number>2</number> <number>0</number>
</property> </property>
<widget class="QWidget" name="simu"> <widget class="QWidget" name="simu">
<attribute name="title"> <attribute name="title">
@@ -257,17 +257,11 @@
<attribute name="title"> <attribute name="title">
<string>Gvars</string> <string>Gvars</string>
</attribute> </attribute>
<widget class="QWidget" name="gridLayoutWidget"> <layout class="QGridLayout" name="gridLayout_4">
<property name="geometry"> <item row="0" column="0">
<rect> <layout class="QGridLayout" name="gvarsLayout"/>
<x>10</x> </item>
<y>10</y> </layout>
<width>691</width>
<height>231</height>
</rect>
</property>
<layout class="QGridLayout" name="gvarsLayout"/>
</widget>
</widget> </widget>
</widget> </widget>
</item> </item>
@@ -523,14 +523,24 @@ void SimulatorDialog::initUi(T * ui)
for (int fm=0; fm<fmodes; fm++) { for (int fm=0; fm<fmodes; fm++) {
QLabel * label = new QLabel(tabWidget); QLabel * label = new QLabel(tabWidget);
label->setText(QString("FM%1").arg(fm)); label->setText(QString("FM%1").arg(fm));
label->setAlignment(Qt::AlignCenter);
ui->gvarsLayout->addWidget(label, 0, fm+1); ui->gvarsLayout->addWidget(label, 0, fm+1);
} }
for (int i=0; i<gvars; i++) { for (int i=0; i<gvars; i++) {
QLabel * label = new QLabel(tabWidget); QLabel * label = new QLabel(tabWidget);
label->setText(QString("GV%1").arg(i+1)); label->setText(QString("GV%1").arg(i+1));
label->setAutoFillBackground(true);
if ((i % 2) ==0 ) {
label->setStyleSheet("QLabel { background-color: rgb(220, 220, 220) }");
}
ui->gvarsLayout->addWidget(label, i+1, 0); ui->gvarsLayout->addWidget(label, i+1, 0);
for (int fm=0; fm<fmodes; fm++) { for (int fm=0; fm<fmodes; fm++) {
QLabel * value = new QLabel(tabWidget); QLabel * value = new QLabel(tabWidget);
value->setAutoFillBackground(true);
value->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
if ((i % 2) ==0 ) {
value->setStyleSheet("QLabel { background-color: rgb(220, 220, 220) }");
}
gvarValues << value; gvarValues << value;
ui->gvarsLayout->addWidget(value, i+1, fm+1); ui->gvarsLayout->addWidget(value, i+1, fm+1);
} }