file() and setFile() -> imagePath() and setImagePath()

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=797772
This commit is contained in:
Marco Martin 2008-04-16 20:48:53 +00:00
parent b08e8ae782
commit f522c38eeb
4 changed files with 9 additions and 9 deletions

View File

@ -90,17 +90,17 @@ PanelSvg::~PanelSvg()
void PanelSvg::setImagePath(const QString& imagePath)
{
if (imagePath == d->background->file()) {
if (imagePath == d->background->imagePath()) {
return;
}
d->background->setFile(imagePath);
d->background->setImagePath(imagePath);
setElementPrefix(prefix());
}
QString PanelSvg::imagePath() const
{
return d->background->file();
return d->background->imagePath();
}
void PanelSvg::setEnabledBorders(const EnabledBorders borders)

View File

@ -453,13 +453,13 @@ Svg::ContentType Svg::contentType()
return d->contentType;
}
void Svg::setFile(const QString &svgFilePath)
void Svg::setImagePath(const QString &svgFilePath)
{
d->setImagePath(svgFilePath, this);
d->eraseRenderer();
}
QString Svg::file() const
QString Svg::imagePath() const
{
return d->themed ? d->themePath : d->path;
}

6
svg.h
View File

@ -50,7 +50,7 @@ class PLASMA_EXPORT Svg : public QObject
Q_ENUMS( ContentType )
Q_PROPERTY( QSize size READ size )
Q_PROPERTY( ContentType contentType READ contentType WRITE setContentType )
Q_PROPERTY( QString file READ file WRITE setFile )
Q_PROPERTY( QString filePath READ imagePath WRITE setImagePath )
public:
/**
@ -196,13 +196,13 @@ class PLASMA_EXPORT Svg : public QObject
* Convenience method for setting the svg file to use for the Svg.
* @arg svgFilePath the filepath including name of the svg.
*/
void setFile(const QString &svgFilePath);
void setImagePath(const QString &svgFilePath);
/**
* Convenience method to get the svg filepath and name of svg.
* @return the svg's filepath including name of the svg.
*/
QString file() const;
QString imagePath() const;
Q_SIGNALS:
void repaintNeeded();

View File

@ -473,7 +473,7 @@ void Icon::setSvg(const QString &svgFilePath, const QString &elementId)
if (!d->iconSvg) {
d->iconSvg = new Plasma::Svg(svgFilePath);
} else {
d->iconSvg->setFile(svgFilePath);
d->iconSvg->setImagePath(svgFilePath);
}
d->iconSvgElement = elementId;