[Kstars-devel] branches/kstars/summer/kstars/kstars/comast
Prakash Mohan
prak902000 at gmail.com
Wed Jul 29 10:38:39 CEST 2009
SVN commit 1004055 by prakash:
Adding a function to select the next target automatically.
CCMAIL: kstars-devel at kde.org
M +12 -0 execute.cpp
M +2 -0 execute.h
--- branches/kstars/summer/kstars/kstars/comast/execute.cpp #1004054:1004055
@@ -220,6 +220,18 @@
void Execute::slotSetTarget( QString name ) {
currentTarget = ks->observingList()->findObjectByName( name );
+ if( !currentTarget )
+ ui.NextButton->setEnabled( false );
+ else
+ ui.NextButton->setEnabled( true );
}
+void Execute::selectNextTarget() {
+ int i = ui.TargetList->findText( currentTarget->name() ) + 1;
+ if( i < ui.TargetList->count() ) {
+ ui.TargetList->setCurrentIndex( i );
+ slotSetTarget( ui.TargetList->currentText() );
+ }
+}
+
#include "execute.moc"
--- branches/kstars/summer/kstars/kstars/comast/execute.h #1004054:1004055
@@ -106,6 +106,8 @@
*/
void loadObservationTab();
+ void selectNextTarget();
+
private:
KStars *ks;
Ui::Execute ui;
More information about the Kstars-devel
mailing list