DataEngine::isEmpty() for shawn

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=738136
This commit is contained in:
Aaron J. Seigo 2007-11-18 01:32:11 +00:00
parent 3af857e265
commit bf7580d942
2 changed files with 11 additions and 0 deletions

View File

@ -425,6 +425,11 @@ bool DataEngine::isValid() const
return d->valid; return d->valid;
} }
bool DataEngine::isEmpty() const
{
return d->sources.count() > 0;
}
void DataEngine::setValid(bool valid) void DataEngine::setValid(bool valid)
{ {
d->valid = valid; d->valid = valid;

View File

@ -181,6 +181,12 @@ class PLASMA_EXPORT DataEngine : public QObject
**/ **/
bool isValid() const; bool isValid() const;
/**
* Returns true if the data engine is empty, which is to say that it has no
* data sources currently.
*/
bool isEmpty() const;
/** /**
* Sets the icon for this data engine * Sets the icon for this data engine
**/ **/