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:
Luca Beltrame 2015-02-20 23:35:13 +01:00
commit 942d1ffd1e
2 changed files with 10 additions and 0 deletions

View file

@ -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:
/**