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@5875 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
g_j_m committed Sep 26, 2006
1 parent c61099c commit 749f822
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
@@ -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 749f822

Please sign in to comment.