1 | #ifndef GWt_PSPA_Application_SEEN |
---|
2 | #define GWt_PSPA_Application_SEEN |
---|
3 | |
---|
4 | #include <cstdlib> |
---|
5 | #include <string.h> |
---|
6 | #include <vector> |
---|
7 | |
---|
8 | #include <Wt/WApplication> |
---|
9 | #include <Wt/WEnvironment> |
---|
10 | #include <Wt/WContainerWidget> |
---|
11 | #include <Wt/WText> |
---|
12 | #include <Wt/WLineEdit> |
---|
13 | #include <Wt/WPanel> |
---|
14 | #include <Wt/WComboBox> |
---|
15 | #include <Wt/WPushButton> |
---|
16 | #include <Wt/WButtonGroup> |
---|
17 | |
---|
18 | #include "GWt_dialog.h" |
---|
19 | #include "GWt_console.h" |
---|
20 | #include "GWt_softwarePanel.h" |
---|
21 | #include "GWt_globalParameters.h" |
---|
22 | #include "GWt_sectorParameters.h" |
---|
23 | |
---|
24 | #include "dataManager.h" |
---|
25 | |
---|
26 | class GWt_abstractElementFactory; |
---|
27 | class GWt_ligneFaisceau; |
---|
28 | |
---|
29 | using namespace Wt; |
---|
30 | |
---|
31 | class PspaApplication : public WApplication |
---|
32 | { |
---|
33 | |
---|
34 | private : |
---|
35 | |
---|
36 | dataManager* dtmanage_; |
---|
37 | string workingDir_; |
---|
38 | WDialog* dialogSave_; |
---|
39 | WDialog* dialogOpen_; |
---|
40 | WLineEdit* saveNameEdit_; |
---|
41 | WLineEdit* openNameEdit_; |
---|
42 | GWt_ligneFaisceau* beamLine_deprecated_; |
---|
43 | |
---|
44 | GWt_globalParameters* globalParam_; |
---|
45 | GWt_sectorParameters* sectorParam_; |
---|
46 | string nameOfCase_; |
---|
47 | |
---|
48 | WText* probleme_; |
---|
49 | |
---|
50 | WString applicationDefaultTitle_; |
---|
51 | |
---|
52 | WFileUpload* uploadFileSelectorWidget_; |
---|
53 | GWt_console* console_; |
---|
54 | GWt_abstractElementFactory* abstractElementFactory_; |
---|
55 | WContainerWidget* acceleratorContainerWidget_; |
---|
56 | |
---|
57 | WText* createTitle(const WString&); |
---|
58 | WWidget* createPalette(WContainerWidget* parent); |
---|
59 | WWidget* createBeamLine_deprecated(); |
---|
60 | WWidget* createExecuteWidget(); |
---|
61 | |
---|
62 | WWidget* createDashBoard(WContainerWidget*); |
---|
63 | |
---|
64 | void messageBox1(); |
---|
65 | void messageBox2(); |
---|
66 | |
---|
67 | // extensions (.001, .002,...) pour les fichiers "snapshot" |
---|
68 | int extensionFile_; |
---|
69 | |
---|
70 | void createDragImage(const char *url,const char *smallurl,const char *mimeType,WContainerWidget *p,WString()); |
---|
71 | void sauver(); |
---|
72 | void dialogSaveDone(WDialog::DialogCode code); |
---|
73 | void restaurer(); |
---|
74 | void chargerConfig(); |
---|
75 | void openFileSelector(); |
---|
76 | void fileTooLarge(); |
---|
77 | |
---|
78 | bool removePathFromConfigName(string& config); |
---|
79 | bool removeExtensionFromConfigName(string& config); |
---|
80 | |
---|
81 | public : |
---|
82 | |
---|
83 | PspaApplication(const WEnvironment& env); |
---|
84 | |
---|
85 | string getSelection(); |
---|
86 | void faireDessin(); |
---|
87 | |
---|
88 | inline dataManager* getDataManager() const { |
---|
89 | return dtmanage_; |
---|
90 | } |
---|
91 | |
---|
92 | inline GWt_globalParameters* getGlobalParam() const { |
---|
93 | return globalParam_; |
---|
94 | } |
---|
95 | |
---|
96 | inline GWt_ligneFaisceau* getBeamLine_deprecated() { |
---|
97 | return beamLine_deprecated_; |
---|
98 | } |
---|
99 | |
---|
100 | inline GWt_abstractElementFactory* getAbstractElementFactory() { |
---|
101 | return abstractElementFactory_; |
---|
102 | } |
---|
103 | |
---|
104 | inline string getWorkingDir() const { |
---|
105 | return workingDir_; |
---|
106 | } |
---|
107 | |
---|
108 | inline void setExtensionFile(int n) { |
---|
109 | extensionFile_ = n; |
---|
110 | } |
---|
111 | |
---|
112 | inline int getExtensionFile() const { |
---|
113 | return extensionFile_; |
---|
114 | } |
---|
115 | |
---|
116 | }; |
---|
117 | #endif |
---|