diff --git a/qgis.dtd b/qgis.dtd index bb22034b641..b37ce3a1535 100644 --- a/qgis.dtd +++ b/qgis.dtd @@ -92,6 +92,7 @@ markersymbol(svgpath,scalefactor,outlinecolor,outlinestyle,outlinewidth,fillcolo + diff --git a/src/qgsdatabaselayer.h b/src/qgsdatabaselayer.h deleted file mode 100644 index f07939d1578..00000000000 --- a/src/qgsdatabaselayer.h +++ /dev/null @@ -1,91 +0,0 @@ -/*************************************************************************** - gsdatabaselayer.h - description - ------------------- - begin : Fri Jun 28 2002 - copyright : (C) 2002 by Gary E.Sherman - email : sherman at mrcc.com -***************************************************************************/ - -/*************************************************************************** - * * - * 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. * - * * - ***************************************************************************/ -/* $Id */ - -#ifndef QGSDATABASELAYER_H -#define QGSDATABASELAYER_H -class QString; -class QgsRect; - -#include "qgsmaplayer.h" - -/*! \class QgsDatabaseLayer - * \brief A map layer based on data stored in a relational database. - * - * At present Qgis supports PostGIS "layers" in PostgresQL. - */ -class QgsDatabaseLayer:public QgsMapLayer -{ - Q_OBJECT public: - /*! Constructor - * @param conninfo Pointer to the connection information required to - * connect to PostgresQL - *@param table Name of the table in the database that this layer - * represents - */ - QgsDatabaseLayer(const char *conninfo = 0, QString table = QString::null); - //! Destructor - ~QgsDatabaseLayer(); - //! Deprecated draw function - virtual void draw(QPainter *, QgsRect *, int); - //! Draws the layer using coordinate transformation - virtual void draw(QPainter *, QgsRect *, QgsCoordinateTransform * cFx); - //! Identify the feature found within the search rectangle - void identify(QgsRect *); - //! Display the attribute table - void table(); - //! Get the name of the geometry column - QString geometryColumnName(); - //! Get the name of the table containing the geometry column - QString geometryTableName(); - //! Get the name of the database - QString databaseName(); - //! Get the schema name - QString schemaName(); - private: - //! Calculates extent of the layer using SQL and PostGIS functions - QgsRect calculateExtent(); - //! Type geometry contained in the layer. This corresponds to one of the OGIS Simple geometry types - QString type; - //! WKB type - int wkbType; - //! Name of the database containing the layer (table) - QString database; - //! Name of the schema containing the layer (table) - QString schema; - //! Name of the table containing the features - QString tableName; - //! Name of the column in the table that contains the geometry for the features - QString geometryColumn; - //! Spatial reference id - QString srid; - //OGIS WKB types - - enum ENDIAN - { - NDR = 1, - XDR = 0 - }; - //! Returns the endian type for the client - int endian(); - /*! Endian type as string - * @return XDR or NDR - */ - QString endianString(); -}; - -#endif diff --git a/src/qgsvectorlayerproperties.cpp b/src/qgsvectorlayerproperties.cpp deleted file mode 100644 index 785eabc87bd..00000000000 --- a/src/qgsvectorlayerproperties.cpp +++ /dev/null @@ -1,130 +0,0 @@ -/*************************************************************************** - qgsvectorlayerproperties.cpp - description - ------------------- - begin : Sun Aug 11 2002 - copyright : (C) 2002 by Gary E.Sherman - email : sherman at mrcc dot com - Romans 3:23=>Romans 6:23=>Romans 5:8=>Romans 10:9,10=>Romans 12 - ***************************************************************************/ - -/*************************************************************************** - * * - * 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. * - * * - ***************************************************************************/ - /* $Id$ */ -#include -#include -#include -#include -#include -#include -#include -#include "qgsvectorlayer.h" -#include "qgssymbol.h" -#include "qgsvectorlayerproperties.h" -#include "qtabwidget.h" -#include -#include -//#include "qgssisydialog.h" -#include "qgssinglesymrenderer.h" -#include "qgsgraduatedsymrenderer.h" -#include -#include "qgslegenditem.h" -#include "qgscontinuouscolrenderer.h" -#include "qgssisydialog.h" -#include "qgsgrasydialog.h" -#include "qgscontcoldialog.h" - -QgsVectorLayerProperties::QgsVectorLayerProperties(QgsVectorLayer * lyr):layer(lyr), rendererDirty(false), bufferDialog(layer->rendererDialog()), -bufferRenderer(layer->renderer()) -{ - // populate the property sheet based on the layer properties - // general info - QString source = lyr->source(); - source = source.left(source.find("password")); - lblSource->setText(source); - setCaption("Layer Properties - " + lyr->name()); - connect(settingsbutton, SIGNAL(clicked()), this, SLOT(showSymbolSettings())); - legendtypecombobox->insertItem(tr("single symbol")); - legendtypecombobox->insertItem(tr("graduated symbol")); - legendtypecombobox->insertItem(tr("continuous color")); - QObject::connect(legendtypecombobox, SIGNAL(activated(const QString &)), this, SLOT(alterLayerDialog(const QString &))); - QObject::connect(buttonOk, SIGNAL(clicked()), this, SLOT(apply())); - QObject::connect(buttonCancel, SIGNAL(clicked()), this, SLOT(cancel())); -} - -QgsVectorLayerProperties::~QgsVectorLayerProperties() -{ - if (rendererDirty) - { - delete bufferDialog; - delete bufferRenderer; - } -} - -QgsSymbol *QgsVectorLayerProperties::getSymbol() -{ - //TODO Added return statement during win32 port - //TODO Check on this and remove or fix - return 0; -} - -void QgsVectorLayerProperties::alterLayerDialog(const QString & string) -{ - if (rendererDirty) - { - delete bufferDialog; - delete bufferRenderer; - } - //create a new Dialog - if (string == tr("single symbol")) - { - bufferRenderer = new QgsSingleSymRenderer(); - //bufferRenderer->initializeSymbology(layer,this); - } else if (string == tr("graduated symbol")) - { - bufferRenderer = new QgsGraduatedSymRenderer(); - //bufferRenderer->initializeSymbology(layer,this); - } else if (string == tr("continuous color")) - { - bufferRenderer = new QgsContinuousColRenderer(); - //bufferRenderer->initializeSymbology(layer,this); - } - rendererDirty = true; - -} - -void QgsVectorLayerProperties::showSymbolSettings() -{ - bufferDialog->show(); - bufferDialog->raise(); -} - -void QgsVectorLayerProperties::setLegendType(QString type) -{ - legendtypecombobox->setCurrentText(type); -} - -void QgsVectorLayerProperties::apply() -{ - if (rendererDirty) - { - layer->setRenderer(bufferRenderer); - layer->setRendererDialog(bufferDialog); - rendererDirty = false; - //copy the bufferPixmap to the vectorlayer and to its legend item - *(layer->legendPixmap()) = bufferPixmap; - layer->updateItemPixmap(); - } - accept(); - layer->triggerRepaint(); -} - -void QgsVectorLayerProperties::cancel() -{ - reject(); -} diff --git a/src/qgsvectorlayerproperties.h b/src/qgsvectorlayerproperties.h deleted file mode 100644 index 4cececf4eab..00000000000 --- a/src/qgsvectorlayerproperties.h +++ /dev/null @@ -1,114 +0,0 @@ -/*************************************************************************** - qgsvectorlayerproperties.h - description - ------------------- - begin : Sun Aug 11 2002 - copyright : (C) 2002 by Gary E.Sherman - email : sherman at mrcc dot com - Romans 3:23=>Romans 6:23=>Romans 5:8=>Romans 10:9,10=>Romans 12 - ***************************************************************************/ - -/*************************************************************************** - * * - * 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. * - * * - ***************************************************************************/ -/* $Id$ */ -#ifndef QGSVECTORLAYERPROPERTIES_H -#define QGSVECTORLAYERPROPERTIES_H -class QgsVectorLayer; -#include "qgssymbol.h" -class QString; -#ifdef WIN32 -#include "qgsvectorlayerpropertiesbase.h" -#else -#include "qgsvectorlayerpropertiesbase.uic.h" -#endif -#include "qgsrenderer.h" -#include "qpixmap.h" - - -/**Property sheet for a map layer - *@author Gary E.Sherman - */ - -class QgsVectorLayerProperties : public QgsVectorLayerPropertiesBase { - -Q_OBJECT - -public: -/*! Constructor -* @param ml Map layer for which properties will be displayed -*/ - QgsVectorLayerProperties(QgsVectorLayer* ml); - ~QgsVectorLayerProperties(); - //! Name to display in legend - QgsSymbol* getSymbol(); - /**Sets the legend type to "single symbol", "graduated symbol" or "continuous color"*/ - void setLegendType(QString type); - /**Sets the dirty flag to false*/ - void unsetRendererDirty(); - /**Returns the value of rendererDirty*/ - bool getRendererDirty() const; - /**Returns a pointer to the bufferDialog*/ - QDialog* getBufferDialog(); - /**Sets the buffer dialog*/ - void setBufferDialog(QDialog* dialog); - QgsRenderer* getBufferRenderer(); - QPixmap* getBufferPixmap(); -private: - QgsVectorLayer* layer; - /**Flag indicating if the render type still has to be changed (true) or not (false)*/ - bool rendererDirty; - /**Renderer dialog. If the legend type has changed, it is assigned to the vectorlayer if apply or ok are pressed*/ - QDialog* bufferDialog; - QgsRenderer* bufferRenderer; - QPixmap bufferPixmap; -public slots: - void alterLayerDialog(const QString& string); - /**Sets the dirty flag to true*/ - void setRendererDirty(); - void apply(); - void cancel(); -protected slots: - void showSymbolSettings(); -}; - -inline bool QgsVectorLayerProperties::getRendererDirty() const -{ - return rendererDirty; -} - -inline void QgsVectorLayerProperties::setRendererDirty() -{ - rendererDirty=true; -} - -inline void QgsVectorLayerProperties::unsetRendererDirty() -{ - rendererDirty=false; -} - -inline QDialog* QgsVectorLayerProperties::getBufferDialog() -{ - return bufferDialog; -} - -inline void QgsVectorLayerProperties::setBufferDialog(QDialog* dialog) -{ - bufferDialog=dialog; -} - -inline QgsRenderer* QgsVectorLayerProperties::getBufferRenderer() -{ - return bufferRenderer; -} - -inline QPixmap* QgsVectorLayerProperties::getBufferPixmap() -{ - return &bufferPixmap; -} - -#endif