// Copyright 2009 Simon Edwards <simon@simonzone.com>

//                 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 <FrameGraphicsItem.h>
%End

public:
    enum FrameType
    {
        NoFrame,
        RectFrame,
        RoundedRectFrame,
        ShadowFrame
    };
    explicit                FrameGraphicsItem (Marble::MarbleGraphicsItem* parent = 0);
    virtual ~FrameGraphicsItem ();
    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);
    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                  paintedRect () const;
    QRectF                  contentRect () const;
    QSizeF                  contentSize () const;
    void                    setContentSize (const QSizeF& size);
protected:
    virtual QPainterPath    backgroundShape () const;
public:
    Marble::FrameGraphicsItem::FrameType  frame () const;
protected:
    virtual void            paint (QPainter* painter);
    virtual void            paintContent (QPainter* painter);
    virtual void            paintBackground (QPainter* painter);
};
};
