Skip to content

Commit

Permalink
Few cosmetic fixes for GUI
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-w committed Sep 17, 2020
1 parent 7019193 commit 6fd7ebc
Show file tree
Hide file tree
Showing 11 changed files with 615 additions and 591 deletions.
2 changes: 2 additions & 0 deletions plugins/Exoplanets/src/gui/ExoplanetsDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ void ExoplanetsDialog::setAboutHtml(void)
ui->aboutTextBrowser->document()->setDefaultStyleSheet(htmlStyleSheet);
}
ui->aboutTextBrowser->setHtml(html);
// TRANSLATORS: duration
ui->updateFrequencySpinBox->setSuffix(qc_(" h","time unit"));
}

void ExoplanetsDialog::setInfoHtml(void)
Expand Down
3 changes: 0 additions & 3 deletions plugins/Exoplanets/src/gui/exoplanetsDialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,6 @@
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="suffix">
<string comment="time unit" extracomment="TRANSLATORS: = &quot;hours&quot;"> h</string>
</property>
<property name="minimum">
<number>1</number>
</property>
Expand Down
2 changes: 2 additions & 0 deletions plugins/MeteorShowers/src/gui/MSConfigDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -326,4 +326,6 @@ void MSConfigDialog::setAboutHtml()
html += "</ul></p></body></html>";

m_ui->about->setHtml(html);
// TRANSLATORS: duration
m_ui->updateFrequency->setSuffix(qc_(" h","time unit"));
}
76 changes: 45 additions & 31 deletions plugins/MeteorShowers/src/gui/MSConfigDialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -485,8 +485,28 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout_12">
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="2">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="lUpdateFrequency">
<property name="text">
<string>Update frequency:</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QSpinBox" name="updateFrequency">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
Expand All @@ -497,9 +517,6 @@
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="suffix">
<string comment="time unit" extracomment="TRANSLATORS: = &quot;hours&quot;"> h</string>
</property>
<property name="minimum">
<number>1</number>
</property>
Expand All @@ -511,38 +528,19 @@
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QDateTimeEdit" name="nextUpdate">
<property name="enabled">
<bool>false</bool>
</property>
<property name="frame">
<bool>false</bool>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buttonSymbols">
<enum>QAbstractSpinBox::NoButtons</enum>
</property>
</widget>
</item>
<item row="2" column="0">
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="lNextUpdate">
<property name="text">
<string>Next update:</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="lUpdateFrequency">
<property name="text">
<string>Update frequency:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<spacer name="horizontalSpacer">
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
Expand All @@ -554,6 +552,22 @@
</property>
</spacer>
</item>
<item>
<widget class="QDateTimeEdit" name="nextUpdate">
<property name="enabled">
<bool>false</bool>
</property>
<property name="frame">
<bool>false</bool>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buttonSymbols">
<enum>QAbstractSpinBox::NoButtons</enum>
</property>
</widget>
</item>
</layout>
</item>
</layout>
Expand Down
7 changes: 6 additions & 1 deletion plugins/Oculars/src/gui/OcularDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,6 @@ void OcularDialog::createDialogContent()
enableKineticScrolling(gui->getFlagUseKineticScrolling());
connect(gui, SIGNAL(flagUseKineticScrollingChanged(bool)), this, SLOT(enableKineticScrolling(bool)));
}


//Now the rest of the actions.
connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close()));
Expand Down Expand Up @@ -469,6 +468,12 @@ void OcularDialog::createDialogContent()
connect(ui->checkBoxShowFocuserOverlay, SIGNAL(toggled(bool)), this, SLOT(updateGuiOptions()));
connect(ui->checkBoxShowCcdCropOverlay, SIGNAL(toggled(bool)), this, SLOT(updateGuiOptions()));
updateGuiOptions();

// add degree char into input boxes of FOV for Telrad
ui->doubleSpinBoxTelradFOV1->setSuffix(QChar(0x00B0));
ui->doubleSpinBoxTelradFOV2->setSuffix(QChar(0x00B0));
ui->doubleSpinBoxTelradFOV3->setSuffix(QChar(0x00B0));
ui->doubleSpinBoxTelradFOV4->setSuffix(QChar(0x00B0));
}

