2014-09-17 21:52:19 +10:00
|
|
|
/**Frame item for a composer multiframe item*/
|
2012-08-09 11:10:55 +02:00
|
|
|
class QgsComposerFrame: QgsComposerItem
|
|
|
|
{
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgscomposerframe.h"
|
|
|
|
%End
|
|
|
|
|
2015-02-03 02:21:52 +01:00
|
|
|
public:
|
2014-10-19 10:54:50 +11:00
|
|
|
QgsComposerFrame( QgsComposition* c /TransferThis/, QgsComposerMultiFrame* mf, qreal x, qreal y, qreal width, qreal height );
|
2015-02-03 02:21:52 +01:00
|
|
|
|
2012-08-09 11:10:55 +02:00
|
|
|
~QgsComposerFrame();
|
|
|
|
|
2014-09-17 21:52:19 +10:00
|
|
|
/**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
|
|
|
|
*/
|
2012-08-09 11:10:55 +02:00
|
|
|
void setContentSection( const QRectF& section );
|
2014-11-13 23:13:13 +01:00
|
|
|
|
2014-09-17 21:52:19 +10:00
|
|
|
/**Returns the parent multiframe for the frame.
|
|
|
|
* @returns parent multiframe
|
|
|
|
*/
|
|
|
|
QgsComposerMultiFrame* multiFrame() const;
|
2014-11-13 23:13:13 +01:00
|
|
|
|
2014-09-17 21:52:19 +10:00
|
|
|
//Overriden to allow multiframe to set display name
|
|
|
|
virtual QString displayName() const;
|
2014-11-13 23:13:13 +01:00
|
|
|
|
2014-09-17 21:52:19 +10:00
|
|
|
//Overriden to handle fixed frame sizes set by multi frame
|
2014-11-13 23:13:13 +01:00
|
|
|
void setSceneRect( const QRectF& rectangle );
|
|
|
|
|
2012-08-09 11:10:55 +02:00
|
|
|
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;
|
2014-11-13 23:13:13 +01:00
|
|
|
|
2014-09-17 21:52:19 +10:00
|
|
|
/**Returns the visible portion of the multi frame's content which
|
|
|
|
* is shown in this frame.
|
|
|
|
* @returns extent of visible portion
|
|
|
|
* @note added in QGIS 2.5
|
|
|
|
* @see setContentSection
|
|
|
|
*/
|
|
|
|
QRectF extent() const;
|
2014-11-13 23:13:13 +01:00
|
|
|
|
2014-09-26 01:05:26 +10:00
|
|
|
/**Returns whether the page should be hidden (ie, not included in composer exports) if this frame is empty
|
|
|
|
* @returns true if page should be hidden if frame is empty
|
|
|
|
* @note added in QGIS 2.5
|
|
|
|
* @see setHidePageIfEmpty
|
|
|
|
*/
|
|
|
|
bool hidePageIfEmpty() const;
|
|
|
|
|
|
|
|
/**Sets whether the page should be hidden (ie, not included in composer exports) if this frame is empty
|
|
|
|
* @param hidePageIfEmpty set to true if page should be hidden if frame is empty
|
|
|
|
* @note added in QGIS 2.5
|
|
|
|
* @see hidePageIfEmpty
|
|
|
|
*/
|
|
|
|
void setHidePageIfEmpty( const bool hidePageIfEmpty );
|
2014-11-13 23:13:13 +01:00
|
|
|
|
2014-09-26 17:45:07 +10:00
|
|
|
/**Returns whether the background and frame border should be hidden if this frame is empty
|
|
|
|
* @returns true if background and border should be hidden if frame is empty
|
|
|
|
* @note added in QGIS 2.5
|
|
|
|
* @see setHideBackgroundIfEmpty
|
|
|
|
*/
|
|
|
|
bool hideBackgroundIfEmpty() const;
|
|
|
|
|
|
|
|
/**Sets whether the background and frame border should be hidden if this frame is empty
|
|
|
|
* @param hideBackgroundIfEmpty set to true if background and border should be hidden if frame is empty
|
|
|
|
* @note added in QGIS 2.5
|
|
|
|
* @see hideBackgroundIfEmpty
|
|
|
|
*/
|
|
|
|
void setHideBackgroundIfEmpty( const bool hideBackgroundIfEmpty );
|
2014-09-26 01:05:26 +10:00
|
|
|
|
|
|
|
/**Returns whether the frame is empty
|
|
|
|
* @returns true if frame is empty
|
|
|
|
* @note added in QGIS 2.5
|
|
|
|
* @see hidePageIfEmpty
|
|
|
|
*/
|
|
|
|
bool isEmpty() const;
|
2014-09-17 21:52:19 +10:00
|
|
|
|
2014-05-27 23:22:50 +02:00
|
|
|
};
|