Skip to content

Commit

Permalink
some minor cleanup in vector props
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@4828 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Feb 12, 2006
1 parent 307883f commit dd8e03e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 51 deletions.
12 changes: 3 additions & 9 deletions src/gui/qgscontcoldialog.cpp
Expand Up @@ -151,15 +151,9 @@ void QgsContColDialog::apply()
maxsymbol->setBrush(QBrush(lblMaxValue->paletteBackgroundColor()));
maxsymbol->setPen(QPen(QColor(0, 0, 0), outlinewidthspinbox->value()));
}

//set the render items to the buffer renderer of the property dialog (if there is one)
QgsContinuousColRenderer *renderer = dynamic_cast < QgsContinuousColRenderer * >(mVectorLayer->propertiesDialog()->getBufferRenderer());

if(!renderer)
{
renderer = new QgsContinuousColRenderer(mVectorLayer->vectorType());
mVectorLayer->setRenderer(renderer);
}

QgsContinuousColRenderer* renderer = new QgsContinuousColRenderer(mVectorLayer->vectorType());
mVectorLayer->setRenderer(renderer);

renderer->setMinimumSymbol(minsymbol);
renderer->setMaximumSymbol(maxsymbol);
Expand Down
1 change: 0 additions & 1 deletion src/gui/qgsgrasydialog.cpp
Expand Up @@ -215,7 +215,6 @@ void QgsGraSyDialog::apply()
{
delete sy;
}
//++i;
}

std::map<QString,int>::iterator iter=mFieldMap.find(classificationComboBox->currentText());
Expand Down
1 change: 1 addition & 0 deletions src/gui/qgsvectorlayer.cpp
Expand Up @@ -43,6 +43,7 @@
#include <QAction>
#include <QApplication>
#include <QCursor>
#include <QLibrary>
#include <q3listview.h>
#include <QPainter>
#include <QPolygon>
Expand Down
25 changes: 5 additions & 20 deletions src/gui/qgsvectorlayerproperties.cpp
Expand Up @@ -111,16 +111,6 @@ void QgsVectorLayerProperties::alterLayerDialog(const QString & dialogString)
widgetStackRenderers->raiseWidget(mRendererDialog);
}

QDialog *QgsVectorLayerProperties::getBufferDialog()
{
//return bufferDialog;
}

QgsRenderer *QgsVectorLayerProperties::getBufferRenderer()
{
//return bufferRenderer;
}

void QgsVectorLayerProperties::setLegendType(QString type)
{
legendtypecombobox->setCurrentText(type);
Expand Down Expand Up @@ -187,36 +177,31 @@ void QgsVectorLayerProperties::reset( void )
legendtypecombobox->insertItem(tr("Continuous Color"));
legendtypecombobox->insertItem(tr("Unique Value"));
}
if( layer->vectorType()==QGis::Point )
{
legendtypecombobox->insertItem(tr("Single Marker"));
if(myFields.size()>0)
{
legendtypecombobox->insertItem(tr("Graduated Marker"));
legendtypecombobox->insertItem(tr("Unique Value Marker"));
}
}
}

//todo: find out the type of renderer in the vectorlayer, create a dialog with these settings and add it to the form
//find out the type of renderer in the vectorlayer, create a dialog with these settings and add it to the form
delete mRendererDialog;
mRendererDialog=0;
QString rtype=layer->renderer()->name();
if(rtype=="Single Symbol")
{
mRendererDialog=new QgsSiSyDialog(layer);
legendtypecombobox->setCurrentIndex(0);
}
else if(rtype=="Graduated Symbol")
{
mRendererDialog=new QgsGraSyDialog(layer);
legendtypecombobox->setCurrentIndex(1);
}
else if(rtype=="Continuous Color")
{
mRendererDialog=new QgsContColDialog(layer);
legendtypecombobox->setCurrentIndex(2);
}
else if(rtype == "Unique Value")
{
mRendererDialog=new QgsUValDialog(layer);
legendtypecombobox->setCurrentIndex(3);
}

if(mRendererDialog)
Expand Down
21 changes: 0 additions & 21 deletions src/gui/qgsvectorlayerproperties.h
Expand Up @@ -41,15 +41,6 @@ class QgsVectorLayerProperties : public QDialog, private Ui::QgsVectorLayerPrope
void setRendererDirty(bool){}
/**Sets the attribute that is used in the Identify Results dialog box*/
void setDisplayField(QString name);
/**Returns a pointer to the bufferDialog*/
QDialog* getBufferDialog();
/**Sets the buffer dialog*/
void setBufferDialog(QDialog* dialog);
/**Returns a pointer to the buffer pixmap*/
QPixmap* getBufferPixmap();
/**Returns a pointer to the buffer renderer*/
QgsRenderer* getBufferRenderer();


public slots:
void alterLayerDialog(const QString& string);
Expand Down Expand Up @@ -87,18 +78,6 @@ class QgsVectorLayerProperties : public QDialog, private Ui::QgsVectorLayerPrope
//QPixmap bufferPixmap;
};


inline void QgsVectorLayerProperties::setBufferDialog(QDialog* dialog)
{
//bufferDialog=dialog;
}

inline QPixmap* QgsVectorLayerProperties::getBufferPixmap()
{
//return &bufferPixmap;
return 0;
}

inline QString QgsVectorLayerProperties::displayName()
{
return txtDisplayName->text();
Expand Down

0 comments on commit dd8e03e

Please sign in to comment.