Skip to content
Permalink
Browse files

Tweak section descriptions

  • Loading branch information
nyalldawson committed Jan 6, 2018
1 parent 015e754 commit 1ef87a401da2dfa955459ec4314f33444b067434
@@ -73,7 +73,7 @@ void QgsReportSectionFieldGroupWidget::editHeader()
{
mSection->header()->reportContext().setLayer( mSection->layer() );
mDesigner->setCurrentLayout( mSection->header() );
mDesigner->setSectionTitle( tr( "%1 Header" ).arg( mSection->description() ) );
mDesigner->setSectionTitle( tr( "Header: %1" ).arg( mSection->description() ) );
mOrganizer->setEditedSection( mSection );
}
}
@@ -91,7 +91,7 @@ void QgsReportSectionFieldGroupWidget::editFooter()
{
mSection->footer()->reportContext().setLayer( mSection->layer() );
mDesigner->setCurrentLayout( mSection->footer() );
mDesigner->setSectionTitle( tr( "%1 Footer" ).arg( mSection->description() ) );
mDesigner->setSectionTitle( tr( "Footer: %1" ).arg( mSection->description() ) );
mOrganizer->setEditedSection( mSection );
}
}
@@ -114,7 +114,7 @@ void QgsReportSectionFieldGroupWidget::editBody()
{
mSection->body()->reportContext().setLayer( mSection->layer() );
mDesigner->setCurrentLayout( mSection->body() );
mDesigner->setSectionTitle( tr( "%1 Body" ).arg( mSection->description() ) );
mDesigner->setSectionTitle( tr( "Body: %1" ).arg( mSection->description() ) );
mOrganizer->setEditedSection( mSection );
}
}
@@ -63,7 +63,7 @@ void QgsReportLayoutSectionWidget::editHeader()
if ( mSection->header() )
{
mDesigner->setCurrentLayout( mSection->header() );
mDesigner->setSectionTitle( tr( "%1 Header" ).arg( mSection->description() ) );
mDesigner->setSectionTitle( tr( "Header: %1" ).arg( mSection->description() ) );
mOrganizer->setEditedSection( mSection );
}
}
@@ -80,7 +80,7 @@ void QgsReportLayoutSectionWidget::editFooter()
if ( mSection->footer() )
{
mDesigner->setCurrentLayout( mSection->footer() );
mDesigner->setSectionTitle( tr( "%1 Footer" ).arg( mSection->description() ) );
mDesigner->setSectionTitle( tr( "Footer: %1" ).arg( mSection->description() ) );
mOrganizer->setEditedSection( mSection );
}
}
@@ -100,6 +100,6 @@ void QgsReportLayoutSectionWidget::editBody()
}

mDesigner->setCurrentLayout( mSection->body() );
mDesigner->setSectionTitle( tr( "%1 Body" ).arg( mSection->description() ) );
mDesigner->setSectionTitle( tr( "Body: %1" ).arg( mSection->description() ) );
mOrganizer->setEditedSection( mSection );
}
@@ -27,7 +27,10 @@ QgsReportSectionFieldGroup::QgsReportSectionFieldGroup( QgsAbstractReportSection

QString QgsReportSectionFieldGroup::description() const
{
return QObject::tr( "Group: %1" ).arg( mField );
if ( mCoverageLayer.get() )
return QObject::tr( "Group: %1 - %2" ).arg( mCoverageLayer->name(), mField );
else
return QObject::tr( "Group" );
}

QIcon QgsReportSectionFieldGroup::icon() const

0 comments on commit 1ef87a4

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