Skip to content
Permalink
Browse files

add decoration grid, based on composer grid (code copied, not reused)

add missing qgssymbollayerv2utils.h include
  • Loading branch information
etiennesky committed Jun 18, 2012
1 parent 56ea83f commit edda90ad57d48f990197ec77a24c3b4d03efc33c
@@ -25,6 +25,8 @@ SET(QGIS_APP_SRCS
qgsdecorationnortharrowdialog.cpp
qgsdecorationscalebar.cpp
qgsdecorationscalebardialog.cpp
qgsdecorationgrid.cpp
qgsdecorationgriddialog.cpp
qgsembedlayerdialog.cpp
qgsformannotationdialog.cpp
qgsdelattrdialog.cpp
@@ -173,6 +175,8 @@ SET (QGIS_APP_MOC_HDRS
qgsdecorationnortharrowdialog.h
qgsdecorationscalebar.h
qgsdecorationscalebardialog.h
qgsdecorationgrid.h
qgsdecorationgriddialog.h
qgsdelattrdialog.h
qgsdisplayangle.h
qgsembedlayerdialog.h
@@ -117,6 +117,7 @@
#include "qgsdecorationcopyright.h"
#include "qgsdecorationnortharrow.h"
#include "qgsdecorationscalebar.h"
#include "qgsdecorationgrid.h"
#include "qgsembedlayerdialog.h"
#include "qgsencodingfiledialog.h"
#include "qgsexception.h"
@@ -1609,6 +1610,7 @@ void QgisApp::setTheme( QString theThemeName )
mActionDecorationCopyright->setIcon( getThemeIcon( "/plugins/copyright_label.png" ) );
mActionDecorationNorthArrow->setIcon( getThemeIcon( "/plugins/north_arrow.png" ) );
mActionDecorationScaleBar->setIcon( getThemeIcon( "/plugins/scale_bar.png" ) );
mActionDecorationGrid->setIcon( getThemeIcon( "/transformed.png" ) );

//change themes of all composers
QSet<QgsComposer*>::iterator composerIt = mPrintComposers.begin();
@@ -2016,6 +2018,12 @@ void QgisApp::createDecorations()
connect( mActionDecorationScaleBar, SIGNAL( triggered() ), mDecorationScaleBar, SLOT( run() ) );
connect( mMapCanvas, SIGNAL( renderComplete( QPainter * ) ), mDecorationScaleBar, SLOT( renderScaleBar( QPainter * ) ) );
connect( this, SIGNAL( projectRead() ), mDecorationScaleBar, SLOT( projectRead() ) );

// TODO draw the decorations in a particular order - perhaps use a vector or decoration objects?
mDecorationGrid = new QgsDecorationGrid( this );
connect( mActionDecorationGrid, SIGNAL( triggered() ), mDecorationGrid, SLOT( run() ) );
connect( mMapCanvas, SIGNAL( renderComplete( QPainter * ) ), mDecorationGrid, SLOT( renderGrid( QPainter * ) ) );
connect( this, SIGNAL( projectRead() ), mDecorationGrid, SLOT( projectRead() ) );
}

// Update file menu with the current list of recently accessed projects
@@ -72,6 +72,7 @@ class QgsGPSInformationWidget;
class QgsDecorationCopyright;
class QgsDecorationNorthArrow;
class QgsDecorationScaleBar;
class QgsDecorationGrid;

class QgsMessageLogViewer;

@@ -1187,6 +1188,7 @@ class QgisApp : public QMainWindow, private Ui::MainWindow
QgsDecorationCopyright* mDecorationCopyright;
QgsDecorationNorthArrow* mDecorationNorthArrow;
QgsDecorationScaleBar* mDecorationScaleBar;
QgsDecorationGrid* mDecorationGrid;

int mLastComposerId;

0 comments on commit edda90a

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