diff options
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 |