Akonadi

core/agenttype.cpp
1 /*
2  SPDX-FileCopyrightText: 2008 Tobias Koenig <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #include "agenttype.h"
8 #include "agenttype_p.h"
9 
10 #include <QIcon>
11 
12 using namespace Akonadi;
13 
15  : d(new Private)
16 {
17 }
18 
20  : d(other.d)
21 {
22 }
23 
25 {
26 }
27 
28 bool AgentType::isValid() const
29 {
30  return !d->mIdentifier.isEmpty();
31 }
32 
34 {
35  return d->mIdentifier;
36 }
37 
39 {
40  return d->mName;
41 }
42 
44 {
45  return d->mDescription;
46 }
47 
49 {
50  return d->mIconName;
51 }
52 
54 {
55  return QIcon::fromTheme(d->mIconName);
56 }
57 
59 {
60  return d->mMimeTypes;
61 }
62 
64 {
65  return d->mCapabilities;
66 }
67 
69 {
70  return d->mCustomProperties;
71 }
72 
74 {
75  if (this != &other) {
76  d = other.d;
77  }
78 
79  return *this;
80 }
81 
82 bool AgentType::operator==(const AgentType &other) const
83 {
84  return (d->mIdentifier == other.d->mIdentifier);
85 }
QIcon icon() const
Returns the icon of the agent type.
QString description() const
Returns the description of the agent type.
QString name() const
Returns the i18n&#39;ed name of the agent type.
bool isValid() const
Returns whether the agent type is valid.
QString identifier() const
Returns the unique identifier of the agent type.
A representation of an agent type.
QStringList mimeTypes() const
Returns the list of supported mime types of the agent type.
QStringList capabilities() const
Returns the list of supported capabilities of the agent type.
QVariantMap customProperties() const
Returns a Map of custom properties of the agent type.
AgentType()
Creates a new agent type.
~AgentType()
Destroys the agent type.
AgentType & operator=(const AgentType &other)
Helper integration between Akonadi and Qt.
QString iconName() const
Returns the name of the icon of the agent type.
QIcon fromTheme(const QString &name)
bool operator==(const AgentType &other) const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Fri Nov 27 2020 23:19:00 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.