ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
IVP12DStandardChannelWidget::Imp Class Reference
Collaboration diagram for IVP12DStandardChannelWidget::Imp:

Public Member Functions

void updateSystemState (QCheckBox *)
 

Public Attributes

IVP12DStandardChannelWidgetchannel
 
VP1GraphicsViewview
 
bool first
 
QMap< IVP12DSystem *, QSet< VP1GraphicsItemCollection * > > system2itemcols
 
QMap< QCheckBox *, IVP1System * > checkbox2system
 
QList< IVP1System * > systemsAllowedControllers
 
QList< QPair< IVP1System *, bool > > system2switchable
 
QMap< IVP1System *, bool > system2startdisabled
 
QMap< IVP1System *, QWidget * > sys2tabpage
 
VP1TabWidgettabwidget
 
VP1ColorSelectButtoncolorselectbutton
 

Detailed Description

Definition at line 37 of file IVP12DStandardChannelWidget.cxx.

Member Function Documentation

◆ updateSystemState()

void IVP12DStandardChannelWidget::Imp::updateSystemState ( QCheckBox *  cb)

Definition at line 169 of file IVP12DStandardChannelWidget.cxx.

170 {
171  assert(checkbox2system.contains(cb));
172  IVP12DSystem*sys = static_cast<IVP12DSystem*>(checkbox2system.value(cb)); assert(sys);
173 
174  assert(system2itemcols.contains(sys));
175  if (cb->isChecked()) {
176  channel->turnOn(sys);
178  ic->reattachToView();
179  }
180  if (tabwidget&&sys2tabpage.contains(sys)) {
181  int sysindex = systemsAllowedControllers.indexOf(sys);
182  if (sysindex>=0) {
183  IVP1System*nextsystem(0);
184  for (int i=sysindex+1;i<systemsAllowedControllers.count();++i) {
185  //Loop through latter systems with controllers in order and
186  //find the first of those which currently has an active
187  //controller:
188  IVP1System* testsys = systemsAllowedControllers.at(i);
189  if (sys2tabpage.contains(testsys)&&tabwidget->indexOf(sys2tabpage[testsys])>-1) {
190  nextsystem=testsys;
191  break;
192  }
193  }
194  //put before tab of "nextsystem" (or at the end if no nextsystem):
195  int index = (nextsystem?tabwidget->indexOf(sys2tabpage[nextsystem]):99999);
196  tabwidget->insertTab(index,sys2tabpage[sys],sys->name());
197  int index2 = tabwidget->indexOf(sys2tabpage[sys]);
198  if (index2!=-1) {
199  tabwidget->setTabEnabled(index2,true);
200  }
201  }
202  }
203  } else {
204  //Fixme: if system being turned off has selections, we should deselect!!
205  channel->turnOff(sys,false);
207  ic->detachFromView();
208  }
209  if (tabwidget&&sys2tabpage.contains(sys)) {
210  int index = tabwidget->indexOf(sys2tabpage[sys]);
211  if (index!=-1) {
212  tabwidget->setTabEnabled(index,false);
214  }
215  }
216  }
217 
218  view->scene()->update();
219 
220 }

Member Data Documentation

◆ channel

IVP12DStandardChannelWidget* IVP12DStandardChannelWidget::Imp::channel

Definition at line 39 of file IVP12DStandardChannelWidget.cxx.

◆ checkbox2system

QMap<QCheckBox*,IVP1System*> IVP12DStandardChannelWidget::Imp::checkbox2system

Definition at line 44 of file IVP12DStandardChannelWidget.cxx.

◆ colorselectbutton

VP1ColorSelectButton* IVP12DStandardChannelWidget::Imp::colorselectbutton

Definition at line 54 of file IVP12DStandardChannelWidget.cxx.

◆ first

bool IVP12DStandardChannelWidget::Imp::first

Definition at line 41 of file IVP12DStandardChannelWidget.cxx.

◆ sys2tabpage

QMap<IVP1System*,QWidget*> IVP12DStandardChannelWidget::Imp::sys2tabpage

Definition at line 51 of file IVP12DStandardChannelWidget.cxx.

◆ system2itemcols

QMap<IVP12DSystem*,QSet<VP1GraphicsItemCollection*> > IVP12DStandardChannelWidget::Imp::system2itemcols

Definition at line 42 of file IVP12DStandardChannelWidget.cxx.

◆ system2startdisabled

QMap<IVP1System*,bool> IVP12DStandardChannelWidget::Imp::system2startdisabled

Definition at line 47 of file IVP12DStandardChannelWidget.cxx.

◆ system2switchable

QList<QPair<IVP1System*,bool> > IVP12DStandardChannelWidget::Imp::system2switchable

Definition at line 46 of file IVP12DStandardChannelWidget.cxx.

◆ systemsAllowedControllers

QList<IVP1System*> IVP12DStandardChannelWidget::Imp::systemsAllowedControllers

Definition at line 45 of file IVP12DStandardChannelWidget.cxx.

◆ tabwidget

VP1TabWidget* IVP12DStandardChannelWidget::Imp::tabwidget

Definition at line 52 of file IVP12DStandardChannelWidget.cxx.

◆ view

VP1GraphicsView* IVP12DStandardChannelWidget::Imp::view

Definition at line 40 of file IVP12DStandardChannelWidget.cxx.


The documentation for this class was generated from the following file:
index
Definition: index.py:1
IVP12DStandardChannelWidget::Imp::channel
IVP12DStandardChannelWidget * channel
Definition: IVP12DStandardChannelWidget.cxx:39
IVP12DStandardChannelWidget::Imp::tabwidget
VP1TabWidget * tabwidget
Definition: IVP12DStandardChannelWidget.cxx:52
IVP1ChannelWidget::turnOff
void turnOff(IVP1System *, const bool &immediateErase=true)
Definition: IVP1ChannelWidget.cxx:246
mapkey::sys
@ sys
Definition: TElectronEfficiencyCorrectionTool.cxx:42
IVP12DStandardChannelWidget::Imp::sys2tabpage
QMap< IVP1System *, QWidget * > sys2tabpage
Definition: IVP12DStandardChannelWidget.cxx:51
IVP12DSystem
Definition: IVP12DSystem.h:25
IVP1System
Definition: IVP1System.h:36
IVP12DStandardChannelWidget::Imp::view
VP1GraphicsView * view
Definition: IVP12DStandardChannelWidget.cxx:40
IVP12DStandardChannelWidget::Imp::system2itemcols
QMap< IVP12DSystem *, QSet< VP1GraphicsItemCollection * > > system2itemcols
Definition: IVP12DStandardChannelWidget.cxx:42
lumiFormat.i
int i
Definition: lumiFormat.py:85
IVP12DStandardChannelWidget::Imp::systemsAllowedControllers
QList< IVP1System * > systemsAllowedControllers
Definition: IVP12DStandardChannelWidget.cxx:45
VP1TabWidget::removeTab
virtual void removeTab(int index)
Definition: VP1TabWidget.cxx:473
grepfile.ic
int ic
Definition: grepfile.py:33
Trk::index2
@ index2
Definition: BoundarySurfaceFace.h:49
IVP12DStandardChannelWidget::Imp::checkbox2system
QMap< QCheckBox *, IVP1System * > checkbox2system
Definition: IVP12DStandardChannelWidget.cxx:44
VP1GraphicsItemCollection
Definition: VP1GraphicsItemCollection.h:53
IVP1ChannelWidget::turnOn
void turnOn(IVP1System *)
Definition: IVP1ChannelWidget.cxx:237