Skip to content
Permalink
Browse files

Fix string capitalization, HIG violations

  • Loading branch information
nyalldawson committed Apr 20, 2018
1 parent 463a646 commit c70c78412c5e3753d98dd641ef5209f89b966092
@@ -41,16 +41,16 @@ QgsPalettedRendererWidget::QgsPalettedRendererWidget( QgsRasterLayer *layer, con
mCancelButton->hide();

mContextMenu = new QMenu( tr( "Options" ), this );
mContextMenu->addAction( tr( "Change color" ), this, SLOT( changeColor() ) );
mContextMenu->addAction( tr( "Change opacity" ), this, SLOT( changeOpacity() ) );
mContextMenu->addAction( tr( "Change label" ), this, SLOT( changeLabel() ) );
mContextMenu->addAction( tr( "Change Color…" ), this, SLOT( changeColor() ) );
mContextMenu->addAction( tr( "Change Opacity…" ), this, SLOT( changeOpacity() ) );
mContextMenu->addAction( tr( "Change Label…" ), this, SLOT( changeLabel() ) );

mAdvancedMenu = new QMenu( tr( "Advanced options" ), this );
QAction *mLoadFromLayerAction = mAdvancedMenu->addAction( tr( "Load classes from layer" ) );
QAction *mLoadFromLayerAction = mAdvancedMenu->addAction( tr( "Load Classes from Layer" ) );
connect( mLoadFromLayerAction, &QAction::triggered, this, &QgsPalettedRendererWidget::loadFromLayer );
QAction *loadFromFile = mAdvancedMenu->addAction( tr( "Load color map from file" ) );
QAction *loadFromFile = mAdvancedMenu->addAction( tr( "Load Color Map from File" ) );
connect( loadFromFile, &QAction::triggered, this, &QgsPalettedRendererWidget::loadColorTable );
QAction *exportToFile = mAdvancedMenu->addAction( tr( "Export color map to file" ) );
QAction *exportToFile = mAdvancedMenu->addAction( tr( "Export Color Map to File" ) );
connect( exportToFile, &QAction::triggered, this, &QgsPalettedRendererWidget::saveColorTable );


@@ -62,8 +62,8 @@ QgsSingleBandPseudoColorRendererWidget::QgsSingleBandPseudoColorRendererWidget(
connect( mClassificationModeComboBox, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this, &QgsSingleBandPseudoColorRendererWidget::mClassificationModeComboBox_currentIndexChanged );

contextMenu = new QMenu( tr( "Options" ), this );
contextMenu->addAction( tr( "Change color" ), this, SLOT( changeColor() ) );
contextMenu->addAction( tr( "Change opacity" ), this, SLOT( changeOpacity() ) );
contextMenu->addAction( tr( "Change Color…" ), this, SLOT( changeColor() ) );
contextMenu->addAction( tr( "Change Opacity…" ), this, SLOT( changeOpacity() ) );

mColormapTreeWidget->setColumnWidth( ColorColumn, 50 );
mColormapTreeWidget->setContextMenuPolicy( Qt::CustomContextMenu );
@@ -106,7 +106,7 @@ QgsSingleBandPseudoColorRendererWidget::QgsSingleBandPseudoColorRendererWidget(
mColorInterpolationComboBox->setCurrentIndex( mColorInterpolationComboBox->findData( QgsColorRampShader::Interpolated ) );

mClassificationModeComboBox->addItem( tr( "Continuous" ), QgsColorRampShader::Continuous );
mClassificationModeComboBox->addItem( tr( "Equal interval" ), QgsColorRampShader::EqualInterval );
mClassificationModeComboBox->addItem( tr( "Equal Interval" ), QgsColorRampShader::EqualInterval );
mClassificationModeComboBox->addItem( tr( "Quantile" ), QgsColorRampShader::Quantile );
mClassificationModeComboBox->setCurrentIndex( mClassificationModeComboBox->findData( QgsColorRampShader::Continuous ) );

@@ -41,18 +41,18 @@ QgsRendererWidget::QgsRendererWidget( QgsVectorLayer *layer, QgsStyle *style )
mPasteAction->setShortcut( QKeySequence( QKeySequence::Paste ) );

contextMenu->addSeparator();
contextMenu->addAction( tr( "Change color" ), this, SLOT( changeSymbolColor() ) );
contextMenu->addAction( tr( "Change opacity" ), this, SLOT( changeSymbolOpacity() ) );
contextMenu->addAction( tr( "Change output unit" ), this, SLOT( changeSymbolUnit() ) );
contextMenu->addAction( tr( "Change Color…" ), this, SLOT( changeSymbolColor() ) );
contextMenu->addAction( tr( "Change Opacity…" ), this, SLOT( changeSymbolOpacity() ) );
contextMenu->addAction( tr( "Change Output Unit…" ), this, SLOT( changeSymbolUnit() ) );

if ( mLayer && mLayer->geometryType() == QgsWkbTypes::LineGeometry )
{
contextMenu->addAction( tr( "Change width" ), this, SLOT( changeSymbolWidth() ) );
contextMenu->addAction( tr( "Change Width…" ), this, SLOT( changeSymbolWidth() ) );
}
else if ( mLayer && mLayer->geometryType() == QgsWkbTypes::PointGeometry )
{
contextMenu->addAction( tr( "Change size" ), this, SLOT( changeSymbolSize() ) );
contextMenu->addAction( tr( "Change angle" ), this, SLOT( changeSymbolAngle() ) );
contextMenu->addAction( tr( "Change Size…" ), this, SLOT( changeSymbolSize() ) );
contextMenu->addAction( tr( "Change Angle…" ), this, SLOT( changeSymbolAngle() ) );
}
}

0 comments on commit c70c784

Please sign in to comment.
You can’t perform that action at this time.