akonadi
Akonadi::CollectionQuotaAttribute Class Reference
Attribute that provides quota information for a collection. More...
#include <collectionquotaattribute.h>

Public Member Functions | |
CollectionQuotaAttribute () | |
CollectionQuotaAttribute (qint64 currentValue, qint64 maxValue) | |
~CollectionQuotaAttribute () | |
virtual Attribute * | clone () const |
qint64 | currentValue () const |
virtual void | deserialize (const QByteArray &data) |
qint64 | maximumValue () const |
virtual QByteArray | serialized () const |
void | setCurrentValue (qint64 value) |
void | setMaximumValue (qint64 value) |
virtual QByteArray | type () const |
Detailed Description
Attribute that provides quota information for a collection.
This attribute class provides quota information (e.g. current fill value and maximum fill value) for an Akonadi collection.
Example:
using namespace Akonadi; const Collection collection = collectionFetchJob->collections().first(); if ( collection.hasAttribute<CollectionQuotaAttribute>() ) { const CollectionQuotaAttribute *attribute = collection.attribute<CollectionQuotaAttribute>(); qDebug() << "current value" << attribute->currentValue(); }
- Since:
- 4.4
Definition at line 50 of file collectionquotaattribute.h.
Constructor & Destructor Documentation
Akonadi::CollectionQuotaAttribute::CollectionQuotaAttribute | ( | ) |
Creates a new collection quota attribute.
Akonadi::CollectionQuotaAttribute::CollectionQuotaAttribute | ( | qint64 | currentValue, | |
qint64 | maxValue | |||
) |
Creates a new collection quota attribute with initial values.
- Parameters:
-
currentValue The current quota value in bytes. maxValue The maximum quota value in bytes.
Akonadi::CollectionQuotaAttribute::~CollectionQuotaAttribute | ( | ) |
Destroys the collection quota attribute.
Member Function Documentation
virtual Attribute* Akonadi::CollectionQuotaAttribute::clone | ( | ) | const [virtual] |
Creates a copy of this attribute.
Implements Akonadi::Attribute.
qint64 Akonadi::CollectionQuotaAttribute::currentValue | ( | ) | const |
Returns the current quota value in bytes.
virtual void Akonadi::CollectionQuotaAttribute::deserialize | ( | const QByteArray & | data | ) | [virtual] |
Sets the data of this attribute, using the same encoding as returned by toByteArray().
- Parameters:
-
data The encoded attribute data.
Implements Akonadi::Attribute.
qint64 Akonadi::CollectionQuotaAttribute::maximumValue | ( | ) | const |
Returns the maximum quota value in bytes.
virtual QByteArray Akonadi::CollectionQuotaAttribute::serialized | ( | ) | const [virtual] |
Returns a QByteArray representation of the attribute which will be storaged.
This can be raw binary data, no encoding needs to be applied.
Implements Akonadi::Attribute.
void Akonadi::CollectionQuotaAttribute::setCurrentValue | ( | qint64 | value | ) |
Sets the current quota value
for the collection.
- Parameters:
-
value The current quota value in bytes.
void Akonadi::CollectionQuotaAttribute::setMaximumValue | ( | qint64 | value | ) |
Sets the maximum quota value
for the collection.
- Parameters:
-
value The maximum quota value in bytes.
virtual QByteArray Akonadi::CollectionQuotaAttribute::type | ( | ) | const [virtual] |
Returns the type of the attribute.
Implements Akonadi::Attribute.
The documentation for this class was generated from the following file: