diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-08-18 14:53:00 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-08-18 17:05:13 +0200 |
commit | a18ca7764abbe24b601885ef06fcc98f0b7ed10b (patch) | |
tree | 1381ca22c6b2e68f5e43f0443435863eb3578c77 /options/bundle.hpp | |
parent | 132a1925340bcd75a88f831a3487044736dccb4a (diff) |
options: factor out connector out of bundle
Diffstat (limited to 'options/bundle.hpp')
-rw-r--r-- | options/bundle.hpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/options/bundle.hpp b/options/bundle.hpp index 0283c911..841df273 100644 --- a/options/bundle.hpp +++ b/options/bundle.hpp @@ -1,9 +1,13 @@ #pragma once +#include "group.hpp" +#include "connector.hpp" + #include <memory> #include <tuple> #include <map> #include <memory> +#include <vector> #include <QObject> #include <QString> @@ -13,7 +17,6 @@ #include <QDebug> -#include "group.hpp" #include "compat/util.hpp" #include "export.hpp" @@ -21,21 +24,25 @@ namespace options { namespace detail { -class OPENTRACK_OPTIONS_EXPORT bundle final : public QObject +class OPENTRACK_OPTIONS_EXPORT bundle final : public QObject, public virtual connector { Q_OBJECT -protected: +private: QMutex mtx; const QString group_name; group saved; group transient; + bundle(const bundle&) = delete; bundle& operator=(const bundle&) = delete; + QMutex* get_mtx() override { return &mtx; } + signals: void reloading(); void saving() const; public: bundle(const QString& group_name); + ~bundle() override {} QString name() { return group_name; } void reload(); void store_kv(const QString& name, const QVariant& datum); |