enabledBorders property for FrameSvg enabled borders flags

svn path=/trunk/KDE/kdebase/runtime/; revision=1193395
This commit is contained in:
Marco Martin 2010-11-05 20:50:28 +00:00
parent 54daa3153d
commit 5d24d5759c
2 changed files with 19 additions and 1 deletions

View File

@ -22,7 +22,7 @@
#include <QtGui/QPainter>
#include "kdebug.h"
#include "plasma/framesvg.h"
namespace Plasma
{
@ -96,6 +96,16 @@ FrameSvgItemMargins *FrameSvgItem::margins() const
return m_margins;
}
void FrameSvgItem::setEnabledBorders(const Plasma::FrameSvg::EnabledBorders borders)
{
m_frameSvg->setEnabledBorders(borders);
}
Plasma::FrameSvg::EnabledBorders FrameSvgItem::enabledBorders() const
{
return m_frameSvg->enabledBorders();
}
void FrameSvgItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{
Q_UNUSED(option);

View File

@ -21,6 +21,8 @@
#include <QDeclarativeItem>
#include <Plasma/FrameSvg>
namespace Plasma {
class FrameSvg;
@ -57,6 +59,9 @@ class FrameSvgItem : public QDeclarativeItem
Q_PROPERTY(QString prefix READ prefix WRITE setPrefix)
Q_PROPERTY(QObject *margins READ margins CONSTANT)
Q_FLAGS(Plasma::FrameSvg::EnabledBorders)
Q_PROPERTY(Plasma::FrameSvg::EnabledBorders enabledBorders READ enabledBorders WRITE setEnabledBorders)
public:
FrameSvgItem(QDeclarativeItem *parent=0);
~FrameSvgItem();
@ -67,6 +72,9 @@ public:
void setPrefix(const QString &prefix);
QString prefix() const;
void setEnabledBorders(const Plasma::FrameSvg::EnabledBorders borders);
Plasma::FrameSvg::EnabledBorders enabledBorders() const;
FrameSvgItemMargins *margins() const;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);