add a missing bit of obvious api.
svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=666798
This commit is contained in:
parent
48db336a07
commit
f88f9ed076
9
svg.cpp
9
svg.cpp
@ -128,7 +128,7 @@ Svg::Svg( const QString& imagePath, QObject* parent )
|
||||
: QObject( parent ),
|
||||
d( new Private( imagePath ) )
|
||||
{
|
||||
connect( Plasma::Theme::self(), SIGNAL(changed()), this, SLOT(themeChanged()) );
|
||||
connect(Plasma::Theme::self(), SIGNAL(changed()), this, SLOT(themeChanged()));
|
||||
}
|
||||
|
||||
Svg::~Svg()
|
||||
@ -181,7 +181,12 @@ QSize Svg::elementSize(const QString& elementId)
|
||||
qreal dy = d->size.height() / naturalSize.height();
|
||||
elementSize.scale( elementSize.width() * dx, elementSize.height() * dy, Qt::IgnoreAspectRatio );
|
||||
|
||||
return elementSize.toSize();;
|
||||
return elementSize.toSize();
|
||||
}
|
||||
|
||||
QSize Svg::size()
|
||||
{
|
||||
return d->size.toSize();
|
||||
}
|
||||
|
||||
void Svg::themeChanged()
|
||||
|
7
svg.h
7
svg.h
@ -115,6 +115,13 @@ class PLASMA_EXPORT Svg : public QObject
|
||||
**/
|
||||
QSize elementSize( const QString& elementId );
|
||||
|
||||
/**
|
||||
* Currently set size of the SVG
|
||||
* @arg elementId the id of the element to check
|
||||
* @return the current size of a given element
|
||||
**/
|
||||
QSize size();
|
||||
|
||||
Q_SIGNALS:
|
||||
void repaintNeeded();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user