source: PSPA/Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_pspaApplication.h @ 437

Last change on this file since 437 was 437, checked in by garnier, 10 years ago

Renommage de toutes les classes d’élément dans le GWt_ par GWt_elementXXX

File size: 3.7 KB
Line 
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/WDialog>
17#include <Wt/WPdfImage>
18#include <Wt/Chart/WCartesianChart>
19#include <Wt/WLength>
20#include <Wt/WButtonGroup>
21
22#include "GWt_dialog.h"
23#include "GWt_console.h"
24#include "GWt_softwarePanel.h"
25#include "GWt_ligneFaisceau.h"
26#include "GWt_globalParameters.h"
27#include "GWt_sectorParameters.h"
28
29#include "dataManager.h"
30
31class GWt_abstractElementFactory;
32
33using namespace Wt;
34
35class PspaApplication : public WApplication
36{
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  GWt_LigneFaisceau* beamLine_;
48   
49  GWt_globalParameters* globalParam_;
50  GWt_sectorParameters* sectorParam_;
51 
52  GWt_dialog* graphicsDialog_;
53  WButtonGroup *group_;
54  vector<GWt_dialog*> eDialog_;
55 
56  WText* probleme_;
57  WComboBox* choixElementDessin_;
58  WComboBox* choixTypeDessinFaisceau_;
59  WComboBox* choixAbsPhase_;
60  WComboBox* choixOrdPhase_;
61  WComboBox* choixEnveloppeDessin_;
62  WComboBox* choixHistoDessin_;
63  WComboBox* choixVariableHisto_;
64
65  WContainerWidget* toto_;
66  WString applicationDefaultTitle_;
67   
68  GWt_softwarePanel* executeWidget_;
69  WFileUpload* uploadFileSelectorWidget_;
70  GWt_console* console_;
71  GWt_abstractElementFactory* abstractElementFactory_;
72     
73  WText* createTitle(const WString&);
74  WWidget* createPalette();
75  WWidget* createBeamLine();
76  WWidget* createExecuteWidget();
77  WContainerWidget* createDrawingWidget();
78
79  WWidget* createDashBoard();
80  void messageBox1();
81  void messageBox2();
82 
83  // extensions (.001, .002,...) pour les fichiers "snapshot"
84  int extensionFile_;
85  void closeGraphicDialog();
86 
87  void createDragImage(const char *url,const char *smallurl,const char *mimeType,WContainerWidget *p,WString());
88  void sauver();
89  void dialogSaveDone(WDialog::DialogCode code);
90  void restaurer();
91  void chargerConfig();
92  void openFileSelector();
93  void fileTooLarge();
94 
95  void dialogOnGraphics();
96  void faireDessinPhaseSpace(WContainerWidget* toto, particleBeam* beam, string elementLabel, string namex, string namey, int typeFaisceau);
97  void faireDessinEnveloppe(WContainerWidget* toto, string type);
98  void chartPlot2vec(WContainerWidget* toto,vector<double>& xcor,vector<double>& ycor,Wt::Chart::SeriesType seriesType,Wt::Chart::FillRangeType fillRange,Wt::Chart::AxisValue value,bool isGridLinesEnables,string title,string legendx,string legendy,int width,int height,bool makeIcon = false);
99
100  bool removePathFromConfigName(string& config);
101  bool removeExtensionFromConfigName(string& config);
102  void removeBeamLine();
103   
104  void dessiner();
105  void dessinerEnveloppe();
106  void dessinerPhaseSpace();
107  void dessinerHistogramme();
108
109 public :
110 
111  PspaApplication(const WEnvironment& env);
112 
113  string getSelection();
114  void faireDessin();
115
116  inline dataManager* getDataManager() const  {
117    return dtmanage_;
118  }
119 
120  inline GWt_globalParameters* getGlobalParam() const {
121    return globalParam_; 
122  }
123
124  inline GWt_softwarePanel* getExecuteWidget() {
125    return executeWidget_;
126  }
127
128  inline GWt_LigneFaisceau* getBeamLine() {
129    return beamLine_;
130  }
131
132  inline GWt_abstractElementFactory* getAbstractElementFactory() {
133    return abstractElementFactory_;
134  }
135
136  inline string getWorkingDir() const {
137    return workingDir_;
138  }
139
140  inline void setExtensionFile(int n) {
141    extensionFile_ = n;
142  }
143
144  inline int getExtensionFile() const {
145    return extensionFile_;
146  }
147
148};
149#endif
Note: See TracBrowser for help on using the repository browser.