[Kstars-devel] branches/kstars/summer/kstars/kstars/comast
Prakash Mohan
prak902000 at gmail.com
Thu Jul 30 21:28:09 CEST 2009
SVN commit 1004744 by prakash:
Adding support to slew to the current target from the execute UI
CCMAIL: kstars-devel at kde.org
M +8 -0 execute.cpp
M +2 -0 execute.h
M +24 -0 execute.ui
--- branches/kstars/summer/kstars/kstars/comast/execute.cpp #1004743:1004744
@@ -59,6 +59,8 @@
this, SLOT( slotEndSession() ) );
connect( ui.NextButton, SIGNAL( clicked() ),
this, SLOT( slotNext() ) );
+ connect( ui.Slew, SIGNAL( clicked() ),
+ this, SLOT( slotSlew() ) );
connect( ui.Location, SIGNAL( clicked() ),
this, SLOT( slotLocation() ) );
connect( ui.TargetList, SIGNAL( currentIndexChanged(const QString) ),
@@ -265,9 +267,11 @@
currentTarget = ks->observingList()->findObjectByName( name );
if( ! currentTarget ) {
ui.NextButton->setEnabled( false );
+ ui.Slew->setEnabled( false );
return;
} else {
ui.NextButton->setEnabled( true );
+ ui.Slew->setEnabled( true );
ks->observingList()->selectObject( currentTarget );
ks->observingList()->slotCenterObject();
QString smag = "--";
@@ -286,6 +290,10 @@
}
}
+void Execute::slotSlew() {
+ ks->observingList()->slotSlewToObject();
+}
+
void Execute::selectNextTarget() {
int i = ui.TargetList->findText( currentTarget->name() ) + 1;
if( i < ui.TargetList->count() ) {
--- branches/kstars/summer/kstars/kstars/comast/execute.h #1004743:1004744
@@ -112,6 +112,8 @@
void slotSetCurrentObjects();
+ void slotSlew();
+
private:
KStars *ks;
Ui::Execute ui;
--- branches/kstars/summer/kstars/kstars/comast/execute.ui #1004743:1004744
@@ -250,6 +250,30 @@
</item>
</layout>
</item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_5">
+ <item>
+ <spacer name="horizontalSpacer_2">
+ <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="QPushButton" name="Slew">
+ <property name="text">
+ <string>Slew</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
</layout>
</widget>
<widget class="QWidget" name="page_2">
More information about the Kstars-devel
mailing list