-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added binding files for composer attribute table
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@14770 c8812cc2-4d05-0410-92ff-de0c093fc19c
- Loading branch information
mhugent
committed
Nov 26, 2010
1 parent
fe88d72
commit 6568583
Showing
5 changed files
with
93 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/** \ingroup MapComposer | ||
* Attribute table item for map composer. | ||
*/ | ||
|
||
class QgsComposerAttributeTable: QgsComposerTable | ||
{ | ||
%TypeHeaderCode | ||
#include <qgscomposerattributetable.h> | ||
%End | ||
|
||
public: | ||
QgsComposerAttributeTable( QgsComposition* composition /TransferThis/ ); | ||
~QgsComposerAttributeTable(); | ||
|
||
/** \brief Reimplementation of QCanvasItem::paint*/ | ||
virtual void paint( QPainter* painter, const QStyleOptionGraphicsItem* itemStyle, QWidget* pWidget ); | ||
|
||
bool writeXML( QDomElement& elem, QDomDocument & doc ) const; | ||
bool readXML( const QDomElement& itemElem, const QDomDocument& doc ); | ||
|
||
void setVectorLayer( QgsVectorLayer* vl ); | ||
const QgsVectorLayer* vectorLayer() const; | ||
|
||
void setComposerMap( const QgsComposerMap* map /TransferThis/ ); | ||
const QgsComposerMap* composerMap() const; | ||
|
||
void setMaximumNumberOfFeatures( int nr ); | ||
int maximumNumberOfFeatures() const; | ||
|
||
void setDisplayOnlyVisibleFeatures( bool b ); | ||
bool displayOnlyVisibleFeatures() const; | ||
|
||
QSet<int> displayAttributes() const; | ||
void setDisplayAttributes( const QSet<int>& attr ); | ||
|
||
QMap<int, QString> fieldAliasMap() const; | ||
void setFieldAliasMap( const QMap<int, QString>& map ); | ||
|
||
/**Adapts mMaximumNumberOfFeatures depending on the rectangle height*/ | ||
void setSceneRect( const QRectF& rectangle ); | ||
|
||
//void setSortAttributes( const QList<QPair<int, bool> > att ); | ||
//QList<QPair<int, bool> > sortAttributes() const; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/**A class to display feature attributes in the print composer*/ | ||
class QgsComposerTable: QgsComposerItem | ||
{ | ||
%TypeHeaderCode | ||
#include <qgscomposertable.h> | ||
%End | ||
|
||
public: | ||
QgsComposerTable( QgsComposition* composition /TransferThis/ ); | ||
virtual ~QgsComposerTable(); | ||
|
||
/** \brief Reimplementation of QCanvasItem::paint*/ | ||
virtual void paint( QPainter* painter, const QStyleOptionGraphicsItem* itemStyle, QWidget* pWidget ); | ||
|
||
virtual bool writeXML( QDomElement& elem, QDomDocument & doc ) const = 0; | ||
virtual bool readXML( const QDomElement& itemElem, const QDomDocument& doc ) = 0; | ||
|
||
void setLineTextDistance( double d ); | ||
double lineTextDistance() const; | ||
|
||
void setHeaderFont( const QFont& f ); | ||
QFont headerFont() const; | ||
|
||
void setContentFont( const QFont& f ); | ||
QFont contentFont() const; | ||
|
||
void setShowGrid( bool show ); | ||
bool showGrid() const; | ||
|
||
void setGridStrokeWidth( double w ); | ||
double gridStrokeWidth() const; | ||
|
||
void setGridColor( const QColor& c ); | ||
QColor gridColor() const; | ||
|
||
/**Adapts the size of the frame to match the content. This is normally done in the paint method, but sometimes \ | ||
it needs to be done before the first render*/ | ||
void adjustFrameToSize(); | ||
|
||
protected: | ||
//virtual bool getFeatureAttributes( QList< QMap< int, QVariant> >& attributes ); | ||
//virtual QMap<int, QString> getHeaderLabels() const; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters