ukui-search/ukui-search-service-dir-man.../dirwatcher/config.h

36 lines
776 B
C
Raw Normal View History

#ifndef CONFIG_H
#define CONFIG_H
#include <QString>
#include <QSettings>
#include <QVector>
#include "search-dir.h"
class Config
{
public:
static Config *self();
void addDir(const SearchDir& dir);
QStringList removeDir(const SearchDir& dir);
/**
* @brief
*/
void processCompatibleCache();
QVector<SearchDir> searchDirObjects();
QStringList searchDirs();
QStringList blackDirs();
QStringList globalBlackList() const;
private:
Config();
void removeDir(const QString& url);
bool isCompatibilityMode();
QSettings *m_settings = nullptr;
bool m_compatibilityMode = false;
QVector<SearchDir> m_searchDirs;
QVector<SearchDir> m_compatibleCache;
};
#endif // CONFIG_H