Identify selected items based on id's rather than translated text

This commit is contained in:
Matthias Kuhn 2012-08-16 16:08:53 +02:00
parent 429eb403b1
commit 033bd79762
2 changed files with 8 additions and 8 deletions

View File

@ -62,19 +62,19 @@ QgsDiagramProperties::QgsDiagramProperties( QgsVectorLayer* layer, QWidget* pare
if ( layerType == QGis::Point || layerType == QGis::Polygon )
{
mPlacementComboBox->addItem( tr( "AroundPoint" ), 0 );
mPlacementComboBox->addItem( tr( "OverPoint" ), 1 );
mPlacementComboBox->addItem( tr( "Around Point" ), QgsDiagramLayerSettings::AroundPoint );
mPlacementComboBox->addItem( tr( "Over Point" ), QgsDiagramLayerSettings::OverPoint );
}
if ( layerType == QGis::Line || layerType == QGis::Polygon )
{
mPlacementComboBox->addItem( tr( "Line" ), 2 );
mPlacementComboBox->addItem( tr( "Horizontal" ), 3 );
mPlacementComboBox->addItem( tr( "Line" ), QgsDiagramLayerSettings::Line );
mPlacementComboBox->addItem( tr( "Horizontal" ), QgsDiagramLayerSettings::Horizontal );
}
if ( layerType == QGis::Polygon )
{
mPlacementComboBox->addItem( tr( "Free" ), 4 );
mPlacementComboBox->addItem( tr( "Free" ), QgsDiagramLayerSettings::Free );
}
if ( layerType == QGis::Line )
@ -90,8 +90,8 @@ QgsDiagramProperties::QgsDiagramProperties( QgsVectorLayer* layer, QWidget* pare
mLineOptionsLabel->setVisible( false );
}
mDiagramTypeComboBox->addItem( tr( "Pie chart" ), "Pie" );
mDiagramTypeComboBox->addItem( tr( "Text diagram" ), "Text");
mDiagramTypeComboBox->addItem( tr( "Pie chart" ), DIAGRAM_NAME_PIE );
mDiagramTypeComboBox->addItem( tr( "Text diagram" ), DIAGRAM_NAME_TEXT );
mDiagramTypeComboBox->addItem( tr( "Histogram" ), DIAGRAM_NAME_HISTOGRAM );
mLabelPlacementComboBox->addItem( tr( "Height" ), QgsDiagramSettings::Height );

View File

@ -35,7 +35,7 @@ struct CORE_EXPORT QgsDiagramLayerSettings
//avoid inclusion of QgsPalLabeling
enum Placement
{
AroundPoint, // Point / Polygon
AroundPoint = 0, // Point / Polygon
OverPoint, // Point / Polygon
Line, // Line / Polygon
Curved, // Line