Skip to content

Commit

Permalink
Merge pull request #4924 from SrNetoChan/dialog_titles
Browse files Browse the repository at this point in the history
Making dialog titles use Book Style Capitalization [needs-docs]
  • Loading branch information
nyalldawson authored Jul 26, 2017
2 parents a3af69a + 8d4dec5 commit ce4a251
Show file tree
Hide file tree
Showing 106 changed files with 139 additions and 139 deletions.
4 changes: 2 additions & 2 deletions src/app/composer/qgsatlascompositionwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ void QgsAtlasCompositionWidget::on_mAtlasFilenameExpressionButton_clicked()

QgsExpressionContext context = mComposition->createExpressionContext();
QgsExpressionBuilderDialog exprDlg( atlasMap->coverageLayer(), mAtlasFilenamePatternEdit->text(), this, QStringLiteral( "generic" ), context );
exprDlg.setWindowTitle( tr( "Expression based filename" ) );
exprDlg.setWindowTitle( tr( "Expression Based Filename" ) );

if ( exprDlg.exec() == QDialog::Accepted )
{
Expand Down Expand Up @@ -304,7 +304,7 @@ void QgsAtlasCompositionWidget::on_mAtlasFeatureFilterButton_clicked()

QgsExpressionContext context = mComposition->createExpressionContext();
QgsExpressionBuilderDialog exprDlg( vl, mAtlasFeatureFilterEdit->text(), this, QStringLiteral( "generic" ), context );
exprDlg.setWindowTitle( tr( "Expression based filter" ) );
exprDlg.setWindowTitle( tr( "Expression Based Filter" ) );

if ( exprDlg.exec() == QDialog::Accepted )
{
Expand Down
14 changes: 7 additions & 7 deletions src/app/composer/qgscomposer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1695,7 +1695,7 @@ void QgsComposer::exportCompositionAsPDF( QgsComposer::OutputMode mode )
}

QProgressDialog progress( tr( "Rendering maps..." ), tr( "Abort" ), 0, atlasMap->numFeatures(), this );
progress.setWindowTitle( tr( "Exporting atlas" ) );
progress.setWindowTitle( tr( "Exporting Atlas" ) );
QApplication::setOverrideCursor( Qt::BusyCursor );

for ( int featureI = 0; featureI < atlasMap->numFeatures(); ++featureI )
Expand Down Expand Up @@ -1862,7 +1862,7 @@ void QgsComposer::printComposition( QgsComposer::OutputMode mode )
return;
}
QProgressDialog progress( tr( "Rendering maps..." ), tr( "Abort" ), 0, atlasMap->numFeatures(), this );
progress.setWindowTitle( tr( "Exporting atlas" ) );
progress.setWindowTitle( tr( "Exporting Atlas" ) );

for ( int i = 0; i < atlasMap->numFeatures(); ++i )
{
Expand Down Expand Up @@ -2194,7 +2194,7 @@ void QgsComposer::exportCompositionAsImage( QgsComposer::OutputMode mode )
}

QProgressDialog progress( tr( "Rendering maps..." ), tr( "Abort" ), 0, atlasMap->numFeatures(), this );
progress.setWindowTitle( tr( "Exporting atlas" ) );
progress.setWindowTitle( tr( "Exporting Atlas" ) );

for ( int feature = 0; feature < atlasMap->numFeatures(); ++feature )
{
Expand Down Expand Up @@ -2383,7 +2383,7 @@ void QgsComposer::exportCompositionAsSVG( QgsComposer::OutputMode mode )
if ( displaySVGWarning )
{
QgsMessageViewer *m = new QgsMessageViewer( this );
m->setWindowTitle( tr( "SVG warning" ) );
m->setWindowTitle( tr( "SVG Warning" ) );
m->setCheckBoxText( tr( "Don't show this message again" ) );
m->setCheckBoxState( Qt::Unchecked );
m->setCheckBoxVisible( true );
Expand Down Expand Up @@ -2541,7 +2541,7 @@ void QgsComposer::exportCompositionAsSVG( QgsComposer::OutputMode mode )
}
}
QProgressDialog progress( tr( "Rendering maps..." ), tr( "Abort" ), 0, atlasMap->numFeatures(), this );
progress.setWindowTitle( tr( "Exporting atlas" ) );
progress.setWindowTitle( tr( "Exporting Atlas" ) );

