Chrysalis - CLO3D DevTools Extension
Loading...
Searching...
No Matches
GeneralUIExporterOptions.h
Go to the documentation of this file.
1#ifndef CHRYSALIS_GENERALUIEXPORTEROPTIONS_H
2#define CHRYSALIS_GENERALUIEXPORTEROPTIONS_H
3
4#include "BaseNativeShortcutHandler.h"
6
7namespace CLO3D {
9 struct Keys {
10 inline static const QString SHORTCUT = "shortcut";
11 inline static const QString PICK_BY_MOUSE = "pickMyMouse";
12 };
13 struct Defaults {
14 inline static const QKeySequence SHORTCUT = QKeySequence("Ctrl+Shift+E");
15 static constexpr bool PICK_BY_MOUSE = false;
16 };
17 public:
18 void read(const QSettings* settings) override;
19 void write(QSettings* settings) override;
20
21 [[nodiscard]] QKeySequence getShortcut() const;
22 [[nodiscard]] bool getPickMyMouse() const;
23
24 void setShortcut(const QKeySequence& shortcut);
25 void setPickMyMouse(bool pickByMouse);
26 void setShortcutHandler(BaseNativeShortcutHandler* shortcutHandler);
27 private:
28 QKeySequence shortcut_ = Defaults::SHORTCUT;
29 bool pickByMouse_ = Defaults::PICK_BY_MOUSE;
30
31 BaseNativeShortcutHandler* shortcutHandler_ = nullptr;
32 };
33}
34
35#endif //CHRYSALIS_GENERALUIEXPORTEROPTIONS_H
Definition BaseUIExporterOptions.h:7
Definition GeneralUIExporterOptions.h:8
bool getPickMyMouse() const
Definition GeneralUIExporterOptions.cpp:25
void read(const QSettings *settings) override
Definition GeneralUIExporterOptions.cpp:9
QKeySequence getShortcut() const
Definition GeneralUIExporterOptions.cpp:21
void setPickMyMouse(bool pickByMouse)
Definition GeneralUIExporterOptions.cpp:34
void write(QSettings *settings) override
Definition GeneralUIExporterOptions.cpp:15
void setShortcutHandler(BaseNativeShortcutHandler *shortcutHandler)
Definition GeneralUIExporterOptions.cpp:38
void setShortcut(const QKeySequence &shortcut)
Definition GeneralUIExporterOptions.cpp:29
Definition BaseDevTool.h:6