Attica

folder.cpp
1/*
2 This file is part of KDE.
3
4 SPDX-FileCopyrightText: 2008 Cornelius Schumacher <schumacher@kde.org>
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
11using namespace Attica;
12
13class Q_DECL_HIDDEN Folder::Private : public QSharedData
14{
15public:
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
33 : d(other.d)
34{
35}
36
38{
39 d = other.d;
40 return *this;
41}
42
46
47void Folder::setId(const QString &u)
48{
49 d->m_id = u;
50}
51
53{
54 return d->m_id;
55}
56
57void 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
78{
79 d->m_type = v;
80}
81
83{
84 return d->m_type;
85}
86
87bool Folder::isValid() const
88{
89 return !(d->m_id.isEmpty());
90}
Represents a single mail folder.
Definition folder.h:25
bool isValid() const
Checks whether this Folder has an id.
Definition folder.cpp:87
QString id() const
Gets the id of the Folder.
Definition folder.cpp:52
~Folder()
Destructor.
Definition folder.cpp:43
void setName(const QString &name)
Sets the name of the Folder.
Definition folder.cpp:57
Folder()
Creates an empty Folder.
Definition folder.cpp:27
QString type() const
Gets the type of the Folder.
Definition folder.cpp:82
void setMessageCount(int messageCount)
Sets the number of messages in the Folder.
Definition folder.cpp:67
void setType(const QString &type)
Sets the type of the folder.
Definition folder.cpp:77
QString name() const
Gets the name of the Folder.
Definition folder.cpp:62
Folder & operator=(const Folder &other)
Assignment operator.
Definition folder.cpp:37
int messageCount() const
Gets the number of messages in the Folder.
Definition folder.cpp:72
void setId(const QString &id)
Sets the id of the Folder.
Definition folder.cpp:47
The Attica namespace,.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:17:36 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.