ATLAS Offline Software
Classes | Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Slots | Protected Member Functions | Private Slots | Private Attributes | Static Private Attributes | List of all members
MissingEtCollectionSettingsButton Class Reference

#include <MissingEtCollectionSettingsButton.h>

Inheritance diagram for MissingEtCollectionSettingsButton:
Collaboration diagram for MissingEtCollectionSettingsButton:

Classes

class  Imp
 

Public Slots

void showEditMaterialDialog ()
 
void setMaterialText (const QString &)
 

Signals

void lastAppliedChanged ()
 
void cutAllowedPhiChanged (const QList< VP1Interval > &)
 
void metSizeChanged (int)
 

Public Member Functions

 MissingEtCollectionSettingsButton (QWidget *parent=0, int dim=25)
 
virtual ~MissingEtCollectionSettingsButton ()
 
void setDimension (int dim)
 
virtual bool setMaterial (SoMaterial *)
 
virtual void copyValuesFromMaterial (SoMaterial *)
 
virtual double lastAppliedTransparency () const
 
virtual double lastAppliedShininess () const
 
virtual double lastAppliedBrightness () const
 
VP1Interval cutAllowedR () const
 
VP1Interval cutAllowedZ () const
 
float metLength () const
 
float metThickness () const
 
QList< VP1IntervalcutAllowedPhi () const
 
QByteArray saveState () const
 fill out with the state of the object (used for drag and drop etc) More...
 
void restoreFromState (const QByteArray &)
 
SoMaterial * getMaterial (VP1MaterialButton *) const
 
SoMaterial * fallBackMaterial () const
 
void setSystemBasePointer (IVP1System *sys)
 
void message (const QString &) const
 
void message (const QStringList &, const QString &addtoend="") const
 
void message (const QString &addtostart, const QStringList &, const QString &addtoend="") const
 
void messageDebug (const QString &) const
 
void messageDebug (const QStringList &, const QString &addtoend="") const
 
void messageDebug (const QString &addtostart, const QStringList &, const QString &addtoend="") const
 
void messageVerbose (const QString &) const
 
void messageVerbose (const QStringList &, const QString &addtoend="") const
 
void messageVerbose (const QString &addtostart, const QStringList &, const QString &addtoend="") const
 
IVP1SystemsystemBase () const
 
QString helperClassName () const
 

Static Public Member Functions

static bool verbose ()
 
static void warnUndeletedInstances ()
 
static QString str (const QString &s)
 
static QString str (const char *c)
 
static QString str (const bool b)
 
static QString str (const QColor &)
 
static QString str (const SbColor &)
 
static QString str (const VP1Interval &)
 
static QString str (const SbVec2d &)
 
static QString str (const SbVec2f &)
 
static QString str (const SbVec2s &)
 
static QString str (const SbVec3d &)
 
static QString str (const SbVec3f &)
 
static QString str (const SbVec3s &)
 
static QString str (const SbVec4d &)
 
static QString str (const SbVec4f &)
 
static QString str (short int n)
 
static QString str (unsigned short int n)
 
static QString str (long n)
 
static QString str (ulong n)
 
static QString str (int n)
 
static QString str (uint n)
 
static QString str (qlonglong n)
 
static QString str (qulonglong n)
 
static QString str (const double &d)
 
static QString str (const float &f)
 
static QString str (const void *)
 
template<class T >
static QString str (const T *t)
 
template<class T >
static QString str (const QFlags< T > &f)
 
template<class T >
static QString str (const HepGeom::BasicVector3D< T > &t)
 
static QString str (const Amg::Vector3D &t)
 
template<class T >
static QString str (const QList< T > &t)
 

Protected Slots

void updateButton ()
 

Protected Member Functions

void mousePressEvent (QMouseEvent *event)
 
void mouseMoveEvent (QMouseEvent *event)
 
void dropEvent (QDropEvent *event)
 
void dragEnterEvent (QDragEnterEvent *event)
 
void setHelperClassName (const QString &n)
 

Private Slots

void updateVertexDrawStyle ()
 
void updateVertexLightModel (bool)
 

Private Attributes

Impm_d
 
QString m_helpername
 
IVP1Systemm_system
 

Static Private Attributes

static const bool s_vp1verbose = VP1QtUtils::environmentVariableIsOn("VP1_VERBOSE_OUTPUT")
 

Detailed Description

Definition at line 17 of file MissingEtCollectionSettingsButton.h.

Constructor & Destructor Documentation

◆ MissingEtCollectionSettingsButton()

MissingEtCollectionSettingsButton::MissingEtCollectionSettingsButton ( QWidget *  parent = 0,
int  dim = 25 
)

Definition at line 90 of file MissingEtCollectionSettingsButton.cxx.

92 {
93  m_d->dim = dim;
94 
95  m_d->theclass = this;
97 
98  //Draw Styles / Complexity:
99 
100  m_d->vertexDrawStyle = new SoDrawStyle;
101  m_d->vertexDrawStyle->setName("VertexDrawStyle");
102  m_d->vertexDrawStyle->pointSize=5.0;
103  m_d->vertexDrawStyle->ref();
105 
106  // MET length and thickness
107  connect(m_d->editwindow_ui.horizontalSlider_met_len,SIGNAL(valueChanged(int)),this,SIGNAL(metSizeChanged(int)));
108  connect(m_d->editwindow_ui.horizontalSlider_met_thickness,SIGNAL(valueChanged(int)),this,SIGNAL(metSizeChanged(int)));
109 
110  // Light model
111  m_d->vertexLightModel = new SoLightModel;
112  m_d->vertexLightModel->setName("METLightModel");
113  m_d->vertexLightModel->ref();
114 
115  updateVertexLightModel(false);
116  connect(m_d->editwindow_ui.checkBox_verticesUseBaseLightModel,SIGNAL(toggled(bool)),this,SLOT(updateVertexLightModel(bool)));
117 
118  // Phi cut
119  connect(m_d->editwindow_ui.etaphi_widget,SIGNAL(allowedPhiChanged(const QList<VP1Interval>&)),this,SIGNAL(cutAllowedPhiChanged(const QList<VP1Interval>&)));
120 
121 // // R
122 // connect(m_d->editwindow_ui.checkBox_cut_r,SIGNAL(toggled(bool)),this,SLOT(possibleChange_cutAllowedR()));
123 // connect(m_d->editwindow_ui.checkBox_cut_r_range_forcesymmetric,SIGNAL(toggled(bool)),this,SLOT(possibleChange_cutAllowedR()));
124 // connect(m_d->editwindow_ui.checkBox_cut_r_excludeRange,SIGNAL(toggled(bool)),this,SLOT(possibleChange_cutAllowedR()));
125 // connect(m_d->editwindow_ui.doubleSpinBox_cut_r_lower,SIGNAL(valueChanged(double)),this,SLOT(possibleChange_cutAllowedR()));
126 // connect(m_d->editwindow_ui.doubleSpinBox_cut_r_upper,SIGNAL(valueChanged(double)),this,SLOT(possibleChange_cutAllowedR()));
127 
128 // // Z
129 // connect(m_d->editwindow_ui.checkBox_cut_z,SIGNAL(toggled(bool)),this,SLOT(possibleChange_cutAllowedZ()));
130 // connect(m_d->editwindow_ui.checkBox_cut_z_range_forcesymmetric,SIGNAL(toggled(bool)),this,SLOT(possibleChange_cutAllowedZ()));
131 // connect(m_d->editwindow_ui.checkBox_cut_z_excludeRange,SIGNAL(toggled(bool)),this,SLOT(possibleChange_cutAllowedZ()));
132 // connect(m_d->editwindow_ui.doubleSpinBox_cut_z_lower,SIGNAL(valueChanged(double)),this,SLOT(possibleChange_cutAllowedZ()));
133 // connect(m_d->editwindow_ui.doubleSpinBox_cut_z_upper,SIGNAL(valueChanged(double)),this,SLOT(possibleChange_cutAllowedZ()));
134 
135 
136  // Material
137  connect(this,SIGNAL(clicked()),this,SLOT(showEditMaterialDialog()));
138  connect(m_d->editwindow_ui.pushButton_close,SIGNAL(clicked()),this,SLOT(showEditMaterialDialog()));
139  connect(m_d->matButton,SIGNAL(lastAppliedChanged()),this,SLOT(updateButton()));
140  connect(m_d->matButton,SIGNAL(lastAppliedChanged()),this,SIGNAL(lastAppliedChanged()));
141  setAcceptDrops(true);
142 
143  QTimer::singleShot(0, this, SLOT(updateButton()));
144 
145 }

◆ ~MissingEtCollectionSettingsButton()

MissingEtCollectionSettingsButton::~MissingEtCollectionSettingsButton ( )
virtual

Definition at line 152 of file MissingEtCollectionSettingsButton.cxx.

153 {
154  delete m_d->editwindow;
155  m_d->vertexDrawStyle->unref();
156  m_d->vertexLightModel->unref();
157  delete m_d;
158 }

Member Function Documentation

◆ copyValuesFromMaterial()

void MissingEtCollectionSettingsButton::copyValuesFromMaterial ( SoMaterial *  mat)
virtual

Implements VP1MaterialButtonBase.

Definition at line 195 of file MissingEtCollectionSettingsButton.cxx.

196 {
197  if (!m_d->matButton) m_d->initEditWindow();
199 }

◆ cutAllowedPhi()

QList< VP1Interval > MissingEtCollectionSettingsButton::cutAllowedPhi ( ) const

Definition at line 404 of file MissingEtCollectionSettingsButton.cxx.

405 {
406  if (!m_d->editwindow)
407  m_d->initEditWindow();
408  return m_d->editwindow_ui.etaphi_widget->allowedPhi();
409 }

◆ cutAllowedPhiChanged

void MissingEtCollectionSettingsButton::cutAllowedPhiChanged ( const QList< VP1Interval > &  )
signal

◆ cutAllowedR()

VP1Interval MissingEtCollectionSettingsButton::cutAllowedR ( ) const

◆ cutAllowedZ()

VP1Interval MissingEtCollectionSettingsButton::cutAllowedZ ( ) const

◆ dragEnterEvent()

void MissingEtCollectionSettingsButton::dragEnterEvent ( QDragEnterEvent *  event)
protected

Definition at line 268 of file MissingEtCollectionSettingsButton.cxx.

269 {
270  if (event->source()!=this && event->mimeData()->hasFormat("vp1/material"))
271  event->acceptProposedAction();
272 }

◆ dropEvent()

void MissingEtCollectionSettingsButton::dropEvent ( QDropEvent *  event)
protected

Definition at line 327 of file MissingEtCollectionSettingsButton.cxx.

328 {
329  QByteArray data = event->mimeData()->data("vp1/material");
330  event->acceptProposedAction();
332 }

◆ fallBackMaterial()

SoMaterial * VP1CollectionSettingsButtonBase::fallBackMaterial ( ) const
inherited

Definition at line 52 of file VP1CollectionSettingsButtonBase.cxx.

53 {
54  if (!m_d->fallBackMaterial) {
55  m_d->fallBackMaterial = new SoMaterial;
56  m_d->fallBackMaterial->ref();
57  }
58  return m_d->fallBackMaterial;
59 }

◆ getMaterial()

SoMaterial * VP1CollectionSettingsButtonBase::getMaterial ( VP1MaterialButton mb) const
inherited

Definition at line 62 of file VP1CollectionSettingsButtonBase.cxx.

63 {
64  if (!mb) {
65  message("ERROR: Null material button pointer");
66  return fallBackMaterial();
67  }
68  QList<SoMaterial*> mats = mb->handledMaterials();
69  if (mats.count()!=1) {
70  message("ERROR: No material in button "+mb->objectName());
71  return fallBackMaterial();
72  }
73  return mats.at(0);
74 
75 
76 }

◆ helperClassName()

QString VP1HelperClassBase::helperClassName ( ) const
inlineinherited

Definition at line 51 of file VP1HelperClassBase.h.

51 { return m_helpername; }

◆ lastAppliedBrightness()

double MissingEtCollectionSettingsButton::lastAppliedBrightness ( ) const
virtual

Implements VP1MaterialButtonBase.

Definition at line 210 of file MissingEtCollectionSettingsButton.cxx.

211 {
212  if (!m_d->matButton) m_d->initEditWindow();
214 }

◆ lastAppliedChanged

void MissingEtCollectionSettingsButton::lastAppliedChanged ( )
signal

◆ lastAppliedShininess()

double MissingEtCollectionSettingsButton::lastAppliedShininess ( ) const
virtual

Implements VP1MaterialButtonBase.

Definition at line 205 of file MissingEtCollectionSettingsButton.cxx.

206 {
207  if (!m_d->matButton) m_d->initEditWindow();
209 }

◆ lastAppliedTransparency()

double MissingEtCollectionSettingsButton::lastAppliedTransparency ( ) const
virtual

Implements VP1MaterialButtonBase.

Definition at line 200 of file MissingEtCollectionSettingsButton.cxx.

201 {
202  if (!m_d->matButton) m_d->initEditWindow();
204 }

◆ message() [1/3]

void VP1HelperClassBase::message ( const QString &  str) const
inherited

Definition at line 49 of file VP1HelperClassBase.cxx.

50 {
51  if (m_helpername.isEmpty()) {
52  if (m_system)
54  else
55  std::cout<<VP1Msg::prefix_msg()<<" [nameless helper class]: "<<str.toStdString()<<std::endl;
56  } else {
57  if (m_system)
58  m_system->message("["+m_helpername+"] " + str);
59  else
60  std::cout<<VP1Msg::prefix_msg()<<" ["<<m_helpername.toStdString()<<"]: "<<str.toStdString()<<std::endl;
61  }
62 }

◆ message() [2/3]

void VP1HelperClassBase::message ( const QString &  addtostart,
const QStringList &  l,
const QString &  addtoend = "" 
) const
inherited

Definition at line 131 of file VP1HelperClassBase.cxx.

132 {
133  if (addtostart.isEmpty()) {
134  message(l,addtoend);
135  return;
136  }
137  if (addtoend.isEmpty()) {
138  for (QString s : l)
139  message(addtostart+s);
140  } else {
141  for (QString s : l)
142  message(addtostart+s+addtoend);
143  }
144 }

◆ message() [3/3]

void VP1HelperClassBase::message ( const QStringList &  l,
const QString &  addtoend = "" 
) const
inherited

Definition at line 91 of file VP1HelperClassBase.cxx.

92 {
93  if (addtoend.isEmpty()) {
94  for (QString s : l)
95  message(s);
96  } else {
97  for (QString s : l)
98  message(s+addtoend);
99  }
100 }

◆ messageDebug() [1/3]

void VP1HelperClassBase::messageDebug ( const QString &  str) const
inherited

Definition at line 65 of file VP1HelperClassBase.cxx.

66 {
67  if (!VP1Msg::debug())
68  return;
69  std::string sysstring(m_system ? " in "+m_system->name().toStdString() : std::string(""));
70  if (m_helpername.isEmpty()) {
71  std::cout<<VP1Msg::prefix_debug()<<" [helper"<<sysstring<<"]: "<<str.toStdString()<<std::endl;
72  } else {
73  std::cout<<VP1Msg::prefix_debug()<<" ["<<m_helpername.toStdString()<<sysstring<<"]: "<<str.toStdString()<<std::endl;
74  }
75 }

◆ messageDebug() [2/3]

void VP1HelperClassBase::messageDebug ( const QString &  addtostart,
const QStringList &  l,
const QString &  addtoend = "" 
) const
inherited

Definition at line 147 of file VP1HelperClassBase.cxx.

148 {
149  if (!VP1Msg::debug())
150  return;
151  if (addtostart.isEmpty()) {
152  messageDebug(l,addtoend);
153  return;
154  }
155  if (addtoend.isEmpty()) {
156  for (QString s : l)
157  messageDebug(addtostart+s);
158  } else {
159  for (QString s : l)
160  messageDebug(addtostart+s+addtoend);
161  }
162 }

◆ messageDebug() [3/3]

void VP1HelperClassBase::messageDebug ( const QStringList &  l,
const QString &  addtoend = "" 
) const
inherited

Definition at line 103 of file VP1HelperClassBase.cxx.

104 {
105  if (!VP1Msg::debug())
106  return;
107  if (addtoend.isEmpty()) {
108  for (QString s : l)
109  messageDebug(s);
110  } else {
111  for (QString s : l)
112  messageDebug(s+addtoend);
113  }
114 }

◆ messageVerbose() [1/3]

void VP1HelperClassBase::messageVerbose ( const QString &  str) const
inherited

Definition at line 78 of file VP1HelperClassBase.cxx.

79 {
80  if (!VP1Msg::verbose())
81  return;
82  std::string sysstring(m_system ? " in "+m_system->name().toStdString() : std::string(""));
83  if (m_helpername.isEmpty()) {
84  std::cout<<VP1Msg::prefix_verbose()<<" [helper"<<sysstring<<"]: "<<str.toStdString()<<std::endl;
85  } else {
86  std::cout<<VP1Msg::prefix_verbose()<<" ["<<m_helpername.toStdString()<<sysstring<<"]: "<<str.toStdString()<<std::endl;
87  }
88 }

