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

Public Member Functions

void updateSystemState (QCheckBox *)
 

Public Attributes

IVP12DDetViewsChannelWidgetchannel
 
VP1GraphicsViewview_xy
 
VP1GraphicsViewview_rz
 
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 39 of file IVP12DDetViewsChannelWidget.cxx.

Member Function Documentation

◆ updateSystemState()

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

Definition at line 197 of file IVP12DDetViewsChannelWidget.cxx.

198 {
199  assert(checkbox2system.contains(cb));
200  IVP12DSystem*sys = static_cast<IVP12DSystem*>(checkbox2system.value(cb)); assert(sys);
201 
202  assert(system2itemcols.contains(sys));
203  if (cb->isChecked()) {
204  channel->turnOn(sys);
206  ic->reattachToView();
207  }
208  if (tabwidget&&sys2tabpage.contains(sys)) {
209  int sysindex = systemsAllowedControllers.indexOf(sys);
210  if (sysindex>=0) {
211  IVP1System*nextsystem(0);
212  for (int i=sysindex+1;i<systemsAllowedControllers.count();++i) {
213  //Loop through latter systems with controllers in order and
214  //find the first of those which currently has an active
215  //controller:
216  IVP1System* testsys = systemsAllowedControllers.at(i);
217  if (sys2tabpage.contains(testsys)&&tabwidget->indexOf(sys2tabpage[testsys])>-1) {
218  nextsystem=testsys;
219  break;
220  }
221  }
222  //put before tab of "nextsystem" (or at the end if no nextsystem):
223  int index = (nextsystem?tabwidget->indexOf(sys2tabpage[nextsystem]):99999);
224  tabwidget->insertTab(index,sys2tabpage[sys],sys->name());
225  int index2 = tabwidget->indexOf(sys2tabpage[sys]);
226  if (index2!=-1) {
227  tabwidget->setTabEnabled(index2,true);
228  }
229  }
230  }
231  } else {
232  //Fixme: if system being turned off has selections, we should deselect!!
233  channel->turnOff(sys,false);
235  ic->detachFromView();
236  }
237  if (tabwidget&&sys2tabpage.contains(sys)) {
238  int index = tabwidget->indexOf(sys2tabpage[sys]);
239  if (index!=-1) {
240  tabwidget->setTabEnabled(index,false);
242  }
243  }
244  }
245 
246  view_xy->scene()->update();
247  view_rz->scene()->update();
248 
249 }

Member Data Documentation

◆ channel

IVP12DDetViewsChannelWidget* IVP12DDetViewsChannelWidget::Imp::channel

Definition at line 41 of file IVP12DDetViewsChannelWidget.cxx.

◆ checkbox2system

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

Definition at line 48 of file IVP12DDetViewsChannelWidget.cxx.

◆ colorselectbutton

VP1ColorSelectButton* IVP12DDetViewsChannelWidget::Imp::colorselectbutton

Definition at line 58 of file IVP12DDetViewsChannelWidget.cxx.

◆ first

bool IVP12DDetViewsChannelWidget::Imp::first

Definition at line 44 of file IVP12DDetViewsChannelWidget.cxx.

◆ sys2tabpage

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

Definition at line 55 of file IVP12DDetViewsChannelWidget.cxx.

◆ system2itemcols

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

Definition at line 46 of file IVP12DDetViewsChannelWidget.cxx.

◆ system2startdisabled

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

Definition at line 51 of file IVP12DDetViewsChannelWidget.cxx.

◆ system2switchable

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

Definition at line 50 of file IVP12DDetViewsChannelWidget.cxx.

◆ systemsAllowedControllers

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

Definition at line 49 of file IVP12DDetViewsChannelWidget.cxx.

◆ tabwidget

VP1TabWidget* IVP12DDetViewsChannelWidget::Imp::tabwidget

Definition at line 56 of file IVP12DDetViewsChannelWidget.cxx.

◆ view_rz

VP1GraphicsView* IVP12DDetViewsChannelWidget::Imp::view_rz

Definition at line 43 of file IVP12DDetViewsChannelWidget.cxx.

◆ view_xy

VP1GraphicsView* IVP12DDetViewsChannelWidget::Imp::view_xy

Definition at line 42 of file IVP12DDetViewsChannelWidget.cxx.


The documentation for this class was generated from the following file:
index
Definition: index.py:1
IVP12DDetViewsChannelWidget::Imp::checkbox2system
QMap< QCheckBox *, IVP1System * > checkbox2system
Definition: IVP12DDetViewsChannelWidget.cxx:48
IVP1ChannelWidget::turnOff
void turnOff(IVP1System *, const bool &immediateErase=true)
Definition: IVP1ChannelWidget.cxx:246
mapkey::sys
@ sys
Definition: TElectronEfficiencyCorrectionTool.cxx:42
IVP12DSystem
Definition: IVP12DSystem.h:25
IVP1System
Definition: IVP1System.h:36
lumiFormat.i
int i
Definition: lumiFormat.py:85
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
IVP12DDetViewsChannelWidget::Imp::view_rz
VP1GraphicsView * view_rz
Definition: IVP12DDetViewsChannelWidget.cxx:43
IVP12DDetViewsChannelWidget::Imp::channel
IVP12DDetViewsChannelWidget * channel
Definition: IVP12DDetViewsChannelWidget.cxx:41
IVP12DDetViewsChannelWidget::Imp::system2itemcols
QMap< IVP12DSystem *, QSet< VP1GraphicsItemCollection * > > system2itemcols
Definition: IVP12DDetViewsChannelWidget.cxx:46
IVP12DDetViewsChannelWidget::Imp::view_xy
VP1GraphicsView * view_xy
Definition: IVP12DDetViewsChannelWidget.cxx:42
IVP12DDetViewsChannelWidget::Imp::sys2tabpage
QMap< IVP1System *, QWidget * > sys2tabpage
Definition: IVP12DDetViewsChannelWidget.cxx:55
IVP12DDetViewsChannelWidget::Imp::systemsAllowedControllers
QList< IVP1System * > systemsAllowedControllers
Definition: IVP12DDetViewsChannelWidget.cxx:49
VP1GraphicsItemCollection
Definition: VP1GraphicsItemCollection.h:53
IVP1ChannelWidget::turnOn
void turnOn(IVP1System *)
Definition: IVP1ChannelWidget.cxx:237
IVP12DDetViewsChannelWidget::Imp::tabwidget
VP1TabWidget * tabwidget
Definition: IVP12DDetViewsChannelWidget.cxx:56