2009-02-27 13:57:26 +00:00
|
|
|
/** \ingroup MapComposer
|
|
|
|
* A composer class that displays svg files or raster format (jpg, png, ...)
|
|
|
|
* */
|
|
|
|
class QgsComposerPicture: QObject, QgsComposerItem
|
|
|
|
{
|
|
|
|
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgscomposerpicture.h"
|
|
|
|
%End
|
|
|
|
|
|
|
|
public:
|
2009-02-28 14:35:45 +00:00
|
|
|
QgsComposerPicture( QgsComposition *composition /TransferThis/);
|
2009-02-27 13:57:26 +00:00
|
|
|
~QgsComposerPicture();
|
|
|
|
|
|
|
|
/**Reimplementation of QCanvasItem::paint*/
|
|
|
|
void paint( QPainter* painter, const QStyleOptionGraphicsItem* itemStyle, QWidget* pWidget );
|
|
|
|
|
|
|
|
/**Sets the source file of the image (may be svg or a raster format)*/
|
|
|
|
void setPictureFile( const QString& path );
|
|
|
|
QString pictureFile() const;
|
|
|
|
|
|
|
|
/**Sets this items bound in scene coordinates such that 1 item size units
|
|
|
|
corresponds to 1 scene size unit*/
|
|
|
|
void setSceneRect( const QRectF& rectangle );
|
|
|
|
|
|
|
|
void setRotation( double rotation );
|
|
|
|
|
|
|
|
double rotation() const;
|
|
|
|
|
|
|
|
/** stores state in Dom node
|
|
|
|
* @param node is Dom node corresponding to 'Composer' tag
|
|
|
|
* @param temp write template file
|
|
|
|
*/
|
|
|
|
bool writeXML( QDomElement& elem, QDomDocument & doc ) const;
|
|
|
|
|
|
|
|
/** sets state from Dom document
|
|
|
|
* @param itemElem is Dom node corresponding to item tag
|
|
|
|
*/
|
|
|
|
bool readXML( const QDomElement& itemElem, const QDomDocument& doc );
|
|
|
|
|
|
|
|
signals:
|
|
|
|
/**Tell the configuration widget that the settings need to be updated*/
|
|
|
|
void settingsChanged();
|
2009-02-28 14:35:45 +00:00
|
|
|
};
|