Skip to content
Permalink
Browse files

More capitalization

  • Loading branch information
nyalldawson committed May 28, 2018
1 parent ec96956 commit dd2279c8af17aeff8f1113257de96cb3a9d00a36
@@ -1125,7 +1125,7 @@ QMenu *QgsLayoutLegendMenuProvider::createContextMenu()

if ( QgsLayerTree::isLayer( mView->currentNode() ) )
{
menu->addAction( QObject::tr( "Reset to defaults" ), mWidget, SLOT( resetLayerNodeToDefaults() ) );
menu->addAction( QObject::tr( "Reset to Defaults" ), mWidget, SLOT( resetLayerNodeToDefaults() ) );
menu->addSeparator();
}

@@ -1065,19 +1065,19 @@ void QgsIdentifyResultsDialog::contextMenuEvent( QContextMenuEvent *event )
{
mActionPopup->addAction(
QgsApplication::getThemeIcon( QStringLiteral( "/mActionPropertyItem.svg" ) ),
vlayer->isEditable() ? tr( "Edit feature form" ) : tr( "View feature form" ),
vlayer->isEditable() ? tr( "Edit Feature Form…" ) : tr( "View Feature Form…" ),
this, SLOT( featureForm() ) );
}

if ( featItem->feature().isValid() )
{
mActionPopup->addAction( tr( "Zoom to feature" ), this, SLOT( zoomToFeature() ) );
mActionPopup->addAction( tr( "Copy feature" ), this, SLOT( copyFeature() ) );
mActionPopup->addAction( tr( "Toggle feature selection" ), this, SLOT( toggleFeatureSelection() ) );
mActionPopup->addAction( tr( "Zoom to Feature" ), this, SLOT( zoomToFeature() ) );
mActionPopup->addAction( tr( "Copy Feature" ), this, SLOT( copyFeature() ) );
mActionPopup->addAction( tr( "Toggle Feature Selection" ), this, SLOT( toggleFeatureSelection() ) );
}

mActionPopup->addAction( tr( "Copy attribute value" ), this, SLOT( copyAttributeValue() ) );
mActionPopup->addAction( tr( "Copy feature attributes" ), this, SLOT( copyFeatureAttributes() ) );
mActionPopup->addAction( tr( "Copy Attribute Value" ), this, SLOT( copyAttributeValue() ) );
mActionPopup->addAction( tr( "Copy Feature Attributes" ), this, SLOT( copyFeatureAttributes() ) );

if ( item->parent() == featItem && item->childCount() == 0 )
{
@@ -1098,18 +1098,18 @@ void QgsIdentifyResultsDialog::contextMenuEvent( QContextMenuEvent *event )
mActionPopup->addSeparator();
}

mActionPopup->addAction( tr( "Clear results" ), this, SLOT( clear() ) );
mActionPopup->addAction( tr( "Clear highlights" ), this, SLOT( clearHighlights() ) );
mActionPopup->addAction( tr( "Highlight all" ), this, SLOT( highlightAll() ) );
mActionPopup->addAction( tr( "Highlight layer" ), this, SLOT( highlightLayer() ) );
mActionPopup->addAction( tr( "Clear Results" ), this, SLOT( clear() ) );
mActionPopup->addAction( tr( "Clear Highlights" ), this, SLOT( clearHighlights() ) );
mActionPopup->addAction( tr( "Highlight All" ), this, SLOT( highlightAll() ) );
mActionPopup->addAction( tr( "Highlight Layer" ), this, SLOT( highlightLayer() ) );
if ( layer && QgsProject::instance()->layerIsEmbedded( layer->id() ).isEmpty() )
{
mActionPopup->addAction( tr( "Activate layer" ), this, SLOT( activateLayer() ) );
mActionPopup->addAction( tr( "Layer properties" ), this, SLOT( layerProperties() ) );
mActionPopup->addAction( tr( "Activate Layer" ), this, SLOT( activateLayer() ) );
mActionPopup->addAction( tr( "Layer Properties" ), this, SLOT( layerProperties() ) );
}
mActionPopup->addSeparator();
mActionPopup->addAction( tr( "Expand all" ), this, SLOT( expandAll() ) );
mActionPopup->addAction( tr( "Collapse all" ), this, SLOT( collapseAll() ) );
mActionPopup->addAction( tr( "Expand All" ), this, SLOT( expandAll() ) );
mActionPopup->addAction( tr( "Collapse All" ), this, SLOT( collapseAll() ) );
mActionPopup->addSeparator();

