Added labelRect function to meter to allow applets to create correctly elided text.
svn path=/trunk/KDE/kdelibs/; revision=881275
This commit is contained in:
parent
4de7d13a16
commit
4cb5e7857c
@ -281,6 +281,12 @@ Qt::Alignment Meter::labelAlignment(int index) const
|
||||
return d->alignments[index];
|
||||
}
|
||||
|
||||
QRectF Meter::labelRect(int index) const
|
||||
{
|
||||
QString elementID = QString("label%1").arg(index);
|
||||
return d->image->elementRect(elementID);
|
||||
}
|
||||
|
||||
void Meter::dataUpdated(const QString &sourceName, const Plasma::DataEngine::Data &data)
|
||||
{
|
||||
Q_UNUSED(sourceName)
|
||||
|
@ -189,6 +189,12 @@ public:
|
||||
*/
|
||||
Qt::Alignment labelAlignment(int index) const;
|
||||
|
||||
/**
|
||||
* @param index label index
|
||||
* @return the size of this label.
|
||||
*/
|
||||
QRectF labelRect(int index) const;
|
||||
|
||||
public Q_SLOTS:
|
||||
/**
|
||||
* Used when connecting to a DataEngine
|
||||
|
Loading…
x
Reference in New Issue
Block a user