|
Quantum GIS API Documentation
master-ce49b66
|
00001 /*************************************************************************** 00002 qgscomposerframe.h 00003 ------------------------------------------------------------ 00004 begin : July 2012 00005 copyright : (C) 2012 by Marco Hugentobler 00006 email : marco dot hugentobler at sourcepole dot ch 00007 *************************************************************************** 00008 * * 00009 * This program is free software; you can redistribute it and/or modify * 00010 * it under the terms of the GNU General Public License as published by * 00011 * the Free Software Foundation; either version 2 of the License, or * 00012 * (at your option) any later version. * 00013 * * 00014 ***************************************************************************/ 00015 00016 #ifndef QGSCOMPOSERFRAME_H 00017 #define QGSCOMPOSERFRAME_H 00018 00019 #include "qgscomposeritem.h" 00020 00021 class QgsComposition; 00022 class QgsComposerMultiFrame; 00023 00025 class CORE_EXPORT QgsComposerFrame: public QgsComposerItem 00026 { 00027 public: 00028 QgsComposerFrame( QgsComposition* c, QgsComposerMultiFrame* mf, qreal x, qreal y, qreal width, qreal height ); 00029 ~QgsComposerFrame(); 00030 00032 void setContentSection( const QRectF& section ) { mSection = section; } 00033 00034 void paint( QPainter* painter, const QStyleOptionGraphicsItem* itemStyle, QWidget* pWidget ); 00035 00036 void beginItemCommand( const QString& text ); 00037 void endItemCommand(); 00038 00039 bool writeXML( QDomElement& elem, QDomDocument & doc ) const; 00040 bool readXML( const QDomElement& itemElem, const QDomDocument& doc ); 00041 00042 int type() const { return ComposerFrame; } 00043 00044 QgsComposerMultiFrame* multiFrame() const { return mMultiFrame; } 00045 00046 00047 private: 00048 QgsComposerFrame(); //forbidden 00049 QgsComposerMultiFrame* mMultiFrame; 00050 QRectF mSection; 00051 }; 00052 00053 #endif // QGSCOMPOSERFRAME_H