// Copyright 2009 Simon Edwards // Generated by twine2 // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU Library General Public License as // published by the Free Software Foundation; either version 2, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details // You should have received a copy of the GNU Library General Public // License along with this program; if not, write to the // Free Software Foundation, Inc., // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. namespace Marble { class FrameGraphicsItem : Marble::ScreenGraphicsItem { %TypeHeaderCode #include %End public: enum FrameType { NoFrame, RectFrame, RoundedRectFrame }; explicit FrameGraphicsItem (Marble::MarbleGraphicsItem* parent = 0); FrameGraphicsItem (const QPointF& position, const QSizeF& size, Marble::MarbleGraphicsItem* parent = 0); virtual ~FrameGraphicsItem (); Marble::FrameGraphicsItem::FrameType frame (); void setFrame (Marble::FrameGraphicsItem::FrameType type); qreal margin () const; void setMargin (qreal margin); qreal marginTop () const; void setMarginTop (qreal marginTop); qreal marginBottom () const; void setMarginBottom (qreal marginBottom); qreal marginLeft () const; void setMarginLeft (qreal marginLeft); qreal marginRight () const; void setMarginRight (qreal marginRight); qreal borderWidth () const; void setBorderWidth (qreal width); qreal padding () const; void setPadding (qreal width); //ig qreal border () const; //ig void setBorder (qreal width); QBrush borderBrush () const; void setBorderBrush (const QBrush& brush); Qt::PenStyle borderStyle () const; void setBorderStyle (Qt::PenStyle style); QBrush background () const; void setBackground (const QBrush& background); QRectF contentRect (const QPointF& position) const; QRectF paintedRect (const QPointF& position = QPointF(0.0,0.0)) const; QRectF contentRect () const; QSizeF contentSize () const; void setContentSize (const QSizeF& size); protected: virtual QPainterPath backgroundShape () const; virtual void paint (Marble::GeoPainter* painter, Marble::ViewportParams* viewport, const QString& renderPos, Marble::GeoSceneLayer* layer = 0); virtual void paintContent (Marble::GeoPainter* painter, Marble::ViewportParams* viewport, const QString& renderPos, Marble::GeoSceneLayer* layer = 0); virtual void paintBackground (Marble::GeoPainter* painter); }; };