◆ messageVerbose() [2/3]

void VP1HelperClassBase::messageVerbose ( const QString &  addtostart,
const QStringList &  l,
const QString &  addtoend = "" 
) const
inherited

Definition at line 165 of file VP1HelperClassBase.cxx.

166 {
167  if (!VP1Msg::verbose())
168  return;
169  if (addtostart.isEmpty()) {
170  messageVerbose(l,addtoend);
171  return;
172  }
173  if (addtoend.isEmpty()) {
174  for (QString s : l)
175  messageVerbose(addtostart+s);
176  } else {
177  for (QString s : l)
178  messageVerbose(addtostart+s+addtoend);
179  }
180 }

◆ messageVerbose() [3/3]

void VP1HelperClassBase::messageVerbose ( const QStringList &  l,
const QString &  addtoend = "" 
) const
inherited

Definition at line 117 of file VP1HelperClassBase.cxx.

118 {
119  if (!VP1Msg::verbose())
120  return;
121  if (addtoend.isEmpty()) {
122  for (QString s : l)
123  messageVerbose(s);
124  } else {
125  for (QString s : l)
126  messageVerbose(s+addtoend);
127  }
128 }

◆ metLength()

float MissingEtCollectionSettingsButton::metLength ( ) const

Definition at line 248 of file MissingEtCollectionSettingsButton.cxx.

249 {
250  return m_d->editwindow_ui.horizontalSlider_met_len->value();
251 }

◆ metSizeChanged

void MissingEtCollectionSettingsButton::metSizeChanged ( int  )
signal

◆ metThickness()

float MissingEtCollectionSettingsButton::metThickness ( ) const

Definition at line 253 of file MissingEtCollectionSettingsButton.cxx.

254 {
255  return m_d->editwindow_ui.horizontalSlider_met_thickness->value();
256 }

◆ mouseMoveEvent()

void MissingEtCollectionSettingsButton::mouseMoveEvent ( QMouseEvent *  event)
protected

Definition at line 275 of file MissingEtCollectionSettingsButton.cxx.

276 {
277  if (!(event->buttons() & Qt::LeftButton))
278  return;
279  if ((event->pos() - m_d->dragStartPosition).manhattanLength()
280  < QApplication::startDragDistance())
281  return;
282 
283  QDrag *drag = new QDrag(this);
284  QMimeData *mimeData = new QMimeData;
285 
287  // For dragging state onto other material buttons: //
289 
290  QByteArray byteArray = saveState();
291 
292  // buffer.close();
293  mimeData->setData("vp1/material", byteArray);
294 
295  // ////////////////////////////////////////////////////////
296  // // For dragging c++ code for defining this material //
297  // // into e.g. an editor: //
298  // ////////////////////////////////////////////////////////
299  //
300  // QString s = "SoMaterial * mat = new SoMaterial;\n";
301  // QString str_ambient = m_d->toSbColTxt(m_d->lastapplied_ambient);
302  // if (str_ambient!="SbColor(0.2,0.2,0.2)")
303  // s += "mat->ambientColor.setValue("+str_ambient+");\n";
304  // QString str_diffuse = m_d->toSbColTxt(m_d->lastapplied_diffuse);
305  // if (str_diffuse!="SbColor(0.8,0.8,0.8)")
306  // s += "mat->diffuseColor.setValue("+str_diffuse+");\n";
307  // QString str_specular = m_d->toSbColTxt(m_d->lastapplied_specular);
308  // if (str_specular!="SbColor(0,0,0)")
309  // s += "mat->specularColor.setValue("+str_specular+");\n";
310  // QString str_emissive = m_d->toSbColTxt(m_d->lastapplied_emissive);
311  // if (str_emissive!="SbColor(0,0,0)")
312  // s += "mat->emissiveColor.setValue("+str_emissive+");\n";
313  // QString str_shininess = m_d->printFloat(m_d->lastapplied_shininess/100.0);
314  // if (str_shininess!="0.2")
315  // s += "mat->shininess.setValue("+str_shininess+");\n";
316  // QString str_transparency = m_d->printFloat(m_d->lastapplied_transparency/100.0);
317  // if (str_transparency!="0")
318  // s += "mat->transparency.setValue("+str_transparency+");\n";
319  // mimeData->setText(s);
320 
321  //Execute drag:
322  drag->setMimeData(mimeData);//drag assumes ownership of mimeData
323  drag->exec(Qt::CopyAction | Qt::MoveAction);
324 }

◆ mousePressEvent()

void MissingEtCollectionSettingsButton::mousePressEvent ( QMouseEvent *  event)
protected

Definition at line 260 of file MissingEtCollectionSettingsButton.cxx.

261 {
262  if (event->button() == Qt::LeftButton)
263  m_d->dragStartPosition = event->pos();
264  QPushButton::mousePressEvent(event);
265 }

◆ restoreFromState()

void MissingEtCollectionSettingsButton::restoreFromState ( const QByteArray &  ba)
virtual

Reimplemented from VP1CollectionSettingsButtonBase.

Definition at line 373 of file MissingEtCollectionSettingsButton.cxx.

373  {
374 
375  VP1Deserialise state(ba,systemBase());
376  if (state.version()<0||state.version()>1)
377  return;//Ignore silently
378 
379  // MATERIAL BUTTON (color,...)
380  state.restore(m_d->matButton);
381 
382  // MET length and thickness
383  state.restore(m_d->editwindow_ui.horizontalSlider_met_len);
384  state.restore(m_d->editwindow_ui.horizontalSlider_met_thickness);
385 
386  // Light model
387  state.restore(m_d->editwindow_ui.checkBox_verticesUseBaseLightModel);
388 
389  // ETA-PHI CUTS (from VP1Base/VP1EtaPhiCutWidget.cxx)
390  state.restore(m_d->editwindow_ui.etaphi_widget);
391 
392  state.widgetHandled(this);
393  state.warnUnrestored(this);
394 
396  updateVertexLightModel(m_d->editwindow_ui.checkBox_verticesUseBaseLightModel);
397 
398  updateButton();
399  //FIXME - anything else need updating?
400 }