if ( featItem && vlayer )
@@ -101,10 +101,10 @@ QgsSnappingWidget::QgsSnappingWidget( QgsProject *project, QgsMapCanvas *canvas,
mModeButton = new QToolButton();
mModeButton->setToolTip( tr( "Snapping Mode" ) );
mModeButton->setPopupMode( QToolButton::InstantPopup );
QMenu *modeMenu = new QMenu( tr( "Set snapping mode" ), this );
mAllLayersAction = new QAction( QIcon( QgsApplication::getThemeIcon( "/mIconSnappingAllLayers.svg" ) ), tr( "All layers" ), modeMenu );
mActiveLayerAction = new QAction( QIcon( QgsApplication::getThemeIcon( "/mIconSnappingActiveLayer.svg" ) ), tr( "Active layer" ), modeMenu );
mAdvancedModeAction = new QAction( QIcon( QgsApplication::getThemeIcon( "/mIconSnappingAdvanced.svg" ) ), tr( "Advanced configuration" ), modeMenu );
QMenu *modeMenu = new QMenu( tr( "Set Snapping Mode" ), this );
mAllLayersAction = new QAction( QIcon( QgsApplication::getThemeIcon( "/mIconSnappingAllLayers.svg" ) ), tr( "All Layers" ), modeMenu );
mActiveLayerAction = new QAction( QIcon( QgsApplication::getThemeIcon( "/mIconSnappingActiveLayer.svg" ) ), tr( "Active Layer" ), modeMenu );
mAdvancedModeAction = new QAction( QIcon( QgsApplication::getThemeIcon( "/mIconSnappingAdvanced.svg" ) ), tr( "Advanced Configuration" ), modeMenu );
modeMenu->addAction( mAllLayersAction );
modeMenu->addAction( mActiveLayerAction );
modeMenu->addAction( mAdvancedModeAction );
@@ -127,9 +127,9 @@ QgsSnappingWidget::QgsSnappingWidget( QgsProject *project, QgsMapCanvas *canvas,
mTypeButton = new QToolButton();
mTypeButton->setToolTip( tr( "Snapping Type" ) );
mTypeButton->setPopupMode( QToolButton::InstantPopup );
QMenu *typeMenu = new QMenu( tr( "Set snapping mode" ), this );
QMenu *typeMenu = new QMenu( tr( "Set Snapping Mode" ), this );
mVertexAction = new QAction( QIcon( QgsApplication::getThemeIcon( "/mIconSnappingVertex.svg" ) ), tr( "Vertex" ), typeMenu );
mVertexAndSegmentAction = new QAction( QIcon( QgsApplication::getThemeIcon( "/mIconSnappingVertexAndSegment.svg" ) ), tr( "Vertex and segment" ), typeMenu );
mVertexAndSegmentAction = new QAction( QIcon( QgsApplication::getThemeIcon( "/mIconSnappingVertexAndSegment.svg" ) ), tr( "Vertex and Segment" ), typeMenu );
mSegmentAction = new QAction( QIcon( QgsApplication::getThemeIcon( "/mIconSnappingSegment.svg" ) ), tr( "Segment" ), typeMenu );
typeMenu->addAction( mVertexAction );
typeMenu->addAction( mVertexAndSegmentAction );
@@ -190,8 +190,8 @@ QgsVectorLayerProperties::QgsVectorLayerProperties(
{
//for loading
mLoadStyleMenu = new QMenu( this );
mLoadStyleMenu->addAction( tr( "Load from file" ) );
mLoadStyleMenu->addAction( tr( "Database styles manager" ) );
mLoadStyleMenu->addAction( tr( "Load from File" ) );
mLoadStyleMenu->addAction( tr( "Database Styles Manager…" ) );
//mActionLoadStyle->setContextMenuPolicy( Qt::PreventContextMenu );
mActionLoadStyle->setMenu( mLoadStyleMenu );

@@ -206,7 +206,7 @@ QgsVectorLayerProperties::QgsVectorLayerProperties(
if ( providerName == QLatin1String( "GPKG" ) )
providerName = QStringLiteral( "GeoPackage" );
}
mSaveAsMenu->addAction( tr( "Save in database (%1)" ).arg( providerName ) );
mSaveAsMenu->addAction( tr( "Save in Database (%1)" ).arg( providerName ) );
}

connect( mSaveAsMenu, &QMenu::triggered,
@@ -43,21 +43,21 @@ void QgsMultiEditToolButton::aboutToShowMenu()
{
case Default:
{
QAction *noAction = mMenu->addAction( tr( "No changes to commit" ) );
QAction *noAction = mMenu->addAction( tr( "No Changes to Commit" ) );
noAction->setEnabled( false );
break;
}
case MixedValues:
{
QString title = !mField.name().isEmpty() ? tr( "Set %1 for all selected features" ).arg( mField.name() )
QString title = !mField.name().isEmpty() ? tr( "Set %1 for All Selected Features" ).arg( mField.name() )
: tr( "Set field for all selected features" );
QAction *setFieldAction = mMenu->addAction( title );
connect( setFieldAction, &QAction::triggered, this, &QgsMultiEditToolButton::setFieldTriggered );
break;
}
case Changed:
{
QAction *resetFieldAction = mMenu->addAction( tr( "Reset to original values" ) );
QAction *resetFieldAction = mMenu->addAction( tr( "Reset to Original Values" ) );
connect( resetFieldAction, &QAction::triggered, this, &QgsMultiEditToolButton::resetFieldTriggered );
break;
}
@@ -144,7 +144,7 @@ void QgsSearchWidgetToolButton::aboutToShowMenu()
}
}

QAction *clearAction = mMenu->addAction( tr( "Exclude field" ) );
QAction *clearAction = mMenu->addAction( tr( "Exclude Field" ) );
connect( clearAction, &QAction::triggered, this, &QgsSearchWidgetToolButton::setInactive );
clearAction->setCheckable( true );
clearAction->setChecked( !fieldActive );
@@ -85,8 +85,8 @@ QgsCheckableComboBox::QgsCheckableComboBox( QWidget *parent )
setLineEdit( lineEdit );

mContextMenu = new QMenu( this );
mSelectAllAction = mContextMenu->addAction( tr( "Select all" ) );
mDeselectAllAction = mContextMenu->addAction( tr( "Deselect all" ) );
mSelectAllAction = mContextMenu->addAction( tr( "Select All" ) );
mDeselectAllAction = mContextMenu->addAction( tr( "Deselect All" ) );
connect( mSelectAllAction, &QAction::triggered, this, &QgsCheckableComboBox::selectAllOptions );
connect( mDeselectAllAction, &QAction::triggered, this, &QgsCheckableComboBox::deselectAllOptions );

@@ -967,8 +967,8 @@ void QgsExpressionBuilderWidget::showContextMenu( QPoint pt )
if ( item->getItemType() == QgsExpressionItem::Field && mLayer )
{
QMenu *menu = new QMenu( this );
menu->addAction( tr( "Load top 10 unique values" ), this, SLOT( loadSampleValues() ) );
menu->addAction( tr( "Load all unique values" ), this, SLOT( loadAllValues() ) );
menu->addAction( tr( "Load First 10 Unique Values" ), this, SLOT( loadSampleValues() ) );
menu->addAction( tr( "Load All Unique Values" ), this, SLOT( loadAllValues() ) );
menu->popup( expressionTree->mapToGlobal( pt ) );
}
}
@@ -540,7 +540,7 @@ void QgsFontButton::prepareMenu()
sizeWidget->setFocusPolicy( Qt::StrongFocus );
mMenu->addAction( sizeAction );

QMenu *recentFontMenu = new QMenu( tr( "Recent fonts" ), mMenu );
QMenu *recentFontMenu = new QMenu( tr( "Recent Fonts" ), mMenu );
Q_FOREACH ( const QString &family, QgsFontUtils::recentFontFamilies() )
{
QAction *fontAction = new QAction( family, recentFontMenu );
@@ -368,7 +368,7 @@ void QgsPropertyOverrideButton::aboutToShowMenu()
bool fieldActive = false;
if ( !mDataTypesString.isEmpty() )
{
QAction *fieldTitleAct = mDefineMenu->addAction( tr( "Attribute field" ) );
QAction *fieldTitleAct = mDefineMenu->addAction( tr( "Attribute Field" ) );
fieldTitleAct->setFont( titlefont );
fieldTitleAct->setEnabled( false );

@@ -688,10 +688,10 @@ void QgsRelationEditorWidget::showContextMenu( QgsActionMenu *menu, const QgsFea
{
QAction *qAction = nullptr;

qAction = menu->addAction( QgsApplication::getThemeIcon( QStringLiteral( "/mActionDeleteSelected.svg" ) ), tr( "Delete feature" ) );
qAction = menu->addAction( QgsApplication::getThemeIcon( QStringLiteral( "/mActionDeleteSelected.svg" ) ), tr( "Delete Feature" ) );
connect( qAction, &QAction::triggered, this, [this, fid]() { deleteFeature( fid ); } );

qAction = menu->addAction( QgsApplication::getThemeIcon( QStringLiteral( "/mActionUnlink.svg" ) ), tr( "Unlink feature" ) );
qAction = menu->addAction( QgsApplication::getThemeIcon( QStringLiteral( "/mActionUnlink.svg" ) ), tr( "Unlink Feature" ) );
connect( qAction, &QAction::triggered, this, [this, fid]() { unlinkFeature( fid ); } );
}
}
@@ -45,7 +45,7 @@ QgsPalettedRendererWidget::QgsPalettedRendererWidget( QgsRasterLayer *layer, con
mContextMenu->addAction( tr( "Change Opacity…" ), this, SLOT( changeOpacity() ) );
mContextMenu->addAction( tr( "Change Label…" ), this, SLOT( changeLabel() ) );

mAdvancedMenu = new QMenu( tr( "Advanced options" ), this );
mAdvancedMenu = new QMenu( tr( "Advanced Options" ), this );
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…" ) );
@@ -463,12 +463,12 @@ QgsCategorizedSymbolRendererWidget::QgsCategorizedSymbolRendererWidget( QgsVecto
// menus for data-defined rotation/size
QMenu *advMenu = new QMenu;

advMenu->addAction( tr( "Match to saved symbols" ), this, SLOT( matchToSymbolsFromLibrary() ) );
advMenu->addAction( tr( "Match to symbols from file" ), this, SLOT( matchToSymbolsFromXml() ) );
advMenu->addAction( tr( "Symbol levels" ), this, SLOT( showSymbolLevels() ) );
advMenu->addAction( tr( "Match to Saved Symbols" ), this, SLOT( matchToSymbolsFromLibrary() ) );
advMenu->addAction( tr( "Match to Symbols from File" ), this, SLOT( matchToSymbolsFromXml() ) );
advMenu->addAction( tr( "Symbol Levels" ), this, SLOT( showSymbolLevels() ) );
if ( mCategorizedSymbol->type() == QgsSymbol::Marker )
{
QAction *actionDdsLegend = advMenu->addAction( tr( "Data-defined size legend" ) );
QAction *actionDdsLegend = advMenu->addAction( tr( "Data-defined Size Legend" ) );
// only from Qt 5.6 there is convenience addAction() with new style connection
connect( actionDdsLegend, &QAction::triggered, this, &QgsCategorizedSymbolRendererWidget::dataDefinedSizeLegend );
}
@@ -524,10 +524,10 @@ QgsGraduatedSymbolRendererWidget::QgsGraduatedSymbolRendererWidget( QgsVectorLay
// menus for data-defined rotation/size
QMenu *advMenu = new QMenu( this );

advMenu->addAction( tr( "Symbol levels" ), this, SLOT( showSymbolLevels() ) );
advMenu->addAction( tr( "Symbol Levels" ), this, SLOT( showSymbolLevels() ) );
if ( mGraduatedSymbol->type() == QgsSymbol::Marker )
{
QAction *actionDdsLegend = advMenu->addAction( tr( "Data-defined size legend" ) );
QAction *actionDdsLegend = advMenu->addAction( tr( "Data-defined Size Legend" ) );
// only from Qt 5.6 there is convenience addAction() with new style connection
connect( actionDdsLegend, &QAction::triggered, this, &QgsGraduatedSymbolRendererWidget::dataDefinedSizeLegend );
}
@@ -84,10 +84,10 @@ QgsRuleBasedRendererWidget::QgsRuleBasedRendererWidget( QgsVectorLayer *layer, Q
viewRules->addAction( mCopyAction );
viewRules->addAction( mPasteAction );

mRefineMenu = new QMenu( tr( "Refine current rule" ), btnRefineRule );
mRefineMenu->addAction( tr( "Add scales to rule" ), this, SLOT( refineRuleScales() ) );
mRefineMenu->addAction( tr( "Add categories to rule" ), this, SLOT( refineRuleCategories() ) );
mRefineMenu->addAction( tr( "Add ranges to rule" ), this, SLOT( refineRuleRanges() ) );
mRefineMenu = new QMenu( tr( "Refine Current Rule" ), btnRefineRule );
mRefineMenu->addAction( tr( "Add Scales to Rule" ), this, SLOT( refineRuleScales() ) );
mRefineMenu->addAction( tr( "Add Categories to Rule" ), this, SLOT( refineRuleCategories() ) );
mRefineMenu->addAction( tr( "Add Ranges to Rule" ), this, SLOT( refineRuleRanges() ) );
btnRefineRule->setMenu( mRefineMenu );
contextMenu->addMenu( mRefineMenu );

@@ -65,11 +65,11 @@ QgsSingleSymbolRendererWidget::QgsSingleSymbolRendererWidget( QgsVectorLayer *la
// advanced actions - data defined rendering
QMenu *advMenu = mSelector->advancedMenu();

QAction *actionLevels = advMenu->addAction( tr( "Symbol levels" ) );
QAction *actionLevels = advMenu->addAction( tr( "Symbol Levels" ) );
connect( actionLevels, &QAction::triggered, this, &QgsSingleSymbolRendererWidget::showSymbolLevels );
if ( mSingleSymbol->type() == QgsSymbol::Marker )
{
QAction *actionDdsLegend = advMenu->addAction( tr( "Data-defined size legend" ) );
QAction *actionDdsLegend = advMenu->addAction( tr( "Data-defined Size Legend" ) );
// only from Qt 5.6 there is convenience addAction() with new style connection
connect( actionDdsLegend, &QAction::triggered, this, &QgsSingleSymbolRendererWidget::dataDefinedSizeLegend );
}
@@ -124,7 +124,7 @@ QgsStyleManagerDialog::QgsStyleManagerDialog( QgsStyle *style, QWidget *parent )
connect( groupModel, &QStandardItemModel::itemChanged,
this, &QgsStyleManagerDialog::groupRenamed );

QMenu *groupMenu = new QMenu( tr( "Group actions" ), this );
QMenu *groupMenu = new QMenu( tr( "Group Actions" ), this );
connect( actnTagSymbols, &QAction::triggered, this, &QgsStyleManagerDialog::tagSymbolsAction );
groupMenu->addAction( actnTagSymbols );
connect( actnFinishTagging, &QAction::triggered, this, &QgsStyleManagerDialog::tagSymbolsAction );

0 comments on commit dd2279c

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