[Kstars-devel] branches/kstars/summer/kstars/kstars/tools
Prakash Mohan
prak902000 at gmail.com
Tue May 5 16:36:09 CEST 2009
SVN commit 963889 by prakash:
Providing a "Add to Observin list" feature in the WUTDialog.
CCMAIL: kstars-devel at kde.org
M +11 -0 wutdialog.cpp
M +4 -0 wutdialog.h
M +14 -1 wutdialog.ui
--- branches/kstars/summer/kstars/kstars/tools/wutdialog.cpp #963888:963889
@@ -94,6 +94,7 @@
connect( WUT->LocationButton, SIGNAL( clicked() ), SLOT( slotChangeLocation() ) );
connect( WUT->CenterButton, SIGNAL( clicked() ), SLOT( slotCenter() ) );
connect( WUT->DetailButton, SIGNAL( clicked() ), SLOT( slotDetails() ) );
+ connect( WUT->ObslistButton, SIGNAL( clicked() ), SLOT( slotObslist() ) );
connect( WUT->CategoryListWidget, SIGNAL( currentTextChanged(const QString &) ),
SLOT( slotLoadList(const QString &) ) );
connect( WUT->ObjectListWidget, SIGNAL( currentTextChanged(const QString &) ),
@@ -428,6 +429,16 @@
detail.exec();
}
}
+void WUTDialog::slotObslist() {
+ SkyObject *o = 0;
+ // get selected item
+ if (WUT->ObjectListWidget->currentItem() != 0) {
+ o = kstars->data()->objectNamed( WUT->ObjectListWidget->currentItem()->text() );
+ }
+ if(o != 0)
+ kstars->observingList()->slotAddObject( o ) ;
+
+}
void WUTDialog::slotChangeDate() {
--- branches/kstars/summer/kstars/kstars/tools/wutdialog.h #963888:963889
@@ -93,6 +93,10 @@
/**@short center the display on the current object
*/
void slotCenter();
+
+ /*@short Add the object to the observing list
+ */
+ void slotObslist();
private:
KStars *kstars;
--- branches/kstars/summer/kstars/kstars/tools/wutdialog.ui #963888:963889
@@ -477,7 +477,20 @@
</property>
</widget>
</item>
- </layout>
+ <item>
+ <widget class="KPushButton" name="ObslistButton" >
+ <property name="toolTip" >
+ <string>Adds the selected object to the Observing list</string>
+ </property>
+ <property name="whatsThis" >
+ <string>Open the Details window for the highlighted object.</string>
+ </property>
+ <property name="text" >
+ <string>Add to List</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
</widget>
</item>
<item row="1" column="0" >
More information about the Kstars-devel
mailing list