source: PSPA/Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_machine.cc @ 495

Last change on this file since 495 was 495, checked in by lemeur, 10 years ago

maj de History

File size: 2.0 KB
Line 
1#include "GWt_machine.h"
2
3#include <Wt/WPushButton>
4#include <Wt/WLabel>
5#include <Wt/WPanel>
6#include <Wt/WColor>
7#include <Wt/WVBoxLayout>
8#include <Wt/WHBoxLayout>
9#include <Wt/WComboBox>
10
11GWt_machine::GWt_machine(GWt_accelerator* parent,expandedMachine* mach) :
12UI_Accelerator_(parent),
13machineControler_(mach)
14{
15  displayWidgetComputing();
16}
17
18GWt_machine::~GWt_machine()
19{
20}
21
22void GWt_machine::createWidgetComputing(WContainerWidget* parent) {
23
24  // suppress old detailled view if present
25  parent->clear();
26 
27  // add the detailled view
28  WContainerWidget* wdg = new WContainerWidget(parent);
29
30  wdg->setObjectName("machine");
31  wdg->addStyleClass("machinePanel");
32  Wt::WVBoxLayout* vContainerLayout = new WVBoxLayout();
33  vContainerLayout->setContentsMargins(0,0,0,0);
34  Wt::WPanel *collapsiblePanel = new Wt::WPanel(wdg);
35  collapsiblePanel->setTitle("Machine panel");
36  collapsiblePanel->setCollapsible(true);
37 
38  WContainerWidget* menu = new WContainerWidget(wdg);
39  menu->addStyleClass("machineMenu");
40 
41 
42  //  new WLabel(sectorControler_->getName()+" ",menu);
43 
44  WPushButton* actionParameters = new WPushButton("",menu);
45  // set tooltips
46  actionParameters->setToolTip("change parameters");
47 
48  // Set class for actions elements
49  actionParameters->setStyleClass("Button WhiteButton parameters");
50  actionParameters->setMaximumSize(32,32);
51  actionParameters->setMinimumSize(32,32);
52 
53
54 
55  menu->setWidth(20+7+7+1+1+2);
56 
57  vContainerLayout->addWidget(menu);
58 
59  // Add beamLine for this sector
60  //  UI_beamLine_ = new GWt_ligneFaisceau(getAccelerator()->getDataManager(),this);
61  //  vContainerLayout->addWidget(UI_beamLine_);
62 
63  // add the software panel
64  cout << " GWt_machine::createWidgetComputing APPEL sofwarepanel" << endl;
65    GWt_softwarePanel*  computeWidget = new GWt_softwarePanel(getAccelerator()->getDataManager(),this);
66    vContainerLayout->addWidget(computeWidget);
67 
68
69  wdg->setLayout(vContainerLayout);
70}
71
72void GWt_machine::displayWidgetComputing() {
73  createWidgetComputing(getAccelerator()->getAcceleratorComputingView());
74}
75
Note: See TracBrowser for help on using the repository browser.