2023-04-10 18:24:58 +02:00
|
|
|
#ifndef TAGMANAGER_H
|
|
|
|
#define TAGMANAGER_H
|
|
|
|
#include "sqlitedbservice.h"
|
|
|
|
|
|
|
|
class TagManager
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
SqliteDbService *dbService = nullptr;
|
|
|
|
bool ensurePathOkay(QString inpath);
|
|
|
|
|
|
|
|
public:
|
|
|
|
TagManager(SqliteDbService &dbService);
|
|
|
|
|
|
|
|
bool addTagsToPath(QString path, const QSet<QString> &tags);
|
|
|
|
bool addTagsToPath(QString path, QString tagstring, QChar delim);
|
|
|
|
|
|
|
|
bool addPathsToTag(QString tag, const QVector<QString> &paths);
|
|
|
|
bool removeTagsForPath(QString path, const QSet<QString> &tags);
|
|
|
|
|
2023-05-07 16:51:42 +02:00
|
|
|
bool removePathsForTag(QString tag, const QVector<QString> &paths);
|
2023-04-10 18:24:58 +02:00
|
|
|
bool deleteTag(QString tag);
|
|
|
|
|
|
|
|
QVector<QString> getTags(QString path);
|
2023-05-07 16:51:42 +02:00
|
|
|
QVector<QString> getTags();
|
2023-04-10 18:24:58 +02:00
|
|
|
QVector<QString> getPaths(QString tag);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // TAGMANAGER_H
|