QGIS/python/core/composer/qgscomposerframe.sip
Matthias Kuhn 58ea21124e Streamline expression context generation (#3350)
* Save more data to QML

 * Virtual fields
 * Map tips
 * Display expression
 * Read only flag

* Streamline expression context generation

Whenever an object is able to generate an expression context it
implements the method createExpressionContext() declared in
QgsExpressionContextGenerator.

This makes a cleaner API and allows using QgsFieldExpressionWidget and
QgsDataDefinedButton from python because standard OO programming
approaches are used instead of callbacks and void pointers.

* Colorize output of doc and sip tests

* Fix build

* Fix sip complaints

* Fix rebase problems

* Workaround failing bindings test
2016-08-10 19:44:30 +02:00

83 lines
2.9 KiB
Plaintext

/** Frame item for a composer multiframe item*/
class QgsComposerFrame: QgsComposerItem
{
%TypeHeaderCode
#include "qgscomposerframe.h"
%End
public:
QgsComposerFrame( QgsComposition* c /TransferThis/, QgsComposerMultiFrame* mf, qreal x, qreal y, qreal width, qreal height );
~QgsComposerFrame();
/** Sets the visible part of the multiframe's content which is visible within
* this frame (relative to the total multiframe extent in mm).
* @param section visible portion of content
* @see extent
*/
void setContentSection( const QRectF& section );
/** Returns the parent multiframe for the frame.
* @returns parent multiframe
*/
QgsComposerMultiFrame* multiFrame() const;
//Overridden to allow multiframe to set display name
virtual QString displayName() const;
//Overridden to handle fixed frame sizes set by multi frame
void setSceneRect( const QRectF& rectangle );
void paint( QPainter* painter, const QStyleOptionGraphicsItem* itemStyle, QWidget* pWidget );
void beginItemCommand( const QString& text );
void endItemCommand();
bool writeXml( QDomElement& elem, QDomDocument & doc ) const;
bool readXml( const QDomElement& itemElem, const QDomDocument& doc );
int type() const;
/** Returns the visible portion of the multi frame's content which
* is shown in this frame.
* @returns extent of visible portion
* @note added in QGIS 2.5
* @see setContentSection
*/
QRectF extent() const;
/** Returns whether the page should be hidden (ie, not included in composer exports) if this frame is empty
* @returns true if page should be hidden if frame is empty
* @note added in QGIS 2.5
* @see setHidePageIfEmpty
*/
bool hidePageIfEmpty() const;
/** Sets whether the page should be hidden (ie, not included in composer exports) if this frame is empty
* @param hidePageIfEmpty set to true if page should be hidden if frame is empty
* @note added in QGIS 2.5
* @see hidePageIfEmpty
*/
void setHidePageIfEmpty( const bool hidePageIfEmpty );
/** Returns whether the background and frame border should be hidden if this frame is empty
* @returns true if background and border should be hidden if frame is empty
* @note added in QGIS 2.5
* @see setHideBackgroundIfEmpty
*/
bool hideBackgroundIfEmpty() const;
/** Sets whether the background and frame border should be hidden if this frame is empty
* @param hideBackgroundIfEmpty set to true if background and border should be hidden if frame is empty
* @note added in QGIS 2.5
* @see hideBackgroundIfEmpty
*/
void setHideBackgroundIfEmpty( const bool hideBackgroundIfEmpty );
/** Returns whether the frame is empty
* @returns true if frame is empty
* @note added in QGIS 2.5
* @see hidePageIfEmpty
*/
bool isEmpty() const;
virtual QgsExpressionContext createExpressionContext() const;
};