◆ saveState()

QByteArray MissingEtCollectionSettingsButton::saveState ( ) const
virtual

fill out with the state of the object (used for drag and drop etc)

Reimplemented from VP1CollectionSettingsButtonBase.

Definition at line 335 of file MissingEtCollectionSettingsButton.cxx.

335  {
336  // messageVerbose("getState");
337  // if (m_d->editwindow_ui.checkBox_tracksUseBaseLightModel->isChecked()) messageVerbose("checked!");
338  VP1Serialise serialise(1/*version*/);
339 
340  serialise.save(m_d->matButton);
341  // serialise.disableUnsavedChecks();
342 
343  // MET length and thickness
344  serialise.save(m_d->editwindow_ui.horizontalSlider_met_len);
345  serialise.save(m_d->editwindow_ui.horizontalSlider_met_thickness);
346 
347  // Light model
348  serialise.save(m_d->editwindow_ui.checkBox_verticesUseBaseLightModel);
349 
350  // ETA-PHI CUTS (from VP1Base/VP1EtaPhiCutWidget.cxx)
351  serialise.save(m_d->editwindow_ui.etaphi_widget);
352 
353 
354 // // R
355 // serialise.save(m_d->editwindow_ui.checkBox_cut_r);
356 // serialise.save(m_d->editwindow_ui.checkBox_cut_r_range_forcesymmetric);
357 // serialise.save(m_d->editwindow_ui.checkBox_cut_r_excludeRange);
358 // serialise.save(m_d->editwindow_ui.doubleSpinBox_cut_r_lower);
359 // serialise.save(m_d->editwindow_ui.doubleSpinBox_cut_r_upper);
360 
362 // serialise.save(m_d->editwindow_ui.checkBox_cut_z);
363 // serialise.save(m_d->editwindow_ui.checkBox_cut_z_range_forcesymmetric);
364 // serialise.save(m_d->editwindow_ui.checkBox_cut_z_excludeRange);
365 // serialise.save(m_d->editwindow_ui.doubleSpinBox_cut_z_lower);
366 // serialise.save(m_d->editwindow_ui.doubleSpinBox_cut_z_upper);
367 
368  serialise.widgetHandled(this);
369  serialise.warnUnsaved(this);
370  return serialise.result();
371 }

◆ setDimension()

void MissingEtCollectionSettingsButton::setDimension ( int  dim)

Definition at line 168 of file MissingEtCollectionSettingsButton.cxx.

169 {
170  if (m_d->dim == dim)
171  return;
172  m_d->dim = dim;
173  updateButton();
174 }

◆ setHelperClassName()

void VP1HelperClassBase::setHelperClassName ( const QString &  n)
inlineprotectedinherited

Definition at line 59 of file VP1HelperClassBase.h.

59 { m_helpername = n; }

◆ setMaterial()

bool MissingEtCollectionSettingsButton::setMaterial ( SoMaterial *  mat)
virtual

Implements VP1MaterialButtonBase.

Definition at line 187 of file MissingEtCollectionSettingsButton.cxx.

188 {
189  // std::cout<<"MissingEtCollectionSettingsButton::setMaterial with mat="<<mat<<std::endl;
190  if (!m_d->matButton) m_d->initEditWindow();
192  return true;
193 }

◆ setMaterialText

void MissingEtCollectionSettingsButton::setMaterialText ( const QString &  t)
slot

Definition at line 82 of file MissingEtCollectionSettingsButton.cxx.

83 {
84  if (m_d->editwindow)
85  m_d->editwindow->setWindowTitle(t);
86  setToolTip(t);
87 }

◆ setSystemBasePointer()

void VP1HelperClassBase::setSystemBasePointer ( IVP1System sys)
inherited

Definition at line 197 of file VP1HelperClassBase.cxx.

198 {
199  m_system = sys;
200  if (VP1Msg::verbose()){
201  vp1helperclassbase_instanceMap[this] = (m_system?m_system->name():QString(""));
202  }
203 }

◆ showEditMaterialDialog

void MissingEtCollectionSettingsButton::showEditMaterialDialog ( )
slot

Definition at line 176 of file MissingEtCollectionSettingsButton.cxx.

177 {
178  if (!m_d->editwindow)
179  m_d->initEditWindow();
180 
181  if (m_d->editwindow->isHidden())
182  m_d->editwindow->show();
183  else
184  m_d->editwindow->hide();
185 }

◆ str() [1/30]

static QString VP1String::str ( const Amg::Vector3D t)
inlinestaticinherited

Definition at line 98 of file VP1String.h.

98 { return "("+str(t.x())+", "+str(t.y())+", "+str(t.z())+")"; }

◆ str() [2/30]

static QString VP1String::str ( const bool  b)
inlinestaticinherited

Definition at line 53 of file VP1String.h.

53 { return b?"True":"False"; }

◆ str() [3/30]

static QString VP1String::str ( const char *  c)
inlinestaticinherited

Definition at line 50 of file VP1String.h.

50 { return c; }

◆ str() [4/30]

static QString VP1String::str ( const double &  d)
inlinestaticinherited

Definition at line 81 of file VP1String.h.

81 { return QString::number(d); }

◆ str() [5/30]

static QString VP1String::str ( const float &  f)
inlinestaticinherited

Definition at line 82 of file VP1String.h.

82 { return QString::number(f); }

◆ str() [6/30]

