Attica

folder.cpp
1 /*
2  This file is part of KDE.
3 
4  SPDX-FileCopyrightText: 2008 Cornelius Schumacher <[email protected]>
5 
6  SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
7 */
8 
9 #include "folder.h"
10 
11 using namespace Attica;
12 
13 class Q_DECL_HIDDEN Folder::Private : public QSharedData
14 {
15 public:
16  QString m_id;
17  QString m_name;
18  int m_messageCount;
19  QString m_type;
20 
21  Private()
22  : m_messageCount(0)
23  {
24  }
25 };
26 
28  : d(new Private)
29 {
30 }
31 
32 Folder::Folder(const Folder &other)
33  : d(other.d)
34 {
35 }
36 
38 {
39  d = other.d;
40  return *this;
41 }
42 
44 {
45 }
46 
47 void Folder::setId(const QString &u)
48 {
49  d->m_id = u;
50 }
51 
53 {
54  return d->m_id;
55 }
56 
57 void Folder::setName(const QString &name)
58 {
59  d->m_name = name;
60 }
61 
63 {
64  return d->m_name;
65 }
66 
68 {
69  d->m_messageCount = c;
70 }
71 
73 {
74  return d->m_messageCount;
75 }
76 
77 void Folder::setType(const QString &v)
78 {
79  d->m_type = v;
80 }
81 
83 {
84  return d->m_type;
85 }
86 
87 bool Folder::isValid() const
88 {
89  return !(d->m_id.isEmpty());
90 }
void setType(const QString &type)
Sets the type of the folder.
Definition: folder.cpp:77
int messageCount() const
Gets the number of messages in the Folder.
Definition: folder.cpp:72
QString id() const
Gets the id of the Folder.
Definition: folder.cpp:52
void setName(const QString &name)
Sets the name of the Folder.
Definition: folder.cpp:57
QString name() const
Gets the name of the Folder.
Definition: folder.cpp:62
Folder & operator=(const Folder &other)
Assignment operator.
Definition: folder.cpp:37
~Folder()
Destructor.
Definition: folder.cpp:43
bool isValid() const
Checks whether this Folder has an id.
Definition: folder.cpp:87
void setMessageCount(int messageCount)
Sets the number of messages in the Folder.
Definition: folder.cpp:67
Folder()
Creates an empty Folder.
Definition: folder.cpp:27
void setId(const QString &id)
Sets the id of the Folder.
Definition: folder.cpp:47
The Attica namespace,.
QString type() const
Gets the type of the Folder.
Definition: folder.cpp:82
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Dec 11 2023 04:05:13 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.