ATLAS Offline Software
Loading...
Searching...
No Matches
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);
205 for (VP1GraphicsItemCollection*ic : system2itemcols.value(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);
234 for (VP1GraphicsItemCollection*ic : system2itemcols.value(sys)) {
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);
241 tabwidget->removeTab(index);
242 }
243 }
244 }
245
246 view_xy->scene()->update();
247 view_rz->scene()->update();
248
249}
QMap< IVP1System *, QWidget * > sys2tabpage
QMap< QCheckBox *, IVP1System * > checkbox2system
QMap< IVP12DSystem *, QSet< VP1GraphicsItemCollection * > > system2itemcols
str index
Definition DeMoScan.py:362
int ic
Definition grepfile.py:33

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: