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