[QGIS Commit] r8702 - in branches/advanced_printing_branch/src: app
app/composer ui
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Tue Jul 1 09:08:34 EDT 2008
Author: mhugent
Date: 2008-07-01 09:08:34 -0400 (Tue, 01 Jul 2008)
New Revision: 8702
Added:
branches/advanced_printing_branch/src/app/composer/qgscomposerlegend.cpp
branches/advanced_printing_branch/src/app/composer/qgscomposerlegend.h
branches/advanced_printing_branch/src/app/composer/qgslegendmodel.cpp
branches/advanced_printing_branch/src/app/composer/qgslegendmodel.h
Modified:
branches/advanced_printing_branch/src/app/CMakeLists.txt
branches/advanced_printing_branch/src/app/composer/qgscomposer.cpp
branches/advanced_printing_branch/src/app/composer/qgscomposer.h
branches/advanced_printing_branch/src/app/composer/qgscomposerview.cpp
branches/advanced_printing_branch/src/app/composer/qgscomposerview.h
branches/advanced_printing_branch/src/ui/qgscomposerbase.ui
Log:
Started working on composer legend
Modified: branches/advanced_printing_branch/src/app/CMakeLists.txt
===================================================================
--- branches/advanced_printing_branch/src/app/CMakeLists.txt 2008-07-01 05:47:38 UTC (rev 8701)
+++ branches/advanced_printing_branch/src/app/CMakeLists.txt 2008-07-01 13:08:34 UTC (rev 8702)
@@ -65,6 +65,8 @@
composer/qgscomposermapwidget.cpp
composer/qgscomposerscalebar.cpp
composer/qgscomposerscalebarwidget.cpp
+ composer/qgslegendmodel.cpp
+ composer/qgscomposerlegend.cpp
composer/qgsscalebarstyle.cpp
composer/qgsdoubleboxscalebarstyle.cpp
composer/qgsnumericscalebarstyle.cpp
Modified: branches/advanced_printing_branch/src/app/composer/qgscomposer.cpp
===================================================================
--- branches/advanced_printing_branch/src/app/composer/qgscomposer.cpp 2008-07-01 05:47:38 UTC (rev 8701)
+++ branches/advanced_printing_branch/src/app/composer/qgscomposer.cpp 2008-07-01 13:08:34 UTC (rev 8702)
@@ -23,6 +23,7 @@
#include "qgscompositionwidget.h"
#include "qgscomposerlabel.h"
#include "qgscomposerlabelwidget.h"
+#include "qgscomposerlegend.h"
#include "qgscomposermap.h"
#include "qgscomposermapwidget.h"
#include "qgscomposerscalebar.h"
@@ -94,6 +95,7 @@
connect(mView, SIGNAL(composerMapAdded(QgsComposerMap*)), this, SLOT(addComposerMap(QgsComposerMap*)));
connect(mView, SIGNAL(itemRemoved(QgsComposerItem*)), this, SLOT(deleteItem(QgsComposerItem*)));
connect(mView, SIGNAL(composerScaleBarAdded(QgsComposerScaleBar*)), this, SLOT(addComposerScaleBar(QgsComposerScaleBar*)));
+ connect(mView, SIGNAL(composerLegendAdded(QgsComposerLegend*)), this, SLOT(addComposerLegend(QgsComposerLegend*)));
mComposition = new QgsComposition(mQgis->getMapCanvas());
mView->setComposition(mComposition);
@@ -160,7 +162,7 @@
mActionAddImage->setIconSet(QIcon(QPixmap(myThemePath + "/mActionSaveMapAsImage.png")));
mActionAddNewMap->setIconSet(QIcon(QPixmap(myThemePath + "/mActionAddRasterLayer.png")));
mActionAddNewLabel->setIconSet(QIcon(QPixmap(myThemePath + "/mActionLabel.png")));
- mActionAddNewVectLegend->setIconSet(QIcon(QPixmap(myThemePath + "/mActionAddLegend.png")));
+ mActionAddNewLegend->setIconSet(QIcon(QPixmap(myThemePath + "/mActionAddLegend.png")));
mActionAddNewScalebar->setIconSet(QIcon(QPixmap(myThemePath + "/mActionScaleBar.png")));
mActionSelectMoveItem->setIconSet(QIcon(QPixmap(myThemePath + "/mActionPan.png")));
}
@@ -923,13 +925,12 @@
}
}
-void QgsComposer::on_mActionAddNewVectLegend_activated(void)
+void QgsComposer::on_mActionAddNewLegend_activated(void)
{
-#if 0
- mComposition->setTool ( QgsComposition::AddVectorLegend );
- setToolActionsOff();
- mActionAddNewVectLegend->setOn ( true );
-#endif //0
+ if(mView)
+ {
+ mView->setCurrentTool(QgsComposerView::AddLegend);
+ }
}
void QgsComposer::on_mActionAddNewLabel_activated(void)
@@ -1143,6 +1144,17 @@
mItemWidgetMap.insert(scalebar, sbWidget);
}
+void QgsComposer::addComposerLegend(QgsComposerLegend* legend)
+{
+ if(!legend)
+ {
+ return;
+ }
+
+ //todo: create a composer legend widget
+ mItemWidgetMap.insert(legend, 0);
+}
+
void QgsComposer::deleteItem(QgsComposerItem* item)
{
QMap<QgsComposerItem*, QWidget*>::iterator it = mItemWidgetMap.find(item);
Modified: branches/advanced_printing_branch/src/app/composer/qgscomposer.h
===================================================================
--- branches/advanced_printing_branch/src/app/composer/qgscomposer.h 2008-07-01 05:47:38 UTC (rev 8701)
+++ branches/advanced_printing_branch/src/app/composer/qgscomposer.h 2008-07-01 13:08:34 UTC (rev 8702)
@@ -22,6 +22,7 @@
class QgisApp;
class QgsComposerLabel;
+class QgsComposerLegend;
class QgsComposerMap;
class QgsComposerScaleBar;
class QgsComposerView;
@@ -128,8 +129,8 @@
//! Add new map
void on_mActionAddNewMap_activated(void);
- //! Add new vector legend
- void on_mActionAddNewVectLegend_activated(void);
+ //! Add new legend
+ void on_mActionAddNewLegend_activated(void);
//! Add new label
void on_mActionAddNewLabel_activated(void);
@@ -170,6 +171,9 @@
/**Adds a composer scale bar to the item/widget map and creates a configuration widget for it*/
void addComposerScaleBar(QgsComposerScaleBar* scalebar);
+ /**Adds a composer legend to the item/widget map and creates a configuration widget for it*/
+ void addComposerLegend(QgsComposerLegend* legend);
+
/**Removes item from the item/widget map and deletes the configuration widget*/
void deleteItem(QgsComposerItem* item);
Added: branches/advanced_printing_branch/src/app/composer/qgscomposerlegend.cpp
===================================================================
--- branches/advanced_printing_branch/src/app/composer/qgscomposerlegend.cpp (rev 0)
+++ branches/advanced_printing_branch/src/app/composer/qgscomposerlegend.cpp 2008-07-01 13:08:34 UTC (rev 8702)
@@ -0,0 +1,148 @@
+/***************************************************************************
+ qgscomposerlegend.cpp - description
+ ---------------------
+ begin : June 2008
+ copyright : (C) 2008 by Marco Hugentobler
+ email : marco dot hugentobler at karto dot baug dot ethz dot ch
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "qgscomposerlegend.h"
+#include "qgsmaplayer.h"
+#include "qgsmaplayerregistry.h"
+#include <QPainter>
+
+QgsComposerLegend::QgsComposerLegend(QgsComposition* composition): QgsComposerItem(composition), mTitle(QObject::tr("Legend")), mBoxSpace(2), mLayerSpace(3), mSymbolSpace(2), mIconLabelSpace(2)
+{
+ QStringList layerIdList;
+ QMap<QString,QgsMapLayer*> layerMap = QgsMapLayerRegistry::instance()->mapLayers();
+ QMap<QString,QgsMapLayer*>::const_iterator mapIt = layerMap.constBegin();
+
+ for(; mapIt != layerMap.constEnd(); ++mapIt)
+ {
+ layerIdList.push_back(mapIt.key());
+ }
+
+ mLegendModel.setLayerSet(layerIdList);
+
+ //default font size
+ mTitleFont.setPointSizeF(4);
+ mLayerFont.setPointSizeF(3);
+ mItemFont.setPointSizeF(2);
+ mSymbolWidth = 7;
+ mSymbolHeight = 4;
+ adjustBoxSize();
+}
+
+QgsComposerLegend::QgsComposerLegend(): QgsComposerItem(0)
+{
+
+}
+
+QgsComposerLegend::~QgsComposerLegend()
+{
+
+}
+
+void QgsComposerLegend::paint(QPainter* painter, const QStyleOptionGraphicsItem* itemStyle, QWidget* pWidget)
+{
+ //go through model...
+ QStandardItem* rootItem = mLegendModel.invisibleRootItem();
+ if(!rootItem || !painter)
+ {
+ return;
+ }
+
+ painter->save();
+
+ int numLayerItems = rootItem->rowCount();
+ QStandardItem* currentLayerItem = 0;
+ double currentYCoordinate = mBoxSpace;
+
+ //font metrics
+ QFontMetricsF titleFontMetrics(mTitleFont);
+ QFontMetricsF layerFontMetrics(mLayerFont);
+
+ //draw title
+ currentYCoordinate += titleFontMetrics.height();
+ painter->setFont(mTitleFont);
+ painter->drawText(QPointF(mBoxSpace, currentYCoordinate), mTitle);
+
+ //draw layer items
+ for(int i = 0; i < numLayerItems; ++i)
+ {
+ currentLayerItem = rootItem->child(i);
+ if(currentLayerItem)
+ {
+ currentYCoordinate += mLayerSpace;
+ currentYCoordinate += layerFontMetrics.height();
+
+ //draw layer Item
+ painter->setFont(mLayerFont);
+ painter->drawText(QPointF(mBoxSpace, currentYCoordinate), currentLayerItem->text());
+
+ //and child items
+ drawLayerChildItems(painter, currentLayerItem, currentYCoordinate);
+ }
+ }
+
+ painter->restore();
+
+ //draw frame and selection boxes if necessary
+ drawFrame(painter);
+ if(isSelected())
+ {
+ drawSelectionBoxes(painter);
+ }
+}
+
+void QgsComposerLegend::adjustBoxSize()
+{
+ //todo...
+ setSceneRect(QRectF(transform().dx(), transform().dy(), 10, 10));
+}
+
+void QgsComposerLegend::drawLayerChildItems(QPainter* p, QStandardItem* layerItem, double& currentYCoord)
+{
+ if(!layerItem || !p)
+ {
+ return;
+ }
+
+ QFontMetricsF itemFontMetrics(mItemFont);
+ double itemHeight = std::max(mSymbolHeight, itemFontMetrics.height());
+
+ QStandardItem* firstItem;
+ QStandardItem* secondItem;
+
+ int numChildren = layerItem->rowCount();
+ for(int i = 0; i < numChildren; ++i)
+ {
+ currentYCoord += mSymbolSpace;
+ double currentXCoord = mBoxSpace;
+
+ firstItem = layerItem->child(i, 0);
+ secondItem = layerItem->child(i, 1);
+
+ if(secondItem) //an item with an icon
+ {
+ firstItem->icon().paint(p, QRect(currentXCoord, currentYCoord, mSymbolWidth, mSymbolHeight));
+ currentXCoord += (mSymbolWidth + mIconLabelSpace);
+ p->drawText(QPointF(currentXCoord, currentYCoord + itemFontMetrics.height()), secondItem->text());
+ }
+ else //an item witout icon (e.g. name of classification field)
+ {
+ p->drawText(QPointF(currentXCoord, currentYCoord + itemFontMetrics.height()), firstItem->text());
+ }
+
+ currentYCoord += itemHeight;
+ }
+}
Added: branches/advanced_printing_branch/src/app/composer/qgscomposerlegend.h
===================================================================
--- branches/advanced_printing_branch/src/app/composer/qgscomposerlegend.h (rev 0)
+++ branches/advanced_printing_branch/src/app/composer/qgscomposerlegend.h 2008-07-01 13:08:34 UTC (rev 8702)
@@ -0,0 +1,75 @@
+/***************************************************************************
+ qgscomposerlegend.h - description
+ -------------------
+ begin : June 2008
+ copyright : (C) 2008 by Marco Hugentobler
+ email : marco dot hugentobler at karto dot baug dot ethz dot ch
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef QGSCOMPOSERLEGEND_H
+#define QGSCOMPOSERLEGEND_H
+
+#include "qgscomposeritem.h"
+#include "qgslegendmodel.h"
+
+class QgsComposerLegend: public QgsComposerItem
+{
+ public:
+ QgsComposerLegend(QgsComposition* composition);
+ ~QgsComposerLegend();
+
+ /** \brief Reimplementation of QCanvasItem::paint*/
+ void paint (QPainter* painter, const QStyleOptionGraphicsItem* itemStyle, QWidget* pWidget);
+
+ /**Sets item box to the whole content*/
+ void adjustBoxSize();
+
+ /**Returns pointer to the legend model*/
+ QgsLegendModel* model(){return &mLegendModel;}
+
+ void setTitle(const QString& t) {mTitle = t;}
+ QString title() const {return mTitle;}
+
+ protected:
+ QString mTitle;
+
+ //different fonts for entries
+ QFont mTitleFont;
+ QFont mLayerFont;
+ QFont mItemFont;
+
+ /**Space between item box and contents*/
+ double mBoxSpace;
+ /**Vertical space between layer entries*/
+ double mLayerSpace;
+ /**Vertical space between symbol entries*/
+ double mSymbolSpace;
+ /**Horizontal space between item icon and label*/
+ double mIconLabelSpace;
+ /**Width of symbol icon*/
+ double mSymbolWidth;
+ /**Height of symbol icon*/
+ double mSymbolHeight;
+
+ QgsLegendModel mLegendModel;
+
+
+ private:
+ QgsComposerLegend(); //forbidden
+
+ /**Draws child items of a layer item
+ @param layerItem parent model item (layer)
+ @param currentYCoord in/out: current y position of legend item*/
+ void drawLayerChildItems(QPainter* p, QStandardItem* layerItem, double& currentYCoord);
+};
+
+#endif
Modified: branches/advanced_printing_branch/src/app/composer/qgscomposerview.cpp
===================================================================
--- branches/advanced_printing_branch/src/app/composer/qgscomposerview.cpp 2008-07-01 05:47:38 UTC (rev 8701)
+++ branches/advanced_printing_branch/src/app/composer/qgscomposerview.cpp 2008-07-01 13:08:34 UTC (rev 8702)
@@ -20,6 +20,7 @@
#include "qgscomposerview.h"
#include "qgscomposerlabel.h"
+#include "qgscomposerlegend.h"
#include "qgscomposermap.h"
#include "qgscomposeritemgroup.h"
#include "qgscomposerscalebar.h"
@@ -108,11 +109,25 @@
scene()->addItem(newScaleBar);
emit composerScaleBarAdded(newScaleBar);
scene()->clearSelection();
+ newScaleBar->setZValue(60);
newScaleBar->setSelected(true);
emit selectedItemChanged(newScaleBar);
}
break;
+ case AddLegend:
+ {
+ QgsComposerLegend* newLegend = new QgsComposerLegend(composition());
+ scene()->addItem(newLegend);
+ emit composerLegendAdded(newLegend);
+ scene()->clearSelection();
+ newLegend->setZValue(60);
+ newLegend->setSceneRect(QRectF(scenePoint.x(), scenePoint.y(), newLegend->rect().width(), newLegend->rect().height()));
+ newLegend->setSelected(true);
+ emit selectedItemChanged(newLegend);
+ break;
+ }
+
default:
break;
}
Modified: branches/advanced_printing_branch/src/app/composer/qgscomposerview.h
===================================================================
--- branches/advanced_printing_branch/src/app/composer/qgscomposerview.h 2008-07-01 05:47:38 UTC (rev 8701)
+++ branches/advanced_printing_branch/src/app/composer/qgscomposerview.h 2008-07-01 13:08:34 UTC (rev 8702)
@@ -25,6 +25,7 @@
class QgsComposition;
class QgsComposerItem;
class QgsComposerLabel;
+class QgsComposerLegend;
class QgsComposerMap;
class QgsComposerScaleBar;
@@ -40,7 +41,7 @@
enum Tool {
Select = 0, // Select/Move item
AddMap, // add new map
- AddVectorLegend, // add vector legend
+ AddLegend, // add vector legend
AddLabel, // add label
AddScalebar, // add scalebar
AddPicture // add raster/vector picture
@@ -89,8 +90,10 @@
void composerLabelAdded(QgsComposerLabel* label);
/**Is emitted when new composer map has been added to the view*/
void composerMapAdded(QgsComposerMap* map);
- /**Is emmitted when new composer scale bar has been added*/
+ /**Is emitted when new composer scale bar has been added*/
void composerScaleBarAdded(QgsComposerScaleBar* scalebar);
+ /**Is emitted when a new composer legend has been added*/
+ void composerLegendAdded(QgsComposerLegend* legend);
/**Is emitted when a composer item has been removed from the scene*/
void itemRemoved(QgsComposerItem*);
};
Added: branches/advanced_printing_branch/src/app/composer/qgslegendmodel.cpp
===================================================================
--- branches/advanced_printing_branch/src/app/composer/qgslegendmodel.cpp (rev 0)
+++ branches/advanced_printing_branch/src/app/composer/qgslegendmodel.cpp 2008-07-01 13:08:34 UTC (rev 8702)
@@ -0,0 +1,148 @@
+/***************************************************************************
+ qgslegendmodel.cpp - description
+ ------------------
+ begin : June 2008
+ copyright : (C) 2008 by Marco Hugentobler
+ email : marco dot hugentobler at karto dot baug dot ethz dot ch
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "qgslegendmodel.h"
+#include "qgsmaplayer.h"
+#include "qgsmaplayerregistry.h"
+#include "qgsrenderer.h"
+#include "qgssymbol.h"
+#include "qgsvectorlayer.h"
+
+QgsLegendModel::QgsLegendModel()
+{
+
+}
+
+QgsLegendModel::~QgsLegendModel()
+{
+
+}
+
+void QgsLegendModel::setLayerSet(const QStringList& layerIds)
+{
+ //in future check which layers have newly been added or deleted
+
+ mLayerIds = layerIds;
+
+ //for now clear the model and add the new entries
+ clear();
+
+ QStringList::const_iterator idIter = mLayerIds.constBegin();
+ QgsMapLayer* currentLayer = 0;
+
+ for(; idIter != mLayerIds.constEnd(); ++idIter)
+ {
+ currentLayer = QgsMapLayerRegistry::instance()->mapLayer(*idIter);
+
+ //addItem for layer
+ QStandardItem* layerItem = new QStandardItem(currentLayer->name());
+ layerItem->setFlags(Qt::ItemIsEnabled);
+ invisibleRootItem()->setChild (invisibleRootItem()->rowCount(), layerItem);
+
+ switch(currentLayer->type())
+ {
+ case QgsMapLayer::VECTOR:
+ addVectorLayerItems(layerItem, currentLayer);
+ break;
+ case QgsMapLayer::RASTER:
+ break;
+ default:
+ break;
+ }
+ }
+
+}
+
+int QgsLegendModel::addVectorLayerItems(QStandardItem* layerItem, QgsMapLayer* vlayer)
+{
+ if(!layerItem || !vlayer)
+ {
+ return 1;
+ }
+
+ QgsVectorLayer* vectorLayer = dynamic_cast<QgsVectorLayer*>(vlayer);
+ if(!vectorLayer)
+ {
+ return 2;
+ }
+
+ const QgsRenderer* vectorRenderer = vectorLayer->renderer();
+ if(!vectorRenderer)
+ {
+ return 3;
+ }
+
+ const QList<QgsSymbol*> vectorSymbols = vectorRenderer->symbols();
+ QList<QgsSymbol*>::const_iterator symbolIt = vectorSymbols.constBegin();
+
+ QStandardItem* currentSymbolItem = 0;
+ QStandardItem* currentLabelItem = 0;
+
+ for(; symbolIt != vectorSymbols.constEnd(); ++symbolIt)
+ {
+ if(!(*symbolIt))
+ {
+ continue;
+ }
+
+ //icon item
+ switch((*symbolIt)->type())
+ {
+ case QGis::Point:
+ currentSymbolItem = new QStandardItem(QIcon(QPixmap::fromImage((*symbolIt)->getPointSymbolAsImage())), "PointSymbol");
+ break;
+ case QGis::Line:
+ currentSymbolItem = new QStandardItem(QIcon(QPixmap::fromImage((*symbolIt)->getLineSymbolAsImage())), "PointSymbol");
+ break;
+ case QGis::Polygon:
+ currentSymbolItem = new QStandardItem(QIcon(QPixmap::fromImage((*symbolIt)->getPolygonSymbolAsImage())), "PointSymbol");
+ break;
+ default:
+ currentSymbolItem = 0;
+ break;
+ }
+
+ if(!currentSymbolItem)
+ {
+ continue;
+ }
+
+ int currentRowCount = layerItem->rowCount();
+ layerItem->setChild(currentRowCount, 0, currentSymbolItem);
+
+ //label
+ QString label;
+ QString lowerValue = (*symbolIt)->lowerValue();
+ QString upperValue = (*symbolIt)->upperValue();
+
+ if(lowerValue == upperValue)
+ {
+ label = lowerValue;
+ }
+ else
+ {
+ label = lowerValue + " - " + upperValue;
+ }
+
+ currentLabelItem = new QStandardItem(label);
+ layerItem->setChild(currentRowCount, 1, currentLabelItem);
+
+ }
+
+ return 0;
+}
+
Added: branches/advanced_printing_branch/src/app/composer/qgslegendmodel.h
===================================================================
--- branches/advanced_printing_branch/src/app/composer/qgslegendmodel.h (rev 0)
+++ branches/advanced_printing_branch/src/app/composer/qgslegendmodel.h 2008-07-01 13:08:34 UTC (rev 8702)
@@ -0,0 +1,44 @@
+/***************************************************************************
+ qgslegendmodel.h - description
+ -----------------
+ begin : June 2008
+ copyright : (C) 2008 by Marco Hugentobler
+ email : marco dot hugentobler at karto dot baug dot ethz dot ch
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef QGSLEGENDMODEL_H
+#define QGSLEGENDMODEL_H
+
+#include <QStandardItemModel>
+#include <QStringList>
+
+class QgsMapLayer;
+
+/**A model that provides layers as root items. The classification items are children of the layer items*/
+class QgsLegendModel: public QStandardItemModel
+{
+ public:
+ QgsLegendModel();
+ ~QgsLegendModel();
+
+ void setLayerSet(const QStringList& layerIds);
+
+ private:
+ /**Adds classification items of vector layers
+ @return 0 in case of success*/
+ int addVectorLayerItems(QStandardItem* layerItem, QgsMapLayer* vlayer);
+
+ protected:
+ QStringList mLayerIds;
+};
+
+#endif
Modified: branches/advanced_printing_branch/src/ui/qgscomposerbase.ui
===================================================================
--- branches/advanced_printing_branch/src/ui/qgscomposerbase.ui 2008-07-01 05:47:38 UTC (rev 8701)
+++ branches/advanced_printing_branch/src/ui/qgscomposerbase.ui 2008-07-01 13:08:34 UTC (rev 8702)
@@ -243,7 +243,7 @@
<addaction name="mActionAddNewMap" />
<addaction name="mActionAddImage" />
<addaction name="mActionAddNewLabel" />
- <addaction name="mActionAddNewVectLegend" />
+ <addaction name="mActionAddNewLegend" />
<addaction name="mActionAddNewScalebar" />
<addaction name="mActionSelectMoveItem" />
</widget>
@@ -311,7 +311,7 @@
<string>Add new label</string>
</property>
</action>
- <action name="mActionAddNewVectLegend" >
+ <action name="mActionAddNewLegend" >
<property name="icon" >
<iconset>../themes/default/mActionAddLegend.png</iconset>
</property>
More information about the QGIS-commit
mailing list