openPSTD  2.0
Open source simulation for sound propagation in urban environments
EditOperations.h
1 // This file is part of openPSTD. //
3 // //
4 // openPSTD is free software: you can redistribute it and/or modify //
5 // it under the terms of the GNU General Public License as published by //
6 // the Free Software Foundation, either version 3 of the License, or //
7 // (at your option) any later version. //
8 // //
9 // openPSTD is distributed in the hope that it will be useful, //
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of //
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
12 // GNU General Public License for more details. //
13 // //
14 // You should have received a copy of the GNU General Public License //
15 // along with openPSTD. If not, see <http://www.gnu.org/licenses/>. //
16 // //
18 
20 //
21 // Date: 16-08-2015
22 //
23 //
24 // Authors: M. R. Fortuin
25 //
26 //
27 // Purpose:
28 //
29 //
31 
32 #ifndef OPENPSTD_EDITOPERATIONS_H
33 #define OPENPSTD_EDITOPERATIONS_H
34 
35 #include "BaseOperation.h"
36 #include <boost/numeric/ublas/vector.hpp>
37 #include <QVector2D>
38 
39 namespace OpenPSTD
40 {
41  namespace GUI
42  {
44  {
45  private:
46  QVector2D StartPoint;
47  QVector2D EndPoint;
48 
49  public:
50  CreateDomainOperation(QVector2D StartPoint, QVector2D EndPoint);
51 
52  virtual void Run(const Reciever &reciever) override;
53  };
54 
56  {
57  private:
58  PstdObjectType _type;
59  QVector3D _position;
60 
61  public:
62  CreateReceiverSpeakerOperation(PstdObjectType type, QVector3D position);
63 
64  virtual void Run(const Reciever &reciever) override;
65  };
66 
68  {
69  public:
70  virtual void Run(const Reciever &reciever) override;
71  };
72 
74  {
75  public:
76  virtual void Run(const Reciever &reciever) override;
77  };
78 
80  {
81  private:
82  int index;
83 
84  public:
85  RemoveDomainOperation(int index);
86 
87  virtual void Run(const Reciever &reciever) override;
88  };
89 
91  {
92  private:
93  int index;
94 
95  public:
96  RemoveSpeakerOperation(int index);
97 
98  virtual void Run(const Reciever &reciever) override;
99  };
100 
102  {
103  private:
104  int index;
105 
106  public:
107  RemoveReceiverOperation(int index);
108 
109  virtual void Run(const Reciever &reciever) override;
110  };
111 
113  {
114  private:
115  int index;
116  QVector2D StartPoint;
117  QVector2D EndPoint;
118 
119  public:
120  EditDomainPositionsOperation(int index, QVector2D startPoint, QVector2D endPoint);
121 
122  virtual void Run(const Reciever &reciever) override;
123  };
124 
126  {
127  private:
128  int index;
130  float NewValue;
131 
132  public:
133  EditDomainEdgeAbsorptionOperation(int index, Kernel::PSTD_DOMAIN_SIDE side, float newValue);
134 
135  virtual void Run(const Reciever &reciever) override;
136  };
137 
139  {
140  private:
141  int index;
143  bool NewValue;
144 
145  public:
146  EditDomainEdgeLrOperation(int index, Kernel::PSTD_DOMAIN_SIDE side, bool newValue);
147 
148  virtual void Run(const Reciever &reciever) override;
149  };
150 
152  {
153  public:
154  float AbsorptionT;
155  float AbsorptionB;
156  float AbsorptionL;
157  float AbsorptionR;
158  bool LRT;
159  bool LRB;
160  bool LRL;
161  bool LRR;
162 
163  virtual void Run(const Reciever &reciever) override;
164  };
165 
167  {
168  public:
170  { };
171 
173 
175 
176  virtual void Run(const Reciever &reciever) override;
177  };
178 
179  }
180 }
181 
182 #endif //OPENPSTD_EDITOPERATIONS_H
183 
This is the general namespace of the OpenPSTD application.
Definition: Boundary.cpp:33
Definition: EditOperations.h:43
A collection of parameters and settings for the simulation.
Definition: KernelInterface.h:44
Definition: EditOperations.h:79
Definition: EditOperations.h:166
Definition: Model.h:106
Definition: BaseOperation.h:61
PSTD_DOMAIN_SIDE
Enums for the domain boundary representation in the interface.
Definition: KernelInterface.h:29
Definition: EditOperations.h:67
Definition: EditOperations.h:138
Definition: EditOperations.h:151
Definition: EditOperations.h:55
Definition: EditOperations.h:101
Definition: BaseOperation.h:68
Definition: EditOperations.h:112
Definition: EditOperations.h:125
Definition: EditOperations.h:90
Definition: EditOperations.h:73