本文整理汇总了C++中KStarsData::observingList方法的典型用法代码示例。如果您正苦于以下问题:C++ KStarsData::observingList方法的具体用法?C++ KStarsData::observingList怎么用?C++ KStarsData::observingList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KStarsData
的用法示例。
在下文中一共展示了KStarsData::observingList方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: initPopupMenu
void KSPopupMenu::initPopupMenu( SkyObject *obj, QString name, QString type, QString info,
bool showDetails, bool showObsList, bool showFlags )
{
KStarsData* data = KStarsData::Instance();
SkyMap * map = SkyMap::Instance();
clear();
bool showLabel = name != i18n("star") && !name.isEmpty();
if( name.isEmpty() )
name = i18n( "Empty sky" );
addFancyLabel( name );
addFancyLabel( type );
addFancyLabel( info );
addFancyLabel( KStarsData::Instance()->skyComposite()->getConstellationBoundary()->constellationName( obj ) );
//Insert Rise/Set/Transit labels
SkyObject* o = obj->clone();
addSeparator();
addFancyLabel( riseSetTimeLabel(o, true), -2 );
addFancyLabel( riseSetTimeLabel(o, false), -2 );
addFancyLabel( transitTimeLabel(o), -2 );
addSeparator();
delete o;
// Show 'Select this object' item when in object pointing mode and when obj is not empty sky
if(map->isInObjectPointingMode() && obj->type() != 21)
{
addAction( i18n( "Select this object"), map, SLOT(slotObjectSelected()));
}
//Insert item for centering on object
addAction( i18n( "Center && Track" ), map, SLOT( slotCenter() ) );
if ( showFlags )
{
//Insert actions for flag operations
initFlagActions( obj );
}
//Insert item for measuring distances
//FIXME: add key shortcut to menu items properly!
addAction( i18n( "Angular Distance To... [" ), map, SLOT(slotBeginAngularDistance()) );
addAction( i18n( "Starhop from here to... " ), map, SLOT(slotBeginStarHop()) );
//Insert item for Showing details dialog
if ( showDetails )
addAction( i18nc( "Show Detailed Information Dialog", "Details" ), map, SLOT( slotDetail() ) );
//Insert "Add/Remove Label" item
if ( showLabel )
{
if ( map->isObjectLabeled( obj ) ) {
addAction( i18n( "Remove Label" ), map, SLOT( slotRemoveObjectLabel() ) );
} else {
addAction( i18n( "Attach Label" ), map, SLOT( slotAddObjectLabel() ) );
}
}
// Should show observing list
if( showObsList ) {
if ( data->observingList()->contains( obj ) )
addAction( i18n("Remove From Observing WishList"), data->observingList(), SLOT( slotRemoveObject() ) );
else
addAction( i18n("Add to Observing WishList"), data->observingList(), SLOT( slotAddObject() ) );
}
// Should we show trail actions
TrailObject* t = dynamic_cast<TrailObject*>( obj );
if( t ) {
if( t->hasTrail() )
addAction( i18n( "Remove Trail" ), map, SLOT( slotRemovePlanetTrail() ) );
else
addAction( i18n( "Add Trail" ), map, SLOT( slotAddPlanetTrail() ) );
}
addAction( i18n("Simulate eyepiece view"), map, SLOT( slotEyepieceView() ) );
addSeparator();
#ifdef HAVE_XPLANET
if ( obj->isSolarSystem() && obj->type() != SkyObject::COMET ) { // FIXME: We now have asteroids -- so should this not be isMajorPlanet() || Pluto?
QMenu *xplanetSubmenu = new QMenu();
xplanetSubmenu->setTitle( i18n( "Print Xplanet view" ) );
xplanetSubmenu->addAction( i18n( "To screen" ), map, SLOT( slotXplanetToScreen() ) );
xplanetSubmenu->addAction( i18n( "To file..." ), map, SLOT( slotXplanetToFile() ) );
addMenu( xplanetSubmenu );
}
#endif
addSeparator();
addINDI();
}