Skip to content
Permalink
Browse files

Add book title capitalization to panels

  • Loading branch information
DelazJ authored and nyalldawson committed Jan 14, 2018
1 parent 776fa23 commit 7494fae9f5844fb4bdc8febbca6e9d6ce8a10c66
@@ -69,7 +69,7 @@ QgsLayoutAttributeTableWidget::QgsLayoutAttributeTableWidget( QgsLayoutFrame *fr
connect( mHideEmptyBgCheckBox, &QCheckBox::toggled, this, &QgsLayoutAttributeTableWidget::mHideEmptyBgCheckBox_toggled );
connect( mWrapBehaviorComboBox, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this, &QgsLayoutAttributeTableWidget::mWrapBehaviorComboBox_currentIndexChanged );
connect( mAdvancedCustomisationButton, &QPushButton::clicked, this, &QgsLayoutAttributeTableWidget::mAdvancedCustomisationButton_clicked );
setPanelTitle( tr( "Table properties" ) );
setPanelTitle( tr( "Table Properties" ) );

mContentFontToolButton->setMode( QgsFontButton::ModeQFont );
mHeaderFontToolButton->setMode( QgsFontButton::ModeQFont );
@@ -46,7 +46,7 @@ QgsLayoutHtmlWidget::QgsLayoutHtmlWidget( QgsLayoutFrame *frame )
connect( mAddFramePushButton, &QPushButton::clicked, this, &QgsLayoutHtmlWidget::mAddFramePushButton_clicked );
connect( mEmptyFrameCheckBox, &QCheckBox::toggled, this, &QgsLayoutHtmlWidget::mEmptyFrameCheckBox_toggled );
connect( mHideEmptyBgCheckBox, &QCheckBox::toggled, this, &QgsLayoutHtmlWidget::mHideEmptyBgCheckBox_toggled );
setPanelTitle( tr( "HTML properties" ) );
setPanelTitle( tr( "HTML Properties" ) );

//setup html editor
mHtmlEditor = new QgsCodeEditorHTML( this );
@@ -44,7 +44,7 @@ QgsLayoutLabelWidget::QgsLayoutLabelWidget( QgsLayoutItemLabel *label )
connect( mTopRadioButton, &QRadioButton::clicked, this, &QgsLayoutLabelWidget::mTopRadioButton_clicked );
connect( mBottomRadioButton, &QRadioButton::clicked, this, &QgsLayoutLabelWidget::mBottomRadioButton_clicked );
connect( mMiddleRadioButton, &QRadioButton::clicked, this, &QgsLayoutLabelWidget::mMiddleRadioButton_clicked );
setPanelTitle( tr( "Label properties" ) );
setPanelTitle( tr( "Label Properties" ) );

mFontButton->setMode( QgsFontButton::ModeQFont );

@@ -101,7 +101,7 @@ QgsLayoutLegendWidget::QgsLayoutLegendWidget( QgsLayoutItemLegend *legend )
connect( mAddGroupToolButton, &QToolButton::clicked, this, &QgsLayoutLegendWidget::mAddGroupToolButton_clicked );
connect( mFilterLegendByAtlasCheckBox, &QCheckBox::toggled, this, &QgsLayoutLegendWidget::mFilterLegendByAtlasCheckBox_toggled );
connect( mItemTreeView, &QgsLayerTreeView::doubleClicked, this, &QgsLayoutLegendWidget::mItemTreeView_doubleClicked );
setPanelTitle( tr( "Legend properties" ) );
setPanelTitle( tr( "Legend Properties" ) );

mTitleFontButton->setMode( QgsFontButton::ModeQFont );
mGroupFontButton->setMode( QgsFontButton::ModeQFont );
@@ -74,7 +74,7 @@ QgsLayoutMapGridWidget::QgsLayoutMapGridWidget( QgsLayoutItemMapGrid *mapGrid, Q
connect( mCoordinatePrecisionSpinBox, static_cast < void ( QSpinBox::* )( int ) > ( &QSpinBox::valueChanged ), this, &QgsLayoutMapGridWidget::mCoordinatePrecisionSpinBox_valueChanged );
connect( mDistanceToMapFrameSpinBox, static_cast < void ( QDoubleSpinBox::* )( double ) > ( &QDoubleSpinBox::valueChanged ), this, &QgsLayoutMapGridWidget::mDistanceToMapFrameSpinBox_valueChanged );
connect( mAnnotationFontColorButton, &QgsColorButton::colorChanged, this, &QgsLayoutMapGridWidget::mAnnotationFontColorButton_colorChanged );
setPanelTitle( tr( "Map grid properties" ) );
setPanelTitle( tr( "Map Grid Properties" ) );

mAnnotationFontButton->setMode( QgsFontButton::ModeQFont );

@@ -75,7 +75,7 @@ QgsLayoutMapWidget::QgsLayoutMapWidget( QgsLayoutItemMap *item )
connect( mOverviewCheckBox, &QgsCollapsibleGroupBoxBasic::toggled, this, &QgsLayoutMapWidget::mOverviewCheckBox_toggled );
connect( mOverviewListWidget, &QListWidget::currentItemChanged, this, &QgsLayoutMapWidget::mOverviewListWidget_currentItemChanged );
connect( mOverviewListWidget, &QListWidget::itemChanged, this, &QgsLayoutMapWidget::mOverviewListWidget_itemChanged );
setPanelTitle( tr( "Map properties" ) );
setPanelTitle( tr( "Map Properties" ) );
mMapRotationSpinBox->setClearValue( 0 );

//add widget for general composer item properties
@@ -52,7 +52,7 @@ QgsLayoutPictureWidget::QgsLayoutPictureWidget( QgsLayoutItemPicture *picture )
connect( mStrokeWidthSpinBox, static_cast < void ( QDoubleSpinBox::* )( double ) > ( &QDoubleSpinBox::valueChanged ), this, &QgsLayoutPictureWidget::mStrokeWidthSpinBox_valueChanged );
connect( mPictureRotationOffsetSpinBox, static_cast < void ( QDoubleSpinBox::* )( double ) > ( &QDoubleSpinBox::valueChanged ), this, &QgsLayoutPictureWidget::mPictureRotationOffsetSpinBox_valueChanged );
connect( mNorthTypeComboBox, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this, &QgsLayoutPictureWidget::mNorthTypeComboBox_currentIndexChanged );
setPanelTitle( tr( "Picture properties" ) );
setPanelTitle( tr( "Picture Properties" ) );

mFillColorButton->setAllowOpacity( true );
mFillColorButton->setColorDialogTitle( tr( "Select Fill Color" ) );
@@ -27,7 +27,7 @@ QgsLayoutPolygonWidget::QgsLayoutPolygonWidget( QgsLayoutItemPolygon *polygon )
, mPolygon( polygon )
{
setupUi( this );
setPanelTitle( tr( "Polygon properties" ) );
setPanelTitle( tr( "Polygon Properties" ) );

//add widget for general composer item properties
mItemPropertiesWidget = new QgsLayoutItemPropertiesWidget( this, polygon );
@@ -28,7 +28,7 @@ QgsLayoutPolylineWidget::QgsLayoutPolylineWidget( QgsLayoutItemPolyline *polylin
, mPolyline( polyline )
{
setupUi( this );
setPanelTitle( tr( "Polyline properties" ) );
setPanelTitle( tr( "Polyline Properties" ) );

connect( mStrokeWidthSpinBox, static_cast < void ( QDoubleSpinBox::* )( double ) > ( &QDoubleSpinBox::valueChanged ), this, &QgsLayoutPolylineWidget::arrowStrokeWidthChanged );
connect( mArrowHeadWidthSpinBox, static_cast < void ( QDoubleSpinBox::* )( double ) > ( &QDoubleSpinBox::valueChanged ), this, &QgsLayoutPolylineWidget::arrowHeadWidthChanged );
@@ -44,7 +44,7 @@ QgsLayoutPolylineWidget::QgsLayoutPolylineWidget( QgsLayoutItemPolyline *polylin
connect( mEndMarkerLineEdit, &QLineEdit::textChanged, this, &QgsLayoutPolylineWidget::mEndMarkerLineEdit_textChanged );
connect( mStartMarkerToolButton, &QToolButton::clicked, this, &QgsLayoutPolylineWidget::mStartMarkerToolButton_clicked );
connect( mEndMarkerToolButton, &QToolButton::clicked, this, &QgsLayoutPolylineWidget::mEndMarkerToolButton_clicked );
setPanelTitle( tr( "Arrow properties" ) );
setPanelTitle( tr( "Arrow Properties" ) );
QButtonGroup *startMarkerGroup = new QButtonGroup( this );
startMarkerGroup->addButton( mRadioStartNoMarker );
startMarkerGroup->addButton( mRadioStartArrow );
@@ -28,7 +28,7 @@ QgsLayoutPropertiesWidget::QgsLayoutPropertiesWidget( QWidget *parent, QgsLayout
Q_ASSERT( mLayout );

setupUi( this );
setPanelTitle( tr( "Layout properties" ) );
setPanelTitle( tr( "Layout Properties" ) );
blockSignals( true );

updateSnappingElements();
@@ -48,7 +48,7 @@ QgsLayoutScaleBarWidget::QgsLayoutScaleBarWidget( QgsLayoutItemScaleBar *scaleBa
connect( mLineCapStyleCombo, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this, &QgsLayoutScaleBarWidget::mLineCapStyleCombo_currentIndexChanged );
connect( mMinWidthSpinBox, static_cast < void ( QDoubleSpinBox::* )( double ) > ( &QDoubleSpinBox::valueChanged ), this, &QgsLayoutScaleBarWidget::mMinWidthSpinBox_valueChanged );
connect( mMaxWidthSpinBox, static_cast < void ( QDoubleSpinBox::* )( double ) > ( &QDoubleSpinBox::valueChanged ), this, &QgsLayoutScaleBarWidget::mMaxWidthSpinBox_valueChanged );
setPanelTitle( tr( "Scalebar properties" ) );
setPanelTitle( tr( "Scalebar Properties" ) );

mFontButton->setMode( QgsFontButton::ModeQFont );

@@ -30,7 +30,7 @@ QgsLayoutShapeWidget::QgsLayoutShapeWidget( QgsLayoutItemShape *shape )
setupUi( this );
connect( mShapeComboBox, static_cast<void ( QComboBox::* )( const QString & )>( &QComboBox::currentIndexChanged ), this, &QgsLayoutShapeWidget::mShapeComboBox_currentIndexChanged );
connect( mCornerRadiusSpinBox, static_cast < void ( QDoubleSpinBox::* )( double ) > ( &QDoubleSpinBox::valueChanged ), this, &QgsLayoutShapeWidget::mCornerRadiusSpinBox_valueChanged );
setPanelTitle( tr( "Shape properties" ) );
setPanelTitle( tr( "Shape Properties" ) );

//add widget for general composer item properties
mItemPropertiesWidget = new QgsLayoutItemPropertiesWidget( this, shape );
@@ -166,7 +166,7 @@ void QgsRuleBasedLabelingWidget::editRule( const QModelIndex &index )
QgsRuleBasedLabeling::Rule *rule = mModel->ruleForIndex( index );

QgsLabelingRulePropsWidget *widget = new QgsLabelingRulePropsWidget( rule, mLayer, this, mCanvas );
widget->setPanelTitle( tr( "Edit rule" ) );
widget->setPanelTitle( tr( "Edit Rule" ) );
connect( widget, &QgsPanelWidget::panelAccepted, this, &QgsRuleBasedLabelingWidget::ruleWidgetPanelAccepted );
connect( widget, &QgsLabelingRulePropsWidget::widgetChanged, this, &QgsRuleBasedLabelingWidget::liveUpdateRuleFromPanel );
openPanel( widget );
@@ -101,7 +101,7 @@ void QgsColorRampButton::showColorRampDialog()
if ( panelMode )
{
QgsLimitedRandomColorRampWidget *widget = new QgsLimitedRandomColorRampWidget( *randRamp, this );
widget->setPanelTitle( tr( "Edit ramp" ) );
widget->setPanelTitle( tr( "Edit Ramp" ) );
connect( widget, &QgsLimitedRandomColorRampWidget::changed, this, &QgsColorRampButton::rampWidgetUpdated );
panel->openPanel( widget );
}
@@ -120,7 +120,7 @@ void QgsColorRampButton::showColorRampDialog()
if ( panelMode )
{
QgsPresetColorRampWidget *widget = new QgsPresetColorRampWidget( *presetRamp, this );
widget->setPanelTitle( tr( "Edit ramp" ) );
widget->setPanelTitle( tr( "Edit Ramp" ) );
connect( widget, &QgsPresetColorRampWidget::changed, this, &QgsColorRampButton::rampWidgetUpdated );
panel->openPanel( widget );
}
@@ -139,7 +139,7 @@ void QgsColorRampButton::showColorRampDialog()
if ( panelMode )
{
QgsColorBrewerColorRampWidget *widget = new QgsColorBrewerColorRampWidget( *brewerRamp, this );
widget->setPanelTitle( tr( "Edit ramp" ) );
widget->setPanelTitle( tr( "Edit Ramp" ) );
connect( widget, &QgsColorBrewerColorRampWidget::changed, this, &QgsColorRampButton::rampWidgetUpdated );
panel->openPanel( widget );
}
@@ -760,7 +760,7 @@ bool QgsColorSwatchDelegate::editorEvent( QEvent *event, QAbstractItemModel *mod
if ( panel && panel->dockMode() )
{
QgsCompoundColorWidget *colorWidget = new QgsCompoundColorWidget( panel, color, QgsCompoundColorWidget::LayoutVertical );
colorWidget->setPanelTitle( tr( "Select color" ) );
colorWidget->setPanelTitle( tr( "Select Color" ) );
colorWidget->setAllowOpacity( true );
colorWidget->setProperty( "index", index );
connect( colorWidget, &QgsCompoundColorWidget::currentColorChanged, this, &QgsColorSwatchDelegate::colorChanged );
@@ -226,7 +226,7 @@ void QgsUnitSelectionWidget::showDialog()
if ( panel && panel->dockMode() )
{
QgsMapUnitScaleWidget *widget = new QgsMapUnitScaleWidget( panel );
widget->setPanelTitle( tr( "Adjust scaling range" ) );
widget->setPanelTitle( tr( "Adjust Scaling Range" ) );
widget->setMapCanvas( mCanvas );
widget->setMapUnitScale( mMapUnitScale );
connect( widget, &QgsMapUnitScaleWidget::mapUnitScaleChanged, this, &QgsUnitSelectionWidget::widgetChanged );
@@ -231,7 +231,7 @@ void QgsPalettedRendererWidget::changeColor()
if ( panel && panel->dockMode() )
{
QgsCompoundColorWidget *colorWidget = new QgsCompoundColorWidget( panel, currentColor, QgsCompoundColorWidget::LayoutVertical );
colorWidget->setPanelTitle( tr( "Select color" ) );
colorWidget->setPanelTitle( tr( "Select Color" ) );
colorWidget->setAllowOpacity( true );
connect( colorWidget, &QgsCompoundColorWidget::currentColorChanged, this, [ = ]( const QColor & color ) { setSelectionColor( sel, color ); } );
panel->openPanel( colorWidget );
@@ -36,7 +36,7 @@ QgsDataDefinedSizeLegendWidget::QgsDataDefinedSizeLegendWidget( const QgsDataDef
, mMapCanvas( canvas )
{
setupUi( this );
setPanelTitle( tr( "Data-defined size legend" ) );
setPanelTitle( tr( "Data-defined Size Legend" ) );

QgsMarkerSymbol *symbol = nullptr;

@@ -149,7 +149,7 @@ void QgsPointClusterRendererWidget::mRendererSettingsButton_clicked()
if ( m )
{
QgsRendererWidget *w = m->createRendererWidget( mLayer, mStyle, mRenderer->embeddedRenderer()->clone() );
w->setPanelTitle( tr( "Renderer settings" ) );
w->setPanelTitle( tr( "Renderer Settings" ) );

QgsExpressionContextScope scope;
scope.addVariable( QgsExpressionContextScope::StaticVariable( QgsExpressionContext::EXPR_CLUSTER_COLOR, "", true ) );
@@ -264,7 +264,7 @@ void QgsPointDisplacementRendererWidget::mRendererSettingsButton_clicked()
if ( m )
{
QgsRendererWidget *w = m->createRendererWidget( mLayer, mStyle, mRenderer->embeddedRenderer()->clone() );
w->setPanelTitle( tr( "Renderer settings" ) );
w->setPanelTitle( tr( "Renderer Settings" ) );

QgsSymbolWidgetContext context = mContext;

@@ -183,7 +183,7 @@ void QgsRuleBasedRendererWidget::editRule( const QModelIndex &index )
QgsRuleBasedRenderer::Rule *rule = mModel->ruleForIndex( index );

QgsRendererRulePropsWidget *widget = new QgsRendererRulePropsWidget( rule, mLayer, mStyle, this, mContext );
widget->setPanelTitle( tr( "Edit rule" ) );
widget->setPanelTitle( tr( "Edit Rule" ) );
connect( widget, &QgsPanelWidget::panelAccepted, this, &QgsRuleBasedRendererWidget::ruleWidgetPanelAccepted );
connect( widget, &QgsPanelWidget::widgetChanged, this, &QgsRuleBasedRendererWidget::liveUpdateRuleFromPanel );
openPanel( widget );
@@ -260,7 +260,7 @@ void QgsRuleBasedRendererWidget::refineRuleScales()
void QgsRuleBasedRendererWidget::refineRuleCategoriesGui()
{
QgsCategorizedSymbolRendererWidget *w = new QgsCategorizedSymbolRendererWidget( mLayer, mStyle, nullptr );
w->setPanelTitle( tr( "Add categories to rules" ) );
w->setPanelTitle( tr( "Add Categories to Rules" ) );
connect( w, &QgsPanelWidget::panelAccepted, this, &QgsRuleBasedRendererWidget::refineRuleCategoriesAccepted );
w->setContext( mContext );
openPanel( w );
@@ -269,7 +269,7 @@ void QgsRuleBasedRendererWidget::refineRuleCategoriesGui()
void QgsRuleBasedRendererWidget::refineRuleRangesGui()
{
QgsGraduatedSymbolRendererWidget *w = new QgsGraduatedSymbolRendererWidget( mLayer, mStyle, nullptr );
w->setPanelTitle( tr( "Add ranges to rules" ) );
w->setPanelTitle( tr( "Add Ranges to Rules" ) );
connect( w, &QgsPanelWidget::panelAccepted, this, &QgsRuleBasedRendererWidget::refineRuleRangesAccepted );
w->setContext( mContext );
openPanel( w );
@@ -284,13 +284,13 @@ void QgsRuleBasedRendererWidget::refineRuleScalesGui( const QModelIndexList &ind
// If any of the rules don't have a symbol let the user know and exit.
if ( !initialRule->symbol() )
{
QMessageBox::warning( this, tr( "Scale refinement" ), tr( "Parent rule %1 must have a symbol for this operation." ).arg( initialRule->label() ) );
QMessageBox::warning( this, tr( "Scale Refinement" ), tr( "Parent rule %1 must have a symbol for this operation." ).arg( initialRule->label() ) );
return;
}
}

QString txt = QInputDialog::getText( this,
tr( "Scale refinement" ),
tr( "Scale Refinement" ),
tr( "Please enter scale denominators at which will split the rule, separate them by commas (e.g. 1000,5000):" ) );
if ( txt.isEmpty() )
return;
@@ -267,7 +267,7 @@ QgsSymbolSelectorWidget::QgsSymbolSelectorWidget( QgsSymbol *symbol, QgsStyle *s
QModelIndex newIndex = layersTree->model()->index( 0, 0 );
layersTree->setCurrentIndex( newIndex );

setPanelTitle( tr( "Symbol selector" ) );
setPanelTitle( tr( "Symbol Selector" ) );
}

QMenu *QgsSymbolSelectorWidget::advancedMenu()

0 comments on commit 7494fae

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