Skip to content

Commit cd587d1

Browse files
author
g_j_m
committedSep 26, 2006

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed
 

‎src/gui/qgslabeldialog.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,15 @@ public slots:
7171
/** Initialise dialog to vector layer values */
7272
void init ( void );
7373

74+
void on_cboLabelField_activated(int) {emit labelSourceSet(); }
75+
76+
signals:
77+
/* emitted when anitem in label source list is chosen */
78+
void labelSourceSet();
79+
7480
protected slots:
7581

82+
7683
private:
7784
QgsLabel *mLabel;
7885
QColor mFontColor;

‎src/gui/qgsvectorlayerproperties.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ QgsVectorLayerProperties::QgsVectorLayerProperties(QgsVectorLayer * lyr,
4747
QVBoxLayout *layout = new QVBoxLayout( labelOptionsFrame );
4848
labelDialog = new QgsLabelDialog ( layer->label(), labelOptionsFrame);
4949
layout->addWidget( labelDialog );
50+
connect(labelDialog, SIGNAL(labelSourceSet()),
51+
this, SLOT(setLabelCheckBox()));
5052

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

7880
QgsVectorLayerProperties::~QgsVectorLayerProperties()
7981
{
80-
82+
disconnect(labelDialog, SIGNAL(labelSourceSet()),
83+
this, SLOT(setLabelCheckBox()));
8184
}
8285
void QgsVectorLayerProperties::sliderTransparency_valueChanged(int theValue)
8386
{
@@ -86,6 +89,11 @@ void QgsVectorLayerProperties::sliderTransparency_valueChanged(int theValue)
8689
lblTransparencyPercent->setText(tr("Transparency: ") + QString::number(myInt) + "%");
8790
}//sliderTransparency_valueChanged
8891

92+
void QgsVectorLayerProperties::setLabelCheckBox()
93+
{
94+
labelCheckBox->setCheckState(Qt::Checked);
95+
}
96+
8997
void QgsVectorLayerProperties::alterLayerDialog(const QString & dialogString)
9098
{
9199

‎src/gui/qgsvectorlayerproperties.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ class QgsVectorLayerProperties : public QDialog, private Ui::QgsVectorLayerPrope
5050
QString getMetadata();
5151
/** Set transparency based on slider position */
5252
void sliderTransparency_valueChanged(int theValue);
53+
/** Toggles on the label check box */
54+
void setLabelCheckBox();
5355

5456
//
5557
//methods reimplemented from qt designer base class

0 commit comments

Comments
 (0)
Please sign in to comment.