|
116 | 116 | #include "qgsdatasourceuri.h" |
117 | 117 | #include "qgsdecorationcopyright.h" |
118 | 118 | #include "qgsdecorationnortharrow.h" |
| 119 | +#include "qgsdecorationscalebar.h" |
119 | 120 | #include "qgsembedlayerdialog.h" |
120 | 121 | #include "qgsencodingfiledialog.h" |
121 | 122 | #include "qgsexception.h" |
@@ -1475,6 +1476,7 @@ void QgisApp::setTheme( QString theThemeName ) |
1475 | 1476 | mActionChangeLabelProperties->setIcon( getThemeIcon( "/mActionChangeLabelProperties.png" ) ); |
1476 | 1477 | mActionDecorationCopyright->setIcon( getThemeIcon( "/plugins/copyright_label.png" ) ); |
1477 | 1478 | mActionDecorationNorthArrow->setIcon( getThemeIcon( "/plugins/north_arrow.png" ) ); |
| 1479 | + mActionDecorationScaleBar->setIcon( getThemeIcon( "/plugins/scale_bar.png" ) ); |
1478 | 1480 |
|
1479 | 1481 | //change themes of all composers |
1480 | 1482 | QSet<QgsComposer*>::iterator composerIt = mPrintComposers.begin(); |
@@ -1819,6 +1821,11 @@ void QgisApp::createDecorations() |
1819 | 1821 | connect( mActionDecorationNorthArrow, SIGNAL( triggered() ), mDecorationNorthArrow, SLOT( run() ) ); |
1820 | 1822 | connect( mMapCanvas, SIGNAL( renderComplete( QPainter * ) ), mDecorationNorthArrow, SLOT( renderNorthArrow( QPainter * ) ) ); |
1821 | 1823 | connect( this, SIGNAL( projectRead() ), mDecorationNorthArrow, SLOT( projectRead() ) ); |
| 1824 | + |
| 1825 | + mDecorationScaleBar = new QgsDecorationScaleBar( this ); |
| 1826 | + connect( mActionDecorationScaleBar, SIGNAL( triggered() ), mDecorationScaleBar, SLOT( run() ) ); |
| 1827 | + connect( mMapCanvas, SIGNAL( renderComplete( QPainter * ) ), mDecorationScaleBar, SLOT( renderScaleBar( QPainter * ) ) ); |
| 1828 | + connect( this, SIGNAL( projectRead() ), mDecorationScaleBar, SLOT( projectRead() ) ); |
1822 | 1829 | } |
1823 | 1830 |
|
1824 | 1831 | // Update file menu with the current list of recently accessed projects |
|
0 commit comments