constification.
svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=667619
This commit is contained in:
parent
19169e84ea
commit
dacd91f859
@ -85,12 +85,12 @@ DataEngine::~DataEngine()
|
|||||||
delete d;
|
delete d;
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList DataEngine::dataSources()
|
QStringList DataEngine::dataSources() const
|
||||||
{
|
{
|
||||||
return d->sources.keys();
|
return d->sources.keys();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DataEngine::connectSource(const QString& source, QObject* visualization)
|
void DataEngine::connectSource(const QString& source, QObject* visualization) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(source)
|
Q_UNUSED(source)
|
||||||
Q_UNUSED(visualization)
|
Q_UNUSED(visualization)
|
||||||
@ -100,7 +100,7 @@ void DataEngine::connectSource(const QString& source, QObject* visualization)
|
|||||||
visualization, SLOT(updated(QString,Plasma::DataEngine::Data)));
|
visualization, SLOT(updated(QString,Plasma::DataEngine::Data)));
|
||||||
}
|
}
|
||||||
|
|
||||||
DataEngine::Data DataEngine::query(const QString& source)
|
DataEngine::Data DataEngine::query(const QString& source) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(source)
|
Q_UNUSED(source)
|
||||||
|
|
||||||
@ -180,7 +180,7 @@ void DataEngine::deref()
|
|||||||
d->ref.deref();
|
d->ref.deref();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DataEngine::isUsed()
|
bool DataEngine::isUsed() const
|
||||||
{
|
{
|
||||||
return d->ref != 0;
|
return d->ref != 0;
|
||||||
}
|
}
|
||||||
@ -190,7 +190,7 @@ void DataEngine::setIcon(const QString& icon)
|
|||||||
d->icon = icon;
|
d->icon = icon;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString DataEngine::icon()
|
QString DataEngine::icon() const
|
||||||
{
|
{
|
||||||
return d->icon;
|
return d->icon;
|
||||||
}
|
}
|
||||||
|
11
dataengine.h
11
dataengine.h
@ -66,7 +66,7 @@ class PLASMA_EXPORT DataEngine : public QObject
|
|||||||
* @return a list of all the data sources currently available via this
|
* @return a list of all the data sources currently available via this
|
||||||
* DataEngine
|
* DataEngine
|
||||||
**/
|
**/
|
||||||
virtual QStringList dataSources();
|
virtual QStringList dataSources() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Connects a source to an object for data updates. The object must
|
* Connects a source to an object for data updates. The object must
|
||||||
@ -80,7 +80,7 @@ class PLASMA_EXPORT DataEngine : public QObject
|
|||||||
* @param source the name of the data source
|
* @param source the name of the data source
|
||||||
* @param visualization the object to connect the data source to
|
* @param visualization the object to connect the data source to
|
||||||
**/
|
**/
|
||||||
void connectSource(const QString& source, QObject* visualization);
|
void connectSource(const QString& source, QObject* visualization) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the Data associated with a data source.
|
* Gets the Data associated with a data source.
|
||||||
@ -92,7 +92,7 @@ class PLASMA_EXPORT DataEngine : public QObject
|
|||||||
* @return the Data associated with the source; if the source doesn't
|
* @return the Data associated with the source; if the source doesn't
|
||||||
* exist an empty data set is returned
|
* exist an empty data set is returned
|
||||||
**/
|
**/
|
||||||
Data query(const QString& source);
|
Data query(const QString& source) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reference counting method. Calling this method increases the count
|
* Reference counting method. Calling this method increases the count
|
||||||
@ -111,7 +111,7 @@ class PLASMA_EXPORT DataEngine : public QObject
|
|||||||
* used.
|
* used.
|
||||||
* @return true if the reference count is zero
|
* @return true if the reference count is zero
|
||||||
**/
|
**/
|
||||||
bool isUsed();
|
bool isUsed() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the icon for this data engine
|
* Sets the icon for this data engine
|
||||||
@ -122,7 +122,8 @@ class PLASMA_EXPORT DataEngine : public QObject
|
|||||||
* @return the name of the icon for this data engine; and empty string
|
* @return the name of the icon for this data engine; and empty string
|
||||||
* is returned if there is no associated icon.
|
* is returned if there is no associated icon.
|
||||||
**/
|
**/
|
||||||
QString icon();
|
QString icon() const;
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
/**
|
/**
|
||||||
* Emitted when a new data source is created
|
* Emitted when a new data source is created
|
||||||
|
Loading…
Reference in New Issue
Block a user