Skip to content

Commit

Permalink
Move some more Q3 widgets to their Qt4 counterpart
Browse files Browse the repository at this point in the history
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@5953 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
g_j_m committed Oct 14, 2006
1 parent e4d1bc8 commit b4fce7c
Show file tree
Hide file tree
Showing 6 changed files with 1,362 additions and 1,464 deletions.
3 changes: 0 additions & 3 deletions src/gui/qgslabeldialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,6 @@ void QgsLabelDialog::init ( )
cboFontTransparencyField->insertStringList(myFieldStringList);
//cboFontTransparencyField->setCurrentItem(itemNoForField(mLabel->labelField(QgsLabel::FontTransparency),myFieldStringList));

//cboBufferColorField->clear();
//cboBufferColorField->insertStringList(myFieldStringList);

cboBufferSizeField->clear();
cboBufferSizeField->insertStringList(myFieldStringList);
cboBufferSizeField->setCurrentItem(itemNoForField(mLabel->labelField(QgsLabel::BufferSize),myFieldStringList));
Expand Down
15 changes: 9 additions & 6 deletions src/gui/qgsvectorlayerproperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,17 @@ QgsVectorLayerProperties::QgsVectorLayerProperties(QgsVectorLayer * lyr,
setupUi(this);
// Create the Label dialog tab
QVBoxLayout *layout = new QVBoxLayout( labelOptionsFrame );
layout->setMargin(0);
labelDialog = new QgsLabelDialog ( layer->label(), labelOptionsFrame);
layout->addWidget( labelDialog );
labelOptionsFrame->setLayout(layout);
connect(labelDialog, SIGNAL(labelSourceSet()),
this, SLOT(setLabelCheckBox()));

// Create the Actions dialog tab
QgsVectorDataProvider *dp = dynamic_cast<QgsVectorDataProvider *>(layer->getDataProvider());
QVBoxLayout *actionLayout = new QVBoxLayout( actionOptionsFrame );
actionLayout->setMargin(0);
std::vector<QgsField> fields = dp->fields();
actionDialog = new QgsAttributeActionDialog ( layer->actions(), fields,
actionOptionsFrame );
Expand Down Expand Up @@ -117,7 +120,7 @@ void QgsVectorLayerProperties::alterLayerDialog(const QString & dialogString)
mRendererDialog = new QgsUniqueValueDialog(layer);
}
widgetStackRenderers->addWidget(mRendererDialog);
widgetStackRenderers->raiseWidget(mRendererDialog);
widgetStackRenderers->setCurrentWidget(mRendererDialog);
}

void QgsVectorLayerProperties::setLegendType(QString type)
Expand Down Expand Up @@ -211,7 +214,7 @@ void QgsVectorLayerProperties::reset( void )
if(mRendererDialog)
{
widgetStackRenderers->addWidget(mRendererDialog);
widgetStackRenderers->raiseWidget(mRendererDialog);
widgetStackRenderers->setCurrentWidget(mRendererDialog);
}


Expand Down Expand Up @@ -288,10 +291,10 @@ void QgsVectorLayerProperties::on_pbnApply_clicked()
layer->setLayerName(displayName());


QgsSingleSymbolDialog *sdialog = dynamic_cast < QgsSingleSymbolDialog * >(widgetStackRenderers->visibleWidget());
QgsGraduatedSymbolDialog *gdialog = dynamic_cast < QgsGraduatedSymbolDialog * >(widgetStackRenderers->visibleWidget());
QgsContinuousColorDialog *cdialog = dynamic_cast < QgsContinuousColorDialog * >(widgetStackRenderers->visibleWidget());
QgsUniqueValueDialog* udialog = dynamic_cast< QgsUniqueValueDialog * >(widgetStackRenderers->visibleWidget());
QgsSingleSymbolDialog *sdialog = dynamic_cast < QgsSingleSymbolDialog * >(widgetStackRenderers->currentWidget());
QgsGraduatedSymbolDialog *gdialog = dynamic_cast < QgsGraduatedSymbolDialog * >(widgetStackRenderers->currentWidget());
QgsContinuousColorDialog *cdialog = dynamic_cast < QgsContinuousColorDialog * >(widgetStackRenderers->currentWidget());
QgsUniqueValueDialog* udialog = dynamic_cast< QgsUniqueValueDialog * >(widgetStackRenderers->currentWidget());

if (sdialog)
{
Expand Down
Loading

0 comments on commit b4fce7c

Please sign in to comment.