MobileRT  1.0
A multi platform C++ CPU progressive Ray Tracer.
config.h
Go to the documentation of this file.
1 #ifndef CONFIG_H
2 #define CONFIG_H
3 
4 #include <QDialog>
5 
6 namespace Ui {
7  class Config;
8 }
9 
10 class Config : public QDialog {
11  Q_OBJECT
12 
13 public:
14  class Builder;
15 
16 private:
17  explicit Config(const Config::Builder& builder);
18 
19 public:
20  explicit Config() = delete;
21  Config(const Config &config) = delete;
22  Config(Config &&config) noexcept;
23  Config &operator=(const Config &config) = delete;
24  Config &operator=(Config &&config) noexcept = delete;
25 
26  ~Config() override;
27 
28  ::std::int32_t getShader();
29  ::std::int32_t getAccelerator();
30  ::std::int32_t getScene();
31  ::std::int32_t getSPP();
32  ::std::int32_t getSPL();
33 
34 private slots:
35  void selected_shader(QAction *action);
36  void selected_accelerator(QAction *action);
37  void selected_scene(QAction *action);
38  void selected_spp(int value);
39  void selected_spl(int value);
40 
41 private:
43  ::std::int32_t m_shader {};
44  ::std::int32_t m_accelerator {};
45  ::std::int32_t m_scene {};
46  ::std::int32_t m_spp {};
47  ::std::int32_t m_spl {};
48 
49 public:
50  class Builder final {
51  public:
52  ::std::int32_t m_shader {};
53  ::std::int32_t m_accelerator {};
54  ::std::int32_t m_scene {};
55  ::std::int32_t m_spp {};
56  ::std::int32_t m_spl {};
57  friend class Config;
58 
59  public:
60  explicit Builder() noexcept;
61 
62  Builder withShader(::std::int32_t shader);
63 
64  Builder withAccelerator(::std::int32_t accelerator);
65 
66  Builder withScene(::std::int32_t scene);
67 
68  Builder withSpp(::std::int32_t spp);
69 
70  Builder withSpl(::std::int32_t spl);
71 
72  Config build();
73  };
74 };
75 
76 #endif // CONFIG_H
Definition: ui_about.h:63
STL namespace.
Definition: config.h:10
Definition: ui_config.h:115
Ui::Config * ui
Definition: config.h:42
Definition: config.h:50