mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-12 00:02:25 -04:00
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
This commit is contained in:
parent
c61099c60e
commit
749f822bd0
@ -71,8 +71,15 @@ public slots:
|
|||||||
/** Initialise dialog to vector layer values */
|
/** Initialise dialog to vector layer values */
|
||||||
void init ( void );
|
void init ( void );
|
||||||
|
|
||||||
|
void on_cboLabelField_activated(int) {emit labelSourceSet(); }
|
||||||
|
|
||||||
|
signals:
|
||||||
|
/* emitted when anitem in label source list is chosen */
|
||||||
|
void labelSourceSet();
|
||||||
|
|
||||||
protected slots:
|
protected slots:
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QgsLabel *mLabel;
|
QgsLabel *mLabel;
|
||||||
QColor mFontColor;
|
QColor mFontColor;
|
||||||
|
@ -47,6 +47,8 @@ QgsVectorLayerProperties::QgsVectorLayerProperties(QgsVectorLayer * lyr,
|
|||||||
QVBoxLayout *layout = new QVBoxLayout( labelOptionsFrame );
|
QVBoxLayout *layout = new QVBoxLayout( labelOptionsFrame );
|
||||||
labelDialog = new QgsLabelDialog ( layer->label(), labelOptionsFrame);
|
labelDialog = new QgsLabelDialog ( layer->label(), labelOptionsFrame);
|
||||||
layout->addWidget( labelDialog );
|
layout->addWidget( labelDialog );
|
||||||
|
connect(labelDialog, SIGNAL(labelSourceSet()),
|
||||||
|
this, SLOT(setLabelCheckBox()));
|
||||||
|
|
||||||
// Create the Actions dialog tab
|
// Create the Actions dialog tab
|
||||||
QgsVectorDataProvider *dp = dynamic_cast<QgsVectorDataProvider *>(layer->getDataProvider());
|
QgsVectorDataProvider *dp = dynamic_cast<QgsVectorDataProvider *>(layer->getDataProvider());
|
||||||
@ -77,7 +79,8 @@ QgsVectorLayerProperties::QgsVectorLayerProperties(QgsVectorLayer * lyr,
|
|||||||
|
|
||||||
QgsVectorLayerProperties::~QgsVectorLayerProperties()
|
QgsVectorLayerProperties::~QgsVectorLayerProperties()
|
||||||
{
|
{
|
||||||
|
disconnect(labelDialog, SIGNAL(labelSourceSet()),
|
||||||
|
this, SLOT(setLabelCheckBox()));
|
||||||
}
|
}
|
||||||
void QgsVectorLayerProperties::sliderTransparency_valueChanged(int theValue)
|
void QgsVectorLayerProperties::sliderTransparency_valueChanged(int theValue)
|
||||||
{
|
{
|
||||||
@ -86,6 +89,11 @@ void QgsVectorLayerProperties::sliderTransparency_valueChanged(int theValue)
|
|||||||
lblTransparencyPercent->setText(tr("Transparency: ") + QString::number(myInt) + "%");
|
lblTransparencyPercent->setText(tr("Transparency: ") + QString::number(myInt) + "%");
|
||||||
}//sliderTransparency_valueChanged
|
}//sliderTransparency_valueChanged
|
||||||
|
|
||||||
|
void QgsVectorLayerProperties::setLabelCheckBox()
|
||||||
|
{
|
||||||
|
labelCheckBox->setCheckState(Qt::Checked);
|
||||||
|
}
|
||||||
|
|
||||||
void QgsVectorLayerProperties::alterLayerDialog(const QString & dialogString)
|
void QgsVectorLayerProperties::alterLayerDialog(const QString & dialogString)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -50,6 +50,8 @@ class QgsVectorLayerProperties : public QDialog, private Ui::QgsVectorLayerPrope
|
|||||||
QString getMetadata();
|
QString getMetadata();
|
||||||
/** Set transparency based on slider position */
|
/** Set transparency based on slider position */
|
||||||
void sliderTransparency_valueChanged(int theValue);
|
void sliderTransparency_valueChanged(int theValue);
|
||||||
|
/** Toggles on the label check box */
|
||||||
|
void setLabelCheckBox();
|
||||||
|
|
||||||
//
|
//
|
||||||
//methods reimplemented from qt designer base class
|
//methods reimplemented from qt designer base class
|
||||||
|
Loading…
x
Reference in New Issue
Block a user