Changeset View
Changeset View
Standalone View
Standalone View
src/plugins/render/crosshairs/CrosshairsPlugin.cpp
Show First 20 Lines • Show All 58 Lines • ▼ Show 20 Line(s) | 58 | { | |||
---|---|---|---|---|---|
59 | return QStringList( "crosshairs" ); | 59 | return QStringList( "crosshairs" ); | ||
60 | } | 60 | } | ||
61 | 61 | | |||
62 | QString CrosshairsPlugin::renderPolicy() const | 62 | QString CrosshairsPlugin::renderPolicy() const | ||
63 | { | 63 | { | ||
64 | return QString( "ALWAYS" ); | 64 | return QString( "ALWAYS" ); | ||
65 | } | 65 | } | ||
66 | 66 | | |||
67 | QStringList CrosshairsPlugin::renderPosition() const | 67 | RenderPositions CrosshairsPlugin::renderPositions() const | ||
68 | { | 68 | { | ||
69 | return QStringList( "FLOAT_ITEM" ); // although this is not a float item we choose the position of one | 69 | return FloatItemRenderPosition; // although this is not a float item we choose the position of one | ||
70 | } | 70 | } | ||
71 | 71 | | |||
72 | RenderPlugin::RenderType CrosshairsPlugin::renderType() const | 72 | RenderPlugin::RenderType CrosshairsPlugin::renderType() const | ||
73 | { | 73 | { | ||
74 | return RenderPlugin::TopLevelRenderType; | 74 | return RenderPlugin::TopLevelRenderType; | ||
75 | } | 75 | } | ||
76 | 76 | | |||
77 | QString CrosshairsPlugin::name() const | 77 | QString CrosshairsPlugin::name() const | ||
▲ Show 20 Lines • Show All 120 Lines • ▼ Show 20 Line(s) | |||||
198 | { | 198 | { | ||
199 | if ( m_uiConfigWidget ) { | 199 | if ( m_uiConfigWidget ) { | ||
200 | m_themeIndex = m_uiConfigWidget->m_themeList->currentRow(); | 200 | m_themeIndex = m_uiConfigWidget->m_themeList->currentRow(); | ||
201 | } | 201 | } | ||
202 | readSettings(); | 202 | readSettings(); | ||
203 | emit settingsChanged( nameId() ); | 203 | emit settingsChanged( nameId() ); | ||
204 | } | 204 | } | ||
205 | 205 | | |||
206 | bool CrosshairsPlugin::render( GeoPainter *painter, ViewportParams *viewport, | 206 | bool CrosshairsPlugin::render(GeoPainter *painter, ViewportParams *viewport, | ||
207 | const QString& renderPos, | 207 | RenderPosition renderPos, | ||
208 | GeoSceneLayer * layer ) | 208 | GeoSceneLayer *layer) | ||
209 | { | 209 | { | ||
210 | Q_UNUSED( renderPos ) | 210 | Q_UNUSED( renderPos ) | ||
211 | Q_UNUSED( layer ) | 211 | Q_UNUSED( layer ) | ||
212 | 212 | | |||
213 | if ( m_crosshairs.isNull() ) { | 213 | if ( m_crosshairs.isNull() ) { | ||
214 | if( QImageReader::imageFormat( m_theme ) == "svg" ) { | 214 | if( QImageReader::imageFormat( m_theme ) == "svg" ) { | ||
215 | painter->setRenderHint( QPainter::Antialiasing, true ); | 215 | painter->setRenderHint( QPainter::Antialiasing, true ); | ||
216 | m_crosshairs = QPixmap( QSize( 21, 21 ) ); | 216 | m_crosshairs = QPixmap( QSize( 21, 21 ) ); | ||
Show All 38 Lines |