Changeset 397 in PSPA for Interface_Web
- Timestamp:
- Mar 22, 2013, 4:32:52 PM (12 years ago)
- Location:
- Interface_Web/branches/12_03_12-managerComboBox/pspaWT
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
Interface_Web/branches/12_03_12-managerComboBox/pspaWT/History
r395 r397 6 6 ========================================================= 7 7 8 22 Mars : Laurent Garnier 9 - GWt_sectionToExecute : Amélioration du layout 10 - GWt_softwarePanel : Suppression de la version avec les lineEdit 11 - Améliorations de l'interface graphique 12 - Restructuration de la console 13 - Remise en ordre des éléments de la barre d'icone à gauche 14 - Toujours quelques problemes à regler sur les comboBox 15 16 Passage sur les comboBox 8 17 20 Mars : Laurent Garnier 9 18 - GWt_LigneFaisceau : renommage -
Interface_Web/branches/12_03_12-managerComboBox/pspaWT/sources/controler/include/nomDeLogiciel.h
r316 r397 19 19 }; 20 20 21 21 22 22 private: 23 23 -
Interface_Web/branches/12_03_12-managerComboBox/pspaWT/sources/userInterface/include/GWt_console.h
r272 r397 15 15 16 16 public: 17 GWt_console(); 18 virtual ~GWt_console(); 19 void addConsoleMessage(WString msg); 17 GWt_console(); 18 virtual ~GWt_console(); 19 void addConsoleMessage(WString msg); 20 private: 21 WText* output_; 20 22 }; 21 23 -
Interface_Web/branches/12_03_12-managerComboBox/pspaWT/sources/userInterface/include/GWt_ligneFaisceau.h
r385 r397 81 81 void update(int); 82 82 83 void initializeSoftwares(); 84 83 85 private : 84 86 void manageLineFaisceauLayout(); -
Interface_Web/branches/12_03_12-managerComboBox/pspaWT/sources/userInterface/include/GWt_pspaApplication.h
r381 r397 65 65 WText* createTitle(const WString&); 66 66 WWidget* createPalette(); 67 voidcreateBeamLine();67 WWidget* createBeamLine(); 68 68 WWidget* createGlobalParamWidget(); 69 69 WWidget* createExecuteWidget(); -
Interface_Web/branches/12_03_12-managerComboBox/pspaWT/sources/userInterface/src/GWt_abstractElementFactory.cc
r343 r397 99 99 { 100 100 vector <GWt_abstractElement*> elems; 101 if (is DriftElementEnable) {102 elems.push_back(new GWt_ drift());101 if (isRFGunElementEnable) { 102 elems.push_back(new GWt_rfgun()); 103 103 } 104 104 if (isBeamElementEnable) { 105 105 elems.push_back(new GWt_beam()); 106 } 107 if (isDriftElementEnable) { 108 elems.push_back(new GWt_drift()); 106 109 } 107 110 if (isBendElementEnable) { … … 111 114 elems.push_back(new GWt_cell()); 112 115 } 116 if (isSolenoElementEnable) { 117 elems.push_back(new GWt_soleno()); 118 } 113 119 if (isFitElementEnable) { 114 120 elems.push_back(new GWt_fit()); 115 }116 if (isRFGunElementEnable) {117 elems.push_back(new GWt_rfgun());118 }119 if (isSolenoElementEnable) {120 elems.push_back(new GWt_soleno());121 121 } 122 122 if (isSnapshotElementEnable) { -
Interface_Web/branches/12_03_12-managerComboBox/pspaWT/sources/userInterface/src/GWt_console.cc
r272 r397 3 3 #include <Wt/WApplication> 4 4 #include <Wt/WText> 5 #include <Wt/WBorder> 6 #include <Wt/WLayout> 7 #include <Wt/WPanel> 8 #include <Wt/WScrollArea> 5 9 6 10 GWt_console::GWt_console() … … 8 12 { 9 13 setObjectName("console"); 14 15 // le panel 16 WPanel *panelConsole = new WPanel(this); 17 WScrollArea* container = new WScrollArea(); 18 19 panelConsole->setTitle(" output"); 20 output_ = new WText(this); 21 output_->setTextFormat(PlainText); 22 output_->setInline(false); 23 24 container->setWidget(output_); 25 26 panelConsole->setCentralWidget(container); 27 output_->setMinimumSize(270,100); 28 output_->setMaximumSize(400,400); 29 30 10 31 } 11 32 … … 18 39 void GWt_console::addConsoleMessage(WString msg) { 19 40 20 WText *w = new WText(this); 21 w->setTextFormat(PlainText); 22 w->setText(msg); 23 w->setInline(false); 41 output_->setText(output_->text()+msg); 24 42 25 43 /* 26 44 * Little javascript trick to make sure we scroll along with new content 27 45 */ 28 wApp->doJavaScript( this->jsRef() + ".scrollTop += "29 + this->jsRef() + ".scrollHeight;");46 wApp->doJavaScript(output_->jsRef() + ".scrollTop += " 47 + output_->jsRef() + ".scrollHeight;"); 30 48 31 49 } -
Interface_Web/branches/12_03_12-managerComboBox/pspaWT/sources/userInterface/src/GWt_globalParameters.cc
r272 r397 18 18 pspa_ = ps; 19 19 WVBoxLayout* globLayout = new WVBoxLayout(); 20 decorationStyle().setBackgroundColor (WColor("blue"));21 20 //&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& 22 21 WContainerWidget *result = new WContainerWidget(); -
Interface_Web/branches/12_03_12-managerComboBox/pspaWT/sources/userInterface/src/GWt_ligneFaisceau.cc
r395 r397 9 9 #include "GWt_soleno.h" 10 10 #include "GWt_bend.h" 11 #include "nomDeLogiciel.h" 11 12 12 13 #include "mixedTools.h" … … 24 25 ligneFaisceauLayout_ = new WHBoxLayout(); 25 26 // decorationStyle().setBackgroundColor (WColor(245,245,245)); 26 setLayout(ligneFaisceauLayout_);27 27 ligneFaisceauLayout_->setContentsMargins(0,0,0,0); 28 28 ligneFaisceauLayout_->setSpacing(0); 29 29 30 setLayout(ligneFaisceauLayout_); 31 30 32 // set the object name 31 setObjectName("ligneFaisceau"); 33 setObjectName("ligneFaisceau"); 32 34 clear(); 33 35 } … … 282 284 } 283 285 286 287 void GWt_LigneFaisceau::initializeSoftwares(){ 288 289 vector <abstractElement*> elems = getAllAbstractElements(); 290 for (int a=0; a< elems.size(); a++) { 291 elems[a]->setSoftware(nomDeLogiciel::unknownSoftware); 292 } 293 } 294 295 -
Interface_Web/branches/12_03_12-managerComboBox/pspaWT/sources/userInterface/src/GWt_pspaApplication.cc
r381 r397 77 77 78 78 /* 79 * The main layout is a 3x2grid layout.79 * The main layout is a 4x3 grid layout. 80 80 */ 81 WGridLayout * layout = new WGridLayout();81 WGridLayout *mainGridLayout = new WGridLayout(); 82 82 // layout->addWidget(createTitle("<a href='workingArea/parmin'> Menu (In future)</a>"), 0, 0, 1, 2); 83 83 // layout->addWidget(createTitle("Menu (In future)"), 0, 0, 1, 2); … … 131 131 toolbarLayout->addWidget(new WText("") , 1,Wt::AlignMiddle); 132 132 133 WContainerWidget * layoutContainer = new WContainerWidget();134 layoutContainer->setLayout(toolbarLayout);135 layoutContainer->decorationStyle().setBackgroundImage ("/htdocs/fond_toolbar.png");136 layout->addWidget(layoutContainer, 1, 0, 1, 2);137 layout->addWidget(createPalette(), 2, 0, 4, 1);138 139 createBeamLine(); 133 WContainerWidget * toolbarLayoutContainer = new WContainerWidget(); 134 toolbarLayoutContainer->setLayout(toolbarLayout); 135 toolbarLayoutContainer->decorationStyle().setBackgroundImage ("/htdocs/fond_toolbar.png"); 136 137 mainGridLayout->addWidget(toolbarLayoutContainer, 1, 0, 1, 3); 138 mainGridLayout->addWidget(createPalette(), 2, 0, 4, 1); 139 140 140 141 141 WScrollArea* scroll = new WScrollArea(); 142 scroll->setWidget(beamLine_); 143 layout->addWidget(scroll, 2, 1, 1, 1); 142 scroll->setWidget(createBeamLine()); 143 scroll->setMinimumSize(300,150); 144 145 mainGridLayout->addWidget(scroll, 2, 1, 1, 2); 144 146 145 147 … … 151 153 // console_->setOverflow(WContainerWidget::OverflowAuto); 152 154 153 154 console_ = new GWt_console();155 console_->clear();156 console_->decorationStyle().setBackgroundColor (WColor("lightgray"));157 console_->setMaximumSize(600,200);158 console_->setMinimumSize(300,100);159 console_->setOverflow(WContainerWidget::OverflowAuto);160 layout->addWidget(console_, 3, 2);161 155 162 156 //----------- … … 171 165 executeWidget_ = new GWt_softwarePanel(dtmanage_,this); 172 166 173 layout->addWidget( globalParam_, 3, 1);167 mainGridLayout->addWidget( globalParam_, 3, 1); 174 168 // layout->addWidget( leDessin_, 3, 2); 175 layout->addWidget( executeWidget_ , 4, 1);169 mainGridLayout->addWidget( executeWidget_ , 4, 1); 176 170 //----------- 177 171 178 layout->setColumnResizable(1); 179 layout->setRowResizable(2); 172 console_ = new GWt_console(); 173 174 console_->setMinimumSize(300,100); 175 176 mainGridLayout->addWidget(console_, 3, 2,2,1); 177 178 180 179 /* 181 180 * Let row 2 and column 1 take the excess space. 182 181 */ 183 layout->setRowStretch(2, 1); 184 layout->setColumnStretch(1, 1); 185 186 widroot->setLayout(layout); 182 mainGridLayout->setRowStretch(4, 1); 183 mainGridLayout->setColumnStretch(2, 1); 184 185 widroot->setLayout(mainGridLayout); 186 187 // set auto scrollbar if needed 188 widroot->setOverflow(WContainerWidget::OverflowAuto); 189 187 190 } 188 191 … … 210 213 } 211 214 212 voidPspaApplication::createBeamLine()215 Wt::WWidget* PspaApplication::createBeamLine() 213 216 { 214 217 extensionFile_= 0; … … 220 223 beamLine_->setMinimumSize(300,100); 221 224 setTitle(applicationDefaultTitle_); 225 226 return beamLine_; 222 227 } 223 228 … … 225 230 { 226 231 WContainerWidget* globalParam = new GWt_globalParameters(this); 227 globalParam->setMaximumSize(600,150);228 globalParam->setMinimumSize(600,150);229 232 return globalParam; 230 233 } -
Interface_Web/branches/12_03_12-managerComboBox/pspaWT/sources/userInterface/src/GWt_sectionToExecute.cc
r396 r397 15 15 softwarePanel(sPanel) 16 16 { 17 Wt::WGridLayout* mainContainerLayout = new Wt::WGridLayout(); 17 Wt::WHBoxLayout* mainContainerLayout = new Wt::WHBoxLayout(); 18 mainContainerLayout->setContentsMargins(0,0,0,0); 19 20 Wt::WContainerWidget* labelAndComboContainer = new Wt::WContainerWidget(); 21 Wt::WVBoxLayout* labelAndComboContainerLayout = new Wt::WVBoxLayout(); 22 labelAndComboContainerLayout->setContentsMargins(0,0,0,0); 23 24 Wt::WContainerWidget* labelAndComboInsideContainer = new Wt::WContainerWidget(); 25 Wt::WHBoxLayout* labelAndComboInsideContainerLayout = new Wt::WHBoxLayout(); 26 labelAndComboInsideContainerLayout->setContentsMargins(0,0,0,0); 18 27 19 mainContainerLayout->addWidget(new Wt::WText(" from : "),0,0);20 mainContainerLayout->addWidget(first,0,1);21 mainContainerLayout->addWidget(new Wt::WText(" to : "),0,2);22 mainContainerLayout->addWidget(last,0,3);23 mainContainerLayout->addWidget(soft,0,4);28 labelAndComboInsideContainerLayout->addWidget(new Wt::WText(" from : ")); 29 labelAndComboInsideContainerLayout->addWidget(first); 30 labelAndComboInsideContainerLayout->addWidget(new Wt::WText(" to : ")); 31 labelAndComboInsideContainerLayout->addWidget(last); 32 labelAndComboInsideContainerLayout->addWidget(soft); 24 33 34 labelAndComboInsideContainer->setLayout(labelAndComboInsideContainerLayout); 35 36 labelAndComboContainerLayout->addWidget(labelAndComboInsideContainer); 37 labelAndComboContainerLayout->addStretch (10); 38 39 labelAndComboContainer->setLayout(labelAndComboContainerLayout); 40 41 // add label and Combo containers 42 mainContainerLayout->addWidget(labelAndComboContainer); 43 44 25 45 // add errors and warning layout 26 46 warningsContainer_ = new Wt::WContainerWidget(); … … 46 66 imgError->resize(20,20); 47 67 48 warningsLabel_ = new Wt::WLabel(" --warnings---");49 errorsLabel_ = new Wt::WLabel(" ---errors--");68 warningsLabel_ = new Wt::WLabel(""); 69 errorsLabel_ = new Wt::WLabel(""); 50 70 51 71 hLayoutContainerWarnings->addWidget(imgWarning); … … 65 85 66 86 // add warnings and errors containers 67 mainContainerLayout->addWidget(warningsAndErrorsContainer,0,5,2,1); 68 mainContainerLayout->addWidget(new WLabel("--"),1,1); 87 // mainContainerLayout->addWidget(warningsAndErrorsContainer); 69 88 70 89 this->setLayout(mainContainerLayout); … … 74 93 lastElement->activated().connect(softwarePanel,&GWt_softwarePanel::updateSections); 75 94 software->activated().connect(softwarePanel,&GWt_softwarePanel::updateSections); 95 96 manageWarningsAndErrors(); 76 97 } 77 98 -
Interface_Web/branches/12_03_12-managerComboBox/pspaWT/sources/userInterface/src/GWt_softwarePanel.cc
r396 r397 25 25 dtmanage_ = dataManager; 26 26 pspa_ = pspa; 27 setMaximumSize(600,150); 28 setMinimumSize(600,150); 29 27 30 28 // bouton execute 31 29 exec_go_ = new WPushButton("execute!"); … … 48 46 // le panel 49 47 WPanel *panelLogiciels = new WPanel(this); 50 panelLogiciels->setTitle(" sections of beam Line for executing softwares ");48 panelLogiciels->setTitle(" sections of beam line for executing softwares "); 51 49 52 50 contenuSections_ = new WContainerWidget(); … … 303 301 bool caMarche = true; 304 302 trivaluedBool tbResume = TBoolOk; 303 304 // initialize dataManager 305 305 dtmanage_->initializeExecution(); 306 307 // intialize User Interface 308 if (pspa_->getBeamLine()) { 309 pspa_->getBeamLine()->initializeSoftwares(); 310 } 311 306 312 string diagnostic; 307 313
Note: See TracChangeset
for help on using the changeset viewer.