ATLAS Offline Software
Loading...
Searching...
No Matches
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);
177 for(VP1GraphicsItemCollection*ic : system2itemcols.value(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);
206 for(VP1GraphicsItemCollection*ic : system2itemcols.value(sys)) {
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);
213 tabwidget->removeTab(index);
214 }
215 }
216 }
217
218 view->scene()->update();
219
220}
QMap< QCheckBox *, IVP1System * > checkbox2system
QMap< IVP1System *, QWidget * > sys2tabpage
QMap< IVP12DSystem *, QSet< VP1GraphicsItemCollection * > > system2itemcols
str index
Definition DeMoScan.py:362
int ic
Definition grepfile.py:33

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: