QGIS/python/core/composer/qgscomposerlegend.sip
Juergen E. Fischer f3cb57b1eb SIP bindings update:
- update methods of existing classes
- add comment to methods missing in the sip bindings
- split up collective sip files into single files and use
  same directory structure in python/ as in src/
- add a lot of missing classes (some might not make sense because of
  missing python methods in those classes)
- remove some non-existing methods from the header files
- add scripts/sipdiff
- replace some usages of std::vector and std::set with QVector/QSet
2012-09-24 02:42:57 +02:00

93 lines
2.5 KiB
Plaintext

/** \ingroup MapComposer
* A legend that can be placed onto a map composition
*/
class QgsComposerLegend : QgsComposerItem
{
%TypeHeaderCode
#include <qgscomposerlegend.h>
%End
public:
QgsComposerLegend( QgsComposition* composition /TransferThis/);
~QgsComposerLegend();
/** return correct graphics item type. Added in v1.7 */
virtual int type() const;
/** \brief Reimplementation of QCanvasItem::paint*/
void paint( QPainter* painter, const QStyleOptionGraphicsItem* itemStyle, QWidget* pWidget );
/**Paints the legend and calculates its size. If painter is 0, only size is calculated*/
QSizeF paintAndDetermineSize( QPainter* painter );
/**Sets item box to the whole content*/
void adjustBoxSize();
/**Returns pointer to the legend model*/
QgsLegendModel* model();
//setters and getters
void setTitle( const QString& t );
QString title() const;
QFont titleFont() const;
void setTitleFont( const QFont& f );
QFont groupFont() const;
void setGroupFont( const QFont& f );
QFont layerFont() const;
void setLayerFont( const QFont& f );
QFont itemFont() const;
void setItemFont( const QFont& f );
double boxSpace() const;
void setBoxSpace( double s );
double groupSpace() const;
void setGroupSpace( double s );
double layerSpace() const;
void setLayerSpace( double s );
double symbolSpace() const;
void setSymbolSpace( double s );
double iconLabelSpace() const;
void setIconLabelSpace( double s );
double symbolWidth() const;
void setSymbolWidth( double w );
double symbolHeight() const;
void setSymbolHeight( double h );
void setWrapChar( const QString& t );
QString wrapChar() const;
void setComposerMap( const QgsComposerMap* map );
const QgsComposerMap* composerMap() const;
/**Updates the model and all legend entries*/
void updateLegend();
/** stores state in Dom node
* @param elem is Dom element corresponding to 'Composer' tag
* @param doc Dom document
*/
bool writeXML( QDomElement& elem, QDomDocument & doc ) const;
/** sets state from Dom document
* @param itemElem is Dom node corresponding to item tag
* @param doc is Dom document
*/
bool readXML( const QDomElement& itemElem, const QDomDocument& doc );
public slots:
/**Data changed*/
void synchronizeWithModel();
/**Sets mCompositionMap to 0 if the map is deleted*/
void invalidateCurrentMap();
};