diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-06-24 18:42:40 +0200 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-06-24 18:42:40 +0200 |
commit | 1581e94b9ac98f5d385a71a5bfbde81da22da2b2 (patch) | |
tree | 74bd192d5cb344e3e5d10596f7b0d09aced8ca42 /src/profilemanager.h | |
parent | Add Session class (diff) | |
download | smolbote-1581e94b9ac98f5d385a71a5bfbde81da22da2b2.tar.xz |
Add ProfileManager
Diffstat (limited to 'src/profilemanager.h')
-rw-r--r-- | src/profilemanager.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/profilemanager.h b/src/profilemanager.h new file mode 100644 index 0000000..b2509a1 --- /dev/null +++ b/src/profilemanager.h @@ -0,0 +1,35 @@ +/* + * This file is part of smolbote. It's copyrighted by the contributors recorded + * in the version control history of the file, available from its original + * location: https://neueland.iserlohn-fortress.net/smolbote.hg + * + * SPDX-License-Identifier: GPL-3.0 + */ + +#ifndef SMOLBOTE_PROFILEMANAGER_H +#define SMOLBOTE_PROFILEMANAGER_H + +#include <QObject> +#include <QMap> +#include <webprofile.h> + +typedef QMapIterator<QString, WebProfile *> ProfileIterator; + +class WebProfile; +class ProfileManager : public QObject +{ + Q_OBJECT +public: + explicit ProfileManager(QObject *parent = nullptr); + + static WebProfile *loadProfile(const QString &path, const QHash<QString, QString> &defaults); + + static const QString id(WebProfile *profile); + static WebProfile *profile(const QString &id); + static const QMap<QString, WebProfile *>& profileList(); + +private: + static QMap<QString, WebProfile *> profiles; +}; + +#endif // SMOLBOTE_PROFILEMANAGER_H |