openPSTD  2.0
Open source simulation for sound propagation in urban environments
main.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:
22 //
23 //
24 // Authors:
25 //
26 //
27 // Purpose:
28 //
29 //
31 
32 //
33 // Created by michiel on 18-7-2015.
34 //
35 
36 #ifndef OPENPSTD_MAIN_GUI_H
37 #define OPENPSTD_MAIN_GUI_H
38 
39 #include <memory>
40 #include "operations/BaseOperation.h"
41 
42 namespace OpenPSTD
43 {
44  namespace GUI
45  {
47  {
48  public:
49  Controller();
50 
51  void SetArguments(int argc, char *argv[]);
52  int RunApplication();
53  void SetOperationRunner(std::shared_ptr<OperationRunner> runner);
54 
55  virtual void RunOperation(std::shared_ptr<BaseOperation> operation);
56 
57  private:
58  void RunOperationWithoutUpdate(std::shared_ptr<BaseOperation> operation);
59  void UpdateWithoutOperation();
60 
61  bool runningOp;
62  std::shared_ptr<OperationRunner> operationRunner;
63  std::shared_ptr<Model> model;
64  std::unique_ptr<QApplication> a;
65  std::unique_ptr<MainWindow> w;
66 
67  int argc;
68  char **argv;
69  };
70  }
71 }
72 
73 #endif //OPENPSTD_MAIN_GUI_H
This is the general namespace of the OpenPSTD application.
Definition: Boundary.cpp:33
Definition: main.h:46
Definition: BaseOperation.h:55