Keep a set of all the tags from the posts stored
This allows later on to get post-specific tags.
This commit is contained in:
parent
f6aa593ee5
commit
942d1ffd1e
2 changed files with 10 additions and 0 deletions
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
#include <QAbstractListModel>
|
||||
#include <QVector>
|
||||
#include <QSet>
|
||||
|
||||
namespace Danbooru
|
||||
{
|
||||
|
|
@ -57,6 +58,7 @@ public:
|
|||
QVariant data(const QModelIndex &index, int role) const Q_DECL_OVERRIDE;
|
||||
void clear();
|
||||
QHash<int, QByteArray> roleNames() const Q_DECL_OVERRIDE;
|
||||
QStringList postTags() const;
|
||||
|
||||
enum PostRoles {
|
||||
FileUrlRole = Qt::UserRole + 1001,
|
||||
|
|
@ -69,6 +71,7 @@ public:
|
|||
|
||||
private:
|
||||
QVector<DanbooruPost *> m_items;
|
||||
QSet<QString> m_postTags;
|
||||
|
||||
public Q_SLOTS:
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue