Changeset View
Changeset View
Standalone View
Standalone View
src/plugins/render/eclipses/EclipsesPlugin.cpp
Show First 20 Lines • Show All 82 Lines • ▼ Show 20 Line(s) | 82 | { | |||
---|---|---|---|---|---|
83 | return QStringList( "eclipses" ); | 83 | return QStringList( "eclipses" ); | ||
84 | } | 84 | } | ||
85 | 85 | | |||
86 | QString EclipsesPlugin::renderPolicy() const | 86 | QString EclipsesPlugin::renderPolicy() const | ||
87 | { | 87 | { | ||
88 | return QString( "ALWAYS" ); | 88 | return QString( "ALWAYS" ); | ||
89 | } | 89 | } | ||
90 | 90 | | |||
91 | QStringList EclipsesPlugin::renderPosition() const | 91 | RenderPositions EclipsesPlugin::renderPositions() const | ||
92 | { | 92 | { | ||
93 | return QStringList( "ORBIT" ); | 93 | return OrbitRenderPosition; | ||
94 | } | 94 | } | ||
95 | 95 | | |||
96 | QString EclipsesPlugin::name() const | 96 | QString EclipsesPlugin::name() const | ||
97 | { | 97 | { | ||
98 | return tr( "Eclipses" ); | 98 | return tr( "Eclipses" ); | ||
99 | } | 99 | } | ||
100 | 100 | | |||
101 | QString EclipsesPlugin::nameId() const | 101 | QString EclipsesPlugin::nameId() const | ||
▲ Show 20 Lines • Show All 125 Lines • ▼ Show 20 Line(s) | 226 | if ( widget && m_marbleWidget != widget ) { | |||
227 | connect( widget, SIGNAL(themeChanged(QString)), | 227 | connect( widget, SIGNAL(themeChanged(QString)), | ||
228 | this, SLOT(updateMenuItemState()) ); | 228 | this, SLOT(updateMenuItemState()) ); | ||
229 | m_marbleWidget = widget; | 229 | m_marbleWidget = widget; | ||
230 | } | 230 | } | ||
231 | 231 | | |||
232 | return RenderPlugin::eventFilter(object, e); | 232 | return RenderPlugin::eventFilter(object, e); | ||
233 | } | 233 | } | ||
234 | 234 | | |||
235 | bool EclipsesPlugin::render( GeoPainter *painter, | 235 | bool EclipsesPlugin::render(GeoPainter *painter, | ||
236 | ViewportParams *viewport, | 236 | ViewportParams *viewport, | ||
237 | const QString &renderPos, | 237 | RenderPosition renderPos, | ||
238 | GeoSceneLayer *layer ) | 238 | GeoSceneLayer *layer) | ||
239 | { | 239 | { | ||
240 | Q_UNUSED( viewport ); | 240 | Q_UNUSED( viewport ); | ||
241 | Q_UNUSED( renderPos ); | 241 | Q_UNUSED( renderPos ); | ||
242 | Q_UNUSED( layer ); | 242 | Q_UNUSED( layer ); | ||
243 | 243 | | |||
244 | if( marbleModel()->planetId() == "earth" ) { | 244 | if( marbleModel()->planetId() == "earth" ) { | ||
245 | foreach( EclipsesItem *item, m_model->items() ) { | 245 | foreach( EclipsesItem *item, m_model->items() ) { | ||
246 | if( item->takesPlaceAt( marbleModel()->clock()->dateTime() ) ) { | 246 | if( item->takesPlaceAt( marbleModel()->clock()->dateTime() ) ) { | ||
▲ Show 20 Lines • Show All 258 Lines • Show Last 20 Lines |