QGIS API Documentation  master-3f58142
src/gui/qgssvgannotationitem.h
Go to the documentation of this file.
00001 /***************************************************************************
00002                               qgssvgannotationitem.h
00003                               ------------------------
00004   begin                : November, 2012
00005   copyright            : (C) 2012 by Marco Hugentobler
00006   email                : marco dot hugentobler at sourcepole dot ch
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef QGSSVGANNOTATIONITEM_H
00019 #define QGSSVGANNOTATIONITEM_H
00020 
00021 #include "qgsannotationitem.h"
00022 #include <QSvgRenderer>
00023 
00024 class GUI_EXPORT QgsSvgAnnotationItem: public QgsAnnotationItem
00025 {
00026   public:
00027 
00028     QgsSvgAnnotationItem( QgsMapCanvas* canvas );
00029     ~QgsSvgAnnotationItem();
00030 
00031     void writeXML( QDomDocument& doc ) const;
00032     void readXML( const QDomDocument& doc, const QDomElement& itemElem );
00033 
00034     void paint( QPainter* painter );
00035 
00036     void setFilePath( const QString& file );
00037     QString filePath() const { return mFilePath; }
00038 
00039   private:
00040     QSvgRenderer mSvgRenderer;
00041     QString mFilePath;
00042 };
00043 
00044 #endif // QGSSVGANNOTATIONITEM_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines