summaryrefslogtreecommitdiffhomepage
path: root/logic/work.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-07-08 23:20:56 +0200
committerStanislaw Halik <sthalik@misaki.pl>2018-07-08 23:20:56 +0200
commit90940a774eab876c38d5cef981b4be5bae67a462 (patch)
tree2e60edc1719ffd53752a55a7f0444166965e90c5 /logic/work.hpp
parente3292e1ddaa8d69eb320d2700fc582b4675cf8ce (diff)
modernize only
Diffstat (limited to 'logic/work.hpp')
-rw-r--r--logic/work.hpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/logic/work.hpp b/logic/work.hpp
index d5bb201e..212bb15d 100644
--- a/logic/work.hpp
+++ b/logic/work.hpp
@@ -29,22 +29,23 @@ class OTR_LOGIC_EXPORT Work final : public TR
{
Q_OBJECT
+ using dylibptr = std::shared_ptr<dylib>;
+
+ static std::unique_ptr<TrackLogger> make_logger(main_settings &s);
+ static QString browse_datalogging_file(main_settings &s);
+
public:
using fn_t = std::function<void(bool)>;
using key_tuple = std::tuple<key_opts&, fn_t, bool>;
main_settings s; // tracker needs settings, so settings must come before it
runtime_libraries libs; // idem
- std::shared_ptr<TrackLogger> logger; // must come before tracker, since tracker depends on it
- std::shared_ptr<pipeline> tracker;
- std::shared_ptr<Shortcuts> sc;
+ std::unique_ptr<TrackLogger> logger; // must come before tracker, since tracker depends on it
+ pipeline pipeline_;
+ Shortcuts sc;
std::vector<key_tuple> keys;
- Work(Mappings& m, event_handler& ev, QFrame* frame, std::shared_ptr<dylib> tracker, std::shared_ptr<dylib> filter, std::shared_ptr<dylib> proto);
- ~Work();
+ Work(Mappings& m, event_handler& ev, QFrame* frame,
+ const dylibptr& tracker, const dylibptr& filter, const dylibptr& proto);
void reload_shortcuts();
bool is_ok() const;
-
-private:
- static std::shared_ptr<TrackLogger> make_logger(main_settings &s);
- static QString browse_datalogging_file(main_settings &s);
};