16 #ifndef QGSREPORTSECTIONFIELDGROUP_H 17 #define QGSREPORTSECTIONFIELDGROUP_H 19 #include "qgis_core.h" 37 class CORE_EXPORT QgsReportSectionFieldGroup :
public QgsAbstractReportSection
44 enum SectionVisibility
46 IncludeWhenFeaturesFound,
54 QgsReportSectionFieldGroup( QgsAbstractReportSection *parentSection =
nullptr );
56 QString type()
const override {
return QStringLiteral(
"SectionFieldGroup" ); }
57 QString description()
const override;
58 QIcon icon()
const override;
83 bool bodyEnabled()
const {
return mBodyEnabled; }
91 void setBodyEnabled(
bool enabled ) { mBodyEnabled = enabled; }
104 void setLayer(
QgsVectorLayer *layer ) { mCoverageLayer = layer; }
110 QString field()
const {
return mField; }
116 void setField(
const QString &field ) { mField = field; }
123 bool sortAscending()
const;
130 void setSortAscending(
bool sortAscending );
136 SectionVisibility headerVisibility()
const {
return mHeaderVisibility; }
142 void setHeaderVisibility( SectionVisibility visibility ) { mHeaderVisibility = visibility; }
148 SectionVisibility footerVisibility()
const {
return mFooterVisibility; }
154 void setFooterVisibility( SectionVisibility visibility ) { mFooterVisibility = visibility; }
156 QgsReportSectionFieldGroup *clone() const override
SIP_FACTORY;
157 bool beginRender() override;
158 bool prepareHeader() override;
159 bool prepareFooter() override;
160 QgsLayout *nextBody(
bool &ok ) override;
161 void reset() override;
162 void setParentSection( QgsAbstractReportSection *parentSection ) override;
163 void reloadSettings() override;
167 bool writePropertiesToElement( QDomElement &element, QDomDocument &document, const
QgsReadWriteContext &context ) const override;
168 bool readPropertiesFromElement( const QDomElement &element, const QDomDocument &document, const
QgsReadWriteContext &context ) override;
174 bool mSortAscending = true;
175 int mFieldIndex = -1;
177 bool mSkipNextRequest = false;
178 bool mNoFeatures = false;
179 SectionVisibility mHeaderVisibility = IncludeWhenFeaturesFound;
180 SectionVisibility mFooterVisibility = IncludeWhenFeaturesFound;
183 QSet< QVariant > mEncounteredValues;
185 bool mBodyEnabled = false;
191 void updateChildContexts( const
QgsFeature &feature );
198 #endif //QGSREPORTSECTIONFIELDGROUP_H The class is used as a container of context for various read/write operations on other objects...
Wrapper for iterator of features from vector data provider or vector layer.
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
std::unique_ptr< GEOSGeometry, GeosDeleter > unique_ptr
Scoped GEOS pointer.
This class wraps a request for features to a vector layer (or directly its vector data provider)...
Base class for layouts, which can contain items such as maps, labels, scalebars, etc.
Represents a vector layer which manages a vector based data sets.