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

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

Suppression de la classe "elementsCollection" et bug fixed #20

File size: 3.0 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#include "GWt_abstractElementFactory.h"
23#include "GWt_softwarePanel.h"
24#include "GWt_ligneFaisceau.h"
25
26using namespace Wt;
27
28/*
29 * ESSAI PSPA
30 */
31class PspaApplication : public WApplication
32{
33       
34    private :
35   
36    dataManager* dtmanage_;
37    string nameOfCase_;
38    string workingDir_;
39    WDialog* dialogSave_;
40    WDialog* dialogOpen_;
41    WLineEdit* saveNameEdit_;
42    WLineEdit* openNameEdit_;
43    GWt_LigneFaisceau* beamLine_;
44   
45   
46    // WContainerWidget* console_;
47    WWidget* globalParam_;
48    // WContainerWidget* leDessin_;
49    GWt_dialog* graphicsDialog_;
50   
51    WText* probleme_;
52    WComboBox* choixElementDessin_;
53    WComboBox* choixTypeDessinFaisceau_;
54    WComboBox* choixEnveloppeDessin_;
55    WContainerWidget* toto_;
56    GWt_softwarePanel* executeWidget_;
57    WFileUpload* uploadFileSelectorWidget_;
58    GWt_console* console_;
59    GWt_abstractElementFactory* abstractElementFactory_;
60   
61   
62    WText*   createTitle(const WString&);
63    WWidget* createPalette();
64    void createBeamLine();
65    WWidget* createGlobalParamWidget();
66    WWidget* createExecuteWidget();
67    WContainerWidget* createDrawingWidget();
68   
69    void createDragImage(const char *url,const char *smallurl,const char *mimeType,WContainerWidget *p,WString name);
70    void sauver();
71    void dialogSaveDone(WDialog::DialogCode code);
72    void dialogOpenDone(WDialog::DialogCode code);
73    void restaurer();
74    void chargerConfig();
75    void openFileSelector();
76    void fileTooLarge();
77    void dessiner();
78   
79    void dialogOnGraphics();
80    void faireDessinParmela(WContainerWidget* toto, particleBeam* beam);
81    void faireDessinTransport(WContainerWidget* toto, particleBeam* beam);
82   
83    void dessinerEnveloppe();
84    void faireDessinEnveloppe(WContainerWidget* toto, string type);
85    void scatterPlot1D(WContainerWidget* toto, vector<double>& xcor, vector<double>& ycor);
86   
87    bool removeExtensionFromConfigName(string& config);
88   
89    void dessinerHistogramme();
90   
91    public :
92   
93    PspaApplication(const WEnvironment& env);
94   
95    inline dataManager* getDataManager() const  {
96        return dtmanage_;
97    }
98   
99    // void addConsoleMessage(WString msg);
100   
101    string getSelection();
102    void faireDessin();
103    inline WWidget* getGlobalParam() {
104        return globalParam_;
105    };
106    inline GWt_softwarePanel* getExecuteWidget() {
107        return executeWidget_;
108    };
109    inline GWt_LigneFaisceau* getBeamLine() {
110        return beamLine_;
111    }
112
113    inline GWt_abstractElementFactory* getAbstractElementFactory() {
114        return abstractElementFactory_;
115    };
116};
117#endif
Note: See TracBrowser for help on using the repository browser.