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

Prakash Mohan prak902000 at gmail.com
Wed May 6 04:21:32 CEST 2009


SVN commit 964125 by prakash:

Adding functionality in the ObservingList to open FindDialog and add objects to the list.

CCMAIL: kstars-devel at kde.org


 M  +13 -1     observinglist.cpp  
 M  +4 -0      observinglist.h  
 M  +21 -2     observinglist.ui  


--- branches/kstars/summer/kstars/kstars/tools/observinglist.cpp #964124:964125
@@ -45,6 +45,7 @@
 #include "skyobjects/starobject.h"
 #include "skymap.h"
 #include "dialogs/detaildialog.h"
+#include "dialogs/finddialog.h"
 #include "tools/altvstime.h"
 #include "Options.h"
 
@@ -114,7 +115,8 @@
              this, SLOT( slotDetails() ) );
     connect( ui->AVTButton, SIGNAL( clicked() ),
              this, SLOT( slotAVT() ) );
-
+    connect( ui->FindButton, SIGNAL( clicked() ),
+    	     this, SLOT( slotFind() ) );
     connect( ui->OpenButton, SIGNAL( clicked() ),
              this, SLOT( slotOpenList() ) );
     connect( ui->SaveButton, SIGNAL( clicked() ),
@@ -510,6 +512,16 @@
     }
 }
 
+void ObservingList::slotFind() {
+    FindDialog fd( ks );    
+    if ( fd.exec() == QDialog::Accepted ) {
+       SkyObject *o = fd.selectedObject();
+       if( o!= 0 )
+       slotAddObject( o );
+    }
+
+}
+
 void ObservingList::slotAVT() {
     QModelIndexList selectedItems = m_SortModel->mapSelectionToSource( ui->TableView->selectionModel()->selection() ).indexes();
 
--- branches/kstars/summer/kstars/kstars/tools/observinglist.h #964124:964125
@@ -136,6 +136,10 @@
     	*/
     void slotAVT();
 
+    /**@short Open the Find Dialog
+    	*/
+    void slotFind();
+
     /**@short Tasks needed when changing the selected object
     	*Save the user log of the previous selected object, 
     	*find the new selected object in the obsList, and 
--- branches/kstars/summer/kstars/kstars/tools/observinglist.ui #964124:964125
@@ -5,8 +5,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>415</width>
-    <height>491</height>
+    <width>500</width>
+    <height>500</height>
    </rect>
   </property>
   <layout class="QVBoxLayout" >
@@ -315,6 +315,25 @@
       </widget>
      </item>
      <item>
+      <widget class="KPushButton" name="FindButton" >
+       <property name="sizePolicy" >
+        <sizepolicy vsizetype="Fixed" hsizetype="Minimum" >
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="toolTip" >
+        <string>Open FindDialog</string>
+       </property>
+       <property name="whatsThis" >
+        <string>Open the FindDialog for adding objects to the list</string>
+       </property>
+       <property name="text" >
+        <string>Find..</string>
+       </property>
+      </widget>
+     </item>
+     <item>
       <widget class="KPushButton" name="RemoveButton" >
        <property name="sizePolicy" >
         <sizepolicy vsizetype="Fixed" hsizetype="Minimum" >


More information about the Kstars-devel mailing list