get rid of elementAtPoint()
was a stub, never implemented because qtsvg doesn't support it (and never will)
This commit is contained in:
parent
54549d8312
commit
60565dafcb
@ -754,24 +754,6 @@ bool Svg::hasElement(const QString &elementId) const
|
||||
return d->elementRect(elementId).isValid();
|
||||
}
|
||||
|
||||
QString Svg::elementAtPoint(const QPoint &point) const
|
||||
{
|
||||
Q_UNUSED(point)
|
||||
|
||||
return QString();
|
||||
/*
|
||||
FIXME: implement when Qt can support us!
|
||||
d->createRenderer();
|
||||
QSizeF naturalSize = d->renderer->defaultSize();
|
||||
qreal dx = d->size.width() / naturalSize.width();
|
||||
qreal dy = d->size.height() / naturalSize.height();
|
||||
//qDebug() << point << "is really"
|
||||
// << QPoint(point.x() *dx, naturalSize.height() - point.y() * dy);
|
||||
|
||||
return QString(); // d->renderer->elementAtPoint(QPoint(point.x() *dx, naturalSize.height() - point.y() * dy));
|
||||
*/
|
||||
}
|
||||
|
||||
bool Svg::isValid() const
|
||||
{
|
||||
if (d->path.isNull() && d->themePath.isNull()) {
|
||||
|
@ -235,18 +235,6 @@ class PLASMA_EXPORT Svg : public QObject
|
||||
**/
|
||||
Q_INVOKABLE bool hasElement(const QString &elementId) const;
|
||||
|
||||
/**
|
||||
* Returns the element (by id) at the given point.
|
||||
*
|
||||
* An empty string is returned if there no element is at @p point.
|
||||
*
|
||||
* NOTE: not implemented! This will currently return an empty string!
|
||||
*
|
||||
* @param point a point in SVG co-ordinates
|
||||
* @return an empty string
|
||||
*/
|
||||
Q_INVOKABLE QString elementAtPoint(const QPoint &point) const;
|
||||
|
||||
/**
|
||||
* Check whether this object is backed by a valid SVG file.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user