ATLAS Offline Software
missingEtController.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // //
7 // Implementation of class missingEtController //
8 // //
9 // Author: Giorgi Gvaberidze (ggvaberi@cern.ch) //
10 // Initial version: July 2010 //
11 // //
13 
14 #define VP1IMPVARNAME m_d
15 
19 #include "VP1Base/IVP1System.h"
20 #include "VP1Base/VP1Serialise.h"
21 #include "VP1Base/VP1Deserialise.h"
22 
23 #include "ui_missingetcontroller.h"
24 #include "ui_missingEtPivot.h"
25 
26 //____________________________________________________________________
28 public:
29  Ui::missingEtControllerForm ui;
30  Ui::missingEtPivotForm uiPivot;
33 };
34 
35 //____________________________________________________________________
37 :VP1Controller(sys, "missingEtController"), m_d(new Imp)
38 {
39  m_d->ui.setupUi(this);
41  setupCollWidgetInScrollArea(m_d->ui.collWidgetScrollArea, m_d->collWidget);
42 
43  initDialog(m_d->uiPivot, m_d->ui.pushButton_display);
44 
46  connectToLastUpdateSlot(m_d->uiPivot.horizontalSlider_thickness);
47 
48  addUpdateSlot(SLOT(changeScale()));
49  connectToLastUpdateSlot(m_d->uiPivot.horizontalSlider_scale);
50 
52  connectToLastUpdateSlot(m_d->ui.radioButton_arrow_shape);
53  connectToLastUpdateSlot(m_d->ui.radioButton_dashline_shape);
54 
55  connect(this, SIGNAL(changeShapeChanged(bool)), this, SLOT(setArrow(bool)));
56 
57  initLastVars();
58 
60  refreshPivots();
61 }
62 
63 //____________________________________________________________________
65 {
66  delete m_d;
67 }
68 
69 //____________________________________________________________________
71 {
72  return 1;
73 }
74 
75 //____________________________________________________________________
77 {
78  s.save(m_d->uiPivot.horizontalSlider_thickness);
79  s.save(m_d->uiPivot.horizontalSlider_scale);
80  s.save(m_d->ui.radioButton_arrow_shape,m_d->ui.radioButton_dashline_shape);//Version 1+
81 }
82 
83 //____________________________________________________________________
85 {
86  if(s.version() < 0 || s.version() > 1){
87  message("Warning: State data in .vp1 file has unsupported version ("+str(s.version())+")");
88  return;
89  }
90  if (s.version() == 0)
91  s.ignoreInt();
92 
93  s.restore(m_d->uiPivot.horizontalSlider_thickness);
94  s.restore(m_d->uiPivot.horizontalSlider_scale);
95 
96  if(s.version() >= 1)
97  s.restore(m_d->ui.radioButton_arrow_shape, m_d->ui.radioButton_dashline_shape);
98 }
99 
100 //____________________________________________________________________
102 {
103  return m_d->collWidget;
104 }
105 
108  if(handle)
109  handle->refresh();
110  }
111 }
112 
114 {
117  refreshPivots();
118  }
119 
122  refreshPivots();
123  }
124 }
125 
128  refreshPivots();
129 }
130 
132  return m_d->ui.radioButton_arrow_shape->isChecked();
133 }
134 
136  VP1MissingEtHandle::useThickness(m_d->uiPivot.horizontalSlider_thickness->value());
137  refreshPivots();
138 }
139 
141  VP1MissingEtHandle::useScale(m_d->uiPivot.horizontalSlider_scale->value());
142  refreshPivots();
143 }
144 
145 #define VP1CONTROLLERCLASSNAME missingEtController
147 POSSIBLECHANGE_IMP(changeShape)
148 //POSSIBLECHANGE_IMP(setDashLine)
149 //POSSIBLECHANGE_IMP(changeThickness)
150 //POSSIBLECHANGE_IMP(changeScale)
missingEtController::possibleChange_changeShape
void possibleChange_changeShape()
VP1Serialise.h
VP1Controller::addUpdateSlot
const char * addUpdateSlot(const char *slot)
Definition: VP1Controller.cxx:318
VP1Controller::setupCollWidgetInScrollArea
void setupCollWidgetInScrollArea(QScrollArea *scrollarea, VP1CollectionWidget *collWidget)
Definition: VP1Controller.cxx:255
POSSIBLECHANGE_IMP
#define POSSIBLECHANGE_IMP(x)
Definition: VP1ControllerMacros.h:18
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
VP1Deserialise.h
VP1Serialise
Definition: VP1Serialise.h:45
VP1MissingEtCollWidget
Definition: VP1MissingEtCollWidget.h:23
missingEtController::refreshPivots
void refreshPivots()
Definition: missingEtController.cxx:106
missingEtController::setArrow
void setArrow(bool)
Definition: missingEtController.cxx:113
fillPileUpNoiseLumi.connect
string connect
Definition: fillPileUpNoiseLumi.py:70
VP1Controller::initDialog
void initDialog(T &theUI, QPushButton *launchbutton, QAbstractButton *enabledButton=0)
Definition: VP1Controller.h:144
CSV_InDetExporter.new
new
Definition: CSV_InDetExporter.py:145
VP1MissingEtHandle
Definition: VP1MissingEtHandle.h:36
missingEtController::actualSaveSettings
void actualSaveSettings(VP1Serialise &) const
Definition: missingEtController.cxx:76
missingEtController::Imp::last_changeShape
bool last_changeShape
Definition: missingEtController.cxx:32
missingEtController::Imp::ui
Ui::missingEtControllerForm ui
Definition: missingEtController.cxx:29
VP1String::str
static QString str(const QString &s)
Definition: VP1String.h:49
VP1MissingEtHandle::useThickness
static void useThickness(double)
Definition: VP1MissingEtHandle.cxx:359
missingEtController::~missingEtController
virtual ~missingEtController()
Definition: missingEtController.cxx:64
VP1Controller::connectToLastUpdateSlot
void connectToLastUpdateSlot(QObject *sender, const char *signal)
Definition: VP1Controller.cxx:327
mapkey::sys
@ sys
Definition: TElectronEfficiencyCorrectionTool.cxx:42
missingEtController::changeShape
bool changeShape() const
Definition: missingEtController.cxx:131
missingEtController::actualRestoreSettings
void actualRestoreSettings(VP1Deserialise &)
Definition: missingEtController.cxx:84
missingEtController::m_d
Imp * m_d
Definition: missingEtController.h:53
IVP1System
Definition: IVP1System.h:36
VP1MissingEtHandle::useShape
static void useShape(bool)
Definition: VP1MissingEtHandle.cxx:367
VP1CollectionWidget::collections
QList< VP1Collection * > collections() const
Definition: VP1CollectionWidget.cxx:61
VP1Deserialise
Definition: VP1Deserialise.h:44
missingEtController::Imp::uiPivot
Ui::missingEtPivotForm uiPivot
Definition: missingEtController.cxx:30
VP1MissingEtCollWidget.h
VP1Controller
Definition: VP1Controller.h:45
missingEtController::missingEtController
missingEtController(IVP1System *sys)
Definition: missingEtController.cxx:36
missingEtController::currentSettingsVersion
int currentSettingsVersion() const
Definition: missingEtController.cxx:70
missingEtController::Imp::collWidget
VP1MissingEtCollWidget * collWidget
Definition: missingEtController.cxx:31
missingEtController::collWidget
VP1CollectionWidget * collWidget() const
Definition: missingEtController.cxx:101
missingEtController::setDashline
void setDashline(bool)
Definition: missingEtController.cxx:126
missingEtController::changeShapeChanged
void changeShapeChanged(bool)
missingEtController::changeThickness
void changeThickness()
Definition: missingEtController.cxx:135
VP1CollectionWidget
Definition: VP1CollectionWidget.h:32
VP1MissingEtHandle::shape
static bool shape
Definition: VP1MissingEtHandle.h:71
missingEtController.h
VP1MissingEtHandle::useScale
static void useScale(double)
Definition: VP1MissingEtHandle.cxx:363
missingEtController::Imp
Definition: missingEtController.cxx:27
VP1MissingEtHandle.h
VP1HelperClassBase::message
void message(const QString &) const
Definition: VP1HelperClassBase.cxx:49
missingEtController::changeScale
void changeScale()
Definition: missingEtController.cxx:140
VP1Controller::initLastVars
void initLastVars()
Definition: VP1Controller.cxx:68
IVP1System.h
VP1ControllerMacros.h