[Kstars-devel] branches/kstars/summer/kstars/kstars
Prakash Mohan
prak902000 at gmail.com
Tue Jul 7 21:06:56 CEST 2009
SVN commit 992819 by prakash:
Adding the links for getting the DSS/SDSS/web images in the popup menu of the observing list.
CCMAIL: kstars-devel at kde.org
M +9 -2 obslistpopupmenu.cpp
M +1 -1 obslistpopupmenu.h
M +7 -3 tools/observinglist.cpp
M +4 -0 tools/observinglist.h
--- branches/kstars/summer/kstars/kstars/obslistpopupmenu.cpp #992818:992819
@@ -32,7 +32,7 @@
ObsListPopupMenu::~ObsListPopupMenu() { }
-void ObsListPopupMenu::initPopupMenu( bool showAddToSession, bool showCenter, bool showDetails, bool showScope, bool showRemove, bool sessionView ) {
+void ObsListPopupMenu::initPopupMenu( bool showAddToSession, bool showCenter, bool showDetails, bool showScope, bool showRemove, bool showLinks, bool sessionView ) {
clear();
//Insert item for adding the object to the session view
@@ -50,8 +50,15 @@
if( showDetails )
addAction( i18nc( "Show Detailed Information Dialog", "Details" ), ks->observingList(), SLOT( slotDetails() ) );
//Insert item for opening the Altitude vs time dialog
- addAction( i18n("Altitude vs. Time"), ks->observingList(), SLOT( slotAVT() ) );
+ addAction( i18n( "Altitude vs. Time" ), ks->observingList(), SLOT( slotAVT() ) );
addSeparator();
+ //Insert item for dowloading different images
+ if( showLinks ) {
+ addAction( i18n( "Show SDSS image" ), ks->observingList(), SLOT( slotGetImage() ) );
+ addAction( i18n( "Show DSS image" ), ks->observingList(), SLOT( slotDSS() ) );
+ addAction( i18n( "Show images from web " ), ks->observingList(), SLOT( slotGoogleImage() ) );
+ addSeparator();
+ }
//Insert item for Removing the object(s)
if( showRemove ) {
if( ! sessionView )
--- branches/kstars/summer/kstars/kstars/obslistpopupmenu.h #992818:992819
@@ -45,7 +45,7 @@
/**Initialize the popup menus.
*/
- void initPopupMenu( bool showAddToSession = false, bool showCenter = false, bool showDetails = false, bool showScope = false, bool showRemove = false, bool sessionView = false );
+ void initPopupMenu( bool showAddToSession = false, bool showCenter = false, bool showDetails = false, bool showScope = false, bool showRemove = false, bool showLinks = false, bool sessionView = false );
private:
KStars *ks;
--- branches/kstars/summer/kstars/kstars/tools/observinglist.cpp #992818:992819
@@ -1337,6 +1337,7 @@
else
slotImageViewer();
}
+ return true;
}
}
if( obj == ui->TableView->viewport() && ! noSelection ) {
@@ -1345,10 +1346,11 @@
if( mouseEvent->button() == Qt::RightButton ) {
QPoint pos( mouseEvent->globalX() , mouseEvent->globalY() );
if( singleSelection )
- pmenu->initPopupMenu( true, true, true, showScope, true );
+ pmenu->initPopupMenu( true, true, true, showScope, true, true );
else
pmenu->initPopupMenu( true, false, false, false, true );
pmenu->popup( pos );
+ return true;
}
}
}
@@ -1358,13 +1360,15 @@
if( mouseEvent->button() == Qt::RightButton ) {
QPoint pos( mouseEvent->globalX() , mouseEvent->globalY() );
if( singleSelection )
- pmenu->initPopupMenu( false, true, true, showScope, true, true );
+ pmenu->initPopupMenu( false, true, true, showScope, true, true, true );
else
- pmenu->initPopupMenu( false, false, false, false, true, true );
+ pmenu->initPopupMenu( false, false, false, false, true, false, true );
pmenu->popup( pos );
+ return true;
}
}
}
+ return false;
}
void ObservingList::slotGoogleImage() {
--- branches/kstars/summer/kstars/kstars/tools/observinglist.h #992818:992819
@@ -292,6 +292,10 @@
*/
void slotDeleteImages();
+ /**@short download the DSS image and show it
+ */
+ void slotDSS() { slotGetImage( true ); }
+
protected slots:
void slotClose();
void downloadReady();
More information about the Kstars-devel
mailing list