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 | |
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 | |
27 | Folder::Folder() |
28 | : d(new Private) |
29 | { |
30 | } |
31 | |
32 | Folder::Folder(const Folder &other) |
33 | : d(other.d) |
34 | { |
35 | } |
36 | |
37 | Folder &Folder::operator=(const Folder &other) |
38 | { |
39 | d = other.d; |
40 | return *this; |
41 | } |
42 | |
43 | Folder::~Folder() |
44 | { |
45 | } |
46 | |
47 | void Folder::setId(const QString &u) |
48 | { |
49 | d->m_id = u; |
50 | } |
51 | |
52 | QString Folder::id() const |
53 | { |
54 | return d->m_id; |
55 | } |
56 | |
57 | void Folder::setName(const QString &name) |
58 | { |
59 | d->m_name = name; |
60 | } |
61 | |
62 | QString Folder::name() const |
63 | { |
64 | return d->m_name; |
65 | } |
66 | |
67 | void Folder::setMessageCount(int c) |
68 | { |
69 | d->m_messageCount = c; |
70 | } |
71 | |
72 | int Folder::messageCount() const |
73 | { |
74 | return d->m_messageCount; |
75 | } |
76 | |
77 | void Folder::setType(const QString &v) |
78 | { |
79 | d->m_type = v; |
80 | } |
81 | |
82 | QString Folder::type() const |
83 | { |
84 | return d->m_type; |
85 | } |
86 | |
87 | bool Folder::isValid() const |
88 | { |
89 | return !(d->m_id.isEmpty()); |
90 | } |
91 | |