void OcularDialog::setupTelradFOVspins(Vec4f fov)
Expand Down
18 changes: 9 additions & 9 deletions plugins/Oculars/src/gui/ocularDialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>722</width>
<width>792</width>
<height>619</height>
</rect>
</property>
Expand Down Expand Up @@ -841,12 +841,12 @@
<widget class="QDoubleSpinBox" name="doubleSpinBoxTelradFOV1">
<property name="maximumSize">
<size>
<width>75</width>
<width>80</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string>FOV for circle 1 in degrees</string>
<string>FOV for circle 1</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
Expand Down Expand Up @@ -875,12 +875,12 @@
</property>
<property name="maximumSize">
<size>
<width>75</width>
<width>80</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string>FOV for circle 2 in degrees</string>
<string>FOV for circle 2</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
Expand Down Expand Up @@ -909,12 +909,12 @@
</property>
<property name="maximumSize">
<size>
<width>75</width>
<width>80</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string>FOV for circle 3 in degrees</string>
<string>FOV for circle 3</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
Expand Down Expand Up @@ -943,12 +943,12 @@
</property>
<property name="maximumSize">
<size>
<width>75</width>
<width>80</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string>FOV for circle 4 in degrees</string>
<string>FOV for circle 4</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
Expand Down
6 changes: 6 additions & 0 deletions plugins/Satellites/src/gui/SatellitesDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1009,6 +1009,12 @@ void SatellitesDialog::populateInfo()
ui->labelRCS->setText(QString("%1, %2<sup>2</sup>:").arg(q_("RCS"), qc_("m","distance")));
ui->labelRCS->setToolTip(QString("<p>%1</p>").arg(q_("Radar cross-section (RCS) is a measure of how detectable an object is with a radar. A larger RCS indicates that an object is more easily detected.")));
ui->labelStdMagnitude->setToolTip(QString("<p>%1</p>").arg(q_("The standard magnitude of a satellite is defined as its apparent magnitude when at half-phase and at a distance 1000 km from the observer.")));
// TRANSLATORS: duration
ui->orbitDurationSpin->setSuffix(qc_(" s","time unit"));
// TRANSLATORS: duration
ui->labelSegmentLength->setText(q_("Segment length:"));
// TRANSLATORS: duration
ui->updateFrequencySpinBox->setSuffix(qc_(" h","time unit"));
}

void SatellitesDialog::populateSourcesList()
Expand Down
10 changes: 2 additions & 8 deletions plugins/Satellites/src/gui/satellitesDialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,6 @@
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="suffix">
<string comment="time unit"> h</string>
</property>
<property name="minimum">
<number>1</number>
</property>
Expand Down Expand Up @@ -547,9 +544,6 @@
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="suffix">
<string comment="time unit"> s</string>
</property>
<property name="minimum">
<number>1</number>
</property>
Expand Down Expand Up @@ -581,12 +575,12 @@
</widget>
</item>
<item row="0" column="3">
<widget class="QLabel" name="label_8">
<widget class="QLabel" name="labelSegmentLength">
<property name="toolTip">
<string>Duration of a single segment</string>
</property>
<property name="text">
<string extracomment="TRANSLATORS: = &quot;duration&quot;">Segment length:</string>
<string>Segment length:</string>
</property>
</widget>
</item>
Expand Down
2 changes: 1 addition & 1 deletion po/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ MACRO(GETTEXT_CREATE_TRANSLATIONS _domain _firstLang)
# "translations" targets.
ADD_CUSTOM_TARGET(translations-${_domain} ${_addToAll} DEPENDS ${_gmoFiles})
ADD_DEPENDENCIES(translations translations-${_domain})
SET_TARGET_PROPERTIES(translations-${_domain} PROPERTIES FOLDER "po")
SET_TARGET_PROPERTIES(translations-${_domain} PROPERTIES FOLDER "po")

ENDMACRO(GETTEXT_CREATE_TRANSLATIONS )

Expand Down
Loading

0 comments on commit 6fd7ebc

Please sign in to comment.