Changeset 427 in PSPA for Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_pspaApplication.cc
- Timestamp:
- Oct 25, 2013, 3:51:05 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_pspaApplication.cc
r424 r427 8 8 #include "GWt_softwarePanel.h" 9 9 #include "GWt_globalParameters.h" 10 // #include "GWt_dialog.h"11 10 #include "GWt_draggableImage.h" 12 11 #include "particleBeam.h" … … 36 35 #include <Wt/WRadioButton> 37 36 37 #include <Wt/WPanel> 38 #include <Wt/WMessageBox> 39 38 40 #define HAS_IMAGEMAGIC 1 39 41 … … 76 78 useStyleSheet("htdocs/pspa.css"); 77 79 dtmanage_ = new dataManager(this); 78 // dtmanage_->setWorkingDir(workingDir_); 79 80 /* 81 * The main layout is a 4x3 grid layout. 82 */ 83 WGridLayout *mainGridLayout = new WGridLayout(); 84 // layout->addWidget(createTitle("<a href='workingArea/parmin'> Menu (In future)</a>"), 0, 0, 1, 2); 85 // layout->addWidget(createTitle("Menu (In future)"), 0, 0, 1, 2); 86 80 81 // The main layout is a 4x3 grid layout. 82 WGridLayout *mainGridLayout = new WGridLayout(); 87 83 WHBoxLayout *toolbarLayout = new WHBoxLayout(); 88 84 … … 100 96 101 97 boutonSauve->setToolTip ("sauvegarder votre configuration"); 102 boutonRestaure->setToolTip (" 98 boutonRestaure->setToolTip ("restaurer la configuration depuis le serveur"); 103 99 boutonLoadNew->setToolTip ("charger une configuration"); 104 100 boutongraphicalAnalysis->setToolTip ("analyse graphique"); … … 118 114 boutonSauve->clicked().connect(this, &PspaApplication::sauver); 119 115 boutonRestaure->clicked().connect(this, &PspaApplication::restaurer); 120 // Upload when the button is clicked. 121 // React to a succesfull upload. 116 // Upload when the button is clicked. React to a succesfull upload. 122 117 boutonLoadNew->clicked().connect(this, &PspaApplication::openFileSelector); 123 124 118 boutongraphicalAnalysis->clicked().connect(this, &PspaApplication::dialogOnGraphics); 125 126 119 boutonTrash->clicked().connect(this, &PspaApplication::removeBeamLine); 127 128 120 toolbarLayout->addWidget(boutonSauve , 0,Wt::AlignMiddle); 129 121 toolbarLayout->addWidget(boutonRestaure , 0,Wt::AlignMiddle); … … 140 132 mainGridLayout->addWidget(createPalette(), 2, 0, 4, 1); 141 133 142 143 134 WScrollArea* scroll = new WScrollArea(); 144 135 scroll->setWidget(createBeamLine()); 145 136 scroll->setMinimumSize(300,150); 146 147 137 mainGridLayout->addWidget(scroll, 2, 1, 1, 2); 148 149 150 // console_ = new WContainerWidget(); 151 // console_->decorationStyle().setBackgroundColor (WColor("lightgray")); 152 // console_->setMaximumSize(600,200); 153 // layout->addWidget(console_, 3, 1); 154 // console_->setMinimumSize(300,100); 155 // console_->setOverflow(WContainerWidget::OverflowAuto); 156 157 138 158 139 //----------- 140 159 141 // A supprimer et a mettre en fenetre 160 globalParam_ = createGlobalParamWidget(); 161 // leDessin_ = new WContainerWidget(); 162 // leDessin_ = createDrawingWidget(); 142 // xx globalParam_ = createGlobalParamWidget(); 143 // xx mainGridLayout->addWidget(globalParam_,3,1); 144 145 WWidget* dboard = createDashBoard(); 146 dboard->setMinimumSize(300,100); 147 mainGridLayout->addWidget(dboard,3,1); 148 //----------- 149 163 150 graphicsDialog_ = new GWt_dialog("graphical analysis",createDrawingWidget(),false); 164 151 graphicsDialog_->setMinimumSize(400,400); … … 167 154 168 155 executeWidget_ = new GWt_softwarePanel(dtmanage_,this); 169 170 mainGridLayout->addWidget( globalParam_, 3, 1); 171 // layout->addWidget( leDessin_, 3, 2); 172 mainGridLayout->addWidget( executeWidget_ , 4, 1); 173 //----------- 156 executeWidget_->setMinimumSize(400,100); 157 mainGridLayout->addWidget(executeWidget_,4,1); 174 158 175 159 console_ = new GWt_console(); 176 177 // manage sizes178 160 console_->setMinimumSize(300,100); 179 executeWidget_->setMinimumSize(400,100); 180 181 mainGridLayout->addWidget(console_, 3, 2,2,1); 182 183 184 /* 185 * Let row 2 and column 1 take the excess space. 186 */ 187 mainGridLayout->setRowStretch(4, 1); 188 mainGridLayout->setColumnStretch(2, 1); 161 mainGridLayout->addWidget(console_,3,2,2,1); 162 163 // Let row 2 and column 1 take the excess space. 164 mainGridLayout->setRowStretch(4,1); 165 mainGridLayout->setColumnStretch(2,1); 189 166 190 167 widroot->setLayout(mainGridLayout); 191 192 168 // set auto scrollbar if needed 193 169 widroot->setOverflow(WContainerWidget::OverflowAuto); 194 170 } 171 172 // WWidget* PspaApplication::createGlobalParamWidget() 173 // { 174 // WContainerWidget* globalParam = new GWt_globalParameters(this); 175 // globalParam->setMinimumSize(300,100); 176 // return globalParam; 177 // } 178 179 WWidget* PspaApplication::createDashBoard() 180 { 181 WContainerWidget *result = new WContainerWidget(); 182 183 WPanel *panel = new WPanel(result); 184 panel->setTitle("dashboard"); 185 186 WContainerWidget *textdiv; 187 textdiv = new WContainerWidget(); 188 textdiv->setStyleClass("text"); 189 190 globalParam_ = new GWt_globalParameters(dtmanage_,textdiv); 191 192 WContainerWidget *cnt = new WContainerWidget(); 193 WContainerWidget *buttons = new WContainerWidget(); 194 buttons->setStyleClass("buttons"); 195 196 WPushButton *button; 197 button = new WPushButton("globalParameters", buttons); 198 button->clicked().connect(this, &PspaApplication::messageBox1); 199 200 button = new WPushButton("fodoCells", buttons); 201 button->clicked().connect(this, &PspaApplication::messageBox2); 202 203 styleSheet().addRule(".buttons","padding: 5px;"); 204 styleSheet().addRule(".text", "padding: 4px 8px"); 205 styleSheet().addRule("body", "margin: 0px;"); 206 207 cnt->addWidget(buttons); 208 cnt->addWidget(textdiv); 209 panel->setCentralWidget(cnt); 210 return result; 211 } 212 213 void PspaApplication::messageBox1() 214 { 215 globalParam_->initilializeDialog(); 216 return; 217 } 218 219 void PspaApplication::messageBox2() 220 { 221 return; 195 222 } 196 223 … … 203 230 new WBreak(palette); 204 231 } 205 206 232 return palette; 207 233 } … … 231 257 return beamLine_; 232 258 } 233 234 WWidget* PspaApplication::createGlobalParamWidget()235 {236 WContainerWidget* globalParam = new GWt_globalParameters(this);237 globalParam->setMinimumSize(300,100);238 return globalParam;239 }240 241 259 242 260 void PspaApplication::dialogOnGraphics() … … 639 657 new WText(" after element : " + elementLabel, phaseSpaceDialog->contents()); 640 658 641 for (int k=0 ; k < legende.size(); k++) {659 for (int k=0 ; k < (int)legende.size(); k++) { 642 660 new WBreak(phaseSpaceDialog->contents()); 643 661 new WText(legende.at(k), phaseSpaceDialog->contents()); … … 1062 1080 new WText(" after element : " + elementLabel, w); 1063 1081 1064 for (int k=0 ; k < legende.size(); k++) {1082 for (int k=0 ; k < (int)legende.size(); k++) { 1065 1083 new WBreak(w); 1066 1084 new WText(legende.at(k), w);
Note: See TracChangeset
for help on using the changeset viewer.