mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
sipify core composer part 2
This commit is contained in:
parent
01ffc4edc7
commit
b52f7c2975
@ -1,18 +1,5 @@
|
||||
core/conversions.sip
|
||||
core/qgsexception.sip
|
||||
core/composer/qgscomposereffect.sip
|
||||
core/composer/qgscomposerframe.sip
|
||||
core/composer/qgscomposerhtml.sip
|
||||
core/composer/qgscomposeritem.sip
|
||||
core/composer/qgscomposeritemcommand.sip
|
||||
core/composer/qgscomposeritemgroup.sip
|
||||
core/composer/qgscomposerlabel.sip
|
||||
core/composer/qgscomposerlegend.sip
|
||||
core/composer/qgscomposermapgrid.sip
|
||||
core/composer/qgscomposermapitem.sip
|
||||
core/composer/qgscomposermapoverview.sip
|
||||
core/composer/qgscomposermodel.sip
|
||||
core/composer/qgscomposermultiframe.sip
|
||||
core/composer/qgscomposermultiframecommand.sip
|
||||
core/composer/qgscomposerobject.sip
|
||||
core/composer/qgscomposerpicture.sip
|
||||
|
@ -1,15 +1,39 @@
|
||||
/************************************************************************
|
||||
* This file has been generated automatically from *
|
||||
* *
|
||||
* src/core/composer/qgscomposereffect.h *
|
||||
* *
|
||||
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||
************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class QgsComposerEffect : QGraphicsEffect
|
||||
{
|
||||
|
||||
%TypeHeaderCode
|
||||
#include <qgscomposereffect.h>
|
||||
#include "qgscomposereffect.h"
|
||||
%End
|
||||
public:
|
||||
QgsComposerEffect();
|
||||
~QgsComposerEffect();
|
||||
|
||||
void setCompositionMode( const QPainter::CompositionMode &compositionMode );
|
||||
void setCompositionMode( QPainter::CompositionMode compositionMode );
|
||||
|
||||
protected:
|
||||
/** Called whenever source needs to be drawn */
|
||||
virtual void draw( QPainter *painter );
|
||||
%Docstring
|
||||
Called whenever source needs to be drawn
|
||||
%End
|
||||
|
||||
};
|
||||
|
||||
|
||||
/************************************************************************
|
||||
* This file has been generated automatically from *
|
||||
* *
|
||||
* src/core/composer/qgscomposereffect.h *
|
||||
* *
|
||||
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||
************************************************************************/
|
||||
|
@ -1,82 +1,119 @@
|
||||
/** Frame item for a composer multiframe item*/
|
||||
/************************************************************************
|
||||
* This file has been generated automatically from *
|
||||
* *
|
||||
* src/core/composer/qgscomposerframe.h *
|
||||
* *
|
||||
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||
************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
class QgsComposerFrame: QgsComposerItem
|
||||
{
|
||||
%Docstring
|
||||
Frame item for a composer multiframe item.
|
||||
%End
|
||||
|
||||
%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 §ion );
|
||||
%Docstring
|
||||
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
|
||||
.. seealso:: extent
|
||||
%End
|
||||
|
||||
/** Returns the parent multiframe for the frame.
|
||||
* @returns parent multiframe
|
||||
*/
|
||||
QgsComposerMultiFrame *multiFrame() const;
|
||||
%Docstring
|
||||
Returns the parent multiframe for the frame.
|
||||
:return: parent multiframe
|
||||
:rtype: QgsComposerMultiFrame
|
||||
%End
|
||||
|
||||
//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 );
|
||||
virtual 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
|
||||
*/
|
||||
virtual void paint( QPainter *painter, const QStyleOptionGraphicsItem *itemStyle, QWidget *pWidget );
|
||||
|
||||
virtual void beginItemCommand( const QString &text );
|
||||
|
||||
virtual void endItemCommand();
|
||||
|
||||
virtual bool writeXml( QDomElement &elem, QDomDocument &doc ) const;
|
||||
|
||||
virtual bool readXml( const QDomElement &itemElem, const QDomDocument &doc );
|
||||
|
||||
virtual int type() const;
|
||||
|
||||
QRectF extent() const;
|
||||
%Docstring
|
||||
Returns the visible portion of the multi frame's content which
|
||||
is shown in this frame.
|
||||
:return: extent of visible portion
|
||||
.. versionadded:: 2.5
|
||||
.. seealso:: setContentSection
|
||||
:rtype: QRectF
|
||||
%End
|
||||
|
||||
/** 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;
|
||||
%Docstring
|
||||
Returns whether the page should be hidden (ie, not included in composer exports) if this frame is empty
|
||||
:return: true if page should be hidden if frame is empty
|
||||
.. versionadded:: 2.5
|
||||
.. seealso:: setHidePageIfEmpty
|
||||
:rtype: bool
|
||||
%End
|
||||
|
||||
/** 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 );
|
||||
%Docstring
|
||||
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
|
||||
.. versionadded:: 2.5
|
||||
.. seealso:: hidePageIfEmpty
|
||||
%End
|
||||
|
||||
/** 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;
|
||||
%Docstring
|
||||
Returns whether the background and frame stroke should be hidden if this frame is empty
|
||||
:return: true if background and stroke should be hidden if frame is empty
|
||||
.. versionadded:: 2.5
|
||||
.. seealso:: setHideBackgroundIfEmpty
|
||||
:rtype: bool
|
||||
%End
|
||||
|
||||
/** 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 );
|
||||
%Docstring
|
||||
Sets whether the background and frame stroke should be hidden if this frame is empty
|
||||
\param hideBackgroundIfEmpty set to true if background and stroke should be hidden if frame is empty
|
||||
.. versionadded:: 2.5
|
||||
.. seealso:: hideBackgroundIfEmpty
|
||||
%End
|
||||
|
||||
/** Returns whether the frame is empty
|
||||
* @returns true if frame is empty
|
||||
* @note added in QGIS 2.5
|
||||
* @see hidePageIfEmpty
|
||||
*/
|
||||
bool isEmpty() const;
|
||||
%Docstring
|
||||
Returns whether the frame is empty
|
||||
:return: true if frame is empty
|
||||
.. versionadded:: 2.5
|
||||
.. seealso:: hidePageIfEmpty
|
||||
:rtype: bool
|
||||
%End
|
||||
|
||||
virtual QgsExpressionContext createExpressionContext() const;
|
||||
|
||||
};
|
||||
|
||||
/************************************************************************
|
||||
* This file has been generated automatically from *
|
||||
* *
|
||||
* src/core/composer/qgscomposerframe.h *
|
||||
* *
|
||||
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||
************************************************************************/
|
||||
|
@ -1,200 +1,250 @@
|
||||
/************************************************************************
|
||||
* This file has been generated automatically from *
|
||||
* *
|
||||
* src/core/composer/qgscomposerhtml.h *
|
||||
* *
|
||||
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||
************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
class QgsComposerHtml: QgsComposerMultiFrame
|
||||
{
|
||||
|
||||
%TypeHeaderCode
|
||||
#include "qgscomposerhtml.h"
|
||||
%End
|
||||
public:
|
||||
|
||||
public:
|
||||
|
||||
/** Source modes for the HTML content to render in the item
|
||||
*/
|
||||
enum ContentMode
|
||||
{
|
||||
Url, /*!< Using this mode item fetches its content via a url*/
|
||||
ManualHtml /*!< HTML content is manually set for the item*/
|
||||
Url,
|
||||
ManualHtml
|
||||
};
|
||||
|
||||
QgsComposerHtml( QgsComposition *c /TransferThis/, bool createUndoCommands );
|
||||
|
||||
~QgsComposerHtml();
|
||||
|
||||
/** Sets the source mode for item's HTML content.
|
||||
* @param mode ContentMode for the item's source
|
||||
* @see contentMode
|
||||
* @see setUrl
|
||||
* @see setHtml
|
||||
* @note added in 2.5
|
||||
*/
|
||||
void setContentMode( ContentMode mode );
|
||||
%Docstring
|
||||
Sets the source mode for item's HTML content.
|
||||
\param mode ContentMode for the item's source
|
||||
.. seealso:: contentMode
|
||||
.. seealso:: setUrl
|
||||
.. seealso:: setHtml
|
||||
.. versionadded:: 2.5
|
||||
%End
|
||||
|
||||
/** Returns the source mode for item's HTML content.
|
||||
* @returns ContentMode for the item's source
|
||||
* @see setContentMode
|
||||
* @see url
|
||||
* @see html
|
||||
* @note added in 2.5
|
||||
*/
|
||||
ContentMode contentMode() const;
|
||||
%Docstring
|
||||
Returns the source mode for item's HTML content.
|
||||
:return: ContentMode for the item's source
|
||||
.. seealso:: setContentMode
|
||||
.. seealso:: url
|
||||
.. seealso:: html
|
||||
.. versionadded:: 2.5
|
||||
:rtype: ContentMode
|
||||
%End
|
||||
|
||||
/** Sets the URL for content to display in the item when the item is using
|
||||
* the QgsComposerHtml::Url mode. Content is automatically fetched and the
|
||||
* HTML item refreshed after calling this function.
|
||||
* @param url URL of content to display in the item
|
||||
* @see url
|
||||
* @see contentMode
|
||||
*/
|
||||
void setUrl( const QUrl &url );
|
||||
%Docstring
|
||||
Sets the URL for content to display in the item when the item is using
|
||||
the QgsComposerHtml.Url mode. Content is automatically fetched and the
|
||||
HTML item refreshed after calling this function.
|
||||
\param url URL of content to display in the item
|
||||
.. seealso:: url
|
||||
.. seealso:: contentMode
|
||||
%End
|
||||
|
||||
/** Returns the URL of the content displayed in the item if the item is using
|
||||
* the QgsComposerHtml::Url mode.
|
||||
* @returns url for content displayed in item
|
||||
* @see setUrl
|
||||
* @see contentMode
|
||||
*/
|
||||
QUrl url() const;
|
||||
%Docstring
|
||||
Returns the URL of the content displayed in the item if the item is using
|
||||
the QgsComposerHtml.Url mode.
|
||||
:return: url for content displayed in item
|
||||
.. seealso:: setUrl
|
||||
.. seealso:: contentMode
|
||||
:rtype: QUrl
|
||||
%End
|
||||
|
||||
/** Sets the HTML to display in the item when the item is using
|
||||
* the QgsComposerHtml::ManualHtml mode. Setting the HTML using this function
|
||||
* does not automatically refresh the item's contents. Call loadHtml to trigger
|
||||
* a refresh of the item after setting the HTML content.
|
||||
* @param html HTML to display in item
|
||||
* @see html
|
||||
* @see contentMode
|
||||
* @see loadHtml
|
||||
* @note added in 2.5
|
||||
*/
|
||||
void setHtml( const QString &html );
|
||||
%Docstring
|
||||
Sets the HTML to display in the item when the item is using
|
||||
the QgsComposerHtml.ManualHtml mode. Setting the HTML using this function
|
||||
does not automatically refresh the item's contents. Call loadHtml to trigger
|
||||
a refresh of the item after setting the HTML content.
|
||||
\param html HTML to display in item
|
||||
.. seealso:: html
|
||||
.. seealso:: contentMode
|
||||
.. seealso:: loadHtml
|
||||
.. versionadded:: 2.5
|
||||
%End
|
||||
|
||||
/** Returns the HTML source displayed in the item if the item is using
|
||||
* the QgsComposerHtml::ManualHtml mode.
|
||||
* @returns HTML displayed in item
|
||||
* @see setHtml
|
||||
* @see contentMode
|
||||
* @note added in 2.5
|
||||
*/
|
||||
QString html() const;
|
||||
%Docstring
|
||||
Returns the HTML source displayed in the item if the item is using
|
||||
the QgsComposerHtml.ManualHtml mode.
|
||||
:return: HTML displayed in item
|
||||
.. seealso:: setHtml
|
||||
.. seealso:: contentMode
|
||||
.. versionadded:: 2.5
|
||||
:rtype: str
|
||||
%End
|
||||
|
||||
/** Returns whether html item will evaluate QGIS expressions prior to rendering
|
||||
* the HTML content. If set, any content inside [% %] tags will be
|
||||
* treated as a QGIS expression and evaluated against the current atlas
|
||||
* feature.
|
||||
* @returns true if html item will evaluate expressions in the content
|
||||
* @see setEvaluateExpressions
|
||||
* @note added in QGIS 2.5
|
||||
*/
|
||||
bool evaluateExpressions() const;
|
||||
%Docstring
|
||||
Returns whether html item will evaluate QGIS expressions prior to rendering
|
||||
the HTML content. If set, any content inside [% %] tags will be
|
||||
treated as a QGIS expression and evaluated against the current atlas
|
||||
feature.
|
||||
:return: true if html item will evaluate expressions in the content
|
||||
.. seealso:: setEvaluateExpressions
|
||||
.. versionadded:: 2.5
|
||||
:rtype: bool
|
||||
%End
|
||||
|
||||
/** Sets whether the html item will evaluate QGIS expressions prior to rendering
|
||||
* the HTML content. If set, any content inside [% %] tags will be
|
||||
* treated as a QGIS expression and evaluated against the current atlas
|
||||
* feature.
|
||||
* @param evaluateExpressions set to true to evaluate expressions in the HTML content
|
||||
* @see evaluateExpressions
|
||||
* @note added in QGIS 2.5
|
||||
*/
|
||||
void setEvaluateExpressions( bool evaluateExpressions );
|
||||
%Docstring
|
||||
Sets whether the html item will evaluate QGIS expressions prior to rendering
|
||||
the HTML content. If set, any content inside [% %] tags will be
|
||||
treated as a QGIS expression and evaluated against the current atlas
|
||||
feature.
|
||||
\param evaluateExpressions set to true to evaluate expressions in the HTML content
|
||||
.. seealso:: evaluateExpressions
|
||||
.. versionadded:: 2.5
|
||||
%End
|
||||
|
||||
/** Returns whether html item is using smart breaks. Smart breaks prevent
|
||||
* the html frame contents from breaking mid-way though a line of text.
|
||||
* @returns true if html item is using smart breaks
|
||||
* @see setUseSmartBreaks
|
||||
*/
|
||||
bool useSmartBreaks() const;
|
||||
%Docstring
|
||||
Returns whether html item is using smart breaks. Smart breaks prevent
|
||||
the html frame contents from breaking mid-way though a line of text.
|
||||
:return: true if html item is using smart breaks
|
||||
.. seealso:: setUseSmartBreaks
|
||||
:rtype: bool
|
||||
%End
|
||||
|
||||
/** Sets whether the html item should use smart breaks. Smart breaks prevent
|
||||
* the html frame contents from breaking mid-way though a line of text.
|
||||
* @param useSmartBreaks set to true to prevent content from breaking
|
||||
* mid-way through a line of text
|
||||
* @see useSmartBreaks
|
||||
*/
|
||||
void setUseSmartBreaks( bool useSmartBreaks );
|
||||
%Docstring
|
||||
Sets whether the html item should use smart breaks. Smart breaks prevent
|
||||
the html frame contents from breaking mid-way though a line of text.
|
||||
\param useSmartBreaks set to true to prevent content from breaking
|
||||
mid-way through a line of text
|
||||
.. seealso:: useSmartBreaks
|
||||
%End
|
||||
|
||||
/** Sets the maximum distance allowed when calculating where to place page breaks
|
||||
* in the html. This distance is the maximum amount of empty space allowed
|
||||
* at the bottom of a frame after calculating the optimum break location. Setting
|
||||
* a larger value will result in better choice of page break location, but more
|
||||
* wasted space at the bottom of frames. This setting is only effective if
|
||||
* useSmartBreaks is true.
|
||||
* @param maxBreakDistance maximum amount of empty space to leave when calculating
|
||||
* page break locations
|
||||
* @note added in 2.3
|
||||
* @see maxBreakDistance
|
||||
* @see setUseSmartBreaks
|
||||
*/
|
||||
void setMaxBreakDistance( double maxBreakDistance );
|
||||
%Docstring
|
||||
Sets the maximum distance allowed when calculating where to place page breaks
|
||||
in the html. This distance is the maximum amount of empty space allowed
|
||||
at the bottom of a frame after calculating the optimum break location. Setting
|
||||
a larger value will result in better choice of page break location, but more
|
||||
wasted space at the bottom of frames. This setting is only effective if
|
||||
useSmartBreaks is true.
|
||||
\param maxBreakDistance maximum amount of empty space to leave when calculating
|
||||
page break locations
|
||||
.. versionadded:: 2.3
|
||||
.. seealso:: maxBreakDistance
|
||||
.. seealso:: setUseSmartBreaks
|
||||
%End
|
||||
|
||||
/** Returns the maximum distance allowed when calculating where to place page breaks
|
||||
* in the html. This distance is the maximum amount of empty space allowed
|
||||
* at the bottom of a frame after calculating the optimum break location. This setting
|
||||
* is only effective if useSmartBreaks is true.
|
||||
* @returns maximum amount of empty space to leave when calculating page break locations
|
||||
* @note added in 2.3
|
||||
* @see setMaxBreakDistance
|
||||
* @see useSmartBreaks
|
||||
*/
|
||||
double maxBreakDistance() const;
|
||||
%Docstring
|
||||
Returns the maximum distance allowed when calculating where to place page breaks
|
||||
in the html. This distance is the maximum amount of empty space allowed
|
||||
at the bottom of a frame after calculating the optimum break location. This setting
|
||||
is only effective if useSmartBreaks is true.
|
||||
:return: maximum amount of empty space to leave when calculating page break locations
|
||||
.. versionadded:: 2.3
|
||||
.. seealso:: setMaxBreakDistance
|
||||
.. seealso:: useSmartBreaks
|
||||
:rtype: float
|
||||
%End
|
||||
|
||||
/** Sets the user stylesheet CSS rules to use while rendering the HTML content. These
|
||||
* allow for overriding the styles specified within the HTML source. Setting the stylesheet
|
||||
* using this function does not automatically refresh the item's contents. Call loadHtml
|
||||
* to trigger a refresh of the item after setting the stylesheet rules.
|
||||
* @param stylesheet CSS rules for user stylesheet
|
||||
* @see userStylesheet
|
||||
* @see setUserStylesheetEnabled
|
||||
* @see loadHtml
|
||||
* @note added in 2.5
|
||||
*/
|
||||
void setUserStylesheet( const QString &stylesheet );
|
||||
%Docstring
|
||||
Sets the user stylesheet CSS rules to use while rendering the HTML content. These
|
||||
allow for overriding the styles specified within the HTML source. Setting the stylesheet
|
||||
using this function does not automatically refresh the item's contents. Call loadHtml
|
||||
to trigger a refresh of the item after setting the stylesheet rules.
|
||||
\param stylesheet CSS rules for user stylesheet
|
||||
.. seealso:: userStylesheet
|
||||
.. seealso:: setUserStylesheetEnabled
|
||||
.. seealso:: loadHtml
|
||||
.. versionadded:: 2.5
|
||||
%End
|
||||
|
||||
/** Returns the user stylesheet CSS rules used while rendering the HTML content. These
|
||||
* overriding the styles specified within the HTML source.
|
||||
* @returns CSS rules for user stylesheet
|
||||
* @see setUserStylesheet
|
||||
* @see userStylesheetEnabled
|
||||
* @note added in 2.5
|
||||
*/
|
||||
QString userStylesheet() const;
|
||||
%Docstring
|
||||
Returns the user stylesheet CSS rules used while rendering the HTML content. These
|
||||
overriding the styles specified within the HTML source.
|
||||
:return: CSS rules for user stylesheet
|
||||
.. seealso:: setUserStylesheet
|
||||
.. seealso:: userStylesheetEnabled
|
||||
.. versionadded:: 2.5
|
||||
:rtype: str
|
||||
%End
|
||||
|
||||
/** Sets whether user stylesheets are enabled for the HTML content.
|
||||
* @param stylesheetEnabled set to true to enable user stylesheets
|
||||
* @see userStylesheetEnabled
|
||||
* @see setUserStylesheet
|
||||
* @note added in 2.5
|
||||
*/
|
||||
void setUserStylesheetEnabled( const bool stylesheetEnabled );
|
||||
%Docstring
|
||||
Sets whether user stylesheets are enabled for the HTML content.
|
||||
\param stylesheetEnabled set to true to enable user stylesheets
|
||||
.. seealso:: userStylesheetEnabled
|
||||
.. seealso:: setUserStylesheet
|
||||
.. versionadded:: 2.5
|
||||
%End
|
||||
|
||||
/** Returns whether user stylesheets are enabled for the HTML content.
|
||||
* @returns true if user stylesheets are enabled
|
||||
* @see setUserStylesheetEnabled
|
||||
* @see userStylesheet
|
||||
* @note added in 2.5
|
||||
*/
|
||||
bool userStylesheetEnabled() const;
|
||||
%Docstring
|
||||
Returns whether user stylesheets are enabled for the HTML content.
|
||||
:return: true if user stylesheets are enabled
|
||||
.. seealso:: setUserStylesheetEnabled
|
||||
.. seealso:: userStylesheet
|
||||
.. versionadded:: 2.5
|
||||
:rtype: bool
|
||||
%End
|
||||
|
||||
virtual QString displayName() const;
|
||||
QSizeF totalSize() const;
|
||||
void render( QPainter *p, const QRectF &renderExtent, const int frameIndex );
|
||||
bool writeXml( QDomElement &elem, QDomDocument &doc, bool ignoreFrames = false ) const;
|
||||
bool readXml( const QDomElement &itemElem, const QDomDocument &doc, bool ignoreFrames = false );
|
||||
void addFrame( QgsComposerFrame *frame /Transfer/, bool recalcFrameSizes = true );
|
||||
//overridden to break frames without dividing lines of text
|
||||
double findNearbyPageBreak( double yPos );
|
||||
virtual QSizeF totalSize() const;
|
||||
|
||||
virtual void render( QPainter *p, const QRectF &renderExtent, const int frameIndex );
|
||||
|
||||
virtual bool writeXml( QDomElement &elem, QDomDocument &doc, bool ignoreFrames = false ) const;
|
||||
|
||||
virtual bool readXml( const QDomElement &itemElem, const QDomDocument &doc, bool ignoreFrames = false );
|
||||
|
||||
virtual void addFrame( QgsComposerFrame *frame /Transfer/, bool recalcFrameSizes = true );
|
||||
|
||||
virtual double findNearbyPageBreak( double yPos );
|
||||
|
||||
|
||||
public slots:
|
||||
|
||||
/** Reloads the html source from the url and redraws the item.
|
||||
* @param useCache set to true to use a cached copy of remote html
|
||||
* content
|
||||
* @param context expression context for evaluating data defined urls and expressions in html
|
||||
* @see setUrl
|
||||
* @see url
|
||||
*/
|
||||
void loadHtml( const bool useCache = false, const QgsExpressionContext *context = 0 );
|
||||
%Docstring
|
||||
Reloads the html source from the url and redraws the item.
|
||||
\param useCache set to true to use a cached copy of remote html
|
||||
content
|
||||
\param context expression context for evaluating data defined urls and expressions in html
|
||||
.. seealso:: setUrl
|
||||
.. seealso:: url
|
||||
%End
|
||||
|
||||
/** Recalculates the frame sizes for the current viewport dimensions*/
|
||||
void recalculateFrameSizes();
|
||||
virtual void recalculateFrameSizes();
|
||||
|
||||
%Docstring
|
||||
Recalculates the frame sizes for the current viewport dimensions
|
||||
%End
|
||||
void refreshExpressionContext();
|
||||
|
||||
virtual void refreshDataDefinedProperty( const QgsComposerObject::DataDefinedProperty property = QgsComposerObject::AllProperties, const QgsExpressionContext *context = 0 );
|
||||
|
||||
};
|
||||
|
||||
/************************************************************************
|
||||
* This file has been generated automatically from *
|
||||
* *
|
||||
* src/core/composer/qgscomposerhtml.h *
|
||||
* *
|
||||
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||
************************************************************************/
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,63 +1,107 @@
|
||||
/** \ingroup core
|
||||
Undo command to undo/redo all composer item related changes*/
|
||||
/************************************************************************
|
||||
* This file has been generated automatically from *
|
||||
* *
|
||||
* src/core/composer/qgscomposeritemcommand.h *
|
||||
* *
|
||||
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||
************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class QgsComposerItemCommand: QUndoCommand
|
||||
{
|
||||
%Docstring
|
||||
Undo command to undo/redo all composer item related changes
|
||||
%End
|
||||
|
||||
%TypeHeaderCode
|
||||
#include "qgscomposeritemcommand.h"
|
||||
#include "qgscomposeritemcommand.h"
|
||||
%End
|
||||
public:
|
||||
QgsComposerItemCommand( QgsComposerItem *item, const QString &text, QUndoCommand *parent /TransferThis/ = 0 );
|
||||
virtual ~QgsComposerItemCommand();
|
||||
|
||||
/** Reverses the command*/
|
||||
void undo();
|
||||
/** Replays the command*/
|
||||
void redo();
|
||||
virtual void undo();
|
||||
|
||||
%Docstring
|
||||
Reverses the command
|
||||
%End
|
||||
virtual void redo();
|
||||
|
||||
%Docstring
|
||||
Replays the command
|
||||
%End
|
||||
|
||||
/** Saves current item state as previous state*/
|
||||
void savePreviousState();
|
||||
/** Saves current item state as after state*/
|
||||
%Docstring
|
||||
Saves current item state as previous state
|
||||
%End
|
||||
void saveAfterState();
|
||||
%Docstring
|
||||
Saves current item state as after state
|
||||
%End
|
||||
|
||||
QDomDocument previousState() const;
|
||||
%Docstring
|
||||
:rtype: QDomDocument
|
||||
%End
|
||||
QDomDocument afterState() const;
|
||||
%Docstring
|
||||
:rtype: QDomDocument
|
||||
%End
|
||||
|
||||
/** Returns true if previous state and after state are valid and different*/
|
||||
bool containsChange() const;
|
||||
%Docstring
|
||||
Returns true if previous state and after state are valid and different
|
||||
:rtype: bool
|
||||
%End
|
||||
|
||||
/** Returns the target item the command applies to.
|
||||
* @returns target composer item
|
||||
*/
|
||||
QgsComposerItem *item() const;
|
||||
%Docstring
|
||||
Returns the target item the command applies to.
|
||||
:return: target composer item
|
||||
:rtype: QgsComposerItem
|
||||
%End
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
void saveState( QDomDocument &stateDoc ) const;
|
||||
%Docstring
|
||||
Flag to prevent the first redo() if the command is pushed to the undo stack
|
||||
%End
|
||||
void restoreState( QDomDocument &stateDoc ) const;
|
||||
};
|
||||
|
||||
/** A composer command that merges together with other commands having the same context (=id). Keeps the oldest previous state and uses the
|
||||
newest after state. The purpose is to avoid too many micro changes in the history*/
|
||||
class QgsComposerMergeCommand : QgsComposerItemCommand
|
||||
class QgsComposerMergeCommand: QgsComposerItemCommand
|
||||
{
|
||||
%Docstring
|
||||
A composer command that merges together with other commands having the same context (=id). Keeps the oldest previous state and uses the
|
||||
newest after state. The purpose is to avoid too many micro changes in the history
|
||||
%End
|
||||
|
||||
%TypeHeaderCode
|
||||
#include "qgscomposeritemcommand.h"
|
||||
#include "qgscomposeritemcommand.h"
|
||||
%End
|
||||
public:
|
||||
enum Context
|
||||
{
|
||||
Unknown,
|
||||
//composer label
|
||||
//composer
|
||||
ComposerLabelSetText,
|
||||
ComposerLabelSetId,
|
||||
ComposerLabelFontColor,
|
||||
//composer map
|
||||
//composer
|
||||
ComposerMapRotation,
|
||||
ComposerMapAnnotationDistance,
|
||||
ComposerMapGridFramePenColor,
|
||||
ComposerMapGridFrameFill1Color,
|
||||
ComposerMapGridFrameFill2Color,
|
||||
ComposerMapGridAnnotationFontColor,
|
||||
//composer legend
|
||||
//composer
|
||||
ComposerLegendText,
|
||||
LegendColumnCount,
|
||||
LegendSplitLayer,
|
||||
@ -73,14 +117,16 @@ class QgsComposerMergeCommand : QgsComposerItemCommand
|
||||
LegendIconSymbolSpace,
|
||||
LegendBoxSpace,
|
||||
LegendColumnSpace,
|
||||
LegendLineSpacing,
|
||||
LegendRasterStrokeWidth,
|
||||
LegendFontColor,
|
||||
LegendRasterStrokeColor,
|
||||
//composer picture
|
||||
//composer
|
||||
ComposerPictureRotation,
|
||||
ComposerPictureFillColor,
|
||||
ComposerPictureStrokeColor,
|
||||
// composer scalebar
|
||||
ComposerPictureNorthOffset,
|
||||
// composer
|
||||
ScaleBarLineWidth,
|
||||
ScaleBarHeight,
|
||||
ScaleBarSegmentSize,
|
||||
@ -94,14 +140,14 @@ class QgsComposerMergeCommand : QgsComposerItemCommand
|
||||
ScaleBarFillColor,
|
||||
ScaleBarFill2Color,
|
||||
ScaleBarStrokeColor,
|
||||
// composer table
|
||||
// composer
|
||||
TableMaximumFeatures,
|
||||
TableMargin,
|
||||
TableGridStrokeWidth,
|
||||
//composer shape
|
||||
//composer
|
||||
ShapeCornerRadius,
|
||||
ShapeStrokeWidth,
|
||||
//composer arrow
|
||||
//composer
|
||||
ArrowStrokeWidth,
|
||||
ArrowHeadFillColor,
|
||||
ArrowHeadStrokeColor,
|
||||
@ -117,8 +163,17 @@ class QgsComposerMergeCommand : QgsComposerItemCommand
|
||||
};
|
||||
|
||||
QgsComposerMergeCommand( Context c, QgsComposerItem *item, const QString &text );
|
||||
~QgsComposerMergeCommand();
|
||||
|
||||
bool mergeWith( const QUndoCommand *command );
|
||||
int id() const;
|
||||
virtual bool mergeWith( const QUndoCommand *command );
|
||||
|
||||
virtual int id() const;
|
||||
|
||||
};
|
||||
|
||||
/************************************************************************
|
||||
* This file has been generated automatically from *
|
||||
* *
|
||||
* src/core/composer/qgscomposeritemcommand.h *
|
||||
* *
|
||||
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||
************************************************************************/
|
||||
|
@ -1,42 +1,80 @@
|
||||
/************************************************************************
|
||||
* This file has been generated automatically from *
|
||||
* *
|
||||
* src/core/composer/qgscomposeritemgroup.h *
|
||||
* *
|
||||
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||
************************************************************************/
|
||||
|
||||
|
||||
|
||||
class QgsComposerItemGroup: QgsComposerItem
|
||||
{
|
||||
%Docstring
|
||||
A container for grouping several QgsComposerItems
|
||||
%End
|
||||
|
||||
%TypeHeaderCode
|
||||
#include <qgscomposeritemgroup.h>
|
||||
#include "qgscomposeritemgroup.h"
|
||||
%End
|
||||
public:
|
||||
QgsComposerItemGroup( QgsComposition *c /TransferThis/ );
|
||||
~QgsComposerItemGroup();
|
||||
|
||||
/** Return correct graphics item type. */
|
||||
virtual int type() const;
|
||||
%Docstring
|
||||
Return correct graphics item type.
|
||||
:rtype: int
|
||||
%End
|
||||
|
||||
/** Adds an item to the group. All the group members are deleted
|
||||
if the group is deleted*/
|
||||
void addItem( QgsComposerItem *item );
|
||||
/** Removes the items but does not delete them*/
|
||||
void removeItems();
|
||||
/** Draw outline and ev. selection handles*/
|
||||
void paint( QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0 );
|
||||
/** Sets this items bound in scene coordinates such that 1 item size units
|
||||
corresponds to 1 scene size unit*/
|
||||
void setSceneRect( const QRectF &rectangle );
|
||||
virtual void addItem( QgsComposerItem *item );
|
||||
|
||||
%Docstring
|
||||
Adds an item to the group. All the group members are deleted
|
||||
if the group is deleted*
|
||||
%End
|
||||
virtual void removeItems();
|
||||
|
||||
%Docstring
|
||||
Removes the items but does not delete them
|
||||
%End
|
||||
virtual void paint( QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0 );
|
||||
|
||||
%Docstring
|
||||
Draw stroke and ev. selection handles
|
||||
%End
|
||||
|
||||
virtual void setSceneRect( const QRectF &rectangle );
|
||||
|
||||
%Docstring
|
||||
Sets this items bound in scene coordinates such that 1 item size units
|
||||
corresponds to 1 scene size unit*
|
||||
%End
|
||||
|
||||
//overridden to also hide grouped items
|
||||
virtual void setVisibility( const bool visible );
|
||||
|
||||
/** Stores state in Dom node
|
||||
* @param elem is Dom element corresponding to 'Composer' tag
|
||||
* @param doc is the Dom document
|
||||
*/
|
||||
bool writeXml( QDomElement &elem, QDomDocument &doc ) const;
|
||||
virtual bool writeXml( QDomElement &elem, QDomDocument &doc ) const;
|
||||
|
||||
/** Sets state from Dom document
|
||||
* @param itemElem is Dom node corresponding to item tag
|
||||
* @param doc is the Dom document
|
||||
*/
|
||||
bool readXml( const QDomElement &itemElem, const QDomDocument &doc );
|
||||
%Docstring
|
||||
Stores state in Dom node
|
||||
\param elem is Dom element corresponding to 'Composer' tag
|
||||
\param doc is the Dom document
|
||||
:rtype: bool
|
||||
%End
|
||||
|
||||
QSet<QgsComposerItem*> items();
|
||||
virtual bool readXml( const QDomElement &itemElem, const QDomDocument &doc );
|
||||
|
||||
%Docstring
|
||||
Sets state from Dom document
|
||||
\param itemElem is Dom node corresponding to item tag
|
||||
\param doc is the Dom document
|
||||
:rtype: bool
|
||||
%End
|
||||
|
||||
QSet<QgsComposerItem *> items();
|
||||
%Docstring
|
||||
:rtype: set of QgsComposerItem
|
||||
%End
|
||||
|
||||
signals:
|
||||
void childItemDeleted( QgsComposerItem *item );
|
||||
@ -45,5 +83,15 @@ class QgsComposerItemGroup: QgsComposerItem
|
||||
void itemDestroyed();
|
||||
|
||||
protected:
|
||||
void drawFrame( QPainter *p );
|
||||
virtual void drawFrame( QPainter *p );
|
||||
|
||||
|
||||
};
|
||||
|
||||
/************************************************************************
|
||||
* This file has been generated automatically from *
|
||||
* *
|
||||
* src/core/composer/qgscomposeritemgroup.h *
|
||||
* *
|
||||
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||
************************************************************************/
|
||||
|
@ -1,129 +1,203 @@
|
||||
/** \ingroup core
|
||||
* A label that can be placed onto a map composition.
|
||||
*/
|
||||
class QgsComposerLabel : QgsComposerItem
|
||||
/************************************************************************
|
||||
* This file has been generated automatically from *
|
||||
* *
|
||||
* src/core/composer/qgscomposerlabel.h *
|
||||
* *
|
||||
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||
************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
class QgsComposerLabel: QgsComposerItem
|
||||
{
|
||||
%Docstring
|
||||
A label that can be placed onto a map composition.
|
||||
%End
|
||||
|
||||
%TypeHeaderCode
|
||||
#include "qgscomposerlabel.h"
|
||||
%End
|
||||
public:
|
||||
QgsComposerLabel( QgsComposition *composition /TransferThis/);
|
||||
QgsComposerLabel( QgsComposition *composition );
|
||||
~QgsComposerLabel();
|
||||
|
||||
/** Return correct graphics item type. */
|
||||
virtual int type() const;
|
||||
%Docstring
|
||||
Return correct graphics item type.
|
||||
:rtype: int
|
||||
%End
|
||||
|
||||
/** \brief Reimplementation of QCanvasItem::paint*/
|
||||
void paint( QPainter *painter, const QStyleOptionGraphicsItem *itemStyle, QWidget *pWidget );
|
||||
virtual void paint( QPainter *painter, const QStyleOptionGraphicsItem *itemStyle, QWidget *pWidget );
|
||||
|
||||
%Docstring
|
||||
Reimplementation of QCanvasItem.paint
|
||||
%End
|
||||
|
||||
/** Resizes the widget such that the text fits to the item. Keeps top left point*/
|
||||
void adjustSizeToText();
|
||||
%Docstring
|
||||
Resizes the widget such that the text fits to the item. Keeps top left point
|
||||
%End
|
||||
|
||||
QString text();
|
||||
%Docstring
|
||||
:rtype: str
|
||||
%End
|
||||
void setText( const QString &text );
|
||||
|
||||
int htmlState();
|
||||
%Docstring
|
||||
:rtype: int
|
||||
%End
|
||||
void setHtmlState( int state );
|
||||
|
||||
/** Returns the text as it appears on screen (with replaced data field) */
|
||||
QString displayText() const;
|
||||
%Docstring
|
||||
Returns the text as it appears on screen (with replaced data field)
|
||||
:rtype: str
|
||||
%End
|
||||
|
||||
QFont font() const;
|
||||
%Docstring
|
||||
:rtype: QFont
|
||||
%End
|
||||
void setFont( const QFont &f );
|
||||
/** Accessor for the vertical alignment of the label
|
||||
* @returns Qt::AlignmentFlag
|
||||
*/
|
||||
|
||||
Qt::AlignmentFlag vAlign() const;
|
||||
/** Accessor for the horizontal alignment of the label
|
||||
* @returns Qt::AlignmentFlag
|
||||
*/
|
||||
%Docstring
|
||||
Accessor for the vertical alignment of the label
|
||||
:return: Qt.AlignmentFlag
|
||||
:rtype: Qt.AlignmentFlag
|
||||
%End
|
||||
|
||||
Qt::AlignmentFlag hAlign() const;
|
||||
/** Mutator for the horizontal alignment of the label
|
||||
* @param a alignment
|
||||
* @returns void
|
||||
*/
|
||||
%Docstring
|
||||
Accessor for the horizontal alignment of the label
|
||||
:return: Qt.AlignmentFlag
|
||||
:rtype: Qt.AlignmentFlag
|
||||
%End
|
||||
|
||||
void setHAlign( Qt::AlignmentFlag a );
|
||||
/** Mutator for the vertical alignment of the label
|
||||
* @param a alignment
|
||||
* @returns void
|
||||
*/
|
||||
%Docstring
|
||||
Mutator for the horizontal alignment of the label
|
||||
\param a alignment
|
||||
:return: void
|
||||
%End
|
||||
|
||||
void setVAlign( Qt::AlignmentFlag a );
|
||||
%Docstring
|
||||
Mutator for the vertical alignment of the label
|
||||
\param a alignment
|
||||
:return: void
|
||||
%End
|
||||
|
||||
/** Returns the horizontal margin between the edge of the frame and the label
|
||||
* contents.
|
||||
* @returns horizontal margin in mm
|
||||
* @note added in QGIS 2.7
|
||||
*/
|
||||
double marginX() const;
|
||||
%Docstring
|
||||
Returns the horizontal margin between the edge of the frame and the label
|
||||
contents.
|
||||
:return: horizontal margin in mm
|
||||
.. versionadded:: 2.7
|
||||
:rtype: float
|
||||
%End
|
||||
|
||||
/** Returns the vertical margin between the edge of the frame and the label
|
||||
* contents.
|
||||
* @returns vertical margin in mm
|
||||
* @note added in QGIS 2.7
|
||||
*/
|
||||
double marginY() const;
|
||||
%Docstring
|
||||
Returns the vertical margin between the edge of the frame and the label
|
||||
contents.
|
||||
:return: vertical margin in mm
|
||||
.. versionadded:: 2.7
|
||||
:rtype: float
|
||||
%End
|
||||
|
||||
/** Sets the margin between the edge of the frame and the label contents.
|
||||
* This method sets both the horizontal and vertical margins to the same
|
||||
* value. The margins can be individually controlled using the setMarginX
|
||||
* and setMarginY methods.
|
||||
* @param m margin in mm
|
||||
* @see setMarginX
|
||||
* @see setMarginY
|
||||
*/
|
||||
void setMargin( const double m );
|
||||
%Docstring
|
||||
Sets the margin between the edge of the frame and the label contents.
|
||||
This method sets both the horizontal and vertical margins to the same
|
||||
value. The margins can be individually controlled using the setMarginX
|
||||
and setMarginY methods.
|
||||
\param m margin in mm
|
||||
.. seealso:: setMarginX
|
||||
.. seealso:: setMarginY
|
||||
%End
|
||||
|
||||
/** Sets the horizontal margin between the edge of the frame and the label
|
||||
* contents.
|
||||
* @param margin horizontal margin in mm
|
||||
* @see setMargin
|
||||
* @see setMarginY
|
||||
* @note added in QGIS 2.7
|
||||
*/
|
||||
void setMarginX( const double margin );
|
||||
%Docstring
|
||||
Sets the horizontal margin between the edge of the frame and the label
|
||||
contents.
|
||||
\param margin horizontal margin in mm
|
||||
.. seealso:: setMargin
|
||||
.. seealso:: setMarginY
|
||||
.. versionadded:: 2.7
|
||||
%End
|
||||
|
||||
/** Sets the vertical margin between the edge of the frame and the label
|
||||
* contents.
|
||||
* @param margin vertical margin in mm
|
||||
* @see setMargin
|
||||
* @see setMarginX
|
||||
* @note added in QGIS 2.7
|
||||
*/
|
||||
void setMarginY( const double margin );
|
||||
%Docstring
|
||||
Sets the vertical margin between the edge of the frame and the label
|
||||
contents.
|
||||
\param margin vertical margin in mm
|
||||
.. seealso:: setMargin
|
||||
.. seealso:: setMarginX
|
||||
.. versionadded:: 2.7
|
||||
%End
|
||||
|
||||
/** Sets text color */
|
||||
void setFontColor( const QColor &c );
|
||||
/** Get font color */
|
||||
%Docstring
|
||||
Sets text color
|
||||
%End
|
||||
QColor fontColor() const;
|
||||
%Docstring
|
||||
Get font color
|
||||
:rtype: QColor
|
||||
%End
|
||||
|
||||
/** Stores state in Dom element
|
||||
* @param elem is Dom element corresponding to 'Composer' tag
|
||||
* @param doc document
|
||||
*/
|
||||
bool writeXml( QDomElement &elem, QDomDocument &doc ) const;
|
||||
virtual bool writeXml( QDomElement &elem, QDomDocument &doc ) const;
|
||||
|
||||
/** Sets state from Dom document
|
||||
* @param itemElem is Dom element corresponding to 'ComposerLabel' tag
|
||||
* @param doc document
|
||||
*/
|
||||
bool readXml( const QDomElement &itemElem, const QDomDocument &doc );
|
||||
%Docstring
|
||||
Stores state in Dom element
|
||||
\param elem is Dom element corresponding to 'Composer' tag
|
||||
\param doc document
|
||||
:rtype: bool
|
||||
%End
|
||||
|
||||
virtual bool readXml( const QDomElement &itemElem, const QDomDocument &doc );
|
||||
|
||||
%Docstring
|
||||
Sets state from Dom document
|
||||
\param itemElem is Dom element corresponding to 'ComposerLabel' tag
|
||||
\param doc document
|
||||
:rtype: bool
|
||||
%End
|
||||
|
||||
//Overridden to contain part of label's text
|
||||
virtual QString displayName() const;
|
||||
|
||||
/** In case of negative margins, the bounding rect may be larger than the
|
||||
* label's frame
|
||||
*/
|
||||
QRectF boundingRect() const;
|
||||
virtual QRectF boundingRect() const;
|
||||
|
||||
%Docstring
|
||||
In case of negative margins, the bounding rect may be larger than the
|
||||
label's frame
|
||||
:rtype: QRectF
|
||||
%End
|
||||
|
||||
/** Reimplemented to call prepareGeometryChange after toggling frame
|
||||
*/
|
||||
virtual void setFrameEnabled( const bool drawFrame );
|
||||
%Docstring
|
||||
Reimplemented to call prepareGeometryChange after toggling frame
|
||||
%End
|
||||
|
||||
/** Reimplemented to call prepareGeometryChange after changing stroke width
|
||||
*/
|
||||
virtual void setFrameStrokeWidth( const double strokeWidth );
|
||||
%Docstring
|
||||
Reimplemented to call prepareGeometryChange after changing stroke width
|
||||
%End
|
||||
|
||||
public slots:
|
||||
void refreshExpressionContext();
|
||||
|
||||
|
||||
};
|
||||
|
||||
/************************************************************************
|
||||
* This file has been generated automatically from *
|
||||
* *
|
||||
* src/core/composer/qgscomposerlabel.h *
|
||||
* *
|
||||
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||
************************************************************************/
|
||||
|
@ -1,254 +1,391 @@
|
||||
/************************************************************************
|
||||
* This file has been generated automatically from *
|
||||
* *
|
||||
* src/core/composer/qgscomposerlegend.h *
|
||||
* *
|
||||
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||
************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/** \ingroup core
|
||||
* Item model implementation based on layer tree model for composer legend.
|
||||
* Overrides some functionality of QgsLayerTreeModel to better fit the needs of composer legend.
|
||||
*
|
||||
* @note added in 2.6
|
||||
*/
|
||||
class QgsLegendModel : QgsLayerTreeModel
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgscomposerlegend.h>
|
||||
%Docstring
|
||||
Item model implementation based on layer tree model for composer legend.
|
||||
Overrides some functionality of QgsLayerTreeModel to better fit the needs of composer legend.
|
||||
|
||||
.. versionadded:: 2.6
|
||||
%End
|
||||
|
||||
%TypeHeaderCode
|
||||
#include "qgscomposerlegend.h"
|
||||
%End
|
||||
public:
|
||||
//! Construct the model based on the given layer tree
|
||||
QgsLegendModel( QgsLayerTree *rootNode, QObject *parent /TransferThis/ = 0 );
|
||||
%Docstring
|
||||
Construct the model based on the given layer tree
|
||||
%End
|
||||
|
||||
QVariant data( const QModelIndex &index, int role ) const;
|
||||
virtual QVariant data( const QModelIndex &index, int role ) const;
|
||||
|
||||
|
||||
virtual Qt::ItemFlags flags( const QModelIndex &index ) const;
|
||||
|
||||
Qt::ItemFlags flags( const QModelIndex &index ) const;
|
||||
};
|
||||
|
||||
|
||||
/** \ingroup core
|
||||
* A legend that can be placed onto a map composition
|
||||
*/
|
||||
class QgsComposerLegend : QgsComposerItem
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgscomposerlegend.h>
|
||||
#include <qgslegendstyle.h>
|
||||
%Docstring
|
||||
A legend that can be placed onto a map composition
|
||||
%End
|
||||
|
||||
%TypeHeaderCode
|
||||
#include "qgscomposerlegend.h"
|
||||
%End
|
||||
public:
|
||||
QgsComposerLegend( QgsComposition *composition /TransferThis/);
|
||||
~QgsComposerLegend();
|
||||
QgsComposerLegend( QgsComposition *composition );
|
||||
|
||||
/** Return correct graphics item type. */
|
||||
virtual int type() const;
|
||||
%Docstring
|
||||
Return correct graphics item type.
|
||||
:rtype: int
|
||||
%End
|
||||
|
||||
/** \brief Reimplementation of QCanvasItem::paint*/
|
||||
void paint( QPainter *painter, const QStyleOptionGraphicsItem *itemStyle, QWidget *pWidget );
|
||||
virtual void paint( QPainter *painter, const QStyleOptionGraphicsItem *itemStyle, QWidget *pWidget );
|
||||
|
||||
%Docstring
|
||||
Reimplementation of QCanvasItem.paint
|
||||
%End
|
||||
|
||||
/** Paints the legend and calculates its size. If painter is 0, only size is calculated*/
|
||||
QSizeF paintAndDetermineSize( QPainter *painter );
|
||||
%Docstring
|
||||
Paints the legend and calculates its size. If painter is 0, only size is calculated
|
||||
:rtype: QSizeF
|
||||
%End
|
||||
|
||||
/** Sets item box to the whole content*/
|
||||
void adjustBoxSize();
|
||||
%Docstring
|
||||
Sets item box to the whole content
|
||||
%End
|
||||
|
||||
/** Sets whether the legend should automatically resize to fit its contents.
|
||||
* @param enabled set to false to disable automatic resizing. The legend frame will not
|
||||
* be expanded to fit legend items, and items may be cropped from display.
|
||||
* @see resizeToContents()
|
||||
* @note added in QGIS 3.0
|
||||
*/
|
||||
void setResizeToContents( bool enabled );
|
||||
%Docstring
|
||||
Sets whether the legend should automatically resize to fit its contents.
|
||||
\param enabled set to false to disable automatic resizing. The legend frame will not
|
||||
be expanded to fit legend items, and items may be cropped from display.
|
||||
.. seealso:: resizeToContents()
|
||||
.. versionadded:: 3.0
|
||||
%End
|
||||
|
||||
/** Returns whether the legend should automatically resize to fit its contents.
|
||||
* @see setResizeToContents()
|
||||
* @note added in QGIS 3.0
|
||||
*/
|
||||
bool resizeToContents() const;
|
||||
%Docstring
|
||||
Returns whether the legend should automatically resize to fit its contents.
|
||||
.. seealso:: setResizeToContents()
|
||||
.. versionadded:: 3.0
|
||||
:rtype: bool
|
||||
%End
|
||||
|
||||
|
||||
//! @note added in 2.6
|
||||
QgsLegendModel *model();
|
||||
%Docstring
|
||||
Returns the legend model
|
||||
:rtype: QgsLegendModel
|
||||
%End
|
||||
|
||||
//! @note added in 2.6
|
||||
void setAutoUpdateModel( bool autoUpdate );
|
||||
//! @note added in 2.6
|
||||
%Docstring
|
||||
.. versionadded:: 2.6
|
||||
%End
|
||||
bool autoUpdateModel() const;
|
||||
%Docstring
|
||||
.. versionadded:: 2.6
|
||||
:rtype: bool
|
||||
%End
|
||||
|
||||
//! Set whether legend items should be filtered to show just the ones visible in the associated map
|
||||
//! @note added in 2.6
|
||||
void setLegendFilterByMapEnabled( bool enabled );
|
||||
//! Find out whether legend items are filtered to show just the ones visible in the associated map
|
||||
//! @note added in 2.6
|
||||
%Docstring
|
||||
.. versionadded:: 2.6
|
||||
%End
|
||||
bool legendFilterByMapEnabled() const;
|
||||
%Docstring
|
||||
.. versionadded:: 2.6
|
||||
:rtype: bool
|
||||
%End
|
||||
|
||||
//! Update() overloading. Use it rather than update()
|
||||
//! @note added in 2.12
|
||||
virtual void updateItem();
|
||||
%Docstring
|
||||
.. versionadded:: 2.12
|
||||
%End
|
||||
|
||||
//! When set to true, during an atlas rendering, it will filter out legend elements
|
||||
//! where features are outside the current atlas feature.
|
||||
//! @note added in 2.14
|
||||
void setLegendFilterOutAtlas( bool doFilter );
|
||||
%Docstring
|
||||
.. versionadded:: 2.14
|
||||
%End
|
||||
|
||||
//! Whether to filter out legend elements outside of the current atlas feature
|
||||
//! @see setLegendFilterOutAtlas()
|
||||
//! @note added in 2.14
|
||||
bool legendFilterOutAtlas() const;
|
||||
%Docstring
|
||||
.. versionadded:: 2.14
|
||||
:rtype: bool
|
||||
%End
|
||||
|
||||
//setters and getters
|
||||
void setTitle( const QString &t );
|
||||
QString title() const;
|
||||
%Docstring
|
||||
:rtype: str
|
||||
%End
|
||||
|
||||
/** Returns the alignment of the legend title
|
||||
* @returns Qt::AlignmentFlag for the legend title
|
||||
* @note added in 2.3
|
||||
* @see setTitleAlignment
|
||||
*/
|
||||
Qt::AlignmentFlag titleAlignment() const;
|
||||
/** Sets the alignment of the legend title
|
||||
* @param alignment Text alignment for drawing the legend title
|
||||
* @note added in 2.3
|
||||
* @see titleAlignment
|
||||
*/
|
||||
void setTitleAlignment( Qt::AlignmentFlag alignment );
|
||||
%Docstring
|
||||
Returns the alignment of the legend title
|
||||
:return: Qt.AlignmentFlag for the legend title
|
||||
.. versionadded:: 2.3
|
||||
.. seealso:: setTitleAlignment
|
||||
:rtype: Qt.AlignmentFlag
|
||||
%End
|
||||
|
||||
void setTitleAlignment( Qt::AlignmentFlag alignment );
|
||||
%Docstring
|
||||
Sets the alignment of the legend title
|
||||
\param alignment Text alignment for drawing the legend title
|
||||
.. versionadded:: 2.3
|
||||
.. seealso:: titleAlignment
|
||||
%End
|
||||
|
||||
/** Returns reference to modifiable style */
|
||||
QgsLegendStyle &rstyle( QgsLegendStyle::Style s );
|
||||
/** Returns style */
|
||||
%Docstring
|
||||
Returns reference to modifiable style
|
||||
:rtype: QgsLegendStyle
|
||||
%End
|
||||
QgsLegendStyle style( QgsLegendStyle::Style s ) const;
|
||||
%Docstring
|
||||
Returns style
|
||||
:rtype: QgsLegendStyle
|
||||
%End
|
||||
void setStyle( QgsLegendStyle::Style s, const QgsLegendStyle &style );
|
||||
|
||||
QFont styleFont( QgsLegendStyle::Style s ) const;
|
||||
/** Set style font */
|
||||
%Docstring
|
||||
:rtype: QFont
|
||||
%End
|
||||
void setStyleFont( QgsLegendStyle::Style s, const QFont &f );
|
||||
%Docstring
|
||||
Set style font
|
||||
%End
|
||||
|
||||
/** Set style margin*/
|
||||
void setStyleMargin( QgsLegendStyle::Style s, double margin );
|
||||
%Docstring
|
||||
Set style margin
|
||||
%End
|
||||
void setStyleMargin( QgsLegendStyle::Style s, QgsLegendStyle::Side side, double margin );
|
||||
|
||||
/** Returns the spacing in-between lines in mm
|
||||
* @note added in 3.0
|
||||
* @see setLineSpacing
|
||||
*/
|
||||
double lineSpacing() const;
|
||||
/** Sets the spacing in-between multiple lines
|
||||
* @param spacing Double value to use as spacing in between multiple lines
|
||||
* @note added in 3.0
|
||||
* @see lineSpacing
|
||||
*/
|
||||
%Docstring
|
||||
Returns the spacing in-between lines in mm
|
||||
.. versionadded:: 3.0
|
||||
.. seealso:: setLineSpacing
|
||||
:rtype: float
|
||||
%End
|
||||
|
||||
void setLineSpacing( double spacing );
|
||||
%Docstring
|
||||
Sets the spacing in-between multiple lines
|
||||
\param spacing Double value to use as spacing in between multiple lines
|
||||
.. versionadded:: 3.0
|
||||
.. seealso:: lineSpacing
|
||||
%End
|
||||
|
||||
double boxSpace() const;
|
||||
%Docstring
|
||||
:rtype: float
|
||||
%End
|
||||
void setBoxSpace( double s );
|
||||
|
||||
double columnSpace() const;
|
||||
%Docstring
|
||||
:rtype: float
|
||||
%End
|
||||
void setColumnSpace( double s );
|
||||
|
||||
QColor fontColor() const;
|
||||
%Docstring
|
||||
:rtype: QColor
|
||||
%End
|
||||
void setFontColor( const QColor &c );
|
||||
|
||||
double symbolWidth() const;
|
||||
%Docstring
|
||||
:rtype: float
|
||||
%End
|
||||
void setSymbolWidth( double w );
|
||||
|
||||
double symbolHeight() const;
|
||||
%Docstring
|
||||
:rtype: float
|
||||
%End
|
||||
void setSymbolHeight( double h );
|
||||
|
||||
double wmsLegendWidth() const;
|
||||
%Docstring
|
||||
:rtype: float
|
||||
%End
|
||||
void setWmsLegendWidth( double w );
|
||||
|
||||
double wmsLegendHeight() const;
|
||||
%Docstring
|
||||
:rtype: float
|
||||
%End
|
||||
void setWmsLegendHeight( double h );
|
||||
|
||||
void setWrapChar( const QString &t );
|
||||
QString wrapChar() const;
|
||||
%Docstring
|
||||
:rtype: str
|
||||
%End
|
||||
|
||||
int columnCount() const;
|
||||
%Docstring
|
||||
:rtype: int
|
||||
%End
|
||||
void setColumnCount( int c );
|
||||
|
||||
int splitLayer() const;
|
||||
bool splitLayer() const;
|
||||
%Docstring
|
||||
:rtype: bool
|
||||
%End
|
||||
void setSplitLayer( bool s );
|
||||
|
||||
int equalColumnWidth() const;
|
||||
bool equalColumnWidth() const;
|
||||
%Docstring
|
||||
:rtype: bool
|
||||
%End
|
||||
void setEqualColumnWidth( bool s );
|
||||
|
||||
/** Returns whether a stroke will be drawn around raster symbol items.
|
||||
* @see setDrawRasterStroke()
|
||||
* @see rasterStrokeColor()
|
||||
* @see rasterStrokeWidth()
|
||||
* @note added in QGIS 2.12
|
||||
*/
|
||||
bool drawRasterStroke() const;
|
||||
%Docstring
|
||||
Returns whether a stroke will be drawn around raster symbol items.
|
||||
.. seealso:: setDrawRasterStroke()
|
||||
.. seealso:: rasterStrokeColor()
|
||||
.. seealso:: rasterStrokeWidth()
|
||||
.. versionadded:: 2.12
|
||||
:rtype: bool
|
||||
%End
|
||||
|
||||
/** Sets whether a stroke will be drawn around raster symbol items.
|
||||
* @param enabled set to true to draw borders
|
||||
* @see drawRasterStroke()
|
||||
* @see setRasterStrokeColor()
|
||||
* @see setRasterStrokeWidth()
|
||||
* @note added in QGIS 2.12
|
||||
*/
|
||||
void setDrawRasterStroke( bool enabled );
|
||||
%Docstring
|
||||
Sets whether a stroke will be drawn around raster symbol items.
|
||||
\param enabled set to true to draw borders
|
||||
.. seealso:: drawRasterStroke()
|
||||
.. seealso:: setRasterStrokeColor()
|
||||
.. seealso:: setRasterStrokeWidth()
|
||||
.. versionadded:: 2.12
|
||||
%End
|
||||
|
||||
/** Returns the stroke color for the stroke drawn around raster symbol items. The stroke is
|
||||
* only drawn if drawRasterStroke() is true.
|
||||
* @see setRasterStrokeColor()
|
||||
* @see drawRasterStroke()
|
||||
* @see rasterStrokeWidth()
|
||||
* @note added in QGIS 2.12
|
||||
*/
|
||||
QColor rasterStrokeColor() const;
|
||||
%Docstring
|
||||
Returns the stroke color for the stroke drawn around raster symbol items. The stroke is
|
||||
only drawn if drawRasterStroke() is true.
|
||||
.. seealso:: setRasterStrokeColor()
|
||||
.. seealso:: drawRasterStroke()
|
||||
.. seealso:: rasterStrokeWidth()
|
||||
.. versionadded:: 2.12
|
||||
:rtype: QColor
|
||||
%End
|
||||
|
||||
/** Sets the stroke color for the stroke drawn around raster symbol items. The stroke is
|
||||
* only drawn if drawRasterStroke() is true.
|
||||
* @param color stroke color
|
||||
* @see rasterStrokeColor()
|
||||
* @see setDrawRasterStroke()
|
||||
* @see setRasterStrokeWidth()
|
||||
* @note added in QGIS 2.12
|
||||
*/
|
||||
void setRasterStrokeColor( const QColor &color );
|
||||
%Docstring
|
||||
Sets the stroke color for the stroke drawn around raster symbol items. The stroke is
|
||||
only drawn if drawRasterStroke() is true.
|
||||
\param color stroke color
|
||||
.. seealso:: rasterStrokeColor()
|
||||
.. seealso:: setDrawRasterStroke()
|
||||
.. seealso:: setRasterStrokeWidth()
|
||||
.. versionadded:: 2.12
|
||||
%End
|
||||
|
||||
/** Returns the stroke width (in millimeters) for the stroke drawn around raster symbol items. The stroke is
|
||||
* only drawn if drawRasterStroke() is true.
|
||||
* @see setRasterStrokeWidth()
|
||||
* @see drawRasterStroke()
|
||||
* @see rasterStrokeColor()
|
||||
* @note added in QGIS 2.12
|
||||
*/
|
||||
double rasterStrokeWidth() const;
|
||||
%Docstring
|
||||
Returns the stroke width (in millimeters) for the stroke drawn around raster symbol items. The stroke is
|
||||
only drawn if drawRasterStroke() is true.
|
||||
.. seealso:: setRasterStrokeWidth()
|
||||
.. seealso:: drawRasterStroke()
|
||||
.. seealso:: rasterStrokeColor()
|
||||
.. versionadded:: 2.12
|
||||
:rtype: float
|
||||
%End
|
||||
|
||||
/** Sets the stroke width for the stroke drawn around raster symbol items. The stroke is
|
||||
* only drawn if drawRasterStroke() is true.
|
||||
* @param width stroke width in millimeters
|
||||
* @see rasterStrokeWidth()
|
||||
* @see setDrawRasterStroke()
|
||||
* @see setRasterStrokeColor()
|
||||
* @note added in QGIS 2.12
|
||||
*/
|
||||
void setRasterStrokeWidth( double width );
|
||||
%Docstring
|
||||
Sets the stroke width for the stroke drawn around raster symbol items. The stroke is
|
||||
only drawn if drawRasterStroke() is true.
|
||||
\param width stroke width in millimeters
|
||||
.. seealso:: rasterStrokeWidth()
|
||||
.. seealso:: setDrawRasterStroke()
|
||||
.. seealso:: setRasterStrokeColor()
|
||||
.. versionadded:: 2.12
|
||||
%End
|
||||
|
||||
void setComposerMap( const QgsComposerMap *map );
|
||||
const QgsComposerMap *composerMap() const;
|
||||
%Docstring
|
||||
:rtype: QgsComposerMap
|
||||
%End
|
||||
|
||||
/** Updates the model and all legend entries*/
|
||||
void updateLegend();
|
||||
%Docstring
|
||||
Updates the model and all legend entries
|
||||
%End
|
||||
|
||||
/** 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;
|
||||
virtual 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 );
|
||||
%Docstring
|
||||
Stores state in Dom node
|
||||
\param elem is Dom element corresponding to 'Composer' tag
|
||||
\param doc Dom document
|
||||
:rtype: bool
|
||||
%End
|
||||
|
||||
virtual bool readXml( const QDomElement &itemElem, const QDomDocument &doc );
|
||||
|
||||
%Docstring
|
||||
Sets state from Dom document
|
||||
\param itemElem is Dom node corresponding to item tag
|
||||
\param doc is Dom document
|
||||
:rtype: bool
|
||||
%End
|
||||
|
||||
//Overridden to show legend title
|
||||
virtual QString displayName() const;
|
||||
|
||||
const QgsLegendSettings &legendSettings() const;
|
||||
%Docstring
|
||||
Returns the legend's renderer settings object.
|
||||
.. versionadded:: 3.0
|
||||
:rtype: QgsLegendSettings
|
||||
%End
|
||||
|
||||
public slots:
|
||||
/** Data changed*/
|
||||
void synchronizeWithModel();
|
||||
/** Sets mCompositionMap to 0 if the map is deleted*/
|
||||
%Docstring
|
||||
Data changed
|
||||
%End
|
||||
void invalidateCurrentMap();
|
||||
%Docstring
|
||||
Sets mCompositionMap to 0 if the map is deleted
|
||||
%End
|
||||
|
||||
virtual void refreshDataDefinedProperty( const QgsComposerObject::DataDefinedProperty property = QgsComposerObject::AllProperties, const QgsExpressionContext *context = 0 );
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
/************************************************************************
|
||||
* This file has been generated automatically from *
|
||||
* *
|
||||
* src/core/composer/qgscomposerlegend.h *
|
||||
* *
|
||||
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||
************************************************************************/
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,223 +1,288 @@
|
||||
/** \ingroup core
|
||||
* \class QgsComposerMapItem
|
||||
* \brief An item which is drawn inside a QgsComposerMap, e.g., a grid or map overview.
|
||||
*/
|
||||
/************************************************************************
|
||||
* This file has been generated automatically from *
|
||||
* *
|
||||
* src/core/composer/qgscomposermapitem.h *
|
||||
* *
|
||||
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||
************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
class QgsComposerMapItem : QgsComposerObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgscomposermapitem.h>
|
||||
%Docstring
|
||||
An item which is drawn inside a QgsComposerMap, e.g., a grid or map overview.
|
||||
%End
|
||||
|
||||
%TypeHeaderCode
|
||||
#include "qgscomposermapitem.h"
|
||||
%End
|
||||
public:
|
||||
|
||||
/** Constructor for QgsComposerMapItem.
|
||||
* @param name friendly display name for item
|
||||
* @param map QgsComposerMap the item is attached to
|
||||
*/
|
||||
QgsComposerMapItem( const QString &name, QgsComposerMap *map );
|
||||
%Docstring
|
||||
Constructor for QgsComposerMapItem.
|
||||
\param name friendly display name for item
|
||||
\param map QgsComposerMap the item is attached to
|
||||
%End
|
||||
|
||||
virtual ~QgsComposerMapItem();
|
||||
|
||||
/** Draws the item on to a painter
|
||||
* @param painter destination QPainter
|
||||
*/
|
||||
virtual void draw( QPainter *painter ) = 0;
|
||||
%Docstring
|
||||
Draws the item on to a painter
|
||||
\param painter destination QPainter
|
||||
%End
|
||||
|
||||
/** Stores map item state in DOM element
|
||||
* @param elem is DOM element corresponding to a 'ComposerMap' tag
|
||||
* @param doc DOM document
|
||||
* @see readXML
|
||||
*/
|
||||
virtual bool writeXml( QDomElement &elem, QDomDocument &doc ) const;
|
||||
%Docstring
|
||||
Stores map item state in DOM element
|
||||
\param elem is DOM element corresponding to a 'ComposerMap' tag
|
||||
\param doc DOM document
|
||||
.. seealso:: readXml
|
||||
:rtype: bool
|
||||
%End
|
||||
|
||||
/** Sets map item state from a DOM document
|
||||
* @param itemElem is DOM node corresponding to a 'ComposerMapGrid' tag
|
||||
* @param doc is DOM document
|
||||
* @see writeXML
|
||||
*/
|
||||
virtual bool readXml( const QDomElement &itemElem, const QDomDocument &doc );
|
||||
%Docstring
|
||||
Sets map item state from a DOM document
|
||||
\param itemElem is DOM node corresponding to a 'ComposerMapGrid' tag
|
||||
\param doc is DOM document
|
||||
.. seealso:: writeXml
|
||||
:rtype: bool
|
||||
%End
|
||||
|
||||
/** Sets composer map for the item
|
||||
* @param map composer map
|
||||
* @see composerMap
|
||||
*/
|
||||
virtual void setComposerMap( QgsComposerMap *map );
|
||||
%Docstring
|
||||
Sets composer map for the item
|
||||
\param map composer map
|
||||
.. seealso:: composerMap
|
||||
%End
|
||||
|
||||
/** Get composer map for the item
|
||||
* @returns composer map
|
||||
* @see setComposerMap
|
||||
*/
|
||||
virtual const QgsComposerMap *composerMap() const;
|
||||
%Docstring
|
||||
Get composer map for the item
|
||||
:return: composer map
|
||||
.. seealso:: setComposerMap
|
||||
:rtype: QgsComposerMap
|
||||
%End
|
||||
|
||||
/** Get the unique id for the map item
|
||||
* @returns unique id
|
||||
*/
|
||||
QString id() const;
|
||||
%Docstring
|
||||
Get the unique id for the map item
|
||||
:return: unique id
|
||||
:rtype: str
|
||||
%End
|
||||
|
||||
/** Sets the friendly display name for the item
|
||||
* @param name display name
|
||||
* @see name
|
||||
*/
|
||||
virtual void setName( const QString &name );
|
||||
%Docstring
|
||||
Sets the friendly display name for the item
|
||||
\param name display name
|
||||
.. seealso:: name
|
||||
%End
|
||||
|
||||
/** Get friendly display name for the item
|
||||
* @returns display name
|
||||
* @see setName
|
||||
*/
|
||||
virtual QString name() const;
|
||||
%Docstring
|
||||
Get friendly display name for the item
|
||||
:return: display name
|
||||
.. seealso:: setName
|
||||
:rtype: str
|
||||
%End
|
||||
|
||||
/** Controls whether the item will be drawn
|
||||
* @param enabled set to true to enable drawing of the item
|
||||
* @see enabled
|
||||
*/
|
||||
virtual void setEnabled( const bool enabled );
|
||||
%Docstring
|
||||
Controls whether the item will be drawn
|
||||
\param enabled set to true to enable drawing of the item
|
||||
.. seealso:: enabled
|
||||
%End
|
||||
|
||||
/** Returns whether the item will be drawn
|
||||
* @returns true if item will be drawn on the map
|
||||
* @see setEnabled
|
||||
*/
|
||||
virtual bool enabled() const;
|
||||
%Docstring
|
||||
Returns whether the item will be drawn
|
||||
:return: true if item will be drawn on the map
|
||||
.. seealso:: setEnabled
|
||||
:rtype: bool
|
||||
%End
|
||||
|
||||
/** Returns true if the item is drawn using advanced effects, such as blend modes.
|
||||
* @returns true if item uses advanced effects
|
||||
*/
|
||||
virtual bool usesAdvancedEffects() const;
|
||||
%Docstring
|
||||
Returns true if the item is drawn using advanced effects, such as blend modes.
|
||||
:return: true if item uses advanced effects
|
||||
:rtype: bool
|
||||
%End
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
/** \ingroup core
|
||||
* \class QgsComposerMapItemStack
|
||||
* \brief A collection of map items which are drawn above the map content in a
|
||||
* QgsComposerMap. The item stack controls which items are drawn and the
|
||||
* order they are drawn in.
|
||||
* \note added in QGIS 2.5
|
||||
* \see QgsComposerMapItem
|
||||
*/
|
||||
class QgsComposerMapItemStack
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgscomposermapitem.h>
|
||||
%Docstring
|
||||
A collection of map items which are drawn above the map content in a
|
||||
QgsComposerMap. The item stack controls which items are drawn and the
|
||||
order they are drawn in.
|
||||
.. versionadded:: 2.5
|
||||
.. seealso:: QgsComposerMapItem
|
||||
%End
|
||||
|
||||
%TypeHeaderCode
|
||||
#include "qgscomposermapitem.h"
|
||||
%End
|
||||
public:
|
||||
|
||||
/** Constructor for QgsComposerMapItemStack.
|
||||
* @param map QgsComposerMap the item stack is attached to
|
||||
*/
|
||||
QgsComposerMapItemStack( QgsComposerMap *map );
|
||||
%Docstring
|
||||
Constructor for QgsComposerMapItemStack.
|
||||
\param map QgsComposerMap the item stack is attached to
|
||||
%End
|
||||
|
||||
virtual ~QgsComposerMapItemStack();
|
||||
|
||||
/** Returns the number of items in the stack
|
||||
* @returns number of items in the stack
|
||||
*/
|
||||
int size() const;
|
||||
%Docstring
|
||||
Returns the number of items in the stack
|
||||
:return: number of items in the stack
|
||||
:rtype: int
|
||||
%End
|
||||
|
||||
/** Stores the state of the item stack in a DOM node
|
||||
* @param elem is DOM element corresponding to a 'ComposerMap' tag
|
||||
* @param doc DOM document
|
||||
* @returns true if write was successful
|
||||
* @see readXML
|
||||
*/
|
||||
virtual bool writeXml( QDomElement &elem, QDomDocument &doc ) const;
|
||||
%Docstring
|
||||
Stores the state of the item stack in a DOM node
|
||||
\param elem is DOM element corresponding to a 'ComposerMap' tag
|
||||
\param doc DOM document
|
||||
:return: true if write was successful
|
||||
.. seealso:: readXml
|
||||
:rtype: bool
|
||||
%End
|
||||
|
||||
/** Sets the item stack's state from a DOM document
|
||||
* @param elem is DOM node corresponding to 'a ComposerMap' tag
|
||||
* @param doc DOM document
|
||||
* @returns true if read was successful
|
||||
* @see writeXML
|
||||
*/
|
||||
virtual bool readXml( const QDomElement &elem, const QDomDocument &doc ) = 0;
|
||||
%Docstring
|
||||
Sets the item stack's state from a DOM document
|
||||
\param elem is DOM node corresponding to 'a ComposerMap' tag
|
||||
\param doc DOM document
|
||||
:return: true if read was successful
|
||||
.. seealso:: writeXml
|
||||
:rtype: bool
|
||||
%End
|
||||
|
||||
/** Draws the items from the stack on a specified painter
|
||||
* @param painter destination QPainter
|
||||
*/
|
||||
void drawItems( QPainter *painter );
|
||||
%Docstring
|
||||
Draws the items from the stack on a specified painter
|
||||
\param painter destination QPainter
|
||||
%End
|
||||
|
||||
/** Returns whether any items within the stack contain advanced effects,
|
||||
* such as blending modes
|
||||
* @returns true if item stack contains advanced effects
|
||||
*/
|
||||
bool containsAdvancedEffects() const;
|
||||
%Docstring
|
||||
Returns whether any items within the stack contain advanced effects,
|
||||
such as blending modes
|
||||
:return: true if item stack contains advanced effects
|
||||
:rtype: bool
|
||||
%End
|
||||
|
||||
protected:
|
||||
|
||||
/** Adds a new map item to the stack and takes ownership of the item.
|
||||
* The item will be added to the end of the stack, and rendered
|
||||
* above any existing map items already present in the stack.
|
||||
* @param item QgsComposerMapItem to add to the stack
|
||||
* @note after adding an item to the stack update()
|
||||
* should be called for the QgsComposerMap to prevent rendering artifacts
|
||||
* @see removeItem
|
||||
*/
|
||||
void addItem( QgsComposerMapItem *item /Transfer/);
|
||||
void addItem( QgsComposerMapItem *item );
|
||||
%Docstring
|
||||
Adds a new map item to the stack and takes ownership of the item.
|
||||
The item will be added to the end of the stack, and rendered
|
||||
above any existing map items already present in the stack.
|
||||
\param item QgsComposerMapItem to add to the stack
|
||||
.. note::
|
||||
|
||||
after adding an item to the stack update()
|
||||
should be called for the QgsComposerMap to prevent rendering artifacts
|
||||
.. seealso:: removeItem
|
||||
%End
|
||||
|
||||
/** Removes an item from the stack and deletes the corresponding QgsComposerMapItem
|
||||
* @param itemId id for the QgsComposerMapItem to remove
|
||||
* @note after removing an item from the stack, update()
|
||||
* should be called for the QgsComposerMap to prevent rendering artifacts
|
||||
* @see addItem
|
||||
*/
|
||||
void removeItem( const QString &itemId );
|
||||
%Docstring
|
||||
Removes an item from the stack and deletes the corresponding QgsComposerMapItem
|
||||
\param itemId id for the QgsComposerMapItem to remove
|
||||
.. note::
|
||||
|
||||
after removing an item from the stack, update()
|
||||
should be called for the QgsComposerMap to prevent rendering artifacts
|
||||
.. seealso:: addItem
|
||||
%End
|
||||
|
||||
/** Moves an item up the stack, causing it to be rendered above other items
|
||||
* @param itemId id for the QgsComposerMapItem to move up
|
||||
* @note after moving an item within the stack, update() should be
|
||||
* called for the QgsComposerMap to redraw the map with the new item stack order
|
||||
* @see moveItemDown
|
||||
*/
|
||||
void moveItemUp( const QString &itemId );
|
||||
%Docstring
|
||||
Moves an item up the stack, causing it to be rendered above other items
|
||||
\param itemId id for the QgsComposerMapItem to move up
|
||||
.. note::
|
||||
|
||||
after moving an item within the stack, update() should be
|
||||
called for the QgsComposerMap to redraw the map with the new item stack order
|
||||
.. seealso:: moveItemDown
|
||||
%End
|
||||
|
||||
/** Moves an item up the stack, causing it to be rendered above other items
|
||||
* @param itemId id for the QgsComposerMapItem to move down
|
||||
* @note after moving an item within the stack, update() should be
|
||||
* called for the QgsComposerMap to redraw the map with the new item stack order
|
||||
* @see moveItemUp
|
||||
*/
|
||||
void moveItemDown( const QString &itemId );
|
||||
%Docstring
|
||||
Moves an item up the stack, causing it to be rendered above other items
|
||||
\param itemId id for the QgsComposerMapItem to move down
|
||||
.. note::
|
||||
|
||||
after moving an item within the stack, update() should be
|
||||
called for the QgsComposerMap to redraw the map with the new item stack order
|
||||
.. seealso:: moveItemUp
|
||||
%End
|
||||
|
||||
/** Returns a const reference to an item within the stack
|
||||
* @param itemId id for the QgsComposerMapItem to find
|
||||
* @returns const reference to item, if found
|
||||
* @see item
|
||||
*/
|
||||
const QgsComposerMapItem *constItem( const QString &itemId ) const;
|
||||
%Docstring
|
||||
Returns a const reference to an item within the stack
|
||||
\param itemId id for the QgsComposerMapItem to find
|
||||
:return: const reference to item, if found
|
||||
.. seealso:: item
|
||||
:rtype: QgsComposerMapItem
|
||||
%End
|
||||
|
||||
/** Returns a reference to an item within the stack
|
||||
* @param itemId id for the QgsComposerMapItem to find
|
||||
* @returns reference to item if found
|
||||
* @see constItem
|
||||
*/
|
||||
QgsComposerMapItem *item( const QString &itemId ) const;
|
||||
%Docstring
|
||||
Returns a reference to an item within the stack
|
||||
\param itemId id for the QgsComposerMapItem to find
|
||||
:return: reference to item if found
|
||||
.. seealso:: constItem
|
||||
:rtype: QgsComposerMapItem
|
||||
%End
|
||||
|
||||
/** Returns a reference to an item within the stack
|
||||
* @param index item position in the stack
|
||||
* @returns reference to item if found
|
||||
* @see constItem
|
||||
*/
|
||||
QgsComposerMapItem *item( const int index ) const;
|
||||
%Docstring
|
||||
Returns a reference to an item within the stack
|
||||
\param index item position in the stack
|
||||
:return: reference to item if found
|
||||
.. seealso:: constItem
|
||||
:rtype: QgsComposerMapItem
|
||||
%End
|
||||
|
||||
/** Returns a reference to an item within the stack
|
||||
* @param idx item position in the stack
|
||||
* @returns reference to item if found
|
||||
* @see constItem
|
||||
* @see item
|
||||
* @note not available in python bindings
|
||||
*/
|
||||
// QgsComposerMapItem &operator[]( int idx );
|
||||
|
||||
/** Returns a list of QgsComposerMapItems contained by the stack
|
||||
* @returns list of items
|
||||
*/
|
||||
QList< QgsComposerMapItem* > asList() const;
|
||||
QList< QgsComposerMapItem * > asList() const;
|
||||
%Docstring
|
||||
Returns a list of QgsComposerMapItems contained by the stack
|
||||
:return: list of items
|
||||
:rtype: list of QgsComposerMapItem
|
||||
%End
|
||||
|
||||
protected:
|
||||
|
||||
/** Clears the item stack and deletes all QgsComposerMapItems contained
|
||||
* by the stack
|
||||
*/
|
||||
|
||||
|
||||
void removeItems();
|
||||
%Docstring
|
||||
Clears the item stack and deletes all QgsComposerMapItems contained
|
||||
by the stack
|
||||
%End
|
||||
};
|
||||
|
||||
|
||||
/************************************************************************
|
||||
* This file has been generated automatically from *
|
||||
* *
|
||||
* src/core/composer/qgscomposermapitem.h *
|
||||
* *
|
||||
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||
************************************************************************/
|
||||
|
@ -1,224 +1,280 @@
|
||||
/** \ingroup core
|
||||
* \class QgsComposerMapOverviewStack
|
||||
* \brief A collection of overviews which are drawn above the map content in a
|
||||
* QgsComposerMap. The overview stack controls which overviews are drawn and the
|
||||
* order they are drawn in.
|
||||
* \note added in QGIS 2.5
|
||||
* \see QgsComposerMapOverview
|
||||
*/
|
||||
/************************************************************************
|
||||
* This file has been generated automatically from *
|
||||
* *
|
||||
* src/core/composer/qgscomposermapoverview.h *
|
||||
* *
|
||||
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||
************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class QgsComposerMapOverviewStack : QgsComposerMapItemStack
|
||||
{
|
||||
%Docstring
|
||||
A collection of overviews which are drawn above the map content in a
|
||||
QgsComposerMap. The overview stack controls which overviews are drawn and the
|
||||
order they are drawn in.
|
||||
.. versionadded:: 2.5
|
||||
.. seealso:: QgsComposerMapOverview
|
||||
%End
|
||||
|
||||
%TypeHeaderCode
|
||||
#include <qgscomposermapoverview.h>
|
||||
#include "qgscomposermapoverview.h"
|
||||
%End
|
||||
public:
|
||||
|
||||
/** Constructor for QgsComposerMapOverviewStack.
|
||||
* @param map QgsComposerMap the overview stack is attached to
|
||||
*/
|
||||
QgsComposerMapOverviewStack( QgsComposerMap *map );
|
||||
%Docstring
|
||||
Constructor for QgsComposerMapOverviewStack.
|
||||
\param map QgsComposerMap the overview stack is attached to
|
||||
%End
|
||||
|
||||
virtual ~QgsComposerMapOverviewStack();
|
||||
|
||||
/** Adds a new map overview to the stack and takes ownership of the overview.
|
||||
* The overview will be added to the end of the stack, and rendered
|
||||
* above any existing map overviews already present in the stack.
|
||||
* @param overview QgsComposerMapOverview to add to the stack
|
||||
* @note after adding a overview to the stack, update()
|
||||
* should be called for the QgsComposerMap to prevent rendering artifacts
|
||||
* @see removeOverview
|
||||
*/
|
||||
void addOverview( QgsComposerMapOverview *overview /Transfer/ );
|
||||
%Docstring
|
||||
Adds a new map overview to the stack and takes ownership of the overview.
|
||||
The overview will be added to the end of the stack, and rendered
|
||||
above any existing map overviews already present in the stack.
|
||||
\param overview QgsComposerMapOverview to add to the stack
|
||||
.. note::
|
||||
|
||||
after adding a overview to the stack, update()
|
||||
should be called for the QgsComposerMap to prevent rendering artifacts
|
||||
.. seealso:: removeOverview
|
||||
%End
|
||||
|
||||
/** Removes an overview from the stack and deletes the corresponding QgsComposerMapOverview
|
||||
* @param overviewId id for the QgsComposerMapOverview to remove
|
||||
* @note after removing an overview from the stack, update()
|
||||
* should be called for the QgsComposerMap to prevent rendering artifacts
|
||||
* @see addOverview
|
||||
*/
|
||||
void removeOverview( const QString &overviewId );
|
||||
%Docstring
|
||||
Removes an overview from the stack and deletes the corresponding QgsComposerMapOverview
|
||||
\param overviewId id for the QgsComposerMapOverview to remove
|
||||
.. note::
|
||||
|
||||
after removing an overview from the stack, update()
|
||||
should be called for the QgsComposerMap to prevent rendering artifacts
|
||||
.. seealso:: addOverview
|
||||
%End
|
||||
|
||||
/** Moves an overview up the stack, causing it to be rendered above other overviews
|
||||
* @param overviewId id for the QgsComposerMapOverview to move up
|
||||
* @note after moving an overview within the stack, update() should be
|
||||
* called for the QgsComposerMap to redraw the map with the new overview stack order
|
||||
* @see moveOverviewDown
|
||||
*/
|
||||
void moveOverviewUp( const QString &overviewId );
|
||||
%Docstring
|
||||
Moves an overview up the stack, causing it to be rendered above other overviews
|
||||
\param overviewId id for the QgsComposerMapOverview to move up
|
||||
.. note::
|
||||
|
||||
after moving an overview within the stack, update() should be
|
||||
called for the QgsComposerMap to redraw the map with the new overview stack order
|
||||
.. seealso:: moveOverviewDown
|
||||
%End
|
||||
|
||||
/** Moves an overview down the stack, causing it to be rendered below other overviews
|
||||
* @param overviewId id for the QgsComposerMapOverview to move down
|
||||
* @note after moving an overview within the stack, update() should be
|
||||
* called for the QgsComposerMap to redraw the map with the new overview stack order
|
||||
* @see moveOverviewUp
|
||||
*/
|
||||
void moveOverviewDown( const QString &overviewId );
|
||||
%Docstring
|
||||
Moves an overview down the stack, causing it to be rendered below other overviews
|
||||
\param overviewId id for the QgsComposerMapOverview to move down
|
||||
.. note::
|
||||
|
||||
after moving an overview within the stack, update() should be
|
||||
called for the QgsComposerMap to redraw the map with the new overview stack order
|
||||
.. seealso:: moveOverviewUp
|
||||
%End
|
||||
|
||||
/** Returns a const reference to an overview within the stack
|
||||
* @param overviewId id for the QgsComposerMapOverview to find
|
||||
* @returns const reference to overview, if found
|
||||
* @see overview
|
||||
*/
|
||||
const QgsComposerMapOverview *constOverview( const QString &overviewId ) const;
|
||||
%Docstring
|
||||
Returns a const reference to an overview within the stack
|
||||
\param overviewId id for the QgsComposerMapOverview to find
|
||||
:return: const reference to overview, if found
|
||||
.. seealso:: overview
|
||||
:rtype: QgsComposerMapOverview
|
||||
%End
|
||||
|
||||
/** Returns a reference to an overview within the stack
|
||||
* @param overviewId id for the QgsComposerMapOverview to find
|
||||
* @returns reference to overview if found
|
||||
* @see constOverview
|
||||
*/
|
||||
QgsComposerMapOverview *overview( const QString &overviewId ) const;
|
||||
%Docstring
|
||||
Returns a reference to an overview within the stack
|
||||
\param overviewId id for the QgsComposerMapOverview to find
|
||||
:return: reference to overview if found
|
||||
.. seealso:: constOverview
|
||||
:rtype: QgsComposerMapOverview
|
||||
%End
|
||||
|
||||
/** Returns a reference to an overview within the stack
|
||||
* @param index overview position in the stack
|
||||
* @returns reference to overview if found
|
||||
* @see constOverview
|
||||
*/
|
||||
QgsComposerMapOverview *overview( const int index ) const;
|
||||
%Docstring
|
||||
Returns a reference to an overview within the stack
|
||||
\param index overview position in the stack
|
||||
:return: reference to overview if found
|
||||
.. seealso:: constOverview
|
||||
:rtype: QgsComposerMapOverview
|
||||
%End
|
||||
|
||||
/** Returns a reference to an overview within the stack
|
||||
* @param idx overview position in the stack
|
||||
* @returns reference to overview if found
|
||||
* @see constOverview
|
||||
* @see overview
|
||||
*/
|
||||
QgsComposerMapOverview &operator[]( int idx );
|
||||
|
||||
/** Returns a list of QgsComposerMapOverviews contained by the stack
|
||||
* @returns list of overviews
|
||||
*/
|
||||
QList< QgsComposerMapOverview* > asList() const;
|
||||
QList< QgsComposerMapOverview * > asList() const;
|
||||
%Docstring
|
||||
Returns a list of QgsComposerMapOverviews contained by the stack
|
||||
:return: list of overviews
|
||||
:rtype: list of QgsComposerMapOverview
|
||||
%End
|
||||
|
||||
/** Sets the overview stack's state from a DOM document
|
||||
* @param elem is DOM node corresponding to a 'ComposerMap' tag
|
||||
* @param doc DOM document
|
||||
* @returns true if read was successful
|
||||
* @see writeXML
|
||||
*/
|
||||
bool readXml( const QDomElement &elem, const QDomDocument &doc );
|
||||
virtual bool readXml( const QDomElement &elem, const QDomDocument &doc );
|
||||
|
||||
%Docstring
|
||||
Sets the overview stack's state from a DOM document
|
||||
\param elem is DOM node corresponding to a 'ComposerMap' tag
|
||||
\param doc DOM document
|
||||
:return: true if read was successful
|
||||
.. seealso:: writeXml
|
||||
:rtype: bool
|
||||
%End
|
||||
|
||||
};
|
||||
|
||||
/** \ingroup core
|
||||
* \class QgsComposerMapOverview
|
||||
* \brief An individual overview which is drawn above the map content in a
|
||||
* QgsComposerMap, and shows the extent of another QgsComposerMap.
|
||||
* \note added in QGIS 2.5
|
||||
* \see QgsComposerMapOverviewStack
|
||||
*/
|
||||
class QgsComposerMapOverview : QgsComposerMapItem
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgscomposermapoverview.h>
|
||||
%Docstring
|
||||
An individual overview which is drawn above the map content in a
|
||||
QgsComposerMap, and shows the extent of another QgsComposerMap.
|
||||
.. versionadded:: 2.5
|
||||
.. seealso:: QgsComposerMapOverviewStack
|
||||
%End
|
||||
|
||||
%TypeHeaderCode
|
||||
#include "qgscomposermapoverview.h"
|
||||
%End
|
||||
public:
|
||||
|
||||
/** Constructor for QgsComposerMapOverview.
|
||||
* @param name friendly display name for overview
|
||||
* @param map QgsComposerMap the overview is attached to
|
||||
*/
|
||||
QgsComposerMapOverview( const QString &name, QgsComposerMap *map );
|
||||
%Docstring
|
||||
Constructor for QgsComposerMapOverview.
|
||||
\param name friendly display name for overview
|
||||
\param map QgsComposerMap the overview is attached to
|
||||
%End
|
||||
|
||||
virtual ~QgsComposerMapOverview();
|
||||
|
||||
/** Draws an overview
|
||||
* @param painter destination QPainter
|
||||
*/
|
||||
void draw( QPainter *painter );
|
||||
virtual void draw( QPainter *painter );
|
||||
|
||||
/** Stores overview state in DOM element
|
||||
* @param elem is DOM element corresponding to a 'ComposerMap' tag
|
||||
* @param doc DOM document
|
||||
* @see readXML
|
||||
*/
|
||||
bool writeXml( QDomElement &elem, QDomDocument &doc ) const;
|
||||
%Docstring
|
||||
Draws an overview
|
||||
\param painter destination QPainter
|
||||
%End
|
||||
|
||||
/** Sets overview state from a DOM document
|
||||
* @param itemElem is DOM node corresponding to a 'ComposerMapOverview' tag
|
||||
* @param doc is DOM document
|
||||
* @see writeXML
|
||||
*/
|
||||
bool readXml( const QDomElement &itemElem, const QDomDocument &doc );
|
||||
virtual bool writeXml( QDomElement &elem, QDomDocument &doc ) const;
|
||||
|
||||
%Docstring
|
||||
Stores overview state in DOM element
|
||||
\param elem is DOM element corresponding to a 'ComposerMap' tag
|
||||
\param doc DOM document
|
||||
.. seealso:: readXml
|
||||
:rtype: bool
|
||||
%End
|
||||
|
||||
virtual bool readXml( const QDomElement &itemElem, const QDomDocument &doc );
|
||||
|
||||
%Docstring
|
||||
Sets overview state from a DOM document
|
||||
\param itemElem is DOM node corresponding to a 'ComposerMapOverview' tag
|
||||
\param doc is DOM document
|
||||
.. seealso:: writeXml
|
||||
:rtype: bool
|
||||
%End
|
||||
|
||||
virtual bool usesAdvancedEffects() const;
|
||||
|
||||
bool usesAdvancedEffects() const;
|
||||
|
||||
/** Sets overview frame map.
|
||||
* @param mapId source map id. -1 disables the overview frame
|
||||
* @see frameMapId
|
||||
*/
|
||||
void setFrameMap( const int mapId );
|
||||
%Docstring
|
||||
Sets overview frame map.
|
||||
\param mapId source map id. -1 disables the overview frame
|
||||
.. seealso:: frameMapId
|
||||
%End
|
||||
|
||||
/** Returns id of source map.
|
||||
* @returns source map id, or -1 if no source map set
|
||||
*/
|
||||
int frameMapId() const;
|
||||
%Docstring
|
||||
Returns id of source map.
|
||||
:return: source map id, or -1 if no source map set
|
||||
:rtype: int
|
||||
%End
|
||||
|
||||
/** Sets the fill symbol used for drawing the overview extent.
|
||||
* @param symbol fill symbol for overview
|
||||
* @see frameSymbol
|
||||
*/
|
||||
void setFrameSymbol( QgsFillSymbol *symbol /Transfer/ );
|
||||
%Docstring
|
||||
Sets the fill symbol used for drawing the overview extent.
|
||||
\param symbol fill symbol for overview
|
||||
.. seealso:: frameSymbol
|
||||
%End
|
||||
|
||||
/** Gets the fill symbol used for drawing the overview extent.
|
||||
* @returns fill symbol for overview
|
||||
* @see setFrameSymbol
|
||||
*/
|
||||
QgsFillSymbol *frameSymbol();
|
||||
%Docstring
|
||||
Gets the fill symbol used for drawing the overview extent.
|
||||
:return: fill symbol for overview
|
||||
.. seealso:: setFrameSymbol
|
||||
:rtype: QgsFillSymbol
|
||||
%End
|
||||
|
||||
/** Gets the fill symbol used for drawing the overview extent.
|
||||
* @returns fill symbol for overview
|
||||
* @see setFrameSymbol
|
||||
* @note not available in python bindings
|
||||
*/
|
||||
// const QgsFillSymbol* frameSymbol() const { return mFrameSymbol; }
|
||||
|
||||
/** Retrieves the blending mode used for drawing the overview.
|
||||
* @returns blending mode for overview
|
||||
* @see setBlendMode
|
||||
*/
|
||||
QPainter::CompositionMode blendMode() const;
|
||||
%Docstring
|
||||
Retrieves the blending mode used for drawing the overview.
|
||||
:return: blending mode for overview
|
||||
.. seealso:: setBlendMode
|
||||
:rtype: QPainter.CompositionMode
|
||||
%End
|
||||
|
||||
/** Sets the blending mode used for drawing the overview.
|
||||
* @param blendMode blending mode for overview
|
||||
* @see blendMode
|
||||
*/
|
||||
void setBlendMode( const QPainter::CompositionMode blendMode );
|
||||
%Docstring
|
||||
Sets the blending mode used for drawing the overview.
|
||||
\param blendMode blending mode for overview
|
||||
.. seealso:: blendMode
|
||||
%End
|
||||
|
||||
/** Returns whether the overview frame is inverted, ie, whether the shaded area is drawn outside
|
||||
* the extent of the overview map.
|
||||
* @returns true if overview frame is inverted
|
||||
* @see setInverted
|
||||
*/
|
||||
bool inverted() const;
|
||||
%Docstring
|
||||
Returns whether the overview frame is inverted, ie, whether the shaded area is drawn outside
|
||||
the extent of the overview map.
|
||||
:return: true if overview frame is inverted
|
||||
.. seealso:: setInverted
|
||||
:rtype: bool
|
||||
%End
|
||||
|
||||
/** Sets whether the overview frame is inverted, ie, whether the shaded area is drawn outside
|
||||
* the extent of the overview map.
|
||||
* @param inverted set to true if overview frame is to be inverted
|
||||
* @see inverted
|
||||
*/
|
||||
void setInverted( const bool inverted );
|
||||
%Docstring
|
||||
Sets whether the overview frame is inverted, ie, whether the shaded area is drawn outside
|
||||
the extent of the overview map.
|
||||
\param inverted set to true if overview frame is to be inverted
|
||||
.. seealso:: inverted
|
||||
%End
|
||||
|
||||
/** Returns whether the extent of the map is forced to center on the overview
|
||||
* @returns true if map will be centered on overview
|
||||
* @see setCentered
|
||||
*/
|
||||
bool centered() const;
|
||||
%Docstring
|
||||
Returns whether the extent of the map is forced to center on the overview
|
||||
:return: true if map will be centered on overview
|
||||
.. seealso:: setCentered
|
||||
:rtype: bool
|
||||
%End
|
||||
|
||||
/** Sets whether the extent of the map is forced to center on the overview
|
||||
* @param centered set to true if map will be centered on overview
|
||||
* @see centered
|
||||
*/
|
||||
void setCentered( const bool centered );
|
||||
%Docstring
|
||||
Sets whether the extent of the map is forced to center on the overview
|
||||
\param centered set to true if map will be centered on overview
|
||||
.. seealso:: centered
|
||||
%End
|
||||
|
||||
/** Reconnects signals for overview map, so that overview correctly follows changes to source
|
||||
* map's extent
|
||||
*/
|
||||
void connectSignals();
|
||||
%Docstring
|
||||
Reconnects signals for overview map, so that overview correctly follows changes to source
|
||||
map's extent
|
||||
%End
|
||||
|
||||
public slots:
|
||||
|
||||
/** Handles recentering of the map and redrawing of the map's overview
|
||||
*/
|
||||
void overviewExtentChanged();
|
||||
%Docstring
|
||||
Handles recentering of the map and redrawing of the map's overview
|
||||
%End
|
||||
|
||||
};
|
||||
|
||||
/************************************************************************
|
||||
* This file has been generated automatically from *
|
||||
* *
|
||||
* src/core/composer/qgscomposermapoverview.h *
|
||||
* *
|
||||
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||
************************************************************************/
|
||||
|
@ -1,289 +1,363 @@
|
||||
/**
|
||||
* \class QgsComposerModel
|
||||
* \ingroup core
|
||||
*
|
||||
* A model for items attached to a composition. The model also maintains the z-order for the
|
||||
* composition, and must be notified whenever item stacking changes.
|
||||
*
|
||||
* Internally, QgsComposerModel maintains two lists. One contains a complete list of all items for
|
||||
* the composition, ordered by their position within the z-order stack. This list also contains
|
||||
* items which have been removed from the composition, so that undo/redo commands can restore
|
||||
* them to their correct position in the stacking order.
|
||||
*
|
||||
* The second list contains only items which are currently displayed in the composition's scene.
|
||||
* It is used as a cache of the last known stacking order, so that the model can compare the current
|
||||
* stacking of items in the composition to the last known state, and emit the corresponding signals
|
||||
* as required.
|
||||
*/
|
||||
/************************************************************************
|
||||
* This file has been generated automatically from *
|
||||
* *
|
||||
* src/core/composer/qgscomposermodel.h *
|
||||
* *
|
||||
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||
************************************************************************/
|
||||
|
||||
class QgsComposerModel : QAbstractItemModel
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class QgsComposerModel: QAbstractItemModel
|
||||
{
|
||||
%Docstring
|
||||
|
||||
A model for items attached to a composition. The model also maintains the z-order for the
|
||||
composition, and must be notified whenever item stacking changes.
|
||||
|
||||
Internally, QgsComposerModel maintains two lists. One contains a complete list of all items for
|
||||
the composition, ordered by their position within the z-order stack. This list also contains
|
||||
items which have been removed from the composition, so that undo/redo commands can restore
|
||||
them to their correct position in the stacking order.
|
||||
|
||||
The second list contains only items which are currently displayed in the composition's scene.
|
||||
It is used as a cache of the last known stacking order, so that the model can compare the current
|
||||
stacking of items in the composition to the last known state, and emit the corresponding signals
|
||||
as required.
|
||||
%End
|
||||
|
||||
%TypeHeaderCode
|
||||
#include "qgscomposermodel.h"
|
||||
%End
|
||||
public:
|
||||
|
||||
//! Columns returned by the model
|
||||
enum Columns
|
||||
{
|
||||
Visibility, /*!< Item visibility check box */
|
||||
LockStatus, /*!< Item lock status check box */
|
||||
ItemId, /*!< Item ID */
|
||||
Visibility,
|
||||
LockStatus,
|
||||
ItemId,
|
||||
};
|
||||
|
||||
/** Constructor
|
||||
* @param composition composition to attach to
|
||||
* @param parent parent object
|
||||
*/
|
||||
explicit QgsComposerModel( QgsComposition *composition, QObject *parent /TransferThis/ = 0 );
|
||||
%Docstring
|
||||
Constructor
|
||||
\param composition composition to attach to
|
||||
\param parent parent object
|
||||
%End
|
||||
|
||||
~QgsComposerModel();
|
||||
virtual QModelIndex index( int row, int column, const QModelIndex &parent = QModelIndex() ) const;
|
||||
|
||||
virtual QModelIndex parent( const QModelIndex &index ) const;
|
||||
|
||||
virtual int rowCount( const QModelIndex &parent = QModelIndex() ) const;
|
||||
|
||||
virtual int columnCount( const QModelIndex &parent = QModelIndex() ) const;
|
||||
|
||||
virtual QVariant data( const QModelIndex &index, int role ) const;
|
||||
|
||||
virtual Qt::ItemFlags flags( const QModelIndex &index ) const;
|
||||
|
||||
virtual bool setData( const QModelIndex &index, const QVariant &value, int role );
|
||||
|
||||
virtual QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const;
|
||||
|
||||
virtual Qt::DropActions supportedDropActions() const;
|
||||
|
||||
//reimplemented QAbstractItemModel methods
|
||||
QModelIndex index( int row, int column, const QModelIndex &parent = QModelIndex() ) const;
|
||||
QModelIndex parent( const QModelIndex &index ) const;
|
||||
int rowCount( const QModelIndex &parent = QModelIndex() ) const;
|
||||
int columnCount( const QModelIndex &parent = QModelIndex() ) const;
|
||||
QVariant data( const QModelIndex &index, int role ) const;
|
||||
Qt::ItemFlags flags( const QModelIndex &index ) const;
|
||||
bool setData( const QModelIndex &index, const QVariant &value, int role );
|
||||
QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const;
|
||||
Qt::DropActions supportedDropActions() const;
|
||||
virtual QStringList mimeTypes() const;
|
||||
virtual QMimeData *mimeData( const QModelIndexList &indexes ) const;
|
||||
bool dropMimeData( const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent );
|
||||
bool removeRows( int row, int count, const QModelIndex &parent = QModelIndex() );
|
||||
virtual bool dropMimeData( const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent );
|
||||
|
||||
virtual bool removeRows( int row, int count, const QModelIndex &parent = QModelIndex() );
|
||||
|
||||
|
||||
/** Clears all items from z-order list and resets the model
|
||||
* @note added in QGIS 2.5
|
||||
*/
|
||||
void clear();
|
||||
%Docstring
|
||||
Clears all items from z-order list and resets the model
|
||||
.. versionadded:: 2.5
|
||||
%End
|
||||
|
||||
/** Returns the size of the z-order list, which includes items which may
|
||||
* have been removed from the composition.
|
||||
* @returns size of z-order list
|
||||
* @note added in QGIS 2.5
|
||||
*/
|
||||
int zOrderListSize() const;
|
||||
%Docstring
|
||||
Returns the size of the z-order list, which includes items which may
|
||||
have been removed from the composition.
|
||||
:return: size of z-order list
|
||||
.. versionadded:: 2.5
|
||||
:rtype: int
|
||||
%End
|
||||
|
||||
/** Rebuilds the z-order list, based on the current stacking of items in the composition.
|
||||
* This method should be called after adding multiple items to the composition.
|
||||
* @note added in QGIS 2.5
|
||||
*/
|
||||
void rebuildZList();
|
||||
%Docstring
|
||||
Rebuilds the z-order list, based on the current stacking of items in the composition.
|
||||
This method should be called after adding multiple items to the composition.
|
||||
.. versionadded:: 2.5
|
||||
%End
|
||||
|
||||
/** Adds an item to the top of the composition z stack.
|
||||
* @param item item to add. The item must not already exist in the z-order list.
|
||||
* @note added in QGIS 2.5
|
||||
* @see reorderItemToTop
|
||||
*/
|
||||
void addItemAtTop( QgsComposerItem *item );
|
||||
%Docstring
|
||||
Adds an item to the top of the composition z stack.
|
||||
\param item item to add. The item must not already exist in the z-order list.
|
||||
.. versionadded:: 2.5
|
||||
.. seealso:: reorderItemToTop
|
||||
%End
|
||||
|
||||
/** Removes an item from the z-order list.
|
||||
* @param item item to remove
|
||||
* @note added in QGIS 2.5
|
||||
*/
|
||||
void removeItem( QgsComposerItem *item );
|
||||
%Docstring
|
||||
Removes an item from the z-order list.
|
||||
\param item item to remove
|
||||
.. versionadded:: 2.5
|
||||
%End
|
||||
|
||||
/** Moves an item up the z-order list.
|
||||
* @param item item to move
|
||||
* @returns true if item was moved. Returns false if item was not found
|
||||
* in z-order list or was already at the top of the z-order list.
|
||||
* @see reorderItemDown
|
||||
* @see reorderItemToTop
|
||||
* @see reorderItemToBottom
|
||||
* @note added in QGIS 2.5
|
||||
*/
|
||||
bool reorderItemUp( QgsComposerItem *item );
|
||||
%Docstring
|
||||
Moves an item up the z-order list.
|
||||
\param item item to move
|
||||
:return: true if item was moved. Returns false if item was not found
|
||||
in z-order list or was already at the top of the z-order list.
|
||||
.. seealso:: reorderItemDown
|
||||
.. seealso:: reorderItemToTop
|
||||
.. seealso:: reorderItemToBottom
|
||||
.. versionadded:: 2.5
|
||||
:rtype: bool
|
||||
%End
|
||||
|
||||
/** Moves an item down the z-order list.
|
||||
* @param item item to move
|
||||
* @returns true if item was moved. Returns false if item was not found
|
||||
* in z-order list or was already at the bottom of the z-order list.
|
||||
* @see reorderItemUp
|
||||
* @see reorderItemToTop
|
||||
* @see reorderItemToBottom
|
||||
* @note added in QGIS 2.5
|
||||
*/
|
||||
bool reorderItemDown( QgsComposerItem *item );
|
||||
%Docstring
|
||||
Moves an item down the z-order list.
|
||||
\param item item to move
|
||||
:return: true if item was moved. Returns false if item was not found
|
||||
in z-order list or was already at the bottom of the z-order list.
|
||||
.. seealso:: reorderItemUp
|
||||
.. seealso:: reorderItemToTop
|
||||
.. seealso:: reorderItemToBottom
|
||||
.. versionadded:: 2.5
|
||||
:rtype: bool
|
||||
%End
|
||||
|
||||
/** Moves an item to the top of the z-order list.
|
||||
* @param item item to move
|
||||
* @returns true if item was moved. Returns false if item was not found
|
||||
* in z-order list or was already at the top of the z-order list.
|
||||
* @see reorderItemUp
|
||||
* @see reorderItemDown
|
||||
* @see reorderItemToBottom
|
||||
* @note added in QGIS 2.5
|
||||
*/
|
||||
bool reorderItemToTop( QgsComposerItem *item );
|
||||
%Docstring
|
||||
Moves an item to the top of the z-order list.
|
||||
\param item item to move
|
||||
:return: true if item was moved. Returns false if item was not found
|
||||
in z-order list or was already at the top of the z-order list.
|
||||
.. seealso:: reorderItemUp
|
||||
.. seealso:: reorderItemDown
|
||||
.. seealso:: reorderItemToBottom
|
||||
.. versionadded:: 2.5
|
||||
:rtype: bool
|
||||
%End
|
||||
|
||||
/** Moves an item to the bottom of the z-order list.
|
||||
* @param item item to move
|
||||
* @returns true if item was moved. Returns false if item was not found
|
||||
* in z-order list or was already at the bottom of the z-order list.
|
||||
* @see reorderItemUp
|
||||
* @see reorderItemDown
|
||||
* @see reorderItemToTop
|
||||
* @note added in QGIS 2.5
|
||||
*/
|
||||
bool reorderItemToBottom( QgsComposerItem *item );
|
||||
%Docstring
|
||||
Moves an item to the bottom of the z-order list.
|
||||
\param item item to move
|
||||
:return: true if item was moved. Returns false if item was not found
|
||||
in z-order list or was already at the bottom of the z-order list.
|
||||
.. seealso:: reorderItemUp
|
||||
.. seealso:: reorderItemDown
|
||||
.. seealso:: reorderItemToTop
|
||||
.. versionadded:: 2.5
|
||||
:rtype: bool
|
||||
%End
|
||||
|
||||
/** Finds the next composer item above an item. This method only considers
|
||||
* items which are currently in the composition, and ignores items which have been
|
||||
* removed from the composition.
|
||||
* @param item item to search above
|
||||
* @returns item above specified item. If no items were found, no item
|
||||
* will be returned.
|
||||
* @see getComposerItemBelow
|
||||
* @note added in QGIS 2.5
|
||||
*/
|
||||
QgsComposerItem *getComposerItemAbove( QgsComposerItem *item ) const;
|
||||
%Docstring
|
||||
Finds the next composer item above an item. This method only considers
|
||||
items which are currently in the composition, and ignores items which have been
|
||||
removed from the composition.
|
||||
\param item item to search above
|
||||
:return: item above specified item. If no items were found, no item
|
||||
will be returned.
|
||||
.. seealso:: getComposerItemBelow
|
||||
.. versionadded:: 2.5
|
||||
:rtype: QgsComposerItem
|
||||
%End
|
||||
|
||||
/** Finds the next composer item below an item. This method only considers
|
||||
* items which are currently in the composition, and ignores items which have been
|
||||
* removed from the composition.
|
||||
* @param item item to search above
|
||||
* @returns item below specified item. If no items were found, no item
|
||||
* will be returned.
|
||||
* @see getComposerItemAbove
|
||||
* @note added in QGIS 2.5
|
||||
*/
|
||||
QgsComposerItem *getComposerItemBelow( QgsComposerItem *item ) const;
|
||||
%Docstring
|
||||
Finds the next composer item below an item. This method only considers
|
||||
items which are currently in the composition, and ignores items which have been
|
||||
removed from the composition.
|
||||
\param item item to search above
|
||||
:return: item below specified item. If no items were found, no item
|
||||
will be returned.
|
||||
.. seealso:: getComposerItemAbove
|
||||
.. versionadded:: 2.5
|
||||
:rtype: QgsComposerItem
|
||||
%End
|
||||
|
||||
/** Returns the item z-order list. This list includes both items currently in the
|
||||
* composition and items which have been removed from the composition.
|
||||
* @returns item z-order list
|
||||
* @note added in QGIS 2.5
|
||||
*/
|
||||
QList<QgsComposerItem *> *zOrderList();
|
||||
%Docstring
|
||||
Returns the item z-order list. This list includes both items currently in the
|
||||
composition and items which have been removed from the composition.
|
||||
:return: item z-order list
|
||||
.. versionadded:: 2.5
|
||||
:rtype: list of QgsComposerItem
|
||||
%End
|
||||
|
||||
/** Marks an item as removed from the composition. This must be called whenever an item
|
||||
* has been removed from the composition.
|
||||
* @param item to mark as removed from the composition
|
||||
* @see setItemRestored
|
||||
* @note added in QGIS 2.5
|
||||
*/
|
||||
void setItemRemoved( QgsComposerItem *item );
|
||||
%Docstring
|
||||
Marks an item as removed from the composition. This must be called whenever an item
|
||||
has been removed from the composition.
|
||||
\param item to mark as removed from the composition
|
||||
.. seealso:: setItemRestored
|
||||
.. versionadded:: 2.5
|
||||
%End
|
||||
|
||||
/** Restores an item to the composition. This must be called whenever an item removed
|
||||
* from the composition is restored to the composition.
|
||||
* @param item to mark as restored to the composition
|
||||
* @see setItemRemoved
|
||||
* @note added in QGIS 2.5
|
||||
*/
|
||||
void setItemRestored( QgsComposerItem *item );
|
||||
%Docstring
|
||||
Restores an item to the composition. This must be called whenever an item removed
|
||||
from the composition is restored to the composition.
|
||||
\param item to mark as restored to the composition
|
||||
.. seealso:: setItemRemoved
|
||||
.. versionadded:: 2.5
|
||||
%End
|
||||
|
||||
/** Must be called when an item's display name is modified
|
||||
* @param item item to update
|
||||
* @see updateItemLockStatus
|
||||
* @see updateItemVisibility
|
||||
* @see updateItemSelectStatus
|
||||
* @note added in QGIS 2.5
|
||||
*/
|
||||
void updateItemDisplayName( QgsComposerItem *item );
|
||||
%Docstring
|
||||
Must be called when an item's display name is modified
|
||||
\param item item to update
|
||||
.. seealso:: updateItemLockStatus
|
||||
.. seealso:: updateItemVisibility
|
||||
.. seealso:: updateItemSelectStatus
|
||||
.. versionadded:: 2.5
|
||||
%End
|
||||
|
||||
/** Must be called when an item's lock status changes
|
||||
* @param item item to update
|
||||
* @see updateItemDisplayName
|
||||
* @see updateItemVisibility
|
||||
* @see updateItemSelectStatus
|
||||
* @note added in QGIS 2.5
|
||||
*/
|
||||
void updateItemLockStatus( QgsComposerItem *item );
|
||||
%Docstring
|
||||
Must be called when an item's lock status changes
|
||||
\param item item to update
|
||||
.. seealso:: updateItemDisplayName
|
||||
.. seealso:: updateItemVisibility
|
||||
.. seealso:: updateItemSelectStatus
|
||||
.. versionadded:: 2.5
|
||||
%End
|
||||
|
||||
/** Must be called when an item's visibility changes
|
||||
* @param item item to update
|
||||
* @see updateItemDisplayName
|
||||
* @see updateItemLockStatus
|
||||
* @see updateItemSelectStatus
|
||||
* @note added in QGIS 2.5
|
||||
*/
|
||||
void updateItemVisibility( QgsComposerItem *item );
|
||||
%Docstring
|
||||
Must be called when an item's visibility changes
|
||||
\param item item to update
|
||||
.. seealso:: updateItemDisplayName
|
||||
.. seealso:: updateItemLockStatus
|
||||
.. seealso:: updateItemSelectStatus
|
||||
.. versionadded:: 2.5
|
||||
%End
|
||||
|
||||
/** Must be called when an item's selection status changes
|
||||
* @param item item to update
|
||||
* @see updateItemDisplayName
|
||||
* @see updateItemVisibility
|
||||
* @see updateItemLockStatus
|
||||
* @note added in QGIS 2.5
|
||||
*/
|
||||
void updateItemSelectStatus( QgsComposerItem *item );
|
||||
%Docstring
|
||||
Must be called when an item's selection status changes
|
||||
\param item item to update
|
||||
.. seealso:: updateItemDisplayName
|
||||
.. seealso:: updateItemVisibility
|
||||
.. seealso:: updateItemLockStatus
|
||||
.. versionadded:: 2.5
|
||||
%End
|
||||
|
||||
/** Returns the QModelIndex corresponding to a QgsComposerItem, if possible
|
||||
* @param item QgsComposerItem to find index for
|
||||
* @param column column number for created QModelIndex
|
||||
* @returns QModelIndex corresponding to item and specified column
|
||||
*/
|
||||
QModelIndex indexForItem( QgsComposerItem *item, const int column = 0 );
|
||||
%Docstring
|
||||
Returns the QModelIndex corresponding to a QgsComposerItem, if possible
|
||||
\param item QgsComposerItem to find index for
|
||||
\param column column number for created QModelIndex
|
||||
:return: QModelIndex corresponding to item and specified column
|
||||
:rtype: QModelIndex
|
||||
%End
|
||||
|
||||
public slots:
|
||||
|
||||
/** Sets an item as the current selection from a QModelIndex
|
||||
* @param index QModelIndex of item to set as selected
|
||||
* @note added in QGIS 2.5
|
||||
*/
|
||||
void setSelected( const QModelIndex &index );
|
||||
%Docstring
|
||||
Sets an item as the current selection from a QModelIndex
|
||||
\param index QModelIndex of item to set as selected
|
||||
.. versionadded:: 2.5
|
||||
%End
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* /class QgsComposerProxyModel
|
||||
* /ingroup core
|
||||
* /brief Allows for filtering a QgsComposerModel by item type.
|
||||
* /note added in 2.16
|
||||
*/
|
||||
class QgsComposerProxyModel: QSortFilterProxyModel
|
||||
{
|
||||
%Docstring
|
||||
Allows for filtering a QgsComposerModel by item type.
|
||||
.. versionadded:: 2.16
|
||||
%End
|
||||
|
||||
%TypeHeaderCode
|
||||
#include "qgscomposermodel.h"
|
||||
%End
|
||||
public:
|
||||
|
||||
/** Constructor for QgsComposerProxyModel.
|
||||
* @param composition composition to attach model to
|
||||
* @param parent optional parent
|
||||
*/
|
||||
QgsComposerProxyModel( QgsComposition *composition, QObject *parent /TransferThis/ = 0 );
|
||||
%Docstring
|
||||
Constructor for QgsComposerProxyModel.
|
||||
\param composition composition to attach model to
|
||||
\param parent optional parent
|
||||
%End
|
||||
|
||||
/** Returns the current item type filter, or QgsComposerItem::ComposerItem if no
|
||||
* item type filter is set.
|
||||
* @see setFilterType()
|
||||
*/
|
||||
QgsComposerItem::ItemType filterType() const;
|
||||
%Docstring
|
||||
Returns the current item type filter, or QgsComposerItem.ComposerItem if no
|
||||
item type filter is set.
|
||||
.. seealso:: setFilterType()
|
||||
:rtype: QgsComposerItem.ItemType
|
||||
%End
|
||||
|
||||
/** Sets the item type filter. Only matching item types will be shown.
|
||||
* @param itemType type to filter. Set to QgsComposerItem::ComposerItem to show all
|
||||
* item types.
|
||||
* @see filterType()
|
||||
*/
|
||||
void setFilterType( QgsComposerItem::ItemType itemType );
|
||||
%Docstring
|
||||
Sets the item type filter. Only matching item types will be shown.
|
||||
\param itemType type to filter. Set to QgsComposerItem.ComposerItem to show all
|
||||
item types.
|
||||
.. seealso:: filterType()
|
||||
%End
|
||||
|
||||
/** Sets a list of specific items to exclude from the model
|
||||
* @param exceptList list of items to exclude
|
||||
* @see exceptedItemList()
|
||||
*/
|
||||
void setExceptedItemList( const QList< QgsComposerItem* > &exceptList );
|
||||
void setExceptedItemList( const QList< QgsComposerItem * > &exceptList );
|
||||
%Docstring
|
||||
Sets a list of specific items to exclude from the model
|
||||
\param exceptList list of items to exclude
|
||||
.. seealso:: exceptedItemList()
|
||||
%End
|
||||
|
||||
/** Returns the list of specific items excluded from the model.
|
||||
* @see setExceptedItemList()
|
||||
*/
|
||||
QList< QgsComposerItem* > exceptedItemList() const;
|
||||
QList< QgsComposerItem * > exceptedItemList() const;
|
||||
%Docstring
|
||||
Returns the list of specific items excluded from the model.
|
||||
.. seealso:: setExceptedItemList()
|
||||
:rtype: list of QgsComposerItem
|
||||
%End
|
||||
|
||||
/** Returns the QgsComposerModel used in this proxy model.
|
||||
*/
|
||||
QgsComposerModel *sourceLayerModel() const;
|
||||
%Docstring
|
||||
Returns the QgsComposerModel used in this proxy model.
|
||||
:rtype: QgsComposerModel
|
||||
%End
|
||||
|
||||
/** Returns the QgsComposerItem corresponding to an index from the source
|
||||
* QgsComposerModel model.
|
||||
* @param sourceIndex a QModelIndex
|
||||
* @returns QgsComposerItem for specified index from QgsComposerModel
|
||||
*/
|
||||
QgsComposerItem *itemFromSourceIndex( const QModelIndex &sourceIndex ) const;
|
||||
%Docstring
|
||||
Returns the QgsComposerItem corresponding to an index from the source
|
||||
QgsComposerModel model.
|
||||
\param sourceIndex a QModelIndex
|
||||
:return: QgsComposerItem for specified index from QgsComposerModel
|
||||
:rtype: QgsComposerItem
|
||||
%End
|
||||
|
||||
protected:
|
||||
bool filterAcceptsRow( int source_row, const QModelIndex &source_parent ) const;
|
||||
bool lessThan( const QModelIndex &left, const QModelIndex &right ) const;
|
||||
virtual bool filterAcceptsRow( int source_row, const QModelIndex &source_parent ) const;
|
||||
|
||||
virtual bool lessThan( const QModelIndex &left, const QModelIndex &right ) const;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
/************************************************************************
|
||||
* This file has been generated automatically from *
|
||||
* *
|
||||
* src/core/composer/qgscomposermodel.h *
|
||||
* *
|
||||
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||
************************************************************************/
|
||||
|
@ -1,269 +1,335 @@
|
||||
/************************************************************************
|
||||
* This file has been generated automatically from *
|
||||
* *
|
||||
* src/core/composer/qgscomposermultiframe.h *
|
||||
* *
|
||||
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||
************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
%ModuleHeaderCode
|
||||
// fix to allow compilation with sip 4.7
|
||||
#include <qgscomposerhtml.h>
|
||||
#include <qgscomposertablev2.h>
|
||||
#include <qgscomposerattributetablev2.h>
|
||||
%End
|
||||
|
||||
/**
|
||||
* \ingroup composer
|
||||
* \class QgsComposerMultiFrame
|
||||
* Abstract base class for composer items with the ability to distribute the content to several frames
|
||||
* (QgsComposerFrame items).
|
||||
*/
|
||||
|
||||
class QgsComposerMultiFrame: QgsComposerObject
|
||||
{
|
||||
%Docstring
|
||||
Abstract base class for composer items with the ability to distribute the content to several frames
|
||||
(QgsComposerFrame items).
|
||||
%End
|
||||
|
||||
%TypeHeaderCode
|
||||
#include <qgscomposermultiframe.h>
|
||||
#include "qgscomposermultiframe.h"
|
||||
%End
|
||||
|
||||
%ConvertToSubClassCode
|
||||
if (dynamic_cast<QgsComposerHtml*>(sipCpp) != NULL)
|
||||
sipType = sipType_QgsComposerHtml;
|
||||
else if (dynamic_cast<QgsComposerAttributeTableV2*>(sipCpp) != NULL)
|
||||
sipType = sipType_QgsComposerAttributeTableV2;
|
||||
else if (dynamic_cast<QgsComposerTableV2*>(sipCpp) != NULL)
|
||||
sipType = sipType_QgsComposerTableV2;
|
||||
else if (dynamic_cast<QgsComposerMultiFrame*>(sipCpp) != NULL)
|
||||
sipType = sipType_QgsComposerMultiFrame;
|
||||
else
|
||||
sipType = NULL;
|
||||
if ( dynamic_cast<QgsComposerHtml *>( sipCpp ) != NULL )
|
||||
sipType = sipType_QgsComposerHtml;
|
||||
else if ( dynamic_cast<QgsComposerAttributeTableV2 *>( sipCpp ) != NULL )
|
||||
sipType = sipType_QgsComposerAttributeTableV2;
|
||||
else if ( dynamic_cast<QgsComposerTableV2 *>( sipCpp ) != NULL )
|
||||
sipType = sipType_QgsComposerTableV2;
|
||||
else if ( dynamic_cast<QgsComposerMultiFrame *>( sipCpp ) != NULL )
|
||||
sipType = sipType_QgsComposerMultiFrame;
|
||||
else
|
||||
sipType = NULL;
|
||||
%End
|
||||
|
||||
public:
|
||||
|
||||
/** Specifies the behavior for creating new frames to fit the multiframe's content
|
||||
*/
|
||||
enum ResizeMode
|
||||
{
|
||||
UseExistingFrames, /*!< don't automatically create new frames, just use existing frames */
|
||||
ExtendToNextPage, /*!< creates new full page frames on the following page(s) until the entire multiframe content is visible */
|
||||
RepeatOnEveryPage, /*!< repeats the same frame on every page */
|
||||
RepeatUntilFinished /*!< creates new frames with the same position and dimensions as the existing frame on the following page(s),
|
||||
until the entire multiframe content is visible */
|
||||
UseExistingFrames,
|
||||
ExtendToNextPage,
|
||||
RepeatOnEveryPage,
|
||||
RepeatUntilFinished
|
||||
};
|
||||
|
||||
/** Construct a new multiframe item.
|
||||
* @param c parent composition
|
||||
* @param createUndoCommands
|
||||
*/
|
||||
QgsComposerMultiFrame( QgsComposition *c /TransferThis/, bool createUndoCommands );
|
||||
%Docstring
|
||||
Construct a new multiframe item.
|
||||
\param c parent composition
|
||||
\param createUndoCommands
|
||||
%End
|
||||
|
||||
virtual ~QgsComposerMultiFrame();
|
||||
|
||||
/** Returns the total size of the multiframe's content.
|
||||
* @returns total size required for content
|
||||
*/
|
||||
virtual QSizeF totalSize() const = 0;
|
||||
%Docstring
|
||||
Returns the total size of the multiframe's content.
|
||||
:return: total size required for content
|
||||
:rtype: QSizeF
|
||||
%End
|
||||
|
||||
/** Returns the fixed size for a frame, if desired. If the fixed frame size changes,
|
||||
* the sizes of all frames can be recalculated by calling recalculateFrameRects().
|
||||
* @param frameIndex frame number
|
||||
* @returns fixed size for frame. If the size has a width or height of 0, then
|
||||
* the frame size is not fixed in that direction and frames can have variable width
|
||||
* or height accordingly.
|
||||
* @note added in version 2.5
|
||||
* @see minFrameSize
|
||||
* @see recalculateFrameRects
|
||||
*/
|
||||
virtual QSizeF fixedFrameSize( const int frameIndex = -1 ) const;
|
||||
%Docstring
|
||||
Returns the fixed size for a frame, if desired. If the fixed frame size changes,
|
||||
the sizes of all frames can be recalculated by calling recalculateFrameRects().
|
||||
\param frameIndex frame number
|
||||
:return: fixed size for frame. If the size has a width or height of 0, then
|
||||
the frame size is not fixed in that direction and frames can have variable width
|
||||
or height accordingly.
|
||||
.. versionadded:: 2.5
|
||||
.. seealso:: minFrameSize
|
||||
.. seealso:: recalculateFrameRects
|
||||
:rtype: QSizeF
|
||||
%End
|
||||
|
||||
/** Returns the minimum size for a frames, if desired. If the minimum
|
||||
* size changes, the sizes of all frames can be recalculated by calling
|
||||
* recalculateFrameRects().
|
||||
* @param frameIndex frame number
|
||||
* @returns minimum size for frame. If the size has a width or height of 0, then
|
||||
* the frame size has no minimum in that direction.
|
||||
* @note added in version 2.5
|
||||
* @see fixedFrameSize
|
||||
* @see recalculateFrameRects
|
||||
*/
|
||||
virtual QSizeF minFrameSize( const int frameIndex = -1 ) const;
|
||||
%Docstring
|
||||
Returns the minimum size for a frames, if desired. If the minimum
|
||||
size changes, the sizes of all frames can be recalculated by calling
|
||||
recalculateFrameRects().
|
||||
\param frameIndex frame number
|
||||
:return: minimum size for frame. If the size has a width or height of 0, then
|
||||
the frame size has no minimum in that direction.
|
||||
.. versionadded:: 2.5
|
||||
.. seealso:: fixedFrameSize
|
||||
.. seealso:: recalculateFrameRects
|
||||
:rtype: QSizeF
|
||||
%End
|
||||
|
||||
/** Renders a portion of the multiframe's content into a painter.
|
||||
* @param painter destination painter
|
||||
* @param renderExtent visible extent of content to render into the painter.
|
||||
* @param frameIndex frame number for content
|
||||
* @note added in version 2.5
|
||||
*/
|
||||
virtual void render( QPainter *painter, const QRectF &renderExtent, const int frameIndex ) = 0;
|
||||
%Docstring
|
||||
Renders a portion of the multiframe's content into a painter.
|
||||
\param painter destination painter
|
||||
\param renderExtent visible extent of content to render into the painter.
|
||||
\param frameIndex frame number for content
|
||||
.. versionadded:: 2.5
|
||||
%End
|
||||
|
||||
/** Adds a frame to the multiframe.
|
||||
* @param frame frame to add
|
||||
* @param recalcFrameSizes set to true to force recalculation of all existing frame sizes
|
||||
* @see removeFrame
|
||||
*/
|
||||
virtual void addFrame( QgsComposerFrame *frame /Transfer/, bool recalcFrameSizes = true ) = 0;
|
||||
%Docstring
|
||||
Adds a frame to the multiframe.
|
||||
\param frame frame to add
|
||||
\param recalcFrameSizes set to true to force recalculation of all existing frame sizes
|
||||
.. seealso:: removeFrame
|
||||
%End
|
||||
|
||||
/** Finds the optimal position to break a frame at.
|
||||
* @param yPos maximum vertical position for break
|
||||
* @returns the optimal breakable position which occurs in the multi frame close
|
||||
* to and before the specified yPos
|
||||
* @note added in version 2.3
|
||||
*/
|
||||
virtual double findNearbyPageBreak( double yPos );
|
||||
%Docstring
|
||||
Finds the optimal position to break a frame at.
|
||||
\param yPos maximum vertical position for break
|
||||
:return: the optimal breakable position which occurs in the multi frame close
|
||||
to and before the specified yPos
|
||||
.. versionadded:: 2.3
|
||||
:rtype: float
|
||||
%End
|
||||
|
||||
/** Removes a frame from the multiframe. This method automatically removes the frame from the
|
||||
* composition.
|
||||
* @param i index of frame to remove
|
||||
* @param removeEmptyPages set to true to remove pages which are empty after the frame is removed
|
||||
* @see addFrame
|
||||
* @see deleteFrames
|
||||
*/
|
||||
void removeFrame( int i, const bool removeEmptyPages = false );
|
||||
%Docstring
|
||||
Removes a frame from the multiframe. This method automatically removes the frame from the
|
||||
composition.
|
||||
\param i index of frame to remove
|
||||
\param removeEmptyPages set to true to remove pages which are empty after the frame is removed
|
||||
.. seealso:: addFrame
|
||||
.. seealso:: deleteFrames
|
||||
%End
|
||||
|
||||
/** Removes and deletes all child frames.
|
||||
* @see removeFrame
|
||||
*/
|
||||
void deleteFrames();
|
||||
%Docstring
|
||||
Removes and deletes all child frames.
|
||||
.. seealso:: removeFrame
|
||||
%End
|
||||
|
||||
/** Sets the resize mode for the multiframe, and recalculates frame sizes to match.
|
||||
* @param mode resize mode
|
||||
* @see resizeMode
|
||||
*/
|
||||
void setResizeMode( ResizeMode mode );
|
||||
%Docstring
|
||||
Sets the resize mode for the multiframe, and recalculates frame sizes to match.
|
||||
\param mode resize mode
|
||||
.. seealso:: resizeMode
|
||||
%End
|
||||
|
||||
/** Returns the resize mode for the multiframe.
|
||||
* @returns resize mode
|
||||
* @see setResizeMode
|
||||
*/
|
||||
ResizeMode resizeMode() const;
|
||||
%Docstring
|
||||
Returns the resize mode for the multiframe.
|
||||
:return: resize mode
|
||||
.. seealso:: setResizeMode
|
||||
:rtype: ResizeMode
|
||||
%End
|
||||
|
||||
/** Stores state information about multiframe in DOM element. Implementations of writeXML
|
||||
* should also call the _writeXML method to save general multiframe properties.
|
||||
* @param elem is DOM element
|
||||
* @param doc is the DOM document
|
||||
* @param ignoreFrames set to false to avoid writing state information about child frames into DOM
|
||||
* @see _writeXML
|
||||
*/
|
||||
virtual bool writeXml( QDomElement &elem, QDomDocument &doc, bool ignoreFrames = false ) const = 0;
|
||||
%Docstring
|
||||
Stores state information about multiframe in DOM element. Implementations of writeXml
|
||||
should also call the _writeXML method to save general multiframe properties.
|
||||
\param elem is DOM element
|
||||
\param doc is the DOM document
|
||||
\param ignoreFrames set to false to avoid writing state information about child frames into DOM
|
||||
.. seealso:: _writeXML
|
||||
:rtype: bool
|
||||
%End
|
||||
|
||||
/** Stores state information about base multiframe object in DOM element. Implementations of writeXML
|
||||
* should call this method.
|
||||
* @param elem is DOM element
|
||||
* @param doc is the DOM document
|
||||
* @param ignoreFrames set to false to avoid writing state information about child frames into DOM
|
||||
* @see writeXML
|
||||
*/
|
||||
bool _writeXml( QDomElement &elem, QDomDocument &doc, bool ignoreFrames = false ) const;
|
||||
%Docstring
|
||||
Stores state information about base multiframe object in DOM element. Implementations of writeXml
|
||||
should call this method.
|
||||
\param elem is DOM element
|
||||
\param doc is the DOM document
|
||||
\param ignoreFrames set to false to avoid writing state information about child frames into DOM
|
||||
.. seealso:: writeXml
|
||||
:rtype: bool
|
||||
%End
|
||||
|
||||
/** Reads multiframe state information from a DOM element. Implementations of readXML
|
||||
* should also call the _readXML method to restore general multiframe properties.
|
||||
* @param itemElem is DOM element
|
||||
* @param doc is the DOM document
|
||||
* @param ignoreFrames set to false to avoid read state information about child frames from DOM
|
||||
* @see _readXML
|
||||
*/
|
||||
virtual bool readXml( const QDomElement &itemElem, const QDomDocument &doc, bool ignoreFrames = false ) = 0;
|
||||
%Docstring
|
||||
Reads multiframe state information from a DOM element. Implementations of readXml
|
||||
should also call the _readXML method to restore general multiframe properties.
|
||||
\param itemElem is DOM element
|
||||
\param doc is the DOM document
|
||||
\param ignoreFrames set to false to avoid read state information about child frames from DOM
|
||||
.. seealso:: _readXML
|
||||
:rtype: bool
|
||||
%End
|
||||
|
||||
/** Restores state information about base multiframe object from a DOM element. Implementations of readXML
|
||||
* should call this method.
|
||||
* @param itemElem is DOM element
|
||||
* @param doc is the DOM document
|
||||
* @param ignoreFrames set to false to avoid reading state information about child frames from DOM
|
||||
* @see readXML
|
||||
*/
|
||||
bool _readXml( const QDomElement &itemElem, const QDomDocument &doc, bool ignoreFrames = false );
|
||||
%Docstring
|
||||
Restores state information about base multiframe object from a DOM element. Implementations of readXml
|
||||
should call this method.
|
||||
\param itemElem is DOM element
|
||||
\param doc is the DOM document
|
||||
\param ignoreFrames set to false to avoid reading state information about child frames from DOM
|
||||
.. seealso:: readXml
|
||||
:rtype: bool
|
||||
%End
|
||||
|
||||
/** Returns the parent composition for the multiframe.
|
||||
* @returns composition
|
||||
*/
|
||||
QgsComposition *composition();
|
||||
%Docstring
|
||||
Returns the parent composition for the multiframe.
|
||||
:return: composition
|
||||
:rtype: QgsComposition
|
||||
%End
|
||||
|
||||
/** Returns whether undo commands should be created for interactions with the multiframe.
|
||||
* @returns true if undo commands should be created
|
||||
* @see setCreateUndoCommands
|
||||
*/
|
||||
bool createUndoCommands() const;
|
||||
%Docstring
|
||||
Returns whether undo commands should be created for interactions with the multiframe.
|
||||
:return: true if undo commands should be created
|
||||
.. seealso:: setCreateUndoCommands
|
||||
:rtype: bool
|
||||
%End
|
||||
|
||||
/** Sets whether undo commands should be created for interactions with the multiframe.
|
||||
* @param enabled set to true if undo commands should be created
|
||||
* @see createUndoCommands
|
||||
*/
|
||||
void setCreateUndoCommands( bool enabled );
|
||||
%Docstring
|
||||
Sets whether undo commands should be created for interactions with the multiframe.
|
||||
\param enabled set to true if undo commands should be created
|
||||
.. seealso:: createUndoCommands
|
||||
%End
|
||||
|
||||
/** Returns the number of frames associated with this multiframe.
|
||||
* @returns number of child frames
|
||||
**/
|
||||
int frameCount() const;
|
||||
%Docstring
|
||||
Returns the number of frames associated with this multiframe.
|
||||
:return: number of child frames
|
||||
*
|
||||
:rtype: int
|
||||
%End
|
||||
|
||||
/** Returns a child frame from the multiframe.
|
||||
* @param i index of frame
|
||||
* @returns child frame if found
|
||||
* @see frameIndex
|
||||
*/
|
||||
QgsComposerFrame *frame( int i );
|
||||
QgsComposerFrame *frame( int i ) const;
|
||||
%Docstring
|
||||
Returns a child frame from the multiframe.
|
||||
\param i index of frame
|
||||
:return: child frame if found
|
||||
.. seealso:: frameIndex
|
||||
:rtype: QgsComposerFrame
|
||||
%End
|
||||
|
||||
/** Returns the index of a frame within the multiframe
|
||||
* @param frame frame to find index of
|
||||
* @returns index for frame if found, -1 if frame not found in multiframe
|
||||
* @note added in version 2.5
|
||||
* @see frame
|
||||
*/
|
||||
int frameIndex( QgsComposerFrame *frame ) const;
|
||||
%Docstring
|
||||
Returns the index of a frame within the multiframe
|
||||
\param frame frame to find index of
|
||||
:return: index for frame if found, -1 if frame not found in multiframe
|
||||
.. versionadded:: 2.5
|
||||
.. seealso:: frame
|
||||
:rtype: int
|
||||
%End
|
||||
|
||||
/** Creates a new frame and adds it to the multi frame and composition.
|
||||
* @param currentFrame an existing QgsComposerFrame from which to copy the size
|
||||
* and general frame properties (e.g., frame style, background, rendering settings).
|
||||
* @param pos position of top-left corner of the new frame
|
||||
* @param size size of the new frame
|
||||
* @returns new QgsComposerFrame
|
||||
* @note added in version 2.3
|
||||
*/
|
||||
QgsComposerFrame *createNewFrame( QgsComposerFrame *currentFrame, QPointF pos, QSizeF size );
|
||||
%Docstring
|
||||
Creates a new frame and adds it to the multi frame and composition.
|
||||
\param currentFrame an existing QgsComposerFrame from which to copy the size
|
||||
and general frame properties (e.g., frame style, background, rendering settings).
|
||||
\param pos position of top-left corner of the new frame
|
||||
\param size size of the new frame
|
||||
:return: new QgsComposerFrame
|
||||
.. versionadded:: 2.3
|
||||
:rtype: QgsComposerFrame
|
||||
%End
|
||||
|
||||
/** Get multiframe display name.
|
||||
* @returns display name for item
|
||||
* @note added in version 2.5
|
||||
*/
|
||||
virtual QString displayName() const;
|
||||
%Docstring
|
||||
Get multiframe display name.
|
||||
:return: display name for item
|
||||
.. versionadded:: 2.5
|
||||
:rtype: str
|
||||
%End
|
||||
|
||||
public slots:
|
||||
|
||||
/** Forces a redraw of all child frames.
|
||||
*/
|
||||
void update();
|
||||
%Docstring
|
||||
Forces a redraw of all child frames.
|
||||
%End
|
||||
|
||||
/** Recalculates the portion of the multiframe item which is shown in each of it's
|
||||
* component frames. If the resize mode is set to anything but UseExistingFrames then
|
||||
* this may cause new frames to be added or frames to be removed, in order to fit
|
||||
* the current size of the multiframe's content.
|
||||
* @see recalculateFrameRects
|
||||
*/
|
||||
virtual void recalculateFrameSizes();
|
||||
%Docstring
|
||||
Recalculates the portion of the multiframe item which is shown in each of it's
|
||||
component frames. If the resize mode is set to anything but UseExistingFrames then
|
||||
this may cause new frames to be added or frames to be removed, in order to fit
|
||||
the current size of the multiframe's content.
|
||||
.. seealso:: recalculateFrameRects
|
||||
%End
|
||||
|
||||
/** Forces a recalculation of all the associated frame's scene rectangles. This
|
||||
* method is useful for multiframes which implement a minFrameSize() or
|
||||
* fixedFrameSize() method.
|
||||
* @note added in version 2.5
|
||||
* @see minFrameSize()
|
||||
* @see fixedFrameSize()
|
||||
* @see recalculateFrameSizes
|
||||
*/
|
||||
void recalculateFrameRects();
|
||||
%Docstring
|
||||
Forces a recalculation of all the associated frame's scene rectangles. This
|
||||
method is useful for multiframes which implement a minFrameSize() or
|
||||
fixedFrameSize() method.
|
||||
.. versionadded:: 2.5
|
||||
.. seealso:: minFrameSize()
|
||||
.. seealso:: fixedFrameSize()
|
||||
.. seealso:: recalculateFrameSizes
|
||||
%End
|
||||
|
||||
void handleFrameRemoval( QgsComposerItem *item );
|
||||
%Docstring
|
||||
Called before a frame is going to be removed. Updates frame list and recalculates
|
||||
content of remaining frames.
|
||||
%End
|
||||
|
||||
signals:
|
||||
|
||||
/** Emitted when the properties of a multi frame have changed, and the GUI item widget
|
||||
* must be updated.
|
||||
*/
|
||||
void changed();
|
||||
%Docstring
|
||||
Emitted when the properties of a multi frame have changed, and the GUI item widget
|
||||
must be updated.
|
||||
%End
|
||||
|
||||
/** Emitted when the contents of the multi frame have changed and the frames
|
||||
* must be redrawn.
|
||||
*/
|
||||
void contentsChanged();
|
||||
%Docstring
|
||||
Emitted when the contents of the multi frame have changed and the frames
|
||||
must be redrawn.
|
||||
%End
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
protected slots:
|
||||
|
||||
/** Called before a frame is going to be removed. Updates frame list and recalculates
|
||||
* content of remaining frames.
|
||||
*/
|
||||
void handleFrameRemoval( QgsComposerItem *item );
|
||||
|
||||
/** Adapts to changed number of composition pages if resize type is RepeatOnEveryPage.
|
||||
*/
|
||||
void handlePageChange();
|
||||
%Docstring
|
||||
Adapts to changed number of composition pages if resize type is RepeatOnEveryPage.
|
||||
%End
|
||||
|
||||
};
|
||||
|
||||
/************************************************************************
|
||||
* This file has been generated automatically from *
|
||||
* *
|
||||
* src/core/composer/qgscomposermultiframe.h *
|
||||
* *
|
||||
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||
************************************************************************/
|
||||
|
@ -38,6 +38,7 @@ class QgsComposerEffect;
|
||||
* A item that forms part of a map composition.
|
||||
*/
|
||||
class CORE_EXPORT QgsComposerItem: public QgsComposerObject, public QGraphicsRectItem
|
||||
{
|
||||
#ifdef SIP_RUN
|
||||
#include <qgscomposerarrow.h>
|
||||
#include <qgscomposerframe.h>
|
||||
@ -53,7 +54,7 @@ class CORE_EXPORT QgsComposerItem: public QgsComposerObject, public QGraphicsRec
|
||||
#include <qgscomposerpolyline.h>
|
||||
#include <qgscomposertexttable.h>
|
||||
#endif
|
||||
{
|
||||
|
||||
|
||||
#ifdef SIP_RUN
|
||||
SIP_CONVERT_TO_SUBCLASS_CODE
|
||||
|
@ -31,6 +31,15 @@ class QDomElement;
|
||||
class QRectF;
|
||||
class QPainter;
|
||||
|
||||
|
||||
#ifdef SIP_RUN
|
||||
% ModuleHeaderCode
|
||||
#include <qgscomposerhtml.h>
|
||||
#include <qgscomposertablev2.h>
|
||||
#include <qgscomposerattributetablev2.h>
|
||||
% End
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \ingroup core
|
||||
* \class QgsComposerMultiFrame
|
||||
|
Loading…
x
Reference in New Issue
Block a user