[kde-doc-english] [kstars] kstars/oal: Execute: Show informative message if no observers / equipment are listed
Akarsh Simha
akarsh.simha at kdemail.net
Thu Oct 30 02:35:23 UTC 2014
Git commit f8e55e67524a38036d542cf948182db8a0c8973e by Akarsh Simha.
Committed on 30/10/2014 at 02:34.
Pushed by asimha into branch 'master'.
Execute: Show informative message if no observers / equipment are listed
Show an informative message in the execute UI if observers / telescope
are not listed, indicating where it must be listed.
GUI:
M +7 -0 kstars/oal/execute.cpp
M +34 -18 kstars/oal/execute.ui
http://commits.kde.org/kstars/f8e55e67524a38036d542cf948182db8a0c8973e
diff --git a/kstars/oal/execute.cpp b/kstars/oal/execute.cpp
index db27a01..7d49ae5 100644
--- a/kstars/oal/execute.cpp
+++ b/kstars/oal/execute.cpp
@@ -104,6 +104,13 @@ void Execute::init() {
//load Observers
loadObservers();
+ if( logObject->scopeList()->isEmpty() || logObject->observerList()->isEmpty() ) {
+ ui.hintLabel->show();
+ }
+ else {
+ ui.hintLabel->hide();
+ }
+
//set Current Items
loadCurrentItems();
}
diff --git a/kstars/oal/execute.ui b/kstars/oal/execute.ui
index 183dde9..c6628a1 100644
--- a/kstars/oal/execute.ui
+++ b/kstars/oal/execute.ui
@@ -344,14 +344,14 @@
<property name="fieldGrowthPolicy">
<enum>QFormLayout::ExpandingFieldsGrow</enum>
</property>
- <item row="0" column="0">
+ <item row="1" column="0">
<widget class="QLabel" name="label_19">
<property name="text">
<string>Observer</string>
</property>
</widget>
</item>
- <item row="0" column="1">
+ <item row="1" column="1">
<widget class="KComboBox" name="Observer">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
@@ -361,14 +361,14 @@
</property>
</widget>
</item>
- <item row="1" column="0">
+ <item row="2" column="0">
<widget class="QLabel" name="label_11">
<property name="text">
<string>Telescope:</string>
</property>
</widget>
</item>
- <item row="1" column="1">
+ <item row="2" column="1">
<widget class="KComboBox" name="Scope">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
@@ -378,14 +378,14 @@
</property>
</widget>
</item>
- <item row="2" column="0">
+ <item row="3" column="0">
<widget class="QLabel" name="label_12">
<property name="text">
<string>Eyepiece:</string>
</property>
</widget>
</item>
- <item row="2" column="1">
+ <item row="3" column="1">
<widget class="KComboBox" name="Eyepiece">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
@@ -395,14 +395,14 @@
</property>
</widget>
</item>
- <item row="3" column="0">
+ <item row="4" column="0">
<widget class="QLabel" name="label_17">
<property name="text">
<string>Lens:</string>
</property>
</widget>
</item>
- <item row="3" column="1">
+ <item row="4" column="1">
<widget class="KComboBox" name="Lens">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
@@ -412,14 +412,14 @@
</property>
</widget>
</item>
- <item row="4" column="0">
+ <item row="5" column="0">
<widget class="QLabel" name="label_18">
<property name="text">
<string>Filter:</string>
</property>
</widget>
</item>
- <item row="4" column="1">
+ <item row="5" column="1">
<widget class="KComboBox" name="Filter">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
@@ -429,14 +429,14 @@
</property>
</widget>
</item>
- <item row="5" column="0">
+ <item row="6" column="0">
<widget class="QLabel" name="label_14">
<property name="text">
<string>Seeing:</string>
</property>
</widget>
</item>
- <item row="5" column="1">
+ <item row="6" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_11">
<item>
<widget class="KDoubleNumInput" name="Seeing"/>
@@ -450,14 +450,14 @@
</item>
</layout>
</item>
- <item row="6" column="0">
+ <item row="7" column="0">
<widget class="QLabel" name="label_15">
<property name="text">
<string>Faintest Star:</string>
</property>
</widget>
</item>
- <item row="6" column="1">
+ <item row="7" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_7">
<item>
<widget class="KDoubleNumInput" name="FaintestStar"/>
@@ -471,26 +471,42 @@
</item>
</layout>
</item>
- <item row="7" column="0">
+ <item row="8" column="0">
<widget class="QLabel" name="label_16">
<property name="text">
<string>Time:</string>
</property>
</widget>
</item>
- <item row="7" column="1">
+ <item row="8" column="1">
<widget class="QTimeEdit" name="Time"/>
</item>
- <item row="8" column="0">
+ <item row="9" column="0">
<widget class="QLabel" name="label_13">
<property name="text">
<string>Description:</string>
</property>
</widget>
</item>
- <item row="8" column="1">
+ <item row="9" column="1">
<widget class="KTextEdit" name="Description"/>
</item>
+ <item row="0" column="0" colspan="2">
+ <widget class="QLabel" name="hintLabel">
+ <property name="font">
+ <font>
+ <weight>75</weight>
+ <bold>true</bold>
+ </font>
+ </property>
+ <property name="text">
+ <string>Looks like you haven't listed out your observers / equipment. Please hit Ctrl + 0 and Ctrl + 1 to fix this situation and come back here.</string>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
</layout>
</item>
</layout>
More information about the kde-doc-english
mailing list