Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F16570674
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
5 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/akonadi/entitydisplayattribute.cpp b/akonadi/entitydisplayattribute.cpp
index 572a3ae32..4e51478a1 100644
--- a/akonadi/entitydisplayattribute.cpp
+++ b/akonadi/entitydisplayattribute.cpp
@@ -1,98 +1,98 @@
/*
Copyright (c) 2008 Volker Krause <vkrause@kde.org>
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
*/
#include "entitydisplayattribute.h"
#include "imapparser_p.h"
#include <KIcon>
using namespace Akonadi;
class EntityDisplayAttribute::Private
{
public:
QString name;
QString icon;
};
EntityDisplayAttribute::EntityDisplayAttribute() :
d( new Private )
{
}
EntityDisplayAttribute::~ EntityDisplayAttribute()
{
delete d;
}
QString EntityDisplayAttribute::displayName() const
{
return d->name;
}
void EntityDisplayAttribute::setDisplayName(const QString & name)
{
d->name = name;
}
KIcon EntityDisplayAttribute::icon() const
{
return KIcon( d->icon );
}
QString EntityDisplayAttribute::iconName() const
{
return d->icon;
}
void EntityDisplayAttribute::setIconName(const QString & icon)
{
d->icon = icon;
}
QByteArray Akonadi::EntityDisplayAttribute::type() const
{
- return "COLDISPLAY";
+ return "ENTITYDISPLAY";
}
EntityDisplayAttribute * EntityDisplayAttribute::clone() const
{
EntityDisplayAttribute *attr = new EntityDisplayAttribute();
attr->d->name = d->name;
attr->d->icon = d->icon;
return attr;
}
QByteArray EntityDisplayAttribute::serialized() const
{
QList<QByteArray> l;
l << ImapParser::quote( d->name.toUtf8() );
l << ImapParser::quote( d->icon.toUtf8() );
return '(' + ImapParser::join( l, " " ) + ')';
}
void EntityDisplayAttribute::deserialize(const QByteArray &data)
{
QList<QByteArray> l;
ImapParser::parseParenthesizedList( data, l );
Q_ASSERT( l.count() >= 2 );
d->name = QString::fromUtf8( l[0] );
d->icon = QString::fromUtf8( l[1] );
}
diff --git a/akonadi/entitydisplayattribute.h b/akonadi/entitydisplayattribute.h
index 2f8e0ebbe..1abb20f80 100644
--- a/akonadi/entitydisplayattribute.h
+++ b/akonadi/entitydisplayattribute.h
@@ -1,88 +1,88 @@
/*
Copyright (c) 2008 Volker Krause <vkrause@kde.org>
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
*/
#ifndef AKONADI_ENTITIYDISPLAYATTRIBUTE_H
#define AKONADI_ENTITIYDISPLAYATTRIBUTE_H
#include <akonadi/attribute.h>
class KIcon;
namespace Akonadi {
/**
- * Display properties of a collection, such as translated names and icons.
- * @todo add active icon, eg. when folder contains unread mail
+ * Display properties of a collection or item, such as translated names and icons.
+ * @todo add active icon, eg. when folder contains unread mail, or a mail is unread
* @since 4.2
*/
class AKONADI_EXPORT EntityDisplayAttribute : public Attribute
{
public:
/**
- * Creates a new collection display attribute.
+ * Creates a new entity display attribute.
*/
EntityDisplayAttribute();
/**
* Destructor.
*/
~EntityDisplayAttribute();
/**
* Returns the name that should be used for display.
- * Fall back to Collection::name() if this is empty.
+ * Users of this should fall back to Collection::name() if this is empty.
*/
QString displayName() const;
/**
* Set the display name.
*/
void setDisplayName( const QString &name );
/**
- * Returns the icon that should be used for this collection.
+ * Returns the icon that should be used for this collection or item.
*/
KIcon icon() const;
/**
* Returns the icon name of the icon returned by icon().
*/
QString iconName() const;
/**
- * Set the icon name for the collections default icon.
+ * Set the icon name for the default icon.
*/
void setIconName( const QString &icon );
/* reimpl */
QByteArray type() const;
EntityDisplayAttribute* clone() const;
QByteArray serialized() const;
void deserialize( const QByteArray &data );
private:
//@cond PRIVATE
class Private;
Private* const d;
//@endcond
};
}
#endif
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Fri, Nov 1, 9:32 AM (1 d, 17 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
10075950
Default Alt Text
(5 KB)
Attached To
Mode
rKPL kdepimlibs
Attached
Detach File
Event Timeline
Log In to Comment