18 #ifndef QGSCOMPOSERATTRIBUTETABLE_H
19 #define QGSCOMPOSERATTRIBUTETABLE_H
60 virtual void paint( QPainter* painter,
const QStyleOptionGraphicsItem* itemStyle, QWidget* pWidget );
67 bool writeXML( QDomElement& elem, QDomDocument & doc )
const;
74 bool readXML(
const QDomElement& itemElem,
const QDomDocument& doc );
119 void setMaximumNumberOfFeatures(
int features );
134 void setDisplayOnlyVisibleFeatures(
bool visibleOnly );
160 void setFilterFeatures(
bool filter );
180 void setFeatureFilter(
const QString& expression );
188 Q_DECL_DEPRECATED QSet<int> displayAttributes()
const;
198 void setDisplayAttributes(
const QSet<int>& attr,
bool refresh =
true );
207 Q_DECL_DEPRECATED QMap<int, QString> fieldAliasMap()
const;
216 Q_DECL_DEPRECATED
void setFieldAliasMap(
const QMap<int, QString>& map );
236 Q_DECL_DEPRECATED
void setSortAttributes(
const QList<QPair<int, bool> > att );
244 QList<QPair<int, bool> > sortAttributes()
const;
272 QList<int> fieldsToDisplay()
const;
278 void restoreFieldAliasMap(
const QMap<int, QString>& map );
282 void removeLayer( QString layerId );
286 void maximumNumberOfFeaturesChanged(
int n );
289 #endif // QGSCOMPOSERATTRIBUTETABLE_H
bool displayOnlyVisibleFeatures() const
Returns true if the table is set to show only features visible on a corresponding composer map item...
void setAscending(bool asc)
Sets sort order for column sorting.
QMap< int, QVariant > QgsAttributeMap
virtual int type() const
return correct graphics item type.
QString mFeatureFilter
Feature filter expression.
QgsVectorLayer * vectorLayer() const
Returns the vector layer the attribute table is currently using.
const QgsComposerMap * mComposerMap
Associated composer map (used to display the visible features)
A class to display feature attributes in the print composer.
QgsVectorLayer * mVectorLayer
Associated vector layer.
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *itemStyle, QWidget *pWidget)
Reimplementation of QCanvasItem::paint.
const QgsComposerMap * composerMap() const
Returns the composer map whose extents are controlling the features shown in the table.
Graphics scene for map printing.
Object representing map window.
virtual bool writeXML(QDomElement &elem, QDomDocument &doc) const =0
stores state in Dom element
virtual bool getFeatureAttributes(QList< QgsAttributeMap > &attributeMaps)
Fetches the text used for the rows of the table.
bool filterFeatures() const
Returns true if a feature filter is active on the attribute table.
int maximumNumberOfFeatures() const
Returns the maximum number of features to be shown by the table.
A table class that displays a vector attribute table.
bool mFilterFeatures
True if feature filtering enabled.
int mMaximumNumberOfFeatures
Maximum number of features that is displayed.
void setSortColumn(int col)
Sets column number to sort by.
virtual void setSceneRect(const QRectF &rectangle)
Sets this items bound in scene coordinates such that 1 item size units corresponds to 1 scene size un...
QString featureFilter() const
Returns the current expression used to filter features for the table.
virtual bool readXML(const QDomElement &itemElem, const QDomDocument &doc)=0
sets state from Dom document
bool mShowOnlyVisibleFeatures
Shows only the features that are visible in the associated composer map (true by default) ...
Represents a vector layer which manages a vector based data sets.
Helper class for sorting tables, takes into account sorting column and ascending / descending...