|
| 1 | +/*************************************************************************** |
| 2 | + qgscomposerframe.h |
| 3 | + ------------------------------------------------------------ |
| 4 | + begin : July 2012 |
| 5 | + copyright : (C) 2012 by Marco Hugentobler |
| 6 | + email : marco dot hugentobler at sourcepole dot ch |
| 7 | + *************************************************************************** |
| 8 | + * * |
| 9 | + * This program is free software; you can redistribute it and/or modify * |
| 10 | + * it under the terms of the GNU General Public License as published by * |
| 11 | + * the Free Software Foundation; either version 2 of the License, or * |
| 12 | + * (at your option) any later version. * |
| 13 | + * * |
| 14 | + ***************************************************************************/ |
| 15 | + |
| 16 | +#ifndef QGSCOMPOSERFRAME_H |
| 17 | +#define QGSCOMPOSERFRAME_H |
| 18 | + |
| 19 | +#include "qgscomposeritem.h" |
| 20 | + |
| 21 | +class QgsComposition; |
| 22 | +class QgsComposerMultiFrame; |
| 23 | + |
| 24 | +/**Frame for html, table, text which can be divided onto several frames*/ |
| 25 | +class QgsComposerFrame: public QgsComposerItem |
| 26 | +{ |
| 27 | + public: |
| 28 | + QgsComposerFrame( QgsComposition* c, QgsComposerMultiFrame* mf ); |
| 29 | + ~QgsComposerFrame(); |
| 30 | + |
| 31 | + /**Sets the part of this frame (relative to the total multiframe extent in mm)*/ |
| 32 | + void setContentSection( const QRectF& section ) { mSection = section; } |
| 33 | + |
| 34 | + void paint( QPainter* painter, const QStyleOptionGraphicsItem* itemStyle, QWidget* pWidget ); |
| 35 | + |
| 36 | + bool writeXML( QDomElement& elem, QDomDocument & doc ) const; |
| 37 | + bool readXML( const QDomElement& itemElem, const QDomDocument& doc ); |
| 38 | + |
| 39 | + private: |
| 40 | + QgsComposerFrame(); //forbidden |
| 41 | + |
| 42 | + QgsComposition* mComposition; |
| 43 | + QgsComposerMultiFrame* mMultiFrame; |
| 44 | + QRectF mSection; |
| 45 | +}; |
| 46 | + |
| 47 | +#endif // QGSCOMPOSERFRAME_H |
0 commit comments