File indexing completed on 2024-10-06 12:15:12
0001 /* 0002 This file is part of KDE. 0003 0004 SPDX-FileCopyrightText: 2011 Laszlo Papp <djszapi@archlinux.us> 0005 0006 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0007 */ 0008 0009 #ifndef ATTICA_FORUM_H 0010 #define ATTICA_FORUM_H 0011 0012 #include "attica_export.h" 0013 0014 #include "topic.h" 0015 0016 #include <QDateTime> 0017 #include <QSharedDataPointer> 0018 #include <QUrl> 0019 0020 namespace Attica 0021 { 0022 0023 /** 0024 * @class Forum forum.h <Attica/Forum> 0025 * 0026 * Represents a forum. 0027 */ 0028 class ATTICA_EXPORT Forum 0029 { 0030 public: 0031 typedef QList<Forum> List; 0032 class Parser; 0033 0034 Forum(); 0035 Forum(const Forum &other); 0036 Forum &operator=(const Forum &other); 0037 ~Forum(); 0038 0039 void setId(const QString &id); 0040 QString id() const; 0041 0042 void setName(const QString &name); 0043 QString name() const; 0044 0045 void setDescription(const QString &description); 0046 QString description() const; 0047 0048 void setDate(const QDateTime &date); 0049 QDateTime date() const; 0050 0051 void setIcon(const QUrl &icon); 0052 QUrl icon() const; 0053 0054 void setChildCount(const int childCount); 0055 int childCount() const; 0056 0057 void setTopics(const int topics); 0058 int topics() const; 0059 0060 void setChildren(QList<Forum> comments); 0061 QList<Forum> children() const; 0062 0063 bool isValid() const; 0064 0065 private: 0066 class Private; 0067 QSharedDataPointer<Private> d; 0068 }; 0069 0070 } 0071 0072 #endif