File indexing completed on 2024-04-21 14:52:22

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_TOPIC_H
0010 #define ATTICA_TOPIC_H
0011 
0012 #include "attica_export.h"
0013 
0014 #include <QDateTime>
0015 #include <QSharedDataPointer>
0016 
0017 namespace Attica
0018 {
0019 
0020 /**
0021  * @class Topic topic.h <Attica/Topic>
0022  *
0023  * Represents a topic.
0024  */
0025 class ATTICA_EXPORT Topic
0026 {
0027 public:
0028     typedef QList<Topic> List;
0029     class Parser;
0030 
0031     Topic();
0032     Topic(const Topic &other);
0033     Topic &operator=(const Topic &other);
0034     ~Topic();
0035 
0036     void setId(const QString &id);
0037     QString id() const;
0038 
0039     void setForumId(const QString &forumId);
0040     QString forumId() const;
0041 
0042     void setUser(const QString &user);
0043     QString user() const;
0044 
0045     void setDate(const QDateTime &date);
0046     QDateTime date() const;
0047 
0048     void setSubject(const QString &subject);
0049     QString subject() const;
0050 
0051     void setContent(const QString &content);
0052     QString content() const;
0053 
0054     void setComments(const int comments);
0055     int comments() const;
0056 
0057     bool isValid() const;
0058 
0059 private:
0060     class Private;
0061     QSharedDataPointer<Private> d;
0062 };
0063 
0064 }
0065 
0066 #endif