Skip to content

Commit e35c82a

Browse files
author
g_j_m
committed
Move some more Q3 widgets to their Qt4 counterpart
Tidy up of the vector layer properties dialog box - remove some the excess space around widgets - make the contents of the tabs scale to fit the whole dialog box Fix a few uic warnings git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5953 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 6634ed5 commit e35c82a

File tree

6 files changed

+1362
-1464
lines changed

6 files changed

+1362
-1464
lines changed

src/gui/qgslabeldialog.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,6 @@ void QgsLabelDialog::init ( )
114114
cboFontTransparencyField->insertStringList(myFieldStringList);
115115
//cboFontTransparencyField->setCurrentItem(itemNoForField(mLabel->labelField(QgsLabel::FontTransparency),myFieldStringList));
116116

117-
//cboBufferColorField->clear();
118-
//cboBufferColorField->insertStringList(myFieldStringList);
119-
120117
cboBufferSizeField->clear();
121118
cboBufferSizeField->insertStringList(myFieldStringList);
122119
cboBufferSizeField->setCurrentItem(itemNoForField(mLabel->labelField(QgsLabel::BufferSize),myFieldStringList));

src/gui/qgsvectorlayerproperties.cpp

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,17 @@ QgsVectorLayerProperties::QgsVectorLayerProperties(QgsVectorLayer * lyr,
4545
setupUi(this);
4646
// Create the Label dialog tab
4747
QVBoxLayout *layout = new QVBoxLayout( labelOptionsFrame );
48+
layout->setMargin(0);
4849
labelDialog = new QgsLabelDialog ( layer->label(), labelOptionsFrame);
4950
layout->addWidget( labelDialog );
51+
labelOptionsFrame->setLayout(layout);
5052
connect(labelDialog, SIGNAL(labelSourceSet()),
5153
this, SLOT(setLabelCheckBox()));
5254

5355
// Create the Actions dialog tab
5456
QgsVectorDataProvider *dp = dynamic_cast<QgsVectorDataProvider *>(layer->getDataProvider());
5557
QVBoxLayout *actionLayout = new QVBoxLayout( actionOptionsFrame );
58+
actionLayout->setMargin(0);
5659
std::vector<QgsField> fields = dp->fields();
5760
actionDialog = new QgsAttributeActionDialog ( layer->actions(), fields,
5861
actionOptionsFrame );
@@ -117,7 +120,7 @@ void QgsVectorLayerProperties::alterLayerDialog(const QString & dialogString)
117120
mRendererDialog = new QgsUniqueValueDialog(layer);
118121
}
119122
widgetStackRenderers->addWidget(mRendererDialog);
120-
widgetStackRenderers->raiseWidget(mRendererDialog);
123+
widgetStackRenderers->setCurrentWidget(mRendererDialog);
121124
}
122125

123126
void QgsVectorLayerProperties::setLegendType(QString type)
@@ -211,7 +214,7 @@ void QgsVectorLayerProperties::reset( void )
211214
if(mRendererDialog)
212215
{
213216
widgetStackRenderers->addWidget(mRendererDialog);
214-
widgetStackRenderers->raiseWidget(mRendererDialog);
217+
widgetStackRenderers->setCurrentWidget(mRendererDialog);
215218
}
216219

217220

@@ -288,10 +291,10 @@ void QgsVectorLayerProperties::on_pbnApply_clicked()
288291
layer->setLayerName(displayName());
289292

290293

291-
QgsSingleSymbolDialog *sdialog = dynamic_cast < QgsSingleSymbolDialog * >(widgetStackRenderers->visibleWidget());
292-
QgsGraduatedSymbolDialog *gdialog = dynamic_cast < QgsGraduatedSymbolDialog * >(widgetStackRenderers->visibleWidget());
293-
QgsContinuousColorDialog *cdialog = dynamic_cast < QgsContinuousColorDialog * >(widgetStackRenderers->visibleWidget());
294-
QgsUniqueValueDialog* udialog = dynamic_cast< QgsUniqueValueDialog * >(widgetStackRenderers->visibleWidget());
294+
QgsSingleSymbolDialog *sdialog = dynamic_cast < QgsSingleSymbolDialog * >(widgetStackRenderers->currentWidget());
295+
QgsGraduatedSymbolDialog *gdialog = dynamic_cast < QgsGraduatedSymbolDialog * >(widgetStackRenderers->currentWidget());
296+
QgsContinuousColorDialog *cdialog = dynamic_cast < QgsContinuousColorDialog * >(widgetStackRenderers->currentWidget());
297+
QgsUniqueValueDialog* udialog = dynamic_cast< QgsUniqueValueDialog * >(widgetStackRenderers->currentWidget());
295298

296299
if (sdialog)
297300
{

0 commit comments

Comments
 (0)