mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Modernise diagram properties UI:
Switch to stacked widget, QgsScaleRangeWidget, QgsFieldExpression widget, QgsDoubleSpinBoxes. Rearrange and reword controls to clarify their behaviour.
This commit is contained in:
parent
16af787192
commit
b2ca7faf3e
@ -87,6 +87,7 @@ class QgsDiagramSettings
|
||||
bool scaleByArea;
|
||||
int angleOffset;
|
||||
|
||||
bool scaleBasedVisibility;
|
||||
//scale range (-1 if no lower / upper bound )
|
||||
double minScaleDenominator;
|
||||
double maxScaleDenominator;
|
||||
|
@ -38,7 +38,6 @@
|
||||
|
||||
QgsDiagramProperties::QgsDiagramProperties( QgsVectorLayer* layer, QWidget* parent )
|
||||
: QWidget( parent )
|
||||
, mAvailableAttributes( 0 )
|
||||
{
|
||||
mLayer = layer;
|
||||
|
||||
@ -55,6 +54,8 @@ QgsDiagramProperties::QgsDiagramProperties( QgsVectorLayer* layer, QWidget* pare
|
||||
connect( mEnableDiagramsCheckBox, SIGNAL( toggled( bool ) ), mDiagramTypeFrame, SLOT( setEnabled( bool ) ) );
|
||||
connect( mEnableDiagramsCheckBox, SIGNAL( toggled( bool ) ), mDiagramFrame, SLOT( setEnabled( bool ) ) );
|
||||
|
||||
mScaleRangeWidget->setMapCanvas( QgisApp::instance()->mapCanvas() );
|
||||
|
||||
mBackgroundColorButton->setColorDialogTitle( tr( "Select background color" ) );
|
||||
mBackgroundColorButton->setAllowAlpha( true );
|
||||
mBackgroundColorButton->setContext( "symbology" );
|
||||
@ -66,9 +67,7 @@ QgsDiagramProperties::QgsDiagramProperties( QgsVectorLayer* layer, QWidget* pare
|
||||
mDiagramPenColorButton->setShowNoColor( true );
|
||||
mDiagramPenColorButton->setNoColorString( tr( "Transparent outline" ) );
|
||||
|
||||
mValueLineEdit->setValidator( new QDoubleValidator( mValueLineEdit ) );
|
||||
mMinimumDiagramScaleLineEdit->setValidator( new QDoubleValidator( mMinimumDiagramScaleLineEdit ) );
|
||||
mMaximumDiagramScaleLineEdit->setValidator( new QDoubleValidator( mMaximumDiagramScaleLineEdit ) );
|
||||
mMaxValueSpinBox->setShowClearButton( false );
|
||||
|
||||
mDiagramUnitComboBox->insertItem( 0, tr( "mm" ), QgsDiagramSettings::MM );
|
||||
mDiagramUnitComboBox->insertItem( 1, tr( "Map units" ), QgsDiagramSettings::MapUnits );
|
||||
@ -84,25 +83,27 @@ QgsDiagramProperties::QgsDiagramProperties( QgsVectorLayer* layer, QWidget* pare
|
||||
|
||||
//insert placement options
|
||||
mPlacementComboBox->blockSignals( true );
|
||||
if ( layerType == QGis::Point || layerType == QGis::Polygon )
|
||||
switch ( layerType )
|
||||
{
|
||||
mPlacementComboBox->addItem( tr( "Around Point" ), QgsDiagramLayerSettings::AroundPoint );
|
||||
mPlacementComboBox->addItem( tr( "Over Point" ), QgsDiagramLayerSettings::OverPoint );
|
||||
mPlacementFrame->setVisible( true );
|
||||
mLinePlacementFrame->setVisible( false );
|
||||
}
|
||||
|
||||
if ( layerType == QGis::Line )
|
||||
{
|
||||
mPlacementFrame->setVisible( false );
|
||||
mLinePlacementFrame->setVisible( true );
|
||||
}
|
||||
|
||||
if ( layerType == QGis::Polygon )
|
||||
{
|
||||
mPlacementComboBox->addItem( tr( "Line" ), QgsDiagramLayerSettings::Line );
|
||||
mPlacementComboBox->addItem( tr( "Horizontal" ), QgsDiagramLayerSettings::Horizontal );
|
||||
mPlacementComboBox->addItem( tr( "Free" ), QgsDiagramLayerSettings::Free );
|
||||
case QGis::Point:
|
||||
mPlacementComboBox->addItem( tr( "Around Point" ), QgsDiagramLayerSettings::AroundPoint );
|
||||
mPlacementComboBox->addItem( tr( "Over Point" ), QgsDiagramLayerSettings::OverPoint );
|
||||
mLinePlacementFrame->setVisible( false );
|
||||
break;
|
||||
case QGis::Line:
|
||||
mPlacementComboBox->addItem( tr( "Around Line" ), QgsDiagramLayerSettings::Line );
|
||||
mPlacementComboBox->addItem( tr( "Over Line" ), QgsDiagramLayerSettings::Horizontal );
|
||||
mLinePlacementFrame->setVisible( true );
|
||||
break;
|
||||
case QGis::Polygon:
|
||||
mPlacementComboBox->addItem( tr( "Around Centroid" ), QgsDiagramLayerSettings::AroundPoint );
|
||||
mPlacementComboBox->addItem( tr( "Over Centroid" ), QgsDiagramLayerSettings::OverPoint );
|
||||
mPlacementComboBox->addItem( tr( "Perimeter" ), QgsDiagramLayerSettings::Line );
|
||||
mPlacementComboBox->addItem( tr( "Inside Polygon" ), QgsDiagramLayerSettings::Horizontal );
|
||||
mLinePlacementFrame->setVisible( false );
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
mPlacementComboBox->blockSignals( false );
|
||||
|
||||
@ -147,25 +148,21 @@ QgsDiagramProperties::QgsDiagramProperties( QgsVectorLayer* layer, QWidget* pare
|
||||
mDiagramOptionsSplitter->restoreState( settings.value( QString( "/Windows/Diagrams/OptionsSplitState" ) ).toByteArray() );
|
||||
mDiagramOptionsListWidget->setCurrentRow( settings.value( QString( "/Windows/Diagrams/Tab" ), 0 ).toInt() );
|
||||
|
||||
// field combo and expression button
|
||||
mSizeFieldExpressionWidget->setLayer( mLayer );
|
||||
QgsDistanceArea myDa;
|
||||
myDa.setSourceCrs( mLayer->crs().srsid() );
|
||||
myDa.setEllipsoidalMode( QgisApp::instance()->mapCanvas()->mapSettings().hasCrsTransformEnabled() );
|
||||
myDa.setEllipsoid( QgsProject::instance()->readEntry( "Measure", "/Ellipsoid", GEO_NONE ) );
|
||||
mSizeFieldExpressionWidget->setGeomCalculator( myDa );
|
||||
|
||||
//insert all attributes into the combo boxes
|
||||
const QgsFields& layerFields = layer->pendingFields();
|
||||
for ( int idx = 0; idx < layerFields.count(); ++idx )
|
||||
{
|
||||
QTreeWidgetItem *newItem = new QTreeWidgetItem( mAttributesTreeWidget );
|
||||
QString name = QString( "\"%1\"" ).arg( layerFields[idx].name() );
|
||||
newItem->setText( 0, name );
|
||||
newItem->setData( 0, Qt::UserRole, name );
|
||||
newItem->setFlags( newItem->flags() & ~Qt::ItemIsDropEnabled );
|
||||
if ( layerFields[idx].type() != QVariant::String )
|
||||
{
|
||||
mSizeAttributeComboBox->addItem( layerFields[idx].name(), idx );
|
||||
}
|
||||
|
||||
mDataDefinedXComboBox->addItem( layerFields[idx].name(), idx );
|
||||
mDataDefinedYComboBox->addItem( layerFields[idx].name(), idx );
|
||||
}
|
||||
mAvailableAttributes = mSizeAttributeComboBox->count();
|
||||
|
||||
const QgsDiagramRendererV2* dr = layer->diagramRenderer();
|
||||
if ( !dr ) //no diagram renderer yet, insert reasonable default
|
||||
@ -182,10 +179,9 @@ QgsDiagramProperties::QgsDiagramProperties( QgsVectorLayer* layer, QWidget* pare
|
||||
mIncreaseMinimumSizeSpinBox->setEnabled( false );
|
||||
mIncreaseMinimumSizeLabel->setEnabled( false );
|
||||
mBarWidthSpinBox->setValue( 5 );
|
||||
mVisibilityGroupBox->setChecked( layer->hasScaleBasedVisibility() );
|
||||
mScaleVisibilityGroupBox->setChecked( layer->hasScaleBasedVisibility() );
|
||||
mScaleRangeWidget->setScaleRange( 1.0 / layer->maximumScale(), 1.0 / layer->minimumScale() ); // caution: layer uses scale denoms, widget uses true scales
|
||||
mShowAllCheckBox->setChecked( true );
|
||||
mMaximumDiagramScaleLineEdit->setText( QString::number( layer->maximumScale() ) );
|
||||
mMinimumDiagramScaleLineEdit->setText( QString::number( layer->minimumScale() ) );
|
||||
|
||||
switch ( layerType )
|
||||
{
|
||||
@ -237,14 +233,14 @@ QgsDiagramProperties::QgsDiagramProperties( QgsVectorLayer* layer, QWidget* pare
|
||||
mDiagramFont = settingList.at( 0 ).font;
|
||||
QSizeF size = settingList.at( 0 ).size;
|
||||
mBackgroundColorButton->setColor( settingList.at( 0 ).backgroundColor );
|
||||
mTransparencySlider->setValue( settingList.at( 0 ).transparency );
|
||||
mTransparencySpinBox->setValue( settingList.at( 0 ).transparency * 100.0 / 255.0 );
|
||||
mDiagramPenColorButton->setColor( settingList.at( 0 ).penColor );
|
||||
mPenWidthSpinBox->setValue( settingList.at( 0 ).penWidth );
|
||||
mDiagramSizeSpinBox->setValue(( size.width() + size.height() ) / 2.0 );
|
||||
mMinimumDiagramScaleLineEdit->setText( QString::number( settingList.at( 0 ).minScaleDenominator, 'f' ) );
|
||||
mMaximumDiagramScaleLineEdit->setText( QString::number( settingList.at( 0 ).maxScaleDenominator, 'f' ) );
|
||||
mVisibilityGroupBox->setChecked( settingList.at( 0 ).minScaleDenominator != -1 &&
|
||||
settingList.at( 0 ).maxScaleDenominator != -1 );
|
||||
// caution: layer uses scale denoms, widget uses true scales
|
||||
mScaleRangeWidget->setScaleRange( 1.0 / ( settingList.at( 0 ).maxScaleDenominator > 0 ? settingList.at( 0 ).maxScaleDenominator : layer->maximumScale() ),
|
||||
1.0 / ( settingList.at( 0 ).minScaleDenominator > 0 ? settingList.at( 0 ).minScaleDenominator : layer->minimumScale() ) );
|
||||
mScaleVisibilityGroupBox->setChecked( settingList.at( 0 ).scaleBasedVisibility );
|
||||
if ( settingList.at( 0 ).sizeType == QgsDiagramSettings::MM )
|
||||
{
|
||||
mDiagramUnitComboBox->setCurrentIndex( 0 );
|
||||
@ -328,16 +324,15 @@ QgsDiagramProperties::QgsDiagramProperties( QgsVectorLayer* layer, QWidget* pare
|
||||
{
|
||||
mDiagramSizeSpinBox->setEnabled( false );
|
||||
mLinearScaleFrame->setEnabled( true );
|
||||
mValueLineEdit->setText( QString::number( lidr->upperValue(), 'f' ) );
|
||||
mMaxValueSpinBox->setValue( lidr->upperValue() );
|
||||
mSizeSpinBox->setValue(( lidr->upperSize().width() + lidr->upperSize().height() ) / 2 );
|
||||
if ( lidr->classificationAttributeIsExpression() )
|
||||
{
|
||||
mSizeAttributeComboBox->addItem( lidr->classificationAttributeExpression() );
|
||||
mSizeAttributeComboBox->setCurrentIndex( mSizeAttributeComboBox->count() - 1 );
|
||||
mSizeFieldExpressionWidget->setField( lidr->classificationAttributeExpression() );
|
||||
}
|
||||
else
|
||||
{
|
||||
mSizeAttributeComboBox->setCurrentIndex( mSizeAttributeComboBox->findData( lidr->classificationAttribute() ) );
|
||||
mSizeFieldExpressionWidget->setField( mLayer->pendingFields().at( lidr->classificationAttribute() ).name() );
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -381,8 +376,9 @@ QgsDiagramProperties::QgsDiagramProperties( QgsVectorLayer* layer, QWidget* pare
|
||||
}
|
||||
} // if ( !dr )
|
||||
|
||||
connect( mSizeAttributeExpression, SIGNAL( clicked() ), this, SLOT( showSizeAttributeExpressionDialog() ) );
|
||||
connect( mAddAttributeExpression, SIGNAL( clicked() ), this, SLOT( showAddAttributeExpressionDialog() ) );
|
||||
connect( mTransparencySlider, SIGNAL( valueChanged( int ) ), mTransparencySpinBox, SLOT( setValue( int ) ) );
|
||||
connect( mTransparencySpinBox, SIGNAL( valueChanged( int ) ), mTransparencySlider, SLOT( setValue( int ) ) );
|
||||
}
|
||||
|
||||
QgsDiagramProperties::~QgsDiagramProperties()
|
||||
@ -419,7 +415,9 @@ void QgsDiagramProperties::on_mDiagramTypeComboBox_currentIndexChanged( int inde
|
||||
mAttributeBasedScalingRadio->setChecked( true );
|
||||
mFixedSizeRadio->setEnabled( false );
|
||||
mDiagramSizeSpinBox->setEnabled( false );
|
||||
mLinearlyScalingLabel->setText( tr( "Bar length: Scale linearly, such as the following value matches the specified size." ) );
|
||||
mLinearlyScalingLabel->setText( tr( "Bar length: Scale linearly, so that the following value matches the specified bar length:" ) );
|
||||
mSizeLabel->setText( tr( "Bar length" ) );
|
||||
mFrameIncreaseSize->setVisible( false );
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -427,9 +425,11 @@ void QgsDiagramProperties::on_mDiagramTypeComboBox_currentIndexChanged( int inde
|
||||
mBarWidthSpinBox->hide();
|
||||
mBarOptionsFrame->hide();
|
||||
mLinearlyScalingLabel->setText( tr( "Scale linearly between 0 and the following attribute value / diagram size:" ) );
|
||||
mSizeLabel->setText( tr( "Size" ) );
|
||||
mAttributeBasedScalingRadio->setEnabled( true );
|
||||
mFixedSizeRadio->setEnabled( true );
|
||||
mDiagramSizeSpinBox->setEnabled( mFixedSizeRadio->isChecked() );
|
||||
mFrameIncreaseSize->setVisible( true );
|
||||
}
|
||||
|
||||
if ( DIAGRAM_NAME_TEXT == diagramType || DIAGRAM_NAME_PIE == diagramType )
|
||||
@ -471,12 +471,6 @@ void QgsDiagramProperties::addAttribute( QTreeWidgetItem * item )
|
||||
mDiagramAttributesTreeWidget->addTopLevelItem( newItem );
|
||||
}
|
||||
|
||||
|
||||
void QgsDiagramProperties::on_mTransparencySlider_valueChanged( int value )
|
||||
{
|
||||
mTransparencyLabel->setText( tr( "Transparency: %1%" ).arg( value * 100 / 255 ) );
|
||||
}
|
||||
|
||||
void QgsDiagramProperties::on_mAddCategoryPushButton_clicked()
|
||||
{
|
||||
foreach ( QTreeWidgetItem *attributeItem, mAttributesTreeWidget->selectedItems() )
|
||||
@ -505,9 +499,12 @@ void QgsDiagramProperties::on_mFindMaximumValueButton_clicked()
|
||||
return;
|
||||
|
||||
float maxValue = 0.0;
|
||||
if ( mSizeAttributeComboBox->currentIndex() >= mAvailableAttributes )
|
||||
|
||||
bool isExpression;
|
||||
QString sizeFieldNameOrExp = mSizeFieldExpressionWidget->currentField( &isExpression );
|
||||
if ( isExpression )
|
||||
{
|
||||
QgsExpression exp( mSizeAttributeComboBox->currentText() );
|
||||
QgsExpression exp( sizeFieldNameOrExp );
|
||||
exp.prepare( mLayer->pendingFields() );
|
||||
if ( !exp.hasEvalError() )
|
||||
{
|
||||
@ -525,9 +522,11 @@ void QgsDiagramProperties::on_mFindMaximumValueButton_clicked()
|
||||
}
|
||||
else
|
||||
{
|
||||
maxValue = mLayer->maximumValue( mSizeAttributeComboBox->itemData( mSizeAttributeComboBox->currentIndex() ).toInt() ).toFloat();
|
||||
int attributeNumber = mLayer->pendingFields().fieldNameIndex( sizeFieldNameOrExp );
|
||||
maxValue = mLayer->maximumValue( attributeNumber ).toFloat();
|
||||
}
|
||||
mValueLineEdit->setText( QString( "%1" ).arg( maxValue ) );
|
||||
|
||||
mMaxValueSpinBox->setValue( maxValue );
|
||||
}
|
||||
|
||||
void QgsDiagramProperties::on_mDiagramFontButton_clicked()
|
||||
@ -571,6 +570,7 @@ void QgsDiagramProperties::apply()
|
||||
QgsMessageBar::WARNING );
|
||||
}
|
||||
|
||||
#if 0
|
||||
bool scaleAttributeValueOk = false;
|
||||
// Check if a (usable) scale attribute value is inserted
|
||||
mValueLineEdit->text().toDouble( &scaleAttributeValueOk );
|
||||
@ -614,9 +614,10 @@ void QgsDiagramProperties::apply()
|
||||
QgsMessageBar::INFO,
|
||||
5 );
|
||||
|
||||
mValueLineEdit->setText( QString::number( maxVal ) );
|
||||
mMaxValueSpinBox->setValue( maxVal );
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if ( diagramType == DIAGRAM_NAME_TEXT )
|
||||
{
|
||||
@ -634,7 +635,7 @@ void QgsDiagramProperties::apply()
|
||||
QgsDiagramSettings ds;
|
||||
ds.enabled = mEnableDiagramsCheckBox->isChecked();
|
||||
ds.font = mDiagramFont;
|
||||
ds.transparency = mTransparencySlider->value();
|
||||
ds.transparency = mTransparencySpinBox->value() * 255.0 / 100.0;
|
||||
|
||||
QList<QColor> categoryColors;
|
||||
QList<QString> categoryAttributes;
|
||||
@ -664,16 +665,10 @@ void QgsDiagramProperties::apply()
|
||||
ds.backgroundColor = mBackgroundColorButton->color();
|
||||
ds.penColor = mDiagramPenColorButton->color();
|
||||
ds.penWidth = mPenWidthSpinBox->value();
|
||||
if ( mVisibilityGroupBox->isChecked() )
|
||||
{
|
||||
ds.minScaleDenominator = mMinimumDiagramScaleLineEdit->text().toDouble();
|
||||
ds.maxScaleDenominator = mMaximumDiagramScaleLineEdit->text().toDouble();
|
||||
}
|
||||
else
|
||||
{
|
||||
ds.minScaleDenominator = -1;
|
||||
ds.maxScaleDenominator = -1;
|
||||
}
|
||||
// caution: layer uses scale denoms, widget uses true scales
|
||||
ds.maxScaleDenominator = 1.0 / mScaleRangeWidget->minimumScale();
|
||||
ds.minScaleDenominator = 1.0 / mScaleRangeWidget->maximumScale();
|
||||
ds.scaleBasedVisibility = mScaleVisibilityGroupBox->isChecked();
|
||||
|
||||
// Diagram angle offset (pie)
|
||||
ds.angleOffset = mAngleOffsetComboBox->itemData( mAngleOffsetComboBox->currentIndex() ).toInt();
|
||||
@ -695,17 +690,20 @@ void QgsDiagramProperties::apply()
|
||||
QgsLinearlyInterpolatedDiagramRenderer* dr = new QgsLinearlyInterpolatedDiagramRenderer();
|
||||
dr->setLowerValue( 0.0 );
|
||||
dr->setLowerSize( QSizeF( 0.0, 0.0 ) );
|
||||
dr->setUpperValue( mValueLineEdit->text().toDouble() );
|
||||
dr->setUpperValue( mMaxValueSpinBox->value() );
|
||||
dr->setUpperSize( QSizeF( mSizeSpinBox->value(), mSizeSpinBox->value() ) );
|
||||
bool isExpression = mSizeAttributeComboBox->currentIndex() >= mAvailableAttributes;
|
||||
|
||||
bool isExpression;
|
||||
QString sizeFieldNameOrExp = mSizeFieldExpressionWidget->currentField( &isExpression );
|
||||
dr->setClassificationAttributeIsExpression( isExpression );
|
||||
if ( isExpression )
|
||||
{
|
||||
dr->setClassificationAttributeExpression( mSizeAttributeComboBox->currentText() );
|
||||
dr->setClassificationAttributeExpression( sizeFieldNameOrExp );
|
||||
}
|
||||
else
|
||||
{
|
||||
dr->setClassificationAttribute( mSizeAttributeComboBox->itemData( mSizeAttributeComboBox->currentIndex() ).toInt() );
|
||||
int attributeNumber = mLayer->pendingFields().fieldNameIndex( sizeFieldNameOrExp );
|
||||
dr->setClassificationAttribute( attributeNumber );
|
||||
}
|
||||
dr->setDiagram( diagram );
|
||||
dr->setDiagramSettings( ds );
|
||||
@ -727,7 +725,6 @@ void QgsDiagramProperties::apply()
|
||||
dls.yPosColumn = -1;
|
||||
}
|
||||
dls.placement = ( QgsDiagramLayerSettings::Placement )mPlacementComboBox->itemData( mPlacementComboBox->currentIndex() ).toInt();
|
||||
|
||||
dls.placementFlags = ( QgsDiagramLayerSettings::LinePlacementFlags )0;
|
||||
if ( chkLineAbove->isChecked() )
|
||||
dls.placementFlags |= QgsDiagramLayerSettings::AboveLine;
|
||||
@ -741,36 +738,6 @@ void QgsDiagramProperties::apply()
|
||||
mLayer->setDiagramLayerSettings( dls );
|
||||
}
|
||||
|
||||
void QgsDiagramProperties::showSizeAttributeExpressionDialog()
|
||||
{
|
||||
QString current = mSizeAttributeComboBox->currentText();
|
||||
if ( mSizeAttributeComboBox->currentIndex() < mAvailableAttributes )
|
||||
{
|
||||
current = QString( "\"%1\"" ).arg( current );
|
||||
}
|
||||
QgsExpressionBuilderDialog dlg( mLayer, current, this );
|
||||
|
||||
dlg.setWindowTitle( tr( "Expression based attribute" ) );
|
||||
|
||||
QgsDistanceArea myDa;
|
||||
myDa.setSourceCrs( mLayer->crs().srsid() );
|
||||
myDa.setEllipsoidalMode( QgisApp::instance()->mapCanvas()->mapSettings().hasCrsTransformEnabled() );
|
||||
myDa.setEllipsoid( QgsProject::instance()->readEntry( "Measure", "/Ellipsoid", GEO_NONE ) );
|
||||
dlg.setGeomCalculator( myDa );
|
||||
|
||||
if ( dlg.exec() == QDialog::Accepted )
|
||||
{
|
||||
QString expression = dlg.expressionText();
|
||||
//Only add the expression if the user has entered some text.
|
||||
if ( !expression.isEmpty() )
|
||||
{
|
||||
mSizeAttributeComboBox->addItem( expression );
|
||||
mSizeAttributeComboBox->setCurrentIndex( mSizeAttributeComboBox->count() - 1 );
|
||||
}
|
||||
}
|
||||
activateWindow(); // set focus back parent
|
||||
}
|
||||
|
||||
void QgsDiagramProperties::showAddAttributeExpressionDialog()
|
||||
{
|
||||
QString expression;
|
||||
@ -822,14 +789,21 @@ void QgsDiagramProperties::on_mDiagramStackedWidget_currentChanged( int index )
|
||||
void QgsDiagramProperties::on_mPlacementComboBox_currentIndexChanged( int index )
|
||||
{
|
||||
QgsDiagramLayerSettings::Placement currentPlacement = ( QgsDiagramLayerSettings::Placement )mPlacementComboBox->itemData( index ).toInt();
|
||||
if ( currentPlacement == QgsDiagramLayerSettings::OverPoint )
|
||||
{
|
||||
mDiagramDistanceLabel->setEnabled( false );
|
||||
mDiagramDistanceSpinBox->setEnabled( false );
|
||||
}
|
||||
else
|
||||
if ( currentPlacement == QgsDiagramLayerSettings::AroundPoint ||
|
||||
( currentPlacement == QgsDiagramLayerSettings::Line && mLayer->geometryType() == QGis::Line ) )
|
||||
{
|
||||
mDiagramDistanceLabel->setEnabled( true );
|
||||
mDiagramDistanceSpinBox->setEnabled( true );
|
||||
}
|
||||
else
|
||||
{
|
||||
mDiagramDistanceLabel->setEnabled( false );
|
||||
mDiagramDistanceSpinBox->setEnabled( false );
|
||||
}
|
||||
|
||||
bool linePlacementEnabled = mLayer->geometryType() == QGis::Line && currentPlacement == QgsDiagramLayerSettings::Line;
|
||||
chkLineAbove->setEnabled( linePlacementEnabled );
|
||||
chkLineBelow->setEnabled( linePlacementEnabled );
|
||||
chkLineOn->setEnabled( linePlacementEnabled );
|
||||
chkLineOrientationDependent->setEnabled( linePlacementEnabled );
|
||||
}
|
||||
|
@ -38,7 +38,6 @@ class APP_EXPORT QgsDiagramProperties : public QWidget, private Ui::QgsDiagramPr
|
||||
public slots:
|
||||
void apply();
|
||||
void on_mDiagramTypeComboBox_currentIndexChanged( int index );
|
||||
void on_mTransparencySlider_valueChanged( int value );
|
||||
void on_mAddCategoryPushButton_clicked();
|
||||
void on_mAttributesTreeWidget_itemDoubleClicked( QTreeWidgetItem * item, int column );
|
||||
void on_mFindMaximumValueButton_clicked();
|
||||
@ -46,7 +45,6 @@ class APP_EXPORT QgsDiagramProperties : public QWidget, private Ui::QgsDiagramPr
|
||||
void on_mDiagramFontButton_clicked();
|
||||
void on_mDiagramAttributesTreeWidget_itemDoubleClicked( QTreeWidgetItem * item, int column );
|
||||
void on_mEngineSettingsButton_clicked();
|
||||
void showSizeAttributeExpressionDialog();
|
||||
void showAddAttributeExpressionDialog();
|
||||
void on_mDiagramStackedWidget_currentChanged( int index );
|
||||
void on_mPlacementComboBox_currentIndexChanged( int index );
|
||||
@ -56,9 +54,6 @@ class APP_EXPORT QgsDiagramProperties : public QWidget, private Ui::QgsDiagramPr
|
||||
|
||||
QgsVectorLayer* mLayer;
|
||||
|
||||
private:
|
||||
int mAvailableAttributes;
|
||||
|
||||
};
|
||||
|
||||
#endif // QGSDIAGRAMPROPERTIES_H
|
||||
|
@ -91,6 +91,14 @@ void QgsDiagramSettings::readXML( const QDomElement& elem, const QgsVectorLayer*
|
||||
|
||||
minScaleDenominator = elem.attribute( "minScaleDenominator", "-1" ).toDouble();
|
||||
maxScaleDenominator = elem.attribute( "maxScaleDenominator", "-1" ).toDouble();
|
||||
if ( elem.hasAttribute( "scaleBasedVisibility" ) )
|
||||
{
|
||||
scaleBasedVisibility = ( elem.attribute( "scaleBasedVisibility", "1" ) != "0" );
|
||||
}
|
||||
else
|
||||
{
|
||||
scaleBasedVisibility = minScaleDenominator >= 0 && maxScaleDenominator >= 0;
|
||||
}
|
||||
|
||||
//mm vs map units
|
||||
if ( elem.attribute( "sizeType" ) == "MM" )
|
||||
@ -199,6 +207,7 @@ void QgsDiagramSettings::writeXML( QDomElement& rendererElem, QDomDocument& doc,
|
||||
categoryElem.setAttribute( "penColor", penColor.name() );
|
||||
categoryElem.setAttribute( "penAlpha", penColor.alpha() );
|
||||
categoryElem.setAttribute( "penWidth", QString::number( penWidth ) );
|
||||
categoryElem.setAttribute( "scaleBasedVisibility", scaleBasedVisibility );
|
||||
categoryElem.setAttribute( "minScaleDenominator", QString::number( minScaleDenominator ) );
|
||||
categoryElem.setAttribute( "maxScaleDenominator", QString::number( maxScaleDenominator ) );
|
||||
categoryElem.setAttribute( "transparency", QString::number( transparency ) );
|
||||
|
@ -120,6 +120,7 @@ class CORE_EXPORT QgsDiagramSettings
|
||||
, transparency( 0 )
|
||||
, scaleByArea( true )
|
||||
, angleOffset( 90 * 16 ) //top
|
||||
, scaleBasedVisibility( false )
|
||||
, minScaleDenominator( -1 )
|
||||
, maxScaleDenominator( -1 )
|
||||
, minimumSize( 0.0 )
|
||||
@ -140,6 +141,7 @@ class CORE_EXPORT QgsDiagramSettings
|
||||
bool scaleByArea;
|
||||
int angleOffset;
|
||||
|
||||
bool scaleBasedVisibility;
|
||||
//scale range (-1 if no lower / upper bound )
|
||||
double minScaleDenominator;
|
||||
double maxScaleDenominator;
|
||||
|
@ -11,31 +11,13 @@
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_8" stretch="0,0,1">
|
||||
<property name="leftMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<property name="margin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QFrame" name="frameShowDiagrams">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
@ -103,16 +85,7 @@
|
||||
<property name="spacing">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
@ -150,21 +123,12 @@
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_6">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="1">
|
||||
<widget class="QSplitter" name="mDiagramOptionsSplitter">
|
||||
<property name="orientation">
|
||||
@ -306,20 +270,11 @@
|
||||
<item>
|
||||
<widget class="QStackedWidget" name="mDiagramStackedWidget">
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="mDiagramPage_Attributes">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_9">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
@ -544,16 +499,7 @@
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
@ -579,8 +525,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>614</width>
|
||||
<height>427</height>
|
||||
<width>630</width>
|
||||
<height>376</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
@ -852,51 +798,22 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QGroupBox" name="mVisibilityGroupBox">
|
||||
<property name="toolTip">
|
||||
<string>Only show diagrams with a size inside the specified range.</string>
|
||||
</property>
|
||||
<property name="whatsThis">
|
||||
<string>Hide diagrams with a size outside the specified range.</string>
|
||||
</property>
|
||||
<widget class="QgsCollapsibleGroupBox" name="mScaleVisibilityGroupBox">
|
||||
<property name="title">
|
||||
<string>Scale dependent visibility</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_18">
|
||||
<item row="1" column="1">
|
||||
<widget class="QFrame" name="mScaleDependentVisibilityOptionsFrame">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="mMinimumDiagramScaleLabel">
|
||||
<property name="text">
|
||||
<string>Minimum</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="mMaximumDiagramScaleLabel">
|
||||
<property name="text">
|
||||
<string>Maximum</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="mMinimumDiagramScaleLineEdit"/>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="mMaximumDiagramScaleLineEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<layout class="QGridLayout" name="gridLayout_15">
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QgsScaleRangeWidget" name="mScaleRangeWidget" native="true"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
@ -927,16 +844,7 @@
|
||||
</widget>
|
||||
<widget class="QWidget" name="mDiagramPage_Size">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
@ -962,8 +870,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>483</width>
|
||||
<height>312</height>
|
||||
<width>630</width>
|
||||
<height>376</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_11">
|
||||
@ -979,6 +887,13 @@
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="mDiagramUnitsLabel">
|
||||
<property name="text">
|
||||
<string>Size units</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QRadioButton" name="mFixedSizeRadio">
|
||||
<property name="text">
|
||||
@ -1048,29 +963,15 @@
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="3" column="0" colspan="3">
|
||||
<widget class="QCheckBox" name="mIncreaseSmallDiagramsCheck">
|
||||
<property name="text">
|
||||
<string>Increase size of small diagrams</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="mSizeAttributeLabel">
|
||||
<property name="text">
|
||||
<string>Attribute</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="mSizeLabel">
|
||||
<property name="text">
|
||||
<string>Size</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="2">
|
||||
<widget class="QSpinBox" name="mSizeSpinBox">
|
||||
<item row="3" column="1" colspan="2">
|
||||
<widget class="QgsSpinBox" name="mSizeSpinBox">
|
||||
<property name="maximum">
|
||||
<number>10000000</number>
|
||||
</property>
|
||||
@ -1079,74 +980,58 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Maximum value</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="4">
|
||||
<widget class="QgsDoubleSpinBox" name="mIncreaseMinimumSizeSpinBox"/>
|
||||
</item>
|
||||
<item row="3" column="3">
|
||||
<widget class="QLabel" name="mIncreaseMinimumSizeLabel">
|
||||
<item row="0" column="0" rowspan="2">
|
||||
<widget class="QLabel" name="mSizeAttributeLabel">
|
||||
<property name="text">
|
||||
<string>Minimum size</string>
|
||||
<string>Attribute</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<item row="0" column="1" rowspan="2" colspan="4">
|
||||
<widget class="QgsFieldExpressionWidget" name="mSizeFieldExpressionWidget" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="3">
|
||||
<widget class="QLabel" name="mScaleDependencyLabel">
|
||||
<property name="text">
|
||||
<string>Scale</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="4">
|
||||
<item row="3" column="4">
|
||||
<widget class="QComboBox" name="mScaleDependencyComboBox"/>
|
||||
</item>
|
||||
<item row="0" column="1" colspan="4">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QComboBox" name="mSizeAttributeComboBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="mSizeAttributeExpression">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Edit expression</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../images/images.qrc">
|
||||
<normaloff>:/images/themes/default/mIconExpressionEditorOpen.svg</normaloff>:/images/themes/default/mIconExpressionEditorOpen.svg</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="1" colspan="2">
|
||||
<item row="2" column="1" colspan="2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="mValueLineEdit">
|
||||
<property name="toolTip">
|
||||
<string>The attribute value you enter here will correspond to the size entered in the field "Size" and the chosen "Size unit".
|
||||
Leave empty to automatically apply the maximum value.</string>
|
||||
<widget class="QgsDoubleSpinBox" name="mMaxValueSpinBox">
|
||||
<property name="decimals">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>-99999999.000000000000000</double>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>99999999.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -1159,6 +1044,51 @@ Leave empty to automatically apply the maximum value.</string>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="5">
|
||||
<widget class="QFrame" name="mFrameIncreaseSize">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="mIncreaseSmallDiagramsCheck">
|
||||
<property name="text">
|
||||
<string>Increase size of small diagrams</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="mIncreaseMinimumSizeLabel">
|
||||
<property name="text">
|
||||
<string>Minimum size</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QgsDoubleSpinBox" name="mIncreaseMinimumSizeSpinBox"/>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
@ -1184,13 +1114,6 @@ Leave empty to automatically apply the maximum value.</string>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="mDiagramUnitsLabel">
|
||||
<property name="text">
|
||||
<string>Size units</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
@ -1199,16 +1122,7 @@ Leave empty to automatically apply the maximum value.</string>
|
||||
</widget>
|
||||
<widget class="QWidget" name="mDiagramPage_Placement">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_7">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
@ -1239,19 +1153,10 @@ Leave empty to automatically apply the maximum value.</string>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_12">
|
||||
<property name="leftMargin">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="8" column="0">
|
||||
<item row="7" column="0">
|
||||
<spacer name="verticalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
@ -1264,34 +1169,15 @@ Leave empty to automatically apply the maximum value.</string>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="3">
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QFrame" name="mPlacementFrame">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<property name="leftMargin">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="mPlacementLabel">
|
||||
<property name="text">
|
||||
<string>Placement</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="mPlacementComboBox"/>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<spacer name="horizontalSpacer_9">
|
||||
<property name="orientation">
|
||||
@ -1305,10 +1191,30 @@ Leave empty to automatically apply the maximum value.</string>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="mPlacementLabel">
|
||||
<property name="text">
|
||||
<string>Placement</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="mPlacementComboBox"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="mDiagramDistanceLabel">
|
||||
<property name="text">
|
||||
<string>Distance</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QgsDoubleSpinBox" name="mDiagramDistanceSpinBox"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="3">
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="QFrame" name="mLinePlacementFrame">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
@ -1317,16 +1223,7 @@ Leave empty to automatically apply the maximum value.</string>
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0" colspan="3">
|
||||
@ -1379,83 +1276,7 @@ Leave empty to automatically apply the maximum value.</string>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0" colspan="3">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="mPriorityLabel">
|
||||
<property name="text">
|
||||
<string>Priority:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="mPriorityLowLabel">
|
||||
<property name="text">
|
||||
<string>Low</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSlider" name="mPrioritySlider">
|
||||
<property name="maximum">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="invertedAppearance">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="invertedControls">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="tickPosition">
|
||||
<enum>QSlider::TicksBelow</enum>
|
||||
</property>
|
||||
<property name="tickInterval">
|
||||
<number>1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="mPriorityHighLabel">
|
||||
<property name="text">
|
||||
<string>High</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_6">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QgsDoubleSpinBox" name="mDiagramDistanceSpinBox"/>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="6" column="0" colspan="2">
|
||||
<item row="5" column="0" colspan="2">
|
||||
<widget class="QGroupBox" name="mDataDefinedPositionGroupBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
@ -1522,12 +1343,65 @@ Leave empty to automatically apply the maximum value.</string>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="mDiagramDistanceLabel">
|
||||
<property name="text">
|
||||
<string>Distance</string>
|
||||
</property>
|
||||
</widget>
|
||||
<item row="6" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="mPriorityLabel">
|
||||
<property name="text">
|
||||
<string>Priority:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="mPriorityLowLabel">
|
||||
<property name="text">
|
||||
<string>Low</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSlider" name="mPrioritySlider">
|
||||
<property name="maximum">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="invertedAppearance">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="invertedControls">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="tickPosition">
|
||||
<enum>QSlider::TicksBelow</enum>
|
||||
</property>
|
||||
<property name="tickInterval">
|
||||
<number>1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="mPriorityHighLabel">
|
||||
<property name="text">
|
||||
<string>High</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_6">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
@ -1537,16 +1411,7 @@ Leave empty to automatically apply the maximum value.</string>
|
||||
</widget>
|
||||
<widget class="QWidget" name="mDiagramPage_Options">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_10">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
@ -1577,16 +1442,7 @@ Leave empty to automatically apply the maximum value.</string>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
@ -1598,16 +1454,7 @@ Leave empty to automatically apply the maximum value.</string>
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
@ -1672,16 +1519,7 @@ Leave empty to automatically apply the maximum value.</string>
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_13">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
@ -1785,11 +1623,25 @@ Leave empty to automatically apply the maximum value.</string>
|
||||
<extends>QSpinBox</extends>
|
||||
<header>qgsspinbox.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>QgsCollapsibleGroupBox</class>
|
||||
<extends>QGroupBox</extends>
|
||||
<header>qgscollapsiblegroupbox.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>QgsFieldExpressionWidget</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>qgsfieldexpressionwidget.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>QgsScaleRangeWidget</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>qgsscalerangewidget.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>mDiagramTypeComboBox</tabstop>
|
||||
<tabstop>mMinimumDiagramScaleLineEdit</tabstop>
|
||||
<tabstop>mMaximumDiagramScaleLineEdit</tabstop>
|
||||
<tabstop>mDataDefinedXComboBox</tabstop>
|
||||
<tabstop>mDataDefinedYComboBox</tabstop>
|
||||
<tabstop>mOrientationUpButton</tabstop>
|
||||
|
@ -264,7 +264,7 @@
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="mOptsPage_General">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_14">
|
||||
@ -293,8 +293,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>331</width>
|
||||
<height>431</height>
|
||||
<width>730</width>
|
||||
<height>537</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_13">
|
||||
@ -487,8 +487,7 @@
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_6">
|
||||
<item row="0" column="0">
|
||||
<widget class="QgsScaleRangeWidget" name="mScaleRangeWidget" native="true">
|
||||
</widget>
|
||||
<widget class="QgsScaleRangeWidget" name="mScaleRangeWidget" native="true"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
@ -693,8 +692,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>730</width>
|
||||
<height>537</height>
|
||||
<width>123</width>
|
||||
<height>38</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_28">
|
||||
@ -835,8 +834,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>730</width>
|
||||
<height>537</height>
|
||||
<width>721</width>
|
||||
<height>171</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_32">
|
||||
@ -1232,7 +1231,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>90</width>
|
||||
<width>134</width>
|
||||
<height>113</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -1401,7 +1400,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>392</width>
|
||||
<width>393</width>
|
||||
<height>608</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
Loading…
x
Reference in New Issue
Block a user