[Kstars-devel] branches/kstars/summer/kstars/kstars/comast

Prakash Mohan prak902000 at gmail.com
Wed Jul 29 23:34:58 CEST 2009


SVN commit 1004339 by prakash:

Adding data fields to the target select page to display the properties of th target.

CCMAIL: kstars-devel at kde.org


 M  +12 -0     execute.cpp  
 M  +103 -2    execute.ui  


--- branches/kstars/summer/kstars/kstars/comast/execute.cpp #1004338:1004339
@@ -257,6 +257,18 @@
         ui.NextButton->setEnabled( true );
         ks->observingList()->selectObject( currentTarget );
         ks->observingList()->slotCenterObject();
+        QString smag = "--";
+        if (  - 30.0 < currentTarget->mag() && currentTarget->mag() < 90.0 ) smag = QString::number( currentTarget->mag(), 'g', 2 ); // The lower limit to avoid display of unrealistic comet magnitudes
+        ui.Mag->setText( smag );
+        ui.Type->setText( currentTarget->typeName() );
+        ui.SchTime->setText( ks->observingList()->scheduledTime(currentTarget).toString( "h:mm:ss AP" ) ) ;
+        SkyPoint p = currentTarget->recomputeCoords( KStarsDateTime::currentDateTime() , geo );
+        dms lst(geo->GSTtoLST( KStarsDateTime::currentDateTime().gst() ));
+        p.EquatorialToHorizontal( &lst, geo->lat() );
+        ui.RA->setText( p.ra()->toHMSString() ) ;
+        ui.Dec->setText( p.dec()->toDMSString() );
+        ui.Alt->setText( p.alt()->toDMSString() );
+        ui.Az->setText( p.az()->toDMSString() );
     }
 }
 
--- branches/kstars/summer/kstars/kstars/comast/execute.ui #1004338:1004339
@@ -122,6 +122,9 @@
        </item>
        <item>
         <layout class="QFormLayout" name="formLayout_4">
+         <property name="fieldGrowthPolicy">
+          <enum>QFormLayout::ExpandingFieldsGrow</enum>
+         </property>
          <item row="0" column="0">
           <widget class="QLabel" name="label_9">
            <property name="text">
@@ -132,16 +135,114 @@
          <item row="0" column="1">
           <widget class="KComboBox" name="TargetList"/>
          </item>
-         <item row="1" column="0">
+         <item row="8" column="0">
           <widget class="QLabel" name="label_10">
            <property name="text">
             <string>Notes:</string>
            </property>
           </widget>
          </item>
-         <item row="1" column="1">
+         <item row="8" column="1">
           <widget class="KTextEdit" name="Notes"/>
          </item>
+         <item row="1" column="0">
+          <widget class="QLabel" name="label_20">
+           <property name="text">
+            <string>Magnitude:</string>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="1">
+          <widget class="QLabel" name="Mag">
+           <property name="text">
+            <string/>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="0">
+          <widget class="QLabel" name="label_22">
+           <property name="text">
+            <string>Type:</string>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="1">
+          <widget class="QLabel" name="Type">
+           <property name="text">
+            <string/>
+           </property>
+          </widget>
+         </item>
+         <item row="3" column="0">
+          <widget class="QLabel" name="label_24">
+           <property name="text">
+            <string>Schdeduled Time:</string>
+           </property>
+          </widget>
+         </item>
+         <item row="3" column="1">
+          <widget class="QLabel" name="SchTime">
+           <property name="text">
+            <string/>
+           </property>
+          </widget>
+         </item>
+         <item row="4" column="0">
+          <widget class="QLabel" name="label_26">
+           <property name="text">
+            <string>Right Ascention:</string>
+           </property>
+          </widget>
+         </item>
+         <item row="5" column="0">
+          <widget class="QLabel" name="label_27">
+           <property name="text">
+            <string>Declination</string>
+           </property>
+          </widget>
+         </item>
+         <item row="4" column="1">
+          <widget class="QLabel" name="RA">
+           <property name="text">
+            <string/>
+           </property>
+          </widget>
+         </item>
+         <item row="5" column="1">
+          <widget class="QLabel" name="Dec">
+           <property name="text">
+            <string/>
+           </property>
+          </widget>
+         </item>
+         <item row="6" column="0">
+          <widget class="QLabel" name="label_21">
+           <property name="text">
+            <string>Altitude:</string>
+           </property>
+          </widget>
+         </item>
+         <item row="7" column="0">
+          <widget class="QLabel" name="label_23">
+           <property name="text">
+            <string>Azimuth:</string>
+           </property>
+          </widget>
+         </item>
+         <item row="6" column="1">
+          <widget class="QLabel" name="Alt">
+           <property name="text">
+            <string/>
+           </property>
+          </widget>
+         </item>
+         <item row="7" column="1">
+          <widget class="QLabel" name="Az">
+           <property name="text">
+            <string/>
+           </property>
+          </widget>
+         </item>
         </layout>
        </item>
       </layout>


More information about the Kstars-devel mailing list