do
{
Expand Down Expand Up @@ -3429,7 +3429,7 @@ void QgsComposer::showWmsPrintingWarning()
if ( displayWMSWarning )
{
QgsMessageViewer *m = new QgsMessageViewer( this );
m->setWindowTitle( tr( "Project contains WMS layers" ) );
m->setWindowTitle( tr( "Project Contains WMS Layers" ) );
m->setMessage( tr( "Some WMS servers (e.g. UMN mapserver) have a limit for the WIDTH and HEIGHT parameter. Printing layers from such servers may exceed this limit. If this is the case, the WMS layer will not be printed" ), QgsMessageOutput::MessageText );
m->setCheckBoxText( tr( "Don't show this message again" ) );
m->setCheckBoxState( Qt::Unchecked );
Expand All @@ -3444,7 +3444,7 @@ void QgsComposer::showAdvancedEffectsWarning()
if ( ! mComposition->printAsRaster() )
{
QgsMessageViewer *m = new QgsMessageViewer( this, QgsGuiUtils::ModalDialogFlags, false );
m->setWindowTitle( tr( "Project contains composition effects" ) );
m->setWindowTitle( tr( "Project Contains Composition Effects" ) );
m->setMessage( tr( "Advanced composition effects such as blend modes or vector layer transparency are enabled in this project, which cannot be printed as vectors. Printing as a raster is recommended." ), QgsMessageOutput::MessageText );
m->setCheckBoxText( tr( "Print as raster" ) );
m->setCheckBoxState( Qt::Checked );
Expand Down
2 changes: 1 addition & 1 deletion src/app/composer/qgscomposerattributetablewidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ void QgsComposerAttributeTableWidget::on_mFeatureFilterButton_clicked()

QgsExpressionContext context = mComposerTable->createExpressionContext();
QgsExpressionBuilderDialog exprDlg( mComposerTable->sourceLayer(), mFeatureFilterEdit->text(), this, QStringLiteral( "generic" ), context );
exprDlg.setWindowTitle( tr( "Expression based filter" ) );
exprDlg.setWindowTitle( tr( "Expression Based Filter" ) );
if ( exprDlg.exec() == QDialog::Accepted )
{
QString expression = exprDlg.expressionText();
Expand Down
2 changes: 1 addition & 1 deletion src/app/composer/qgscomposerhtmlwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ void QgsComposerHtmlWidget::on_mInsertExpressionButton_clicked()
QgsVectorLayer *coverageLayer = atlasCoverageLayer();
QgsExpressionContext context = mHtml->createExpressionContext();
QgsExpressionBuilderDialog exprDlg( coverageLayer, selText, this, QStringLiteral( "generic" ), context );
exprDlg.setWindowTitle( tr( "Insert expression" ) );
exprDlg.setWindowTitle( tr( "Insert Expression" ) );
if ( exprDlg.exec() == QDialog::Accepted )
{
QString expression = exprDlg.expressionText();
Expand Down
2 changes: 1 addition & 1 deletion src/app/composer/qgscomposerlabelwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ void QgsComposerLabelWidget::on_mInsertExpressionButton_clicked()
QgsExpressionContext context = mComposerLabel->createExpressionContext();
QgsExpressionBuilderDialog exprDlg( coverageLayer, selText, this, QStringLiteral( "generic" ), context );

exprDlg.setWindowTitle( tr( "Insert expression" ) );
exprDlg.setWindowTitle( tr( "Insert Expression" ) );
if ( exprDlg.exec() == QDialog::Accepted )
{
QString expression = exprDlg.expressionText();
Expand Down
2 changes: 1 addition & 1 deletion src/app/composer/qgscomposermapgridwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1075,7 +1075,7 @@ void QgsComposerMapGridWidget::on_mAnnotationFormatButton_clicked()
QgsExpressionContext expressionContext = mComposerMapGrid->createExpressionContext();

QgsExpressionBuilderDialog exprDlg( nullptr, mComposerMapGrid->annotationExpression(), this, QStringLiteral( "generic" ), expressionContext );
exprDlg.setWindowTitle( tr( "Expression based annotation" ) );
exprDlg.setWindowTitle( tr( "Expression Based Annotation" ) );

if ( exprDlg.exec() == QDialog::Accepted )
{
Expand Down
8 changes: 4 additions & 4 deletions src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,7 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh
else
{
QDialog *dialog = new QDialog( this );
dialog->setWindowTitle( tr( "Project snapping settings" ) );
dialog->setWindowTitle( tr( "Project Snapping Settings" ) );
QVBoxLayout *layout = new QVBoxLayout( dialog );
layout->addWidget( mSnappingDialog );
layout->setMargin( 0 );
Expand Down Expand Up @@ -6378,7 +6378,7 @@ void QgisApp::labelingFontNotFound( QgsVectorLayer *vlayer, const QString &fontf
void QgisApp::commitError( QgsVectorLayer *vlayer )
{
QgsMessageViewer *mv = new QgsMessageViewer();
mv->setWindowTitle( tr( "Commit errors" ) );
mv->setWindowTitle( tr( "Commit Errors" ) );
mv->setMessageAsPlainText( tr( "Could not commit changes to layer %1" ).arg( vlayer->name() )
+ "\n\n"
+ tr( "Errors: %1\n" ).arg( vlayer->commitErrors().join( QStringLiteral( "\n " ) ) )
Expand Down Expand Up @@ -6480,7 +6480,7 @@ void QgisApp::diagramProperties()
}

QDialog dlg;
dlg.setWindowTitle( tr( "Layer diagram properties" ) );
dlg.setWindowTitle( tr( "Layer Diagram Properties" ) );
QgsDiagramProperties *gui = new QgsDiagramProperties( vlayer, &dlg, mMapCanvas );
gui->layout()->setContentsMargins( 0, 0, 0, 0 );
QVBoxLayout *layout = new QVBoxLayout( &dlg );
Expand Down Expand Up @@ -6880,7 +6880,7 @@ void QgisApp::saveAsVectorFileGeneral( QgsVectorLayer *vlayer, bool symbologyOpt
if ( error != QgsVectorFileWriter::Canceled )
{
QgsMessageViewer *m = new QgsMessageViewer( nullptr );
m->setWindowTitle( tr( "Save error" ) );
m->setWindowTitle( tr( "Save Error" ) );
m->setMessageAsPlainText( tr( "Export to vector file failed.\nError: %1" ).arg( errorMessage ) );
m->exec();
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsaddtaborgroup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ QgsAddTabOrGroup::QgsAddTabOrGroup( QgsVectorLayer *lyr, const QList < TabPair >

mColumnCountSpinBox->setValue( QgsSettings().value( QStringLiteral( "/qgis/attributeForm/defaultTabColumnCount" ), 1 ).toInt() );

setWindowTitle( tr( "Add tab or group for %1" ).arg( mLayer->name() ) );
setWindowTitle( tr( "Add Tab or Group for %1" ).arg( mLayer->name() ) );
} // QgsVectorLayerProperties ctor

QgsAddTabOrGroup::~QgsAddTabOrGroup()
Expand Down
4 changes: 2 additions & 2 deletions src/app/qgsapplayertreeviewmenuprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ void QgsAppLayerTreeViewMenuProvider::editVectorSymbol()

std::unique_ptr< QgsSymbol > symbol( singleRenderer->symbol() ? singleRenderer->symbol()->clone() : nullptr );
QgsSymbolSelectorDialog dlg( symbol.get(), QgsStyle::defaultStyle(), layer, mView->window() );
dlg.setWindowTitle( tr( "Symbol selector" ) );
dlg.setWindowTitle( tr( "Symbol Selector" ) );
QgsSymbolWidgetContext context;
context.setMapCanvas( mCanvas );
dlg.setContext( context );
Expand Down Expand Up @@ -581,7 +581,7 @@ void QgsAppLayerTreeViewMenuProvider::editSymbolLegendNodeSymbol()
std::unique_ptr< QgsSymbol > symbol( originalSymbol->clone() );
QgsVectorLayer *vlayer = qobject_cast<QgsVectorLayer *>( node->layerNode()->layer() );
QgsSymbolSelectorDialog dlg( symbol.get(), QgsStyle::defaultStyle(), vlayer, mView->window() );
dlg.setWindowTitle( tr( "Symbol selector" ) );
dlg.setWindowTitle( tr( "Symbol Selector" ) );
QgsSymbolWidgetContext context;
context.setMapCanvas( mCanvas );
dlg.setContext( context );
Expand Down
4 changes: 2 additions & 2 deletions src/app/qgsattributeactiondialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ void QgsAttributeActionDialog::insert()
int pos = mAttributeActionTable->rowCount();

QgsAttributeActionPropertiesDialog dlg( mLayer, this );
dlg.setWindowTitle( tr( "Add new action" ) );
dlg.setWindowTitle( tr( "Add New Action" ) );

if ( dlg.exec() )
{
Expand Down Expand Up @@ -325,7 +325,7 @@ void QgsAttributeActionDialog::itemDoubleClicked( QTableWidgetItem *item )
mLayer
);

actionProperties.setWindowTitle( tr( "Edit action" ) );
actionProperties.setWindowTitle( tr( "Edit Action" ) );

if ( actionProperties.exec() )
{
Expand Down
4 changes: 2 additions & 2 deletions src/app/qgsattributetabledialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ QgsAttributeTableDialog::~QgsAttributeTableDialog()
void QgsAttributeTableDialog::updateTitle()
{
QWidget *w = mDock ? qobject_cast<QWidget *>( mDock ) : qobject_cast<QWidget *>( this );
w->setWindowTitle( tr( " %1 :: Features total: %2, filtered: %3, selected: %4" )
w->setWindowTitle( tr( " %1 :: Features Total: %2, Filtered: %3, Selected: %4" )
.arg( mLayer->name() )
.arg( qMax( static_cast< long >( mMainView->featureCount() ), mLayer->featureCount() ) ) // layer count may be estimated, so use larger of the two
.arg( mMainView->filteredFeatureCount() )
Expand Down Expand Up @@ -584,7 +584,7 @@ void QgsAttributeTableDialog::filterExpressionBuilder()
QgsExpressionContext context( QgsExpressionContextUtils::globalProjectLayerScopes( mLayer ) );

QgsExpressionBuilderDialog dlg( mLayer, mFilterQuery->text(), this, QStringLiteral( "generic" ), context );
dlg.setWindowTitle( tr( "Expression based filter" ) );
dlg.setWindowTitle( tr( "Expression Based Filter" ) );

QgsDistanceArea myDa;
myDa.setSourceCrs( mLayer->crs() );
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsdiagramproperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,7 @@ QString QgsDiagramProperties::showExpressionBuilder( const QString &initialExpre
<< QgsExpressionContextUtils::layerScope( mLayer );

QgsExpressionBuilderDialog dlg( mLayer, initialExpression, this, QStringLiteral( "generic" ), context );
dlg.setWindowTitle( tr( "Expression based attribute" ) );
dlg.setWindowTitle( tr( "Expression Based Attribute" ) );

QgsDistanceArea myDa;
myDa.setSourceCrs( mLayer->crs() );
Expand Down
6 changes: 3 additions & 3 deletions src/app/qgsfieldsproperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1336,7 +1336,7 @@ void DesignerTree::onItemDoubleClicked( QTreeWidgetItem *item, int column )
if ( itemData.type() == QgsFieldsProperties::DesignerTreeItemData::Container )
{
QDialog dlg;
dlg.setWindowTitle( tr( "Configure container" ) );
dlg.setWindowTitle( tr( "Configure Container" ) );
QFormLayout *layout = new QFormLayout() ;
dlg.setLayout( layout );
layout->addRow( baseWidget );
Expand Down Expand Up @@ -1395,7 +1395,7 @@ void DesignerTree::onItemDoubleClicked( QTreeWidgetItem *item, int column )
else if ( itemData.type() == QgsFieldsProperties::DesignerTreeItemData::Relation )
{
QDialog dlg;
dlg.setWindowTitle( tr( "Configure relation editor" ) );
dlg.setWindowTitle( tr( "Configure Relation Editor" ) );
QFormLayout *layout = new QFormLayout() ;
dlg.setLayout( layout );
layout->addWidget( baseWidget );
Expand Down Expand Up @@ -1428,7 +1428,7 @@ void DesignerTree::onItemDoubleClicked( QTreeWidgetItem *item, int column )
else
{
QDialog dlg;
dlg.setWindowTitle( tr( "Configure field" ) );
dlg.setWindowTitle( tr( "Configure Field" ) );
dlg.setLayout( new QGridLayout() );
dlg.layout()->addWidget( baseWidget );

Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsguivectorlayertools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ bool QgsGuiVectorLayerTools::stopEditing( QgsVectorLayer *layer, bool allowCance
void QgsGuiVectorLayerTools::commitError( QgsVectorLayer *vlayer ) const
{
QgsMessageViewer *mv = new QgsMessageViewer();
mv->setWindowTitle( tr( "Commit errors" ) );
mv->setWindowTitle( tr( "Commit Errors" ) );
mv->setMessageAsPlainText( tr( "Could not commit changes to layer %1" ).arg( vlayer->name() )
+ "\n\n"
+ tr( "Errors: %1\n" ).arg( vlayer->commitErrors().join( QStringLiteral( "\n " ) ) )
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgshtmlannotationdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ QgsHtmlAnnotationDialog::QgsHtmlAnnotationDialog( QgsMapCanvasAnnotationItem *it
, mEmbeddedWidget( nullptr )
{
setupUi( this );
setWindowTitle( tr( "HTML annotation" ) );
setWindowTitle( tr( "HTML Annotation" ) );
mEmbeddedWidget = new QgsAnnotationWidget( mItem );
mStackedWidget->addWidget( mEmbeddedWidget );
mStackedWidget->setCurrentWidget( mEmbeddedWidget );
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsmapsavedialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ QgsMapSaveDialog::QgsMapSaveDialog( QWidget *parent, QgsMapCanvas *mapCanvas, QL
}
mSaveAsRaster->setVisible( true );

this->setWindowTitle( tr( "Save map as PDF" ) );
this->setWindowTitle( tr( "Save Map as PDF" ) );
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsprojectproperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1399,7 +1399,7 @@ void QgsProjectProperties::on_mRemoveWMSComposerButton_clicked()
void QgsProjectProperties::on_mAddLayerRestrictionButton_clicked()
{
QgsProjectLayerGroupDialog d( this, QgsProject::instance()->fileName() );
d.setWindowTitle( tr( "Select restricted layers and groups" ) );
d.setWindowTitle( tr( "Select Restricted Layers and Groups" ) );
if ( d.exec() == QDialog::Accepted )
{
QStringList layerNames = d.selectedLayerNames();
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgssavestyletodbdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ QgsSaveStyleToDbDialog::QgsSaveStyleToDbDialog( QWidget *parent )
: QDialog( parent )
{
setupUi( this );
setWindowTitle( QStringLiteral( "Save style in database" ) );
setWindowTitle( QStringLiteral( "Save Style in Database" ) );
mDescriptionEdit->setTabChangesFocus( true );
setTabOrder( mNameEdit, mDescriptionEdit );
setTabOrder( mDescriptionEdit, mUseAsDefault );
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsselectbyformdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ QgsSelectByFormDialog::QgsSelectByFormDialog( QgsVectorLayer *layer, const QgsAt
QgsSettings settings;
restoreGeometry( settings.value( QStringLiteral( "Windows/SelectByForm/geometry" ) ).toByteArray() );

setWindowTitle( tr( "Select features by value" ) );
setWindowTitle( tr( "Select Features by Value" ) );
}

QgsSelectByFormDialog::~QgsSelectByFormDialog()
Expand Down
6 changes: 3 additions & 3 deletions src/gui/attributetable/qgsdualview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ void QgsDualView::previewExpressionBuilder()
QgsExpressionContext context( QgsExpressionContextUtils::globalProjectLayerScopes( mLayer ) );

QgsExpressionBuilderDialog dlg( mLayer, mFeatureList->displayExpression(), this, QStringLiteral( "generic" ), context );
dlg.setWindowTitle( tr( "Expression based preview" ) );
dlg.setWindowTitle( tr( "Expression Based Preview" ) );
dlg.setExpressionText( mFeatureList->displayExpression() );