Run astyle-kdelibs on the source
This commit is contained in:
parent
4b85d63d68
commit
39aac8c95b
22 changed files with 1227 additions and 1264 deletions
|
|
@ -32,49 +32,49 @@
|
|||
#include <QAbstractListModel>
|
||||
#include <QVector>
|
||||
|
||||
namespace Danbooru {
|
||||
namespace Danbooru
|
||||
{
|
||||
|
||||
class DanbooruPost;
|
||||
class DanbooruPost;
|
||||
|
||||
/**
|
||||
* @brief A model to represent DanbooruItems
|
||||
*
|
||||
* Since items from a Danbooru service are sent by the service itself,
|
||||
* there is no need for sorting or table-like structures: everything is
|
||||
* represented as a flat list.
|
||||
*
|
||||
* Items are added through the addPost() slot.
|
||||
*
|
||||
*/
|
||||
class DanbooruPostModel : public QAbstractListModel
|
||||
{
|
||||
/**
|
||||
* @brief A model to represent DanbooruItems
|
||||
*
|
||||
* Since items from a Danbooru service are sent by the service itself,
|
||||
* there is no need for sorting or table-like structures: everything is
|
||||
* represented as a flat list.
|
||||
*
|
||||
* Items are added through the addPost() slot.
|
||||
*
|
||||
*/
|
||||
class DanbooruPostModel : public QAbstractListModel
|
||||
{
|
||||
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DanbooruPostModel(QObject* parent=0);
|
||||
~DanbooruPostModel();
|
||||
public:
|
||||
DanbooruPostModel(QObject *parent = 0);
|
||||
~DanbooruPostModel();
|
||||
|
||||
int rowCount(const QModelIndex& parent=QModelIndex()) const;
|
||||
QVariant data(const QModelIndex& index, int role) const;
|
||||
void clear();
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
||||
QVariant data(const QModelIndex &index, int role) const;
|
||||
void clear();
|
||||
|
||||
private:
|
||||
QVector<DanbooruPost*> m_items;
|
||||
private:
|
||||
QVector<DanbooruPost *> m_items;
|
||||
|
||||
public Q_SLOTS:
|
||||
/**
|
||||
* @brief Add a new post to the model
|
||||
*
|
||||
* Connect to this slot when you want to add items to the model.
|
||||
*
|
||||
* @param post A pointer to a DanbooruPost.
|
||||
*
|
||||
*/
|
||||
void addPost(Danbooru::DanbooruPost* post);
|
||||
public Q_SLOTS:
|
||||
/**
|
||||
* @brief Add a new post to the model
|
||||
*
|
||||
* Connect to this slot when you want to add items to the model.
|
||||
*
|
||||
* @param post A pointer to a DanbooruPost.
|
||||
*
|
||||
*/
|
||||
void addPost(Danbooru::DanbooruPost *post);
|
||||
|
||||
};
|
||||
};
|
||||
}; // namespace Danbooru
|
||||
|
||||
|
||||
#endif // DANBOORUPOSTMODEL_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue