File indexing completed on 2024-12-01 03:37:34

0001 /*
0002     This file is part of KDE.
0003 
0004     SPDX-FileCopyrightText: 2008 Cornelius Schumacher <schumacher@kde.org>
0005 
0006     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0007 */
0008 
0009 #include "folder.h"
0010 
0011 using namespace Attica;
0012 
0013 class Q_DECL_HIDDEN Folder::Private : public QSharedData
0014 {
0015 public:
0016     QString m_id;
0017     QString m_name;
0018     int m_messageCount;
0019     QString m_type;
0020 
0021     Private()
0022         : m_messageCount(0)
0023     {
0024     }
0025 };
0026 
0027 Folder::Folder()
0028     : d(new Private)
0029 {
0030 }
0031 
0032 Folder::Folder(const Folder &other)
0033     : d(other.d)
0034 {
0035 }
0036 
0037 Folder &Folder::operator=(const Folder &other)
0038 {
0039     d = other.d;
0040     return *this;
0041 }
0042 
0043 Folder::~Folder()
0044 {
0045 }
0046 
0047 void Folder::setId(const QString &u)
0048 {
0049     d->m_id = u;
0050 }
0051 
0052 QString Folder::id() const
0053 {
0054     return d->m_id;
0055 }
0056 
0057 void Folder::setName(const QString &name)
0058 {
0059     d->m_name = name;
0060 }
0061 
0062 QString Folder::name() const
0063 {
0064     return d->m_name;
0065 }
0066 
0067 void Folder::setMessageCount(int c)
0068 {
0069     d->m_messageCount = c;
0070 }
0071 
0072 int Folder::messageCount() const
0073 {
0074     return d->m_messageCount;
0075 }
0076 
0077 void Folder::setType(const QString &v)
0078 {
0079     d->m_type = v;
0080 }
0081 
0082 QString Folder::type() const
0083 {
0084     return d->m_type;
0085 }
0086 
0087 bool Folder::isValid() const
0088 {
0089     return !(d->m_id.isEmpty());
0090 }