1
/***************************************************************************
2
* Copyright (C) 2005 by Tim Sutton *
5
* This program is free software; you can redistribute it and/or modify *
6
* it under the terms of the GNU General Public License as published by *
7
* the Free Software Foundation; either version 2 of the License, or *
8
* (at your option) any later version. *
10
* This program is distributed in the hope that it will be useful, *
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13
* GNU General Public License for more details. *
15
* You should have received a copy of the GNU General Public License *
16
* along with this program; if not, write to the *
17
* Free Software Foundation, Inc., *
18
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19
***************************************************************************/
21
#include "qgslegendsymbologyitem.h"
23
QgsLegendSymbologyItem::QgsLegendSymbologyItem(QTreeWidgetItem * theItem,QString theString, int pixmapWidth, int pixmapHeight)
24
: QgsLegendItem(theItem, theString), mPixmapWidth(pixmapWidth), mPixmapHeight(pixmapHeight), mLegend(0)
26
mType = LEGEND_SYMBOL_ITEM;
29
QgsLegendSymbologyItem::QgsLegendSymbologyItem(int pixmapWidth, int pixmapHeight): QgsLegendItem(), mPixmapWidth(pixmapWidth), mPixmapHeight(pixmapHeight), mLegend(0)
31
mType = LEGEND_SYMBOL_ITEM;
34
QgsLegendSymbologyItem::~QgsLegendSymbologyItem()
38
mLegend->removePixmapWidthValue(mPixmapWidth);
39
mLegend->removePixmapHeightValue(mPixmapHeight);
43
QgsLegendItem::DRAG_ACTION QgsLegendSymbologyItem::accept(LEGEND_ITEM_TYPE type)
48
QgsLegendItem::DRAG_ACTION QgsLegendSymbologyItem::accept(const QgsLegendItem* li) const
53
void QgsLegendSymbologyItem::setLegend(QgsLegend* theLegend)
58
mLegend->addPixmapWidthValue(mPixmapWidth);
59
mLegend->addPixmapHeightValue(mPixmapHeight);