CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner Class Reference
Inheritance diagram for Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner:
Vispa.Gui.ConnectableWidget.ConnectableWidget Vispa.Gui.ConnectableWidgetOwner.ConnectableWidgetOwner Vispa.Gui.WidgetContainer.WidgetContainer Vispa.Gui.WidgetContainer.WidgetContainer Vispa.Gui.ZoomableScrollableWidgetOwner.ZoomableScrollableWidgetOwner Vispa.Views.BoxDecayView.BoxDecayContainer Vispa.Views.LineDecayView.LineDecayContainer Vispa.Views.BoxDecayView.BoxDecayContainer Vispa.Views.LineDecayView.LineDecayContainer Vispa.Views.WidgetView.WidgetView Vispa.Views.BoxDecayView.BoxDecayView Vispa.Views.LineDecayView.LineDecayView Vispa.Plugins.ConfigEditor.ConfigEditorBoxView.ConfigEditorBoxView Vispa.Plugins.EdmBrowser.EdmBrowserBoxView.EdmBrowserBoxView Vispa.Plugins.ConfigEditor.ConfigEditorBoxView.ConnectionStructureView Vispa.Plugins.ConfigEditor.ConfigEditorBoxView.SequenceStructureView

Public Member Functions

def deselectAllWidgets (self, exception=None)
 
def enableMultiSelect (self, multiSelect=True)
 
def initWidgetMovement (self, widget)
 
def keyPressEvent (self, event)
 
def lastMovedWidgets (self)
 
def mouseMoveEvent (self, event)
 
def mousePressEvent (self, event)
 
def mouseReleaseEvent (self, event)
 
def multiSelectEnabled (self)
 
def selectedWidgets (self)
 
def widgetAboutToDelete (self, widget)
 
def widgetDoubleClicked (self, widget)
 
def widgetDragged (self, widget)
 
def widgetSelected (self, widget, multiSelect=False)
 

Private Attributes

 _lastMovedWidgets
 
 _multiSelectEnabledFlag
 
 _selectedWidgets
 
 _selectionRect
 
 _selectionRectStartPos
 

Detailed Description

Interface for classes containing VispaWidgets

Only makes sense if implementing class also inherits QWidget or class inheriting QWidget.

Definition at line 6 of file VispaWidgetOwner.py.

Member Function Documentation

def Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.deselectAllWidgets (   self,
  exception = None 
)
Deselects all widgets except the widget given as exception.

Definition at line 102 of file VispaWidgetOwner.py.

References Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner._selectedWidgets, Vispa.Share.BasicDataAccessor.BasicDataAccessor.children(), Vispa.Plugins.EdmBrowser.EventContentDataAccessor.EventContentDataAccessor.children(), data_sources.node.children(), Vispa.Plugins.ConfigEditor.ToolDataAccessor.ToolDataAccessor.children(), Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor.children(), geometry.Structure.children, Folder.children(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor.children(), Vispa.Views.LineDecayView.LineDecayContainer.children(), DDDWorldObserver< Event >.update(), KillSecondariesRunAction.update(), KillSecondariesTrackAction.update(), ECALPFSeedCleaner.update(), SaveSimTrack.update(), PTStatistics.update(), PrintTrackNumberAction.update(), GenericMVAComputerCache.update(), Basic2DGenericPFlowClusterizer.update(), PFMultiDepthClusterizer.update(), reco::KalmanGhostTrackUpdater.update(), DDG4ProductionCuts.update(), LagrangeChildUpdator.update(), VertexTrackUpdator< N >.update(), DummyVertexTrackUpdator< N >.update(), TrajectoryStateUpdator.update(), FastFedCablingTask.update(), RecHitTopologicalCleanerBase.update(), PFlow2DClusterizerWithTime.update(), VpspScanTask.update(), ApvTimingTask.update(), ErrorCorrelation.update(), FedTimingTask.update(), MSLayersAtAngle.update(), AlignableDet.update(), ApvTimingHistosUsingDb.update(), DaqScopeModeHistosUsingDb.update(), NoiseHistosUsingDb.update(), OptoScanHistosUsingDb.update(), PedestalsHistosUsingDb.update(), PedsFullNoiseHistosUsingDb.update(), PrintSensitive.update(), PedsOnlyHistosUsingDb.update(), VpspScanHistosUsingDb.update(), GsfMultiStateUpdator.update(), PedestalsTask.update(), OptoScanTask.update(), MonopoleSteppingAction.update(), CalibrationScanTask.update(), FineDelayTask.update(), LatencyTask.update(), edm::SubProcessParentageHelper.update(), FastFedCablingHistosUsingDb.update(), SCRegressionCalculator< VarCalc >.update(), CalibrationTask.update(), PFClusterEnergyCorrectorBase.update(), PFCPositionCalculatorBase.update(), AlignableDetUnit.update(), RHStopTracer.update(), FedCablingTask.update(), KFStrip1DUpdator.update(), LatencyHistosUsingDb.update(), CheckOverlap.update(), cond::persistency::ITagTable.update(), TkPhase2OTMeasurementDet.update(), NoiseTask.update(), TkPixelMeasurementDet.update(), PedsOnlyTask.update(), CalibrationHistosUsingDb.update(), CountProcessesAction.update(), PrintGeomInfoAction.update(), PrintGeomSummary.update(), ChildUpdator.update(), FineDelayHistosUsingDb.update(), PrintMaterialBudgetInfo.update(), BaselinePFSCRegression.update(), progressbar.Widget.update(), PedsFullNoiseTask.update(), KinematicConstrainedVertexUpdator.update(), AlignableCSCChamber.update(), PhysicsTools::MVAComputerCache.update(), KFSwitching1DUpdator.update(), HGCScintSD.update(), StoreSecondary.update(), MaterialBudgetHcal.update(), cond::persistency::GLOBAL_TAG::Table.update(), HFNoseSD.update(), HGCalSD.update(), FastTimerSD.update(), edm::RunningAverage.update(), DaqScopeModeTask.update(), HGCalTBMB.update(), Observer< const EndOfRun * >.update(), Observer< const T * >.update(), AlignableTracker.update(), Observer< T >.update(), Observer< const DDDWorld * >.update(), Observer< const BeginOfTrack * >.update(), Observer< const G4Step * >.update(), BinomialProbability.update(), Observer< const EndOfJob * >.update(), Observer< const BeginOfEvent * >.update(), Observer< const EndOfTrack * >.update(), Observer< const BeginOfJob * >.update(), Observer< const BeginOfRun * >.update(), Observer< const Event * >.update(), Observer< const EndOfEvent * >.update(), GflashG4Watcher.update(), pathelpers::Record.update(), MuonServiceProxy.update(), PFClusterBuilderBase.update(), cond::persistency::TAG::Table.update(), HGCSD.update(), edm::storage::StatisticsSenderService::FileStatistics.update(), funct::Master< F >.update(), KFUpdator.update(), MaterialBudget.update(), MaterialBudgetForward.update(), RealisticSimClusterMapper.update(), CaloTrkProcessing.update(), CheckSecondary.update(), AlignableComposite.update(), ECAL2DPositionCalcWithDepthCorr.update(), SimG4FluxProducer.update(), EcalSimHitsValidProducer.update(), KalmanVertexTrackUpdator< 5 >.update(), KalmanVertexTrackUpdator< N >.update(), TrackingMaterialProducer.update(), HcalTestAnalysis.update(), FWJobMetadataManager.update(), TrackingVerboseAction.update(), L1TMuonBarrelKalmanAlgo.update(), PhysicsTools::TreeReader.update(), SiTrackerMultiRecHitUpdator.update(), MaterialBudgetAction.update(), BasicMultiTrajectoryState.update(), KalmanVertexUpdator< N >.update(), SingleParticleEvent.update(), pos::PixelConfig.update(), KalmanVertexUpdator< 5 >.update(), reco::GhostTrackFitter::PredictionUpdater.update(), SiStripConfObject.update(), AlignableMuon.update(), edm::service::CondorStatusService.update(), fwlite::RecordWriter.update(), SiStripPartition.update(), MuonTrajectoryUpdator.update(), fastsim::Geometry.update(), FWParameterSetterBase.update(), TimingSD.update(), HCalSD.update(), HGCPassive.update(), FiberSD.update(), TotemTestGem.update(), progressbar.Timer.update(), SimG4HcalValidation.update(), MuonSensitiveDetector.update(), simwatcher::BeginOfTrackCounter.update(), HcaluLUTTPGCoder.update(), Alignable.update(), KinematicConstrainedVertexUpdatorT< nTrk, nConstraint >.update(), TkAccumulatingSensitiveDetector.update(), MuonUpdatorAtVertex.update(), DQMOldReceiver.update(), HcalTB02Analysis.update(), LaserAlignmentSimulation.update(), TotemSD.update(), sim_act::Signaler< BeginOfJob >.update(), CaloSteppingAction.update(), ApvAnalysisFactory.update(), sim_act::Signaler< EndOfRun >.update(), sim_act::Signaler< DDDWorld >.update(), sim_act::Signaler< T >.update(), sim_act::Signaler< BeginOfRun >.update(), sim_act::Signaler< BeginOfEvent >.update(), sim_act::Signaler< BeginOfTrack >.update(), sim_act::Signaler< G4Step >.update(), sim_act::Signaler< EndOfEvent >.update(), sim_act::Signaler< EndOfTrack >.update(), SimTracer.update(), progressbar.WidgetHFill.update(), HcalForwardAnalysis.update(), FP420SD.update(), DTSegmentUpdator.update(), DTVDriftCalibration::cellInfo.update(), DAClusterizerInZ.update(), sistrip::RawToDigiUnpacker.update(), HcalTB04Analysis.update(), SimG4HGCalValidation.update(), DoCastorAnalysis.update(), ZdcTestAnalysis.update(), EcalTBH4Trigger.update(), CastorTestAnalysis.update(), PhysicsTools::TreeReader::Value.update(), BetafuncEvtVtxGenerator.update(), CaloSD.update(), InitialClusteringStepBase.update(), cond::persistency::IPayloadMigrationTable.update(), PhysicsTools::MVAModuleHelper< Record, Object, Filler >::Value.update(), HLTScalersClient::CountLSFifo_t.update(), progressbar.Bar.update(), DynamicTruncation.update(), jsoncollector::IntJ.update(), edm::service::SimpleMemoryCheck.update(), PFECALSuperClusterAlgo.update(), edm::BMixingModule.update(), evf::FastMonitoringService::Encoding.update(), progressbar.BouncingBar.update(), GaussianSumUtilities1D.update(), CastorShowerLibraryMaker.update(), cond::persistency::IGTTable.update(), DTRecSegment2D.update(), MonitorElement.update(), StandAloneMuonFilter.update(), jsoncollector::DoubleJ.update(), FWPSetTableManager.update(), DQMNet::Peer.update, G4StepStatistics.update(), progressbar.FormatLabel.update(), TrajectoryStateOnSurface.update(), DQMNet::AutoPeer.update, FWLiteESRecordWriterAnalyzer.update(), CommissioningTask.update(), FP420Test.update(), StMeasurementDetSet.update(), DAClusterizerInZ_vect.update(), Folder.update(), BscTest.update(), jsoncollector::StringJ.update(), dqm-mbProfile.Profile.update(), DAClusterizerInZT_vect.update(), jsoncollector::HistoJ< unsigned int >.update(), jsoncollector::HistoJ< T >.update(), BasicTrajectoryState.update(), progressbar.ProgressBar.update(), PxMeasurementDetSet.update(), Phase2OTMeasurementDetSet.update(), edmStreamStallGrapher.Stack.update(), crabFunctions.CrabTask.update(), DetSetVector< SiPixelCluster >.update(), const_iterator.update(), DetSetVector< ClusterType >.update(), DetSetVector< T >.update(), edmNew::DetSetVector< T >.update(), and DetSetVector< SiStripCluster >.update().

Referenced by Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.mousePressEvent(), Vispa.Views.LineDecayView.LineDecayContainer.mousePressEvent(), and Vispa.Views.WidgetView.WidgetView.select().

102  def deselectAllWidgets(self, exception=None):
103  """ Deselects all widgets except the widget given as exception.
104  """
105  #logging.debug(self.__class__.__name__ +": deselectAllWidgets()")
106  self._selectedWidgets = []
107  for child in self.children():
108  if child != exception:
109  if hasattr(child, 'select'):
110  child.select(False)
111  else:
112  self._selectedWidgets.append(child)
113 
114  if isinstance(child, VispaWidgetOwner):
115  child.deselectAllWidgets(exception)
116  self.update()
117 
def Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.enableMultiSelect (   self,
  multiSelect = True 
)

Definition at line 12 of file VispaWidgetOwner.py.

12  def enableMultiSelect(self, multiSelect=True):
13  self._multiSelectEnabledFlag = multiSelect
14 
def enableMultiSelect(self, multiSelect=True)
def Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.initWidgetMovement (   self,
  widget 
)

Definition at line 55 of file VispaWidgetOwner.py.

55  def initWidgetMovement(self, widget):
57  if self.multiSelectEnabled():
58  pos = widget.pos()
59  for child in self.children():
60  if child != widget and hasattr(child, "isSelected") and child.isSelected():
61  child.setDragReferencePoint(pos - child.pos())
62 
def Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.keyPressEvent (   self,
  event 
)
Calls delete() method of selected child widgets if multi-select is activated.

Definition at line 94 of file VispaWidgetOwner.py.

94  def keyPressEvent(self, event):
95  """ Calls delete() method of selected child widgets if multi-select is activated.
96  """
97  if self.multiSelectEnabled() and ( event.key() == Qt.Key_Backspace or event.key() == Qt.Key_Delete ):
98  selection = self.selectedWidgets()[:]
99  for widget in selection:
100  widget.delete()
101 
def Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.lastMovedWidgets (   self)

Definition at line 84 of file VispaWidgetOwner.py.

References Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner._lastMovedWidgets.

84  def lastMovedWidgets(self):
85  if hasattr(self, "_lastMovedWidgets"):
86  return self._lastMovedWidgets
87  return None
88 
def Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.mouseMoveEvent (   self,
  event 
)

Definition at line 128 of file VispaWidgetOwner.py.

References Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner._selectionRect, Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner._selectionRectStartPos, funct.abs(), min(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.multiSelectEnabled(), DDDWorldObserver< Event >.update(), KillSecondariesRunAction.update(), KillSecondariesTrackAction.update(), ECALPFSeedCleaner.update(), SaveSimTrack.update(), PTStatistics.update(), PrintTrackNumberAction.update(), GenericMVAComputerCache.update(), Basic2DGenericPFlowClusterizer.update(), PFMultiDepthClusterizer.update(), reco::KalmanGhostTrackUpdater.update(), DDG4ProductionCuts.update(), VertexTrackUpdator< N >.update(), DummyVertexTrackUpdator< N >.update(), TrajectoryStateUpdator.update(), RecHitTopologicalCleanerBase.update(), FastFedCablingTask.update(), PFlow2DClusterizerWithTime.update(), LagrangeChildUpdator.update(), ErrorCorrelation.update(), ApvTimingTask.update(), FedTimingTask.update(), MSLayersAtAngle.update(), VpspScanTask.update(), ApvTimingHistosUsingDb.update(), DaqScopeModeHistosUsingDb.update(), NoiseHistosUsingDb.update(), OptoScanHistosUsingDb.update(), PedestalsHistosUsingDb.update(), PedsFullNoiseHistosUsingDb.update(), VpspScanHistosUsingDb.update(), PedsOnlyHistosUsingDb.update(), AlignableDet.update(), PrintSensitive.update(), GsfMultiStateUpdator.update(), OptoScanTask.update(), PedestalsTask.update(), MonopoleSteppingAction.update(), CalibrationScanTask.update(), LatencyTask.update(), FineDelayTask.update(), FastFedCablingHistosUsingDb.update(), CalibrationTask.update(), SCRegressionCalculator< VarCalc >.update(), edm::SubProcessParentageHelper.update(), PFClusterEnergyCorrectorBase.update(), PFCPositionCalculatorBase.update(), RHStopTracer.update(), AlignableDetUnit.update(), FedCablingTask.update(), KFStrip1DUpdator.update(), LatencyHistosUsingDb.update(), cond::persistency::ITagTable.update(), CheckOverlap.update(), TkPhase2OTMeasurementDet.update(), NoiseTask.update(), TkPixelMeasurementDet.update(), PedsOnlyTask.update(), CalibrationHistosUsingDb.update(), CountProcessesAction.update(), PrintGeomInfoAction.update(), PrintGeomSummary.update(), FineDelayHistosUsingDb.update(), ChildUpdator.update(), PrintMaterialBudgetInfo.update(), BaselinePFSCRegression.update(), progressbar.Widget.update(), PedsFullNoiseTask.update(), PhysicsTools::MVAComputerCache.update(), KFSwitching1DUpdator.update(), AlignableCSCChamber.update(), KinematicConstrainedVertexUpdator.update(), HGCScintSD.update(), StoreSecondary.update(), cond::persistency::GLOBAL_TAG::Table.update(), MaterialBudgetHcal.update(), HFNoseSD.update(), HGCalSD.update(), FastTimerSD.update(), edm::RunningAverage.update(), DaqScopeModeTask.update(), HGCalTBMB.update(), Observer< const Event * >.update(), AlignableTracker.update(), Observer< const EndOfEvent * >.update(), Observer< T >.update(), BinomialProbability.update(), Observer< const BeginOfJob * >.update(), Observer< const BeginOfTrack * >.update(), Observer< const G4Step * >.update(), Observer< const EndOfJob * >.update(), Observer< const EndOfRun * >.update(), Observer< const T * >.update(), Observer< const BeginOfEvent * >.update(), Observer< const BeginOfRun * >.update(), Observer< const DDDWorld * >.update(), Observer< const EndOfTrack * >.update(), GflashG4Watcher.update(), pathelpers::Record.update(), MuonServiceProxy.update(), PFClusterBuilderBase.update(), HGCSD.update(), edm::storage::StatisticsSenderService::FileStatistics.update(), cond::persistency::TAG::Table.update(), MaterialBudgetForward.update(), funct::Master< F >.update(), KFUpdator.update(), MaterialBudget.update(), RealisticSimClusterMapper.update(), CaloTrkProcessing.update(), AlignableComposite.update(), CheckSecondary.update(), SimG4FluxProducer.update(), EcalSimHitsValidProducer.update(), ECAL2DPositionCalcWithDepthCorr.update(), KalmanVertexTrackUpdator< 5 >.update(), KalmanVertexTrackUpdator< N >.update(), TrackingMaterialProducer.update(), HcalTestAnalysis.update(), FWJobMetadataManager.update(), TrackingVerboseAction.update(), L1TMuonBarrelKalmanAlgo.update(), PhysicsTools::TreeReader.update(), SiTrackerMultiRecHitUpdator.update(), BasicMultiTrajectoryState.update(), MaterialBudgetAction.update(), pos::PixelConfig.update(), SingleParticleEvent.update(), KalmanVertexUpdator< 5 >.update(), reco::GhostTrackFitter::PredictionUpdater.update(), KalmanVertexUpdator< N >.update(), edm::service::CondorStatusService.update(), MuonTrajectoryUpdator.update(), fwlite::RecordWriter.update(), SiStripPartition.update(), SiStripConfObject.update(), AlignableMuon.update(), fastsim::Geometry.update(), FWParameterSetterBase.update(), TimingSD.update(), HCalSD.update(), HGCPassive.update(), FiberSD.update(), TotemTestGem.update(), SimG4HcalValidation.update(), progressbar.Timer.update(), HcaluLUTTPGCoder.update(), MuonSensitiveDetector.update(), simwatcher::BeginOfTrackCounter.update(), Alignable.update(), TkAccumulatingSensitiveDetector.update(), MuonUpdatorAtVertex.update(), KinematicConstrainedVertexUpdatorT< nTrk, nConstraint >.update(), DQMOldReceiver.update(), HcalTB02Analysis.update(), LaserAlignmentSimulation.update(), TotemSD.update(), CaloSteppingAction.update(), sim_act::Signaler< G4Step >.update(), ApvAnalysisFactory.update(), sim_act::Signaler< T >.update(), sim_act::Signaler< BeginOfEvent >.update(), sim_act::Signaler< EndOfRun >.update(), sim_act::Signaler< EndOfEvent >.update(), sim_act::Signaler< BeginOfRun >.update(), sim_act::Signaler< DDDWorld >.update(), sim_act::Signaler< BeginOfJob >.update(), sim_act::Signaler< EndOfTrack >.update(), sim_act::Signaler< BeginOfTrack >.update(), SimTracer.update(), progressbar.WidgetHFill.update(), HcalForwardAnalysis.update(), FP420SD.update(), DTSegmentUpdator.update(), DTVDriftCalibration::cellInfo.update(), DAClusterizerInZ.update(), sistrip::RawToDigiUnpacker.update(), HcalTB04Analysis.update(), SimG4HGCalValidation.update(), DoCastorAnalysis.update(), ZdcTestAnalysis.update(), EcalTBH4Trigger.update(), PhysicsTools::TreeReader::Value.update(), CastorTestAnalysis.update(), BetafuncEvtVtxGenerator.update(), CaloSD.update(), InitialClusteringStepBase.update(), cond::persistency::IPayloadMigrationTable.update(), PhysicsTools::MVAModuleHelper< Record, Object, Filler >::Value.update(), HLTScalersClient::CountLSFifo_t.update(), progressbar.Bar.update(), DynamicTruncation.update(), jsoncollector::IntJ.update(), edm::service::SimpleMemoryCheck.update(), PFECALSuperClusterAlgo.update(), evf::FastMonitoringService::Encoding.update(), edm::BMixingModule.update(), progressbar.BouncingBar.update(), GaussianSumUtilities1D.update(), CastorShowerLibraryMaker.update(), cond::persistency::IGTTable.update(), DTRecSegment2D.update(), MonitorElement.update(), StandAloneMuonFilter.update(), jsoncollector::DoubleJ.update(), FWPSetTableManager.update(), DQMNet::Peer.update, G4StepStatistics.update(), progressbar.FormatLabel.update(), TrajectoryStateOnSurface.update(), DQMNet::AutoPeer.update, FWLiteESRecordWriterAnalyzer.update(), CommissioningTask.update(), FP420Test.update(), StMeasurementDetSet.update(), Folder.update(), DAClusterizerInZ_vect.update(), BscTest.update(), jsoncollector::StringJ.update(), dqm-mbProfile.Profile.update(), DAClusterizerInZT_vect.update(), jsoncollector::HistoJ< unsigned int >.update(), jsoncollector::HistoJ< T >.update(), BasicTrajectoryState.update(), progressbar.ProgressBar.update(), PxMeasurementDetSet.update(), Phase2OTMeasurementDetSet.update(), edmStreamStallGrapher.Stack.update(), crabFunctions.CrabTask.update(), DetSetVector< SiPixelCluster >.update(), DetSetVector< T >.update(), const_iterator.update(), edmNew::DetSetVector< T >.update(), DetSetVector< SiStripCluster >.update(), and DetSetVector< ClusterType >.update().

128  def mouseMoveEvent(self, event):
129  if self.multiSelectEnabled() and self._selectionRectStartPos and (event.pos() - self._selectionRectStartPos).manhattanLength() >= QApplication.startDragDistance():
130  eventX = event.pos().x()
131  eventY = event.pos().y()
132  startX = self._selectionRectStartPos.x()
133  startY = self._selectionRectStartPos.y()
134  oldRect = self._selectionRect
135  self._selectionRect = QRect(min(startX, eventX), min(startY, eventY), abs(eventX - startX), abs(eventY - startY))
136  if oldRect:
137  self.update(self._selectionRect.united(oldRect).adjusted(-5, -5, 5, 5))
138  else:
139  self.update(self._selectionRect)
140 
141  # dynamically update selection statur
142  # currently bad performance (2010-07-07)
143  # TODO: improve selection mechanism
144 # for child in self.children():
145 # if hasattr(child, "select") and hasattr(child, "isSelected"):
146 # child.select(self._selectionRect.contains(child.geometry()), True) # select, mulitSelect
147 
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
T min(T a, T b)
Definition: MathUtil.h:58
def Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.mousePressEvent (   self,
  event 
)
Calls deselectAllWidgets.

Definition at line 118 of file VispaWidgetOwner.py.

References Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.deselectAllWidgets(), and Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.multiSelectEnabled().

118  def mousePressEvent(self, event):
119  """ Calls deselectAllWidgets.
120  """
121  multiSelectEnabled = self.multiSelectEnabled()
122  if event.modifiers() != Qt.ControlModifier:
123  self.deselectAllWidgets()
124  if multiSelectEnabled:
125  self._selectionRectStartPos = QPoint(event.pos())
126  self._selectionRect = None
127 
def Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.mouseReleaseEvent (   self,
  event 
)

Definition at line 148 of file VispaWidgetOwner.py.

References Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner._selectionRect, Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner._selectionRectStartPos, Vispa.Share.BasicDataAccessor.BasicDataAccessor.children(), Vispa.Plugins.EdmBrowser.EventContentDataAccessor.EventContentDataAccessor.children(), data_sources.node.children(), Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor.children(), Vispa.Plugins.ConfigEditor.ToolDataAccessor.ToolDataAccessor.children(), geometry.Structure.children, Folder.children(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor.children(), Vispa.Views.LineDecayView.LineDecayContainer.children(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.multiSelectEnabled(), DDDWorldObserver< Event >.update(), KillSecondariesRunAction.update(), KillSecondariesTrackAction.update(), ECALPFSeedCleaner.update(), SaveSimTrack.update(), PTStatistics.update(), PrintTrackNumberAction.update(), GenericMVAComputerCache.update(), Basic2DGenericPFlowClusterizer.update(), PFMultiDepthClusterizer.update(), reco::KalmanGhostTrackUpdater.update(), DDG4ProductionCuts.update(), LagrangeChildUpdator.update(), VertexTrackUpdator< N >.update(), DummyVertexTrackUpdator< N >.update(), TrajectoryStateUpdator.update(), FastFedCablingTask.update(), RecHitTopologicalCleanerBase.update(), PFlow2DClusterizerWithTime.update(), VpspScanTask.update(), ApvTimingTask.update(), ErrorCorrelation.update(), FedTimingTask.update(), MSLayersAtAngle.update(), AlignableDet.update(), ApvTimingHistosUsingDb.update(), DaqScopeModeHistosUsingDb.update(), NoiseHistosUsingDb.update(), OptoScanHistosUsingDb.update(), PrintSensitive.update(), PedestalsHistosUsingDb.update(), PedsFullNoiseHistosUsingDb.update(), GsfMultiStateUpdator.update(), VpspScanHistosUsingDb.update(), PedsOnlyHistosUsingDb.update(), PedestalsTask.update(), OptoScanTask.update(), MonopoleSteppingAction.update(), CalibrationScanTask.update(), FineDelayTask.update(), LatencyTask.update(), edm::SubProcessParentageHelper.update(), FastFedCablingHistosUsingDb.update(), SCRegressionCalculator< VarCalc >.update(), CalibrationTask.update(), PFClusterEnergyCorrectorBase.update(), PFCPositionCalculatorBase.update(), AlignableDetUnit.update(), RHStopTracer.update(), FedCablingTask.update(), KFStrip1DUpdator.update(), LatencyHistosUsingDb.update(), CheckOverlap.update(), TkPhase2OTMeasurementDet.update(), cond::persistency::ITagTable.update(), PedsOnlyTask.update(), TkPixelMeasurementDet.update(), NoiseTask.update(), CalibrationHistosUsingDb.update(), CountProcessesAction.update(), PrintGeomSummary.update(), PrintGeomInfoAction.update(), ChildUpdator.update(), FineDelayHistosUsingDb.update(), PrintMaterialBudgetInfo.update(), progressbar.Widget.update(), BaselinePFSCRegression.update(), PedsFullNoiseTask.update(), KinematicConstrainedVertexUpdator.update(), AlignableCSCChamber.update(), PhysicsTools::MVAComputerCache.update(), KFSwitching1DUpdator.update(), HGCScintSD.update(), StoreSecondary.update(), MaterialBudgetHcal.update(), cond::persistency::GLOBAL_TAG::Table.update(), HGCalSD.update(), HFNoseSD.update(), FastTimerSD.update(), edm::RunningAverage.update(), DaqScopeModeTask.update(), HGCalTBMB.update(), Observer< const G4Step * >.update(), Observer< const EndOfRun * >.update(), Observer< const EndOfJob * >.update(), Observer< const EndOfTrack * >.update(), AlignableTracker.update(), Observer< const DDDWorld * >.update(), Observer< T >.update(), Observer< const Event * >.update(), Observer< const BeginOfTrack * >.update(), Observer< const T * >.update(), BinomialProbability.update(), Observer< const EndOfEvent * >.update(), Observer< const BeginOfEvent * >.update(), Observer< const BeginOfRun * >.update(), Observer< const BeginOfJob * >.update(), GflashG4Watcher.update(), pathelpers::Record.update(), MuonServiceProxy.update(), PFClusterBuilderBase.update(), cond::persistency::TAG::Table.update(), HGCSD.update(), edm::storage::StatisticsSenderService::FileStatistics.update(), funct::Master< F >.update(), KFUpdator.update(), MaterialBudget.update(), MaterialBudgetForward.update(), RealisticSimClusterMapper.update(), AlignableComposite.update(), CaloTrkProcessing.update(), CheckSecondary.update(), KalmanVertexTrackUpdator< N >.update(), SimG4FluxProducer.update(), EcalSimHitsValidProducer.update(), KalmanVertexTrackUpdator< 5 >.update(), ECAL2DPositionCalcWithDepthCorr.update(), TrackingMaterialProducer.update(), HcalTestAnalysis.update(), FWJobMetadataManager.update(), TrackingVerboseAction.update(), L1TMuonBarrelKalmanAlgo.update(), PhysicsTools::TreeReader.update(), SiTrackerMultiRecHitUpdator.update(), BasicMultiTrajectoryState.update(), MaterialBudgetAction.update(), KalmanVertexUpdator< N >.update(), SingleParticleEvent.update(), pos::PixelConfig.update(), KalmanVertexUpdator< 5 >.update(), reco::GhostTrackFitter::PredictionUpdater.update(), SiStripConfObject.update(), edm::service::CondorStatusService.update(), AlignableMuon.update(), SiStripPartition.update(), MuonTrajectoryUpdator.update(), fwlite::RecordWriter.update(), fastsim::Geometry.update(), TimingSD.update(), FWParameterSetterBase.update(), HCalSD.update(), HGCPassive.update(), FiberSD.update(), TotemTestGem.update(), progressbar.Timer.update(), SimG4HcalValidation.update(), MuonSensitiveDetector.update(), simwatcher::BeginOfTrackCounter.update(), HcaluLUTTPGCoder.update(), KinematicConstrainedVertexUpdatorT< nTrk, nConstraint >.update(), TkAccumulatingSensitiveDetector.update(), MuonUpdatorAtVertex.update(), Alignable.update(), DQMOldReceiver.update(), HcalTB02Analysis.update(), LaserAlignmentSimulation.update(), TotemSD.update(), sim_act::Signaler< BeginOfTrack >.update(), CaloSteppingAction.update(), sim_act::Signaler< BeginOfRun >.update(), sim_act::Signaler< EndOfRun >.update(), sim_act::Signaler< T >.update(), sim_act::Signaler< BeginOfEvent >.update(), sim_act::Signaler< EndOfEvent >.update(), sim_act::Signaler< G4Step >.update(), ApvAnalysisFactory.update(), sim_act::Signaler< DDDWorld >.update(), sim_act::Signaler< EndOfTrack >.update(), sim_act::Signaler< BeginOfJob >.update(), SimTracer.update(), progressbar.WidgetHFill.update(), HcalForwardAnalysis.update(), FP420SD.update(), DTSegmentUpdator.update(), DTVDriftCalibration::cellInfo.update(), DAClusterizerInZ.update(), sistrip::RawToDigiUnpacker.update(), HcalTB04Analysis.update(), SimG4HGCalValidation.update(), DoCastorAnalysis.update(), ZdcTestAnalysis.update(), PhysicsTools::TreeReader::Value.update(), EcalTBH4Trigger.update(), CastorTestAnalysis.update(), BetafuncEvtVtxGenerator.update(), CaloSD.update(), InitialClusteringStepBase.update(), cond::persistency::IPayloadMigrationTable.update(), PhysicsTools::MVAModuleHelper< Record, Object, Filler >::Value.update(), HLTScalersClient::CountLSFifo_t.update(), progressbar.Bar.update(), DynamicTruncation.update(), jsoncollector::IntJ.update(), edm::service::SimpleMemoryCheck.update(), PFECALSuperClusterAlgo.update(), edm::BMixingModule.update(), evf::FastMonitoringService::Encoding.update(), progressbar.BouncingBar.update(), GaussianSumUtilities1D.update(), CastorShowerLibraryMaker.update(), cond::persistency::IGTTable.update(), DTRecSegment2D.update(), MonitorElement.update(), StandAloneMuonFilter.update(), jsoncollector::DoubleJ.update(), FWPSetTableManager.update(), DQMNet::Peer.update, G4StepStatistics.update(), TrajectoryStateOnSurface.update(), progressbar.FormatLabel.update(), DQMNet::AutoPeer.update, FWLiteESRecordWriterAnalyzer.update(), CommissioningTask.update(), FP420Test.update(), StMeasurementDetSet.update(), Folder.update(), DAClusterizerInZ_vect.update(), BscTest.update(), jsoncollector::StringJ.update(), dqm-mbProfile.Profile.update(), DAClusterizerInZT_vect.update(), jsoncollector::HistoJ< T >.update(), jsoncollector::HistoJ< unsigned int >.update(), BasicTrajectoryState.update(), progressbar.ProgressBar.update(), PxMeasurementDetSet.update(), Phase2OTMeasurementDetSet.update(), edmStreamStallGrapher.Stack.update(), crabFunctions.CrabTask.update(), edmNew::DetSetVector< T >.update(), DetSetVector< ClusterType >.update(), DetSetVector< SiPixelCluster >.update(), DetSetVector< SiStripCluster >.update(), DetSetVector< T >.update(), and const_iterator.update().

148  def mouseReleaseEvent(self, event):
149  if hasattr(self, "_selectionRect") and self._selectionRect and self.multiSelectEnabled():
150  for child in self.children():
151  if hasattr(child, "select") and hasattr(child, "isSelected") and self._selectionRect.contains(child.geometry()) and not child.isSelected():
152  child.select(True, True) # select, mulitSelect
153  self.update(self._selectionRect.adjusted(-5, -5, 5, 5))
154  self._selectionRect = None
155  self._selectionRectStartPos = None
def Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.widgetAboutToDelete (   self,
  widget 
)
This function is called from the delete() function of VispaWidget.

Definition at line 89 of file VispaWidgetOwner.py.

89  def widgetAboutToDelete(self, widget):
90  """ This function is called from the delete() function of VispaWidget.
91  """
92  pass
93 
def Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.widgetDoubleClicked (   self,
  widget 
)
Forward selection information to super class if it is a VispaWidgetOwner.

Definition at line 47 of file VispaWidgetOwner.py.

References edmIntegrityCheck.PublishToFileSystem.parent, edm::ThinnedAssociationBranches.parent(), confdb.HLTProcess.parent, reco::PattRecoNode< Cluster >.parent(), FSimVertex.parent(), DDI::Division.parent(), math::GraphWalker< N, E >.parent(), GraphWalker< N, E >.parent(), math::GraphWalker< ReferenceCountingPointer, ReferenceCountingPointer >.parent(), math::GraphWalker< DDLogicalPart, DDPosData * >.parent(), edm::ModuleCallingContext.parent(), DDLSAX2FileHandler.parent(), OpticalObject.parent(), edm::DocFormatHelper.parent(), FWPSetTableManager::PSetData.parent, emtf::Node.parent, EmDQMReco::FourVectorMonitorElements.parent, DDFilteredView.parent(), cms::DDFilteredView.parent(), DDExpandedView.parent(), DDDivision.parent(), options.HLTProcessOptions.parent, dqmservices::TriggerSelector::TreeElement.parent(), BeautifulSoup.PageElement.parent, DDXMLElement.parent(), globcontrol.parent, and Vispa.Views.LineDecayView.DecayObject.parent().

Referenced by Vispa.Gui.WidgetContainer.WidgetContainer.mouseDoubleClickEvent().

47  def widgetDoubleClicked(self, widget):
48  """ Forward selection information to super class if it is a VispaWidgetOwner.
49  """
50  #logging.debug(self.__class__.__name__ +": widgetDoubleClicked()")
51  if isinstance(self, QObject):
52  if isinstance(self.parent(), VispaWidgetOwner):
53  self.parent().widgetDoubleClicked(widget)
54 
def Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.widgetDragged (   self,
  widget 
)
Tell parent widget has moved.

Only informs parent if it is a VispaWidgetOwner, too.

Definition at line 63 of file VispaWidgetOwner.py.

References Vispa.Share.BasicDataAccessor.BasicDataAccessor.children(), Vispa.Plugins.EdmBrowser.EventContentDataAccessor.EventContentDataAccessor.children(), data_sources.node.children(), Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor.children(), Vispa.Plugins.ConfigEditor.ToolDataAccessor.ToolDataAccessor.children(), geometry.Structure.children, Folder.children(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor.children(), Vispa.Views.LineDecayView.LineDecayContainer.children(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.multiSelectEnabled(), edm::ThinnedAssociationBranches.parent(), edmIntegrityCheck.PublishToFileSystem.parent, confdb.HLTProcess.parent, reco::PattRecoNode< Cluster >.parent(), FSimVertex.parent(), DDI::Division.parent(), math::GraphWalker< N, E >.parent(), GraphWalker< N, E >.parent(), math::GraphWalker< ReferenceCountingPointer, ReferenceCountingPointer >.parent(), math::GraphWalker< DDLogicalPart, DDPosData * >.parent(), edm::ModuleCallingContext.parent(), DDLSAX2FileHandler.parent(), OpticalObject.parent(), edm::DocFormatHelper.parent(), FWPSetTableManager::PSetData.parent, emtf::Node.parent, EmDQMReco::FourVectorMonitorElements.parent, DDFilteredView.parent(), cms::DDFilteredView.parent(), DDExpandedView.parent(), DDDivision.parent(), options.HLTProcessOptions.parent, dqmservices::TriggerSelector::TreeElement.parent(), BeautifulSoup.PageElement.parent, DDXMLElement.parent(), globcontrol.parent, and Vispa.Views.LineDecayView.DecayObject.parent().

Referenced by Vispa.Gui.WidgetContainer.WidgetContainer.toggleCollapse().

63  def widgetDragged(self, widget):
64  """ Tell parent widget has moved.
65 
66  Only informs parent if it is a VispaWidgetOwner, too.
67  """
68  if isinstance(self.parent(), VispaWidgetOwner):
69  self.parent().widgetDragged(widget)
70 
71  if hasattr(self, "_lastMovedWidgets"):
72  self._lastMovedWidgets.append(widget)
73 
74  if self.multiSelectEnabled():
75  for child in self.children():
76  if hasattr(child, "dragReferencePoint") and child != widget and hasattr(child, "isSelected") and child.isSelected():
77  if hasattr(child, "setPreviousDragPosition"):
78  child.setPreviousDragPosition(child.pos())
79  child.move(widget.pos() - child.dragReferencePoint())
80  self._lastMovedWidgets.append(child)
81 
82 # apparently unused feature (2010-07-02), remove if really unnecessary
83 # also see self._lastMovedWidget definition above
def Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.widgetSelected (   self,
  widget,
  multiSelect = False 
)
Forward selection information to super class if it is a VispaWidgetOwner.

Definition at line 25 of file VispaWidgetOwner.py.

Referenced by Vispa.Views.LineDecayView.LineDecayContainer.select().

25  def widgetSelected(self, widget, multiSelect=False):
26  """ Forward selection information to super class if it is a VispaWidgetOwner.
27  """
28  logging.debug(self.__class__.__name__ +": widgetSelected()")
29 
30  if isinstance(self, QObject):
31  if not hasattr(self, "_selectedWidgets"):
32  self._selectedWidgets = []
33 
34  if not multiSelect or not self.multiSelectEnabled():
35  self.deselectAllWidgets(widget)
36  self._selectedWidgets = []
37 
38  if widget.parent() == self and not widget in self._selectedWidgets:
39  self._selectedWidgets.append(widget)
40 
41  for widget in [child for child in self._selectedWidgets if hasattr(child, "isSelected") and not child.isSelected()]:
42  self._selectedWidgets.remove(widget)
43 
44  if isinstance(self.parent(), VispaWidgetOwner):
45  self.parent().widgetSelected(widget)
46 
def widgetSelected(self, widget, multiSelect=False)

Member Data Documentation

Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner._lastMovedWidgets
private
Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner._multiSelectEnabledFlag
private
Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner._selectedWidgets
private
Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner._selectionRect
private
Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner._selectionRectStartPos
private