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

Last change on this file since 431 was 431, checked in by touze, 11 years ago

systeme periodique (mailles) + multipoles + madx

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