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

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

Affichage du nom du cas test dans le titre de la fenetre + see History

File size: 3.5 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#include <Wt/WButtonGroup>
19
20#include "GWt_dialog.h"
21#include "dataManager.h"
22#include "GWt_console.h"
23#include "GWt_abstractElementFactory.h"
24#include "GWt_softwarePanel.h"
25#include "GWt_ligneFaisceau.h"
26
27using namespace Wt;
28
29class PspaApplication : public WApplication
30{
31       
32 private :
33   
34  dataManager* dtmanage_;
35  string nameOfCase_;
36  string workingDir_;
37  WDialog* dialogSave_;
38  WDialog* dialogOpen_;
39  WLineEdit* saveNameEdit_;
40  WLineEdit* openNameEdit_;
41  GWt_LigneFaisceau* beamLine_;
42   
43  WWidget* globalParam_;
44  GWt_dialog* graphicsDialog_;
45  WButtonGroup *group_;
46  vector<GWt_dialog*> eDialog_;
47 
48  WText* probleme_;
49  WComboBox* choixElementDessin_;
50  WComboBox* choixTypeDessinFaisceau_;
51  WComboBox* choixAbsPhase_;
52  WComboBox* choixOrdPhase_;
53  WComboBox* choixEnveloppeDessin_;
54  WComboBox* choixHistoDessin_;
55  WComboBox* choixVariableHisto_;
56
57  WContainerWidget* toto_;
58  WString applicationDefaultTitle_;
59   
60  GWt_softwarePanel* executeWidget_;
61  WFileUpload* uploadFileSelectorWidget_;
62  GWt_console* console_;
63  GWt_abstractElementFactory* abstractElementFactory_;
64     
65  WText* createTitle(const WString&);
66  WWidget* createPalette();
67  void createBeamLine();
68  WWidget* createGlobalParamWidget();
69  WWidget* createExecuteWidget();
70  WContainerWidget* createDrawingWidget();
71 
72  void closeGraphicDialog();
73 
74  void createDragImage(const char *url,const char *smallurl,const char *mimeType,WContainerWidget *p,WString());
75  void sauver();
76  void dialogSaveDone(WDialog::DialogCode code);
77  void restaurer();
78  void chargerConfig();
79  void openFileSelector();
80  void fileTooLarge();
81 
82  void dialogOnGraphics();
83  //  void setModelComponentForPhaseSpace(WStandardItemModel* model, vector<bareParticle>& partic, unsigned indexParticleComponent, unsigned modelComponent);
84void faireDessinParmela(WContainerWidget* toto, particleBeam* beam, unsigned indexAbs, unsigned indexOrd, string namex, string namey  );
85  void faireDessinTransport(WContainerWidget* toto, particleBeam* beam, unsigned indexAbs, unsigned indexOrd, string namex, string namey);
86  void faireDessinEnveloppe(WContainerWidget* toto, string type);
87  //  void scatterPlot1D(WContainerWidget* toto, vector<double>& xcor, vector<double>& ycor);
88  void chartPlot2vec(WContainerWidget* toto, vector<double>& xcor, vector<double>& ycor, bool drawPoints, int width, int height, bool makeIcon=false);
89  bool removePathFromConfigName(string& config);
90  bool removeExtensionFromConfigName(string& config);
91 
92  void dessiner();
93  void dessinerEnveloppe();
94  void dessinerPhaseSpace();
95  void dessinerHistogramme();
96
97 public :
98 
99  PspaApplication(const WEnvironment& env);
100 
101  string getSelection();
102  void faireDessin();
103
104  inline dataManager* getDataManager() const  {
105    return dtmanage_;
106  }
107 
108  inline WWidget* getGlobalParam() {
109    return globalParam_;
110  }
111
112  inline GWt_softwarePanel* getExecuteWidget() {
113    return executeWidget_;
114  }
115
116  inline GWt_LigneFaisceau* getBeamLine() {
117    return beamLine_;
118  }
119
120  inline GWt_abstractElementFactory* getAbstractElementFactory() {
121    return abstractElementFactory_;
122  }
123
124    inline string getWorkingDir() const {
125        return workingDir_;
126    }
127
128};
129#endif
Note: See TracBrowser for help on using the repository browser.