openPSTD  2.0
Open source simulation for sound propagation in urban environments
MainWindow.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_MAINWINDOW_H
37 #define OPENPSTD_MAINWINDOW_H
38 
39 #include <QMainWindow>
40 #include <memory>
41 #include "operations/BaseOperation.h"
42 #include "MouseHandlers.h"
43 #include "DomainProperties.h"
44 #include "DocumentSettings.h"
45 #include <ui_MainWindow.h>
46 
47 namespace OpenPSTD
48 {
49  namespace GUI
50  {
51 
52  class MainWindow : public QMainWindow
53  {
54  Q_OBJECT
55 
56  public:
57  explicit MainWindow(std::shared_ptr<OperationRunner> operationRunner, QWidget *parent = 0);
58 
59  void UpdateFromModel(std::shared_ptr<Model> const &model);
60 
61  private:
62  std::unique_ptr<Ui_MainWindow> ui;
63  std::unique_ptr<DomainProperties> domainProperties;
64  std::unique_ptr<DocumentSettings> documentSettings;
65  std::shared_ptr<OperationRunner> operationRunner;
66  std::vector<QAction *> MouseHandlersActions;
67 
68  void ChangeMouseHandler(QAction *action, std::unique_ptr<MouseStrategy> mouseHandler);
69 
70  void EditSelectedDomain();
71 
72  void EditDocumentSettings();
73 
74  void UpdateDisableWidgets(std::shared_ptr<Model> const &model);
75 
76  void ShowAbout();
77 
78  void ShowAboutIcons();
79 
80  public slots:
81 
82  void New();
83 
84  void Open();
85 
86  void Save();
87 
88 
89  };
90 
91  }
92 }
93 
94 
95 #endif //OPENPSTD_MAINWINDOW_H
This is the general namespace of the OpenPSTD application.
Definition: Boundary.cpp:33
Definition: MainWindow.h:52