expose hasElementPrefix() method

This commit is contained in:
Marco Martin 2014-03-04 18:13:46 +01:00
parent a0aa88f00d
commit b388a0d76b
2 changed files with 12 additions and 0 deletions

View File

@ -198,6 +198,11 @@ Plasma::FrameSvg::EnabledBorders FrameSvgItem::enabledBorders() const
return m_frameSvg->enabledBorders();
}
bool FrameSvgItem::hasElementPrefix(const QString &prefix) const
{
return m_frameSvg->hasElementPrefix(prefix);
}
void FrameSvgItem::paint(QPainter *painter)
{
m_frameSvg->paintFrame(painter);

View File

@ -157,6 +157,13 @@ public:
*/
Plasma::FrameSvg *frameSvg() const;
/**
* @return true if the svg has the necessary elements with the given prefix
* to draw a frame
* @param prefix the given prefix we want to check if drawable
*/
Q_INVOKABLE bool hasElementPrefix(const QString & prefix) const;
protected:
virtual void componentComplete();