Skip to content
Permalink
Browse files
Automatically turn on the vector layer label toggle when the user sets
the label field. 


git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5875 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
g_j_m committed Sep 26, 2006
1 parent 1021436 commit cd587d1a0b0c773ee5bdbc38d5f4ebd3b377f1db
Showing with 18 additions and 1 deletion.
  1. +7 −0 src/gui/qgslabeldialog.h
  2. +9 −1 src/gui/qgsvectorlayerproperties.cpp
  3. +2 −0 src/gui/qgsvectorlayerproperties.h
@@ -71,8 +71,15 @@ public slots:
/** Initialise dialog to vector layer values */
void init ( void );

void on_cboLabelField_activated(int) {emit labelSourceSet(); }

signals:
/* emitted when anitem in label source list is chosen */
void labelSourceSet();

protected slots:


private:
QgsLabel *mLabel;
QColor mFontColor;
@@ -47,6 +47,8 @@ QgsVectorLayerProperties::QgsVectorLayerProperties(QgsVectorLayer * lyr,
QVBoxLayout *layout = new QVBoxLayout( labelOptionsFrame );
labelDialog = new QgsLabelDialog ( layer->label(), labelOptionsFrame);
layout->addWidget( labelDialog );
connect(labelDialog, SIGNAL(labelSourceSet()),
this, SLOT(setLabelCheckBox()));

// Create the Actions dialog tab
QgsVectorDataProvider *dp = dynamic_cast<QgsVectorDataProvider *>(layer->getDataProvider());
@@ -77,7 +79,8 @@ QgsVectorLayerProperties::QgsVectorLayerProperties(QgsVectorLayer * lyr,

QgsVectorLayerProperties::~QgsVectorLayerProperties()
{

disconnect(labelDialog, SIGNAL(labelSourceSet()),
this, SLOT(setLabelCheckBox()));
}
void QgsVectorLayerProperties::sliderTransparency_valueChanged(int theValue)
{
@@ -86,6 +89,11 @@ void QgsVectorLayerProperties::sliderTransparency_valueChanged(int theValue)
lblTransparencyPercent->setText(tr("Transparency: ") + QString::number(myInt) + "%");
}//sliderTransparency_valueChanged

void QgsVectorLayerProperties::setLabelCheckBox()
{
labelCheckBox->setCheckState(Qt::Checked);
}

void QgsVectorLayerProperties::alterLayerDialog(const QString & dialogString)
{

@@ -50,6 +50,8 @@ class QgsVectorLayerProperties : public QDialog, private Ui::QgsVectorLayerPrope
QString getMetadata();
/** Set transparency based on slider position */
void sliderTransparency_valueChanged(int theValue);
/** Toggles on the label check box */
void setLabelCheckBox();

//
//methods reimplemented from qt designer base class

0 comments on commit cd587d1

Please sign in to comment.