source: PSPA/Interface_Web/trunk/pspaWT/sources/controler/include/GWt_pspaApplication.h @ 257

Last change on this file since 257 was 257, checked in by garnier, 11 years ago

refactoring

File size: 2.6 KB
Line 
1#ifndef PSPA_SEEN
2#define  PSPA_SEEN
3
4#include <cstdlib>
5#include <list>
6
7#include <Wt/WApplication>
8#include <Wt/WEnvironment>
9#include <Wt/WContainerWidget>
10#include <Wt/WText>
11#include <Wt/WPanel>
12#include <Wt/WComboBox>
13#include <Wt/WPushButton>
14#include <Wt/WDialog>
15#include <Wt/WPdfImage>
16#include <Wt/Chart/WCartesianChart>
17#include <Wt/WLength>
18
19#include "GWt_dialog.h"
20#include "dataManager.h"
21#include "GWt_console.h"
22
23using namespace Wt;
24
25/*
26 * ESSAI PSPA
27 */
28class PspaApplication : public WApplication
29{
30
31typedef struct {
32  WLineEdit* debut;
33  WLineEdit*  fin;
34  WComboBox* selection;
35  WContainerWidget* ligneDeWidget;
36} GWt_sectionToExecute;
37
38 private :
39 
40 dataManager* dtmanage_;
41 string nameOfCase_;
42 string workingDir_;
43 WDialog* dialogSave_;
44 WDialog* dialogOpen_;
45 WLineEdit* saveNameEdit_;
46 WLineEdit* openNameEdit_;
47
48
49 // WContainerWidget* console_;
50 WWidget* globalParam_;
51 WWidget* beamLine_;
52 // WContainerWidget* leDessin_;
53 GWt_dialog* graphicsDialog_;
54
55 WPushButton *exec_go_;
56 WText* probleme_;
57  WComboBox* choixElementDessin_;
58  WComboBox* choixTypeDessinFaisceau_;
59  WComboBox* choixEnveloppeDessin_;
60 WContainerWidget* toto_;
61 WContainerWidget* contenuSections_;
62 list<GWt_sectionToExecute*> selectedSections_;
63 WFileUpload* uploadFileSelectorWidget_;
64 GWt_console* console_;
65 
66
67 WText*   createTitle(const WString&);
68 WWidget* createPalette();
69 WWidget* createBeamLine();
70 WWidget* createGlobalParamWidget();
71 WWidget* createExecuteWidget();
72 WContainerWidget* createDrawingWidget();
73 
74 void createDragImage(const char *url,const char *smallurl,const char *mimeType,WContainerWidget *p,WString name);
75 void executer();
76 void sauver();
77 void dialogSaveDone(WDialog::DialogCode code);
78 void dialogOpenDone(WDialog::DialogCode code);
79 void restaurer();
80 void chargerConfig();
81 void openFileSelector();
82 void fileTooLarge();
83 void dessiner();
84
85 void addSectionToExecuteW();
86 void deleteSectionToExecuteW();
87 void checkSectionSelection();
88 void disableSectionExecute();
89 bool areDataCoherent();
90 void dialogOnGraphics();
91 void faireDessin();
92 void faireDessinParmela(WContainerWidget* toto, particleBeam* beam);
93 void faireDessinTransport(WContainerWidget* toto, particleBeam* beam);
94
95 void dessinerEnveloppe();
96 void faireDessinEnveloppe(WContainerWidget* toto, string type);
97 void scatterPlot1D(WContainerWidget* toto, vector<double>& xcor, vector<double>& ycor);
98
99 bool removeExtensionFromConfigName(string& config);
100
101 void dessinerHistogramme();
102
103 public :
104
105 PspaApplication(const WEnvironment& env);
106 
107 inline dataManager* getDataManager() const  {
108   return dtmanage_;
109 }
110 
111 // void addConsoleMessage(WString msg);
112
113 void updateSelections();
114 string getSelection();
115};
116#endif
Note: See TracBrowser for help on using the repository browser.