template<class T >
static QString VP1String::str ( const HepGeom::BasicVector3D< T > &  t)
inlinestaticinherited

Definition at line 95 of file VP1String.h.

95 { return "("+str(t.x())+", "+str(t.y())+", "+str(t.z())+")"; }

◆ str() [7/30]

QString VP1String::str ( const QColor &  c)
staticinherited

Definition at line 30 of file VP1String.cxx.

31 {
32  return c.isValid() ? c.name() : "Invalid";
33 }

◆ str() [8/30]

template<class T >
static QString VP1String::str ( const QFlags< T > &  f)
inlinestaticinherited

Definition at line 91 of file VP1String.h.

91 { return "0x"+QString::number(f, 16).toUpper().rightJustified(8,'0'); }

◆ str() [9/30]

template<class T >
static QString VP1String::str ( const QList< T > &  t)
inlinestaticinherited

Definition at line 102 of file VP1String.h.

102 { return "QList of size"+QString::number(t.size()); }

◆ str() [10/30]

static QString VP1String::str ( const QString &  s)
inlinestaticinherited

Definition at line 49 of file VP1String.h.

49 { return s; }

◆ str() [11/30]

QString VP1String::str ( const SbColor &  c)
staticinherited

Definition at line 36 of file VP1String.cxx.

37 {
39 }

◆ str() [12/30]

QString VP1String::str ( const SbVec2d &  v)
staticinherited

Definition at line 61 of file VP1String.cxx.

61 { double x,y; v.getValue(x,y); return "("+str(x)+", "+str(y)+")"; }

◆ str() [13/30]

QString VP1String::str ( const SbVec2f &  v)
staticinherited

Definition at line 62 of file VP1String.cxx.

62 { float x,y; v.getValue(x,y); return "("+str(x)+", "+str(y)+")"; }

◆ str() [14/30]

QString VP1String::str ( const SbVec2s &  v)
staticinherited

Definition at line 63 of file VP1String.cxx.

63 { short x,y; v.getValue(x,y); return "("+str(x)+", "+str(y)+")"; }

◆ str() [15/30]

QString VP1String::str ( const SbVec3d &  v)
staticinherited

Definition at line 64 of file VP1String.cxx.

64 { double x,y,z; v.getValue(x,y,z); return "("+str(x)+", "+str(y)+", "+str(z)+")"; }

◆ str() [16/30]

QString VP1String::str ( const SbVec3f &  v)
staticinherited

Definition at line 65 of file VP1String.cxx.

65 { float x,y,z; v.getValue(x,y,z); return "("+str(x)+", "+str(y)+", "+str(z)+")"; }

◆ str() [17/30]

QString VP1String::str ( const SbVec3s &  v)
staticinherited

Definition at line 66 of file VP1String.cxx.

66 { short x,y,z; v.getValue(x,y,z); return "("+str(x)+", "+str(y)+", "+str(z)+")"; }

◆ str() [18/30]

QString VP1String::str ( const SbVec4d &  v)
staticinherited

Definition at line 67 of file VP1String.cxx.

67 { double x,y,z,t; v.getValue(x,y,z,t); return "("+str(x)+", "+str(y)+", "+str(z)+", "+str(t)+")"; }

◆ str() [19/30]

QString VP1String::str ( const SbVec4f &  v)
staticinherited

Definition at line 68 of file VP1String.cxx.

68 { float x,y,z,t; v.getValue(x,y,z,t); return "("+str(x)+", "+str(y)+", "+str(z)+", "+str(t)+")"; }

◆ str() [20/30]

template<class T >
static QString VP1String::str ( const T *  t)
inlinestaticinherited

Definition at line 87 of file VP1String.h.

87 { return str(static_cast<const void* >(t)); }

◆ str() [21/30]

QString VP1String::str ( const void *  p)
staticinherited

Definition at line 48 of file VP1String.cxx.

49 {
50  if (p) {
51  std::ostringstream s;
52  s << p;
53  // Explicitly naming QString here avoids a cppcheck warning.
54  return QString (s.str().c_str());
55  } else {
56  return "NULL";
57  }
58 }

◆ str() [22/30]

QString VP1String::str ( const VP1Interval i)
staticinherited

Definition at line 42 of file VP1String.cxx.

43 {
44  return i.toString();
45 }

◆ str() [23/30]

static QString VP1String::str ( int  n)
inlinestaticinherited

Definition at line 77 of file VP1String.h.

77 { return QString::number(n); }

◆ str() [24/30]

static QString VP1String::str ( long  n)
inlinestaticinherited

Definition at line 75 of file VP1String.h.

75 { return QString::number(n); }

◆ str() [25/30]

static QString VP1String::str ( qlonglong  n)
inlinestaticinherited

Definition at line 79 of file VP1String.h.

79 { return QString::number(n); }

◆ str() [26/30]

static QString VP1String::str ( qulonglong  n)
inlinestaticinherited

Definition at line 80 of file VP1String.h.

80 { return QString::number(n); }

◆ str() [27/30]

static QString VP1String::str ( short int  n)
inlinestaticinherited

Definition at line 73 of file VP1String.h.

73 { return QString::number(n); }

◆ str() [28/30]

static QString VP1String::str ( uint  n)
inlinestaticinherited

Definition at line 78 of file VP1String.h.

78 { return QString::number(n); }

◆ str() [29/30]

static QString VP1String::str ( ulong  n)
inlinestaticinherited

Definition at line 76 of file VP1String.h.

76 { return QString::number(n); }

◆ str() [30/30]

static QString VP1String::str ( unsigned short int  n)
inlinestaticinherited

Definition at line 74 of file VP1String.h.

74 { return QString::number(n); }

◆ systemBase()

IVP1System* VP1HelperClassBase::systemBase ( ) const
inlineinherited

Definition at line 50 of file VP1HelperClassBase.h.

50 { return m_system; }

◆ updateButton

void MissingEtCollectionSettingsButton::updateButton ( )
protectedslot

Definition at line 160 of file MissingEtCollectionSettingsButton.cxx.

161 {
162  if (objectName().isEmpty())
163  setObjectName("MissingEtCollectionSettingsButton");
164  messageVerbose("setColButtonProperties: color=" + str(m_d->matButton->lastAppliedDiffuseColour()));
166 }

◆ updateVertexDrawStyle

void MissingEtCollectionSettingsButton::updateVertexDrawStyle ( )
privateslot

Definition at line 217 of file MissingEtCollectionSettingsButton.cxx.

218 {
219  // TODO: Do I need this???
220 
221  // double val = VP1QtInventorUtils::getValueLineWidthSlider(m_d->editwindow_ui.horizontalSlider_vertexSize);
222  // if (m_d->vertexDrawStyle->lineWidth.getValue()!=val)
223  // m_d->vertexDrawStyle->lineWidth = val;
224 }

◆ updateVertexLightModel

void MissingEtCollectionSettingsButton::updateVertexLightModel ( bool  base)
privateslot

Definition at line 226 of file MissingEtCollectionSettingsButton.cxx.

227 {
228  if (m_d->vertexLightModel->model.getValue()!=(base?SoLightModel::BASE_COLOR:SoLightModel::PHONG)) {
229  messageVerbose("VertexLightModel changed (base = "+str(base));
230  if (base)
231  m_d->vertexLightModel->model.setValue(SoLightModel::BASE_COLOR);
232  else
233  m_d->vertexLightModel->model.setValue(SoLightModel::PHONG);
234  }
235 }

◆ verbose()

static bool VP1HelperClassBase::verbose ( )
inlinestaticinherited

Definition at line 32 of file VP1HelperClassBase.h.

32 { return s_vp1verbose; } // Returns true if env var VP1_VERBOSE_OUTPUT=1

◆ warnUndeletedInstances()

void VP1HelperClassBase::warnUndeletedInstances ( )
staticinherited

Definition at line 183 of file VP1HelperClassBase.cxx.

184 {
185  if (vp1helperclassbase_instanceMap.empty())
186  return;
187  std::cout << "WARNING: Detected "<<vp1helperclassbase_instanceMap.size()<<" undeleted helper class instances:"<<std::endl;
188 
189  std::map<VP1HelperClassBase*,QString>::iterator it,itE(vp1helperclassbase_instanceMap.end());
190  for (it = vp1helperclassbase_instanceMap.begin();it!=itE;++it) {
191  std::cout << " ==> "<<it->first<<": "<<it->first->m_helpername.toStdString()
192  << (it->second.isEmpty()?QString(""):" (in system "+it->second+")").toStdString()<<std::endl;
193  }
194 }

Member Data Documentation

◆ m_d

Imp* MissingEtCollectionSettingsButton::m_d
private

Definition at line 75 of file MissingEtCollectionSettingsButton.h.

◆ m_helpername

QString VP1HelperClassBase::m_helpername
privateinherited

Definition at line 67 of file VP1HelperClassBase.h.

◆ m_system

IVP1System* VP1HelperClassBase::m_system
privateinherited

Definition at line 68 of file VP1HelperClassBase.h.

◆ s_vp1verbose

const bool VP1HelperClassBase::s_vp1verbose = VP1QtUtils::environmentVariableIsOn("VP1_VERBOSE_OUTPUT")
staticprivateinherited

Definition at line 69 of file VP1HelperClassBase.h.


The documentation for this class was generated from the following files:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
base
std::string base
Definition: hcg.cxx:78
python.SystemOfUnits.second
int second
Definition: SystemOfUnits.py:120
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
yodamerge_tmp.dim
dim
Definition: yodamerge_tmp.py:239
VP1Serialise
Definition: VP1Serialise.h:45
MissingEtCollectionSettingsButton::Imp::dim
int dim
Definition: MissingEtCollectionSettingsButton.cxx:50
RoiUtil::serialise
void serialise(const std::vector< const IRoiDescriptor * > &rois, roiserial_type &s)
serialise an entire vector of IRoiDescriptors
Definition: RoiSerialise.cxx:45
hist_file_dump.d
d
Definition: hist_file_dump.py:137
mat
GeoMaterial * mat
Definition: LArDetectorConstructionTBEC.cxx:55
VP1HelperClassBase::m_helpername
QString m_helpername
Definition: VP1HelperClassBase.h:67
VP1HelperClassBase::messageVerbose
void messageVerbose(const QString &) const
Definition: VP1HelperClassBase.cxx:78
VP1HelperClassBase::s_vp1verbose
static const bool s_vp1verbose
Definition: VP1HelperClassBase.h:69
fillPileUpNoiseLumi.connect
string connect
Definition: fillPileUpNoiseLumi.py:70
MissingEtCollectionSettingsButton::Imp::vertexDrawStyle
SoDrawStyle * vertexDrawStyle
Definition: MissingEtCollectionSettingsButton.cxx:52
skel.it
it
Definition: skel.GENtoEVGEN.py:396
MissingEtCollectionSettingsButton::m_d
Imp * m_d
Definition: MissingEtCollectionSettingsButton.h:74
VP1Msg::debug
static bool debug()
Definition: VP1Msg.h:32
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
VP1HelperClassBase::m_system
IVP1System * m_system
Definition: VP1HelperClassBase.h:68
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
VP1MaterialButton::lastAppliedDiffuseColour
QColor lastAppliedDiffuseColour() const
Definition: VP1MaterialButton.cxx:167
x
#define x
VP1String::str
static QString str(const QString &s)
Definition: VP1String.h:49
VP1HelperClassBase::messageDebug
void messageDebug(const QString &) const
Definition: VP1HelperClassBase.cxx:65
MissingEtCollectionSettingsButton::updateVertexDrawStyle
void updateVertexDrawStyle()
Definition: MissingEtCollectionSettingsButton.cxx:217
VP1ColorSelectButton::setColButtonProperties
static void setColButtonProperties(QPushButton *, const QColor &col, int dim)
Definition: VP1ColorSelectButton.cxx:49
mapkey::sys
@ sys
Definition: TElectronEfficiencyCorrectionTool.cxx:42
MissingEtCollectionSettingsButton::Imp::dragStartPosition
QPoint dragStartPosition
Definition: MissingEtCollectionSettingsButton.cxx:60
TruthTest.itE
itE
Definition: TruthTest.py:25
MissingEtCollectionSettingsButton::lastAppliedChanged
void lastAppliedChanged()
VP1CollectionSettingsButtonBase::m_d
Imp * m_d
Definition: VP1CollectionSettingsButtonBase.h:38
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
VP1Msg::prefix_msg
static const char * prefix_msg()
Definition: VP1Msg.h:56
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
lumiFormat.i
int i
Definition: lumiFormat.py:85
z
#define z
MissingEtCollectionSettingsButton::saveState
QByteArray saveState() const
fill out with the state of the object (used for drag and drop etc)
Definition: MissingEtCollectionSettingsButton.cxx:335
beamspotman.n
n
Definition: beamspotman.py:731
MissingEtCollectionSettingsButton::Imp::matButton
VP1MaterialButton * matButton
Definition: MissingEtCollectionSettingsButton.cxx:48
VP1MaterialButton::lastAppliedBrightness
double lastAppliedBrightness() const
Definition: VP1MaterialButton.cxx:173
MissingEtCollectionSettingsButton::cutAllowedPhiChanged
void cutAllowedPhiChanged(const QList< VP1Interval > &)
MissingEtCollectionSettingsButton::Imp::initEditWindow
void initEditWindow()
Definition: MissingEtCollectionSettingsButton.cxx:66
test_pyathena.parent
parent
Definition: test_pyathena.py:15
IVP1System::name
const QString & name() const
Definition: IVP1System.cxx:50
MissingEtCollectionSettingsButton::updateButton
void updateButton()
Definition: MissingEtCollectionSettingsButton.cxx:160
MissingEtCollectionSettingsButton::showEditMaterialDialog
void showEditMaterialDialog()
Definition: MissingEtCollectionSettingsButton.cxx:176
hist_file_dump.f
f
Definition: hist_file_dump.py:135
VP1CollectionSettingsButtonBase::VP1CollectionSettingsButtonBase
VP1CollectionSettingsButtonBase(QWidget *parent=0, int dim=25)
Definition: VP1CollectionSettingsButtonBase.cxx:34
VP1CollectionSettingsButtonBase::fallBackMaterial
SoMaterial * fallBackMaterial() const
Definition: VP1CollectionSettingsButtonBase.cxx:52
VP1Deserialise
Definition: VP1Deserialise.h:44
MissingEtCollectionSettingsButton::Imp::theclass
MissingEtCollectionSettingsButton * theclass
Definition: MissingEtCollectionSettingsButton.cxx:44
VP1QtInventorUtils::sbcol2qcol
static QColor sbcol2qcol(const SbColor &)
Definition: VP1QtInventorUtils.cxx:1142
MissingEtCollectionSettingsButton::metSizeChanged
void metSizeChanged(int)
VP1MaterialButton::setMaterial
bool setMaterial(SoMaterial *)
Definition: VP1MaterialButton.cxx:447
VP1HelperClassBase::systemBase
IVP1System * systemBase() const
Definition: VP1HelperClassBase.h:50
python.selection.number
number
Definition: selection.py:20
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
MissingEtCollectionSettingsButton::Imp::editwindow_ui
Ui::MissingEtSettingsForm editwindow_ui
Definition: MissingEtCollectionSettingsButton.cxx:46
VP1Msg::prefix_debug
static const char * prefix_debug()
Definition: VP1Msg.h:57
VP1MaterialButton::lastAppliedShininess
double lastAppliedShininess() const
Definition: VP1MaterialButton.cxx:172
python.PyAthena.v
v
Definition: PyAthena.py:154
VP1Msg::prefix_verbose
static const char * prefix_verbose()
Definition: VP1Msg.h:59
MissingEtCollectionSettingsButton::restoreFromState
void restoreFromState(const QByteArray &)
Definition: MissingEtCollectionSettingsButton.cxx:373
y
#define y
TRT_PAI_physicsConstants::mb
const double mb
1mb to cm2
Definition: TRT_PAI_physicsConstants.h:15
VP1HelperClassBase::message
void message(const QString &) const
Definition: VP1HelperClassBase.cxx:49
str
Definition: BTagTrackIpAccessor.cxx:11
VP1Msg::verbose
static bool verbose()
Definition: VP1Msg.h:31
MissingEtCollectionSettingsButton::Imp::vertexLightModel
SoLightModel * vertexLightModel
Definition: MissingEtCollectionSettingsButton.cxx:53
VP1MaterialButton::lastAppliedTransparency
double lastAppliedTransparency() const
Definition: VP1MaterialButton.cxx:171
python.compressB64.c
def c
Definition: compressB64.py:93
MissingEtCollectionSettingsButton::Imp::editwindow
QWidget * editwindow
Definition: MissingEtCollectionSettingsButton.cxx:45
IVP1System::message
void message(const QString &) const
Definition: IVP1System.cxx:336
VP1CollectionSettingsButtonBase::Imp::fallBackMaterial
SoMaterial * fallBackMaterial
Definition: VP1CollectionSettingsButtonBase.cxx:29
MissingEtCollectionSettingsButton::updateVertexLightModel
void updateVertexLightModel(bool)
Definition: MissingEtCollectionSettingsButton.cxx:226