Skip to content
Permalink
Browse files

Moved scale bar plugin to app

  • Loading branch information
wonder-sk committed Aug 21, 2011
1 parent 5ca2c32 commit d386c6689b469ce570162679133dac42c898585b
@@ -352,6 +352,7 @@
<file>themes/default/unlocked.png</file>
<file>themes/default/plugins/copyright_label.png</file>
<file>themes/default/plugins/north_arrow.png</file>
<file>themes/default/plugins/scale_bar.png</file>
</qresource>
<qresource prefix="/images/tips">
<file alias="symbol_levels.png">qgis_tips/symbol_levels.png</file>
File renamed without changes.
@@ -25,6 +25,8 @@ SET(QGIS_APP_SRCS
qgsdecorationcopyrightdialog.cpp
qgsdecorationnortharrow.cpp
qgsdecorationnortharrowdialog.cpp
qgsdecorationscalebar.cpp
qgsdecorationscalebardialog.cpp
qgsembedlayerdialog.cpp
qgsformannotationdialog.cpp
qgsdelattrdialog.cpp
@@ -161,6 +163,8 @@ SET (QGIS_APP_MOC_HDRS
qgsdecorationcopyrightdialog.h
qgsdecorationnortharrow.h
qgsdecorationnortharrowdialog.h
qgsdecorationscalebar.h
qgsdecorationscalebardialog.h
qgsdelattrdialog.h
qgsdisplayangle.h
qgsembedlayerdialog.h
@@ -116,6 +116,7 @@
#include "qgsdatasourceuri.h"
#include "qgsdecorationcopyright.h"
#include "qgsdecorationnortharrow.h"
#include "qgsdecorationscalebar.h"
#include "qgsembedlayerdialog.h"
#include "qgsencodingfiledialog.h"
#include "qgsexception.h"
@@ -1475,6 +1476,7 @@ void QgisApp::setTheme( QString theThemeName )
mActionChangeLabelProperties->setIcon( getThemeIcon( "/mActionChangeLabelProperties.png" ) );
mActionDecorationCopyright->setIcon( getThemeIcon( "/plugins/copyright_label.png" ) );
mActionDecorationNorthArrow->setIcon( getThemeIcon( "/plugins/north_arrow.png" ) );
mActionDecorationScaleBar->setIcon( getThemeIcon( "/plugins/scale_bar.png" ) );

//change themes of all composers
QSet<QgsComposer*>::iterator composerIt = mPrintComposers.begin();
@@ -1819,6 +1821,11 @@ void QgisApp::createDecorations()
connect( mActionDecorationNorthArrow, SIGNAL( triggered() ), mDecorationNorthArrow, SLOT( run() ) );
connect( mMapCanvas, SIGNAL( renderComplete( QPainter * ) ), mDecorationNorthArrow, SLOT( renderNorthArrow( QPainter * ) ) );
connect( this, SIGNAL( projectRead() ), mDecorationNorthArrow, SLOT( projectRead() ) );

mDecorationScaleBar = new QgsDecorationScaleBar( this );
connect( mActionDecorationScaleBar, SIGNAL( triggered() ), mDecorationScaleBar, SLOT( run() ) );
connect( mMapCanvas, SIGNAL( renderComplete( QPainter * ) ), mDecorationScaleBar, SLOT( renderScaleBar( QPainter * ) ) );
connect( this, SIGNAL( projectRead() ), mDecorationScaleBar, SLOT( projectRead() ) );
}

// Update file menu with the current list of recently accessed projects
@@ -71,6 +71,7 @@ class QgsGPSInformationWidget;

class QgsDecorationCopyright;
class QgsDecorationNorthArrow;
class QgsDecorationScaleBar;

#include <QMainWindow>
#include <QToolBar>
@@ -1057,6 +1058,7 @@ class QgisApp : public QMainWindow, private Ui::MainWindow

QgsDecorationCopyright* mDecorationCopyright;
QgsDecorationNorthArrow* mDecorationNorthArrow;
QgsDecorationScaleBar* mDecorationScaleBar;

int mLastComposerId;

0 comments on commit d386c66

Please sign in to comment.
You can’t perform that action at this time.