Run astyle-kdelibs on the source
This commit is contained in:
parent
4b85d63d68
commit
39aac8c95b
22 changed files with 1227 additions and 1264 deletions
|
@ -37,74 +37,75 @@
|
|||
#include <QtCore/QStringList>
|
||||
#include <QtXml/QXmlStreamAttributes>
|
||||
|
||||
namespace Danbooru {
|
||||
namespace Danbooru
|
||||
{
|
||||
|
||||
/**
|
||||
* @brief Class representing a Danbooru pool.
|
||||
*
|
||||
* Pools are organized groups of images, often by a common theme, for
|
||||
* example taken from the same artbook. They are identified by unique IDs
|
||||
* and are represented by a name, a description, and the posts they
|
||||
* contain.
|
||||
*
|
||||
* @author Luca Beltrame (lbeltrame@kde.org)
|
||||
*
|
||||
* **/
|
||||
class DanbooruPool : public QObject
|
||||
{
|
||||
/**
|
||||
* @brief Class representing a Danbooru pool.
|
||||
*
|
||||
* Pools are organized groups of images, often by a common theme, for
|
||||
* example taken from the same artbook. They are identified by unique IDs
|
||||
* and are represented by a name, a description, and the posts they
|
||||
* contain.
|
||||
*
|
||||
* @author Luca Beltrame (lbeltrame@kde.org)
|
||||
*
|
||||
* **/
|
||||
class DanbooruPool : public QObject
|
||||
{
|
||||
|
||||
Q_OBJECT
|
||||
|
||||
private:
|
||||
int m_id;
|
||||
int m_postCount;
|
||||
QString m_name;
|
||||
QString m_description;
|
||||
QList<int> m_posts;
|
||||
private:
|
||||
int m_id;
|
||||
int m_postCount;
|
||||
QString m_name;
|
||||
QString m_description;
|
||||
QList<int> m_posts;
|
||||
|
||||
public:
|
||||
public:
|
||||
|
||||
/**
|
||||
* @brief Construct a Danbooru pool from a QVariantMap.
|
||||
*
|
||||
* This form is the easiest to use and should be used when dealing with
|
||||
* responses in JSON format. Unfortunately most Danbooru
|
||||
* implementations produce broken JSON for some responses.
|
||||
*
|
||||
* @param postData A QVariantMap from parsed JSON representing the
|
||||
* data from a single pool.
|
||||
*
|
||||
*
|
||||
**/
|
||||
DanbooruPool(const QVariantMap& postData, QObject* parent = 0);
|
||||
/**
|
||||
* @brief Construct a Danbooru pool from a QVariantMap.
|
||||
*
|
||||
* This form is the easiest to use and should be used when dealing with
|
||||
* responses in JSON format. Unfortunately most Danbooru
|
||||
* implementations produce broken JSON for some responses.
|
||||
*
|
||||
* @param postData A QVariantMap from parsed JSON representing the
|
||||
* data from a single pool.
|
||||
*
|
||||
*
|
||||
**/
|
||||
DanbooruPool(const QVariantMap &postData, QObject *parent = 0);
|
||||
|
||||
/**
|
||||
* @brief Construct a Danbooru pool from a QVariantMap.
|
||||
*
|
||||
* This form is the easiest to use and should be used when dealing with
|
||||
* responses in JSON format. Unfortunately most Danbooru
|
||||
* implementations produce broken JSON for some responses.
|
||||
*
|
||||
* @param postData A QXmlStreamAttributes instance holding the
|
||||
* attributes for the given pool.
|
||||
*
|
||||
*
|
||||
**/
|
||||
DanbooruPool(const QXmlStreamAttributes& postData, QObject* parent=0);
|
||||
/**
|
||||
* @brief Construct a Danbooru pool from a QVariantMap.
|
||||
*
|
||||
* This form is the easiest to use and should be used when dealing with
|
||||
* responses in JSON format. Unfortunately most Danbooru
|
||||
* implementations produce broken JSON for some responses.
|
||||
*
|
||||
* @param postData A QXmlStreamAttributes instance holding the
|
||||
* attributes for the given pool.
|
||||
*
|
||||
*
|
||||
**/
|
||||
DanbooruPool(const QXmlStreamAttributes &postData, QObject *parent = 0);
|
||||
|
||||
int id() const;
|
||||
int postCount() const;
|
||||
QString name() const;
|
||||
QString description() const;
|
||||
QList<int> posts() const;
|
||||
int id() const;
|
||||
int postCount() const;
|
||||
QString name() const;
|
||||
QString description() const;
|
||||
QList<int> posts() const;
|
||||
|
||||
void addPost(int post);
|
||||
void addPosts(QList<int> posts);
|
||||
void addPosts(const QStringList& posts);
|
||||
};
|
||||
void addPost(int post);
|
||||
void addPosts(QList<int> posts);
|
||||
void addPosts(const QStringList &posts);
|
||||
};
|
||||
|
||||
}; // namespace Danbooru
|
||||
|
||||
Q_DECLARE_METATYPE(Danbooru::DanbooruPool*)
|
||||
Q_DECLARE_METATYPE(Danbooru::DanbooruPool *)
|
||||
|
||||
#endif // DANBOORUPOOL_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue