CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
 
def enableMultiSelect
 
def initWidgetMovement
 
def keyPressEvent
 
def lastMovedWidgets
 
def mouseMoveEvent
 
def mousePressEvent
 
def mouseReleaseEvent
 
def multiSelectEnabled
 
def selectedWidgets
 
def widgetAboutToDelete
 
def widgetDoubleClicked
 
def widgetDragged
 
def widgetSelected
 

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(), Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor.children(), Vispa.Plugins.ConfigEditor.ToolDataAccessor.ToolDataAccessor.children(), Folder.children(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor.children(), Vispa.Views.LineDecayView.LineDecayContainer.children(), DDDWorldObserver< Event >.update(), PixelTrackFilterByKinematics.update(), SaveSimTrack.update(), PTStatistics.update(), PixelTrackFilter.update(), KillSecondariesTrackAction.update(), KillSecondariesRunAction.update(), reco::KalmanGhostTrackUpdater.update(), PrintTrackNumberAction.update(), GenericMVAComputerCache.update(), HIProtoTrackFilter.update(), Basic2DGenericPFlowClusterizer.update(), PFMultiDepthClusterizer.update(), HIPixelTrackFilter.update(), FastFedCablingTask.update(), LagrangeChildUpdator.update(), VertexTrackUpdator< N >.update(), DummyVertexTrackUpdator< N >.update(), TrajectoryStateUpdator.update(), PFlow2DClusterizerWithTime.update(), MSLayersAtAngle.update(), FedTimingTask.update(), VpspScanTask.update(), edm::RunningAverage.update(), DDG4ProductionCuts.update(), ErrorCorrelation.update(), ApvTimingTask.update(), DaqScopeModeTask.update(), PedestalsTask.update(), OptoScanTask.update(), ApvTimingHistosUsingDb.update(), GsfMultiStateUpdator.update(), NoiseHistosUsingDb.update(), OptoScanHistosUsingDb.update(), PedestalsHistosUsingDb.update(), PedsFullNoiseHistosUsingDb.update(), PedsOnlyHistosUsingDb.update(), VpspScanHistosUsingDb.update(), FineDelayTask.update(), LatencyTask.update(), MonopoleSteppingAction.update(), CalibrationTask.update(), CalibrationScanTask.update(), cond::persistency::ITagTable.update(), RHStopTracer.update(), FastFedCablingHistosUsingDb.update(), SCRegressionCalculator< VarCalc >.update(), PFClusterEnergyCorrectorBase.update(), PFCPositionCalculatorBase.update(), ValidHitPairFilter.update(), FedCablingTask.update(), PrintSensitive.update(), SamplingHistosUsingDb.update(), KFStrip1DUpdator.update(), LatencyHistosUsingDb.update(), CheckOverlap.update(), TkPixelMeasurementDet.update(), NoiseTask.update(), PedsOnlyTask.update(), CalibrationHistosUsingDb.update(), ChildUpdator.update(), FineDelayHistosUsingDb.update(), PedsFullNoiseTask.update(), CountProcessesAction.update(), PrintGeomInfoAction.update(), PrintMaterialBudgetInfo.update(), PrintGeomMatInfo.update(), progressbar.Widget.update(), KinematicConstrainedVertexUpdator.update(), ora::PVectorUpdater.update(), PhysicsTools::MVAComputerCache.update(), KFSwitching1DUpdator.update(), BaselinePFSCRegression.update(), ClusterShapeTrackFilter.update(), cond::persistency::GLOBAL_TAG::Table.update(), MaterialBudgetHcal.update(), BinomialProbability.update(), StoreSecondary.update(), TrackingMaterialProducer.update(), GraphPath< N, E >.update(), MuonServiceProxy.update(), pathelpers::Record.update(), cond::persistency::TAG::Table.update(), Observer< const Event * >.update(), GflashG4Watcher.update(), Observer< const DDDWorld * >.update(), Observer< T >.update(), Observer< const BeginOfRun * >.update(), Observer< const EndOfRun * >.update(), KFUpdator.update(), funct::Master< F >.update(), MaterialBudget.update(), Observer< const BeginOfTrack * >.update(), Observer< const G4Step * >.update(), Observer< const EndOfTrack * >.update(), Observer< const T * >.update(), Observer< const BeginOfJob * >.update(), MaterialBudgetForward.update(), Observer< const EndOfEvent * >.update(), PFClusterBuilderBase.update(), Observer< const BeginOfEvent * >.update(), CheckSecondary.update(), HcaluLUTTPGCoder.update(), KalmanVertexTrackUpdator< N >.update(), KalmanVertexTrackUpdator< 5 >.update(), ECAL2DPositionCalcWithDepthCorr.update(), CaloTrkProcessing.update(), EcalSimHitsValidProducer.update(), MaterialBudgetAction.update(), pos::PixelConfig.update(), ora::IRelationalUpdater.update(), edm::service::CondorStatusService.update(), FWJobMetadataManager.update(), BasicMultiTrajectoryState.update(), SiTrackerMultiRecHitUpdator.update(), TrackingVerboseAction.update(), PhysicsTools::TreeReader.update(), HcalTestAnalysis.update(), SiStripConfObject.update(), reco::GhostTrackFitter::PredictionUpdater.update(), KalmanVertexUpdator< N >.update(), SingleParticleEvent.update(), KalmanVertexUpdator< 5 >.update(), HCalSD.update(), ora::QueryableVectorUpdater.update(), MuonTrajectoryUpdator.update(), fwlite::RecordWriter.update(), SiStripPartition.update(), FiberSD.update(), FWParameterSetterBase.update(), KinematicConstrainedVertexUpdatorT< nTrk, nConstraint >.update(), TotemTestGem.update(), progressbar.Timer.update(), SimG4HcalValidation.update(), Bcm1fSD.update(), PltSD.update(), simwatcher::BeginOfTrackCounter.update(), MuonUpdatorAtVertex.update(), DQMOldReceiver.update(), TkAccumulatingSensitiveDetector.update(), ora::OraPtrUpdater.update(), LaserAlignmentSimulation.update(), HcalTB02Analysis.update(), cond::persistency::OraTagTable.update(), ora::PrimitiveUpdater.update(), InitialClusteringStepBase.update(), ora::UniqueRefUpdater.update(), FastTimerSD.update(), BHMSD.update(), ora::OraReferenceUpdater.update(), ora::CArrayUpdater.update(), ApvAnalysisFactory.update(), TotemSD.update(), HcalTB06Analysis.update(), progressbar.WidgetHFill.update(), ora::ObjectUpdater.update(), ora::BlobUpdater.update(), SimTracer.update(), HcalForwardAnalysis.update(), DTVDriftCalibration::cellInfo.update(), MuonSensitiveDetector.update(), DTSegmentUpdator.update(), ora::InlineCArrayUpdater.update(), sistrip::RawToDigiUnpacker.update(), DAClusterizerInZ.update(), ora::STLContainerUpdater.update(), HcalTB04Analysis.update(), sim_act::Signaler< EndOfTrack >.update(), sim_act::Signaler< BeginOfRun >.update(), sim_act::Signaler< BeginOfJob >.update(), sim_act::Signaler< DDDWorld >.update(), sim_act::Signaler< EndOfRun >.update(), sim_act::Signaler< T >.update(), sim_act::Signaler< G4Step >.update(), sim_act::Signaler< EndOfEvent >.update(), sim_act::Signaler< BeginOfTrack >.update(), sim_act::Signaler< BeginOfEvent >.update(), EcalTBH4Trigger.update(), DoCastorAnalysis.update(), ora::NamedRefUpdater.update(), ZdcTestAnalysis.update(), CastorTestAnalysis.update(), PhysicsTools::TreeReader::Value.update(), CaloSD.update(), BscSD.update(), QuadrupletSeedMerger.update(), edm::service::SimpleMemoryCheck.update(), DynamicTruncation.update(), PhysicsTools::MVAModuleHelper< Record, Object, Filler >::Value.update(), BetafuncEvtVtxGenerator.update(), evf::FastMonitoringService::Encoding.update(), cond::persistency::IPayloadMigrationTable.update(), ora::Container.update(), progressbar.Bar.update(), FP420SD.update(), edm::BMixingModule.update(), jsoncollector::IntJ.update(), HLTScalersClient::CountLSFifo_t.update(), PFECALSuperClusterAlgo.update(), progressbar.BouncingBar.update(), GaussianSumUtilities1D.update(), CastorShowerLibraryMaker.update(), cond::persistency::IGTTable.update(), edmNew::DetSetVector< T >::IterHelp.update, DTRecSegment2D.update(), StandAloneMuonFilter.update(), ora::Database.update(), MonitorElement.update(), jsoncollector::DoubleJ.update(), FWPSetTableManager.update(), DQMNet::Peer.update, CommissioningTask.update(), progressbar.FormatLabel.update(), cond::persistency::OraGTTable.update(), G4StepStatistics.update(), DQMNet::AutoPeer.update, python.seqvaluedict.seqdict.update(), TrajectoryStateOnSurface.update(), FWLiteESRecordWriterAnalyzer.update(), StMeasurementDetSet.update(), cond::persistency::PAYLOAD_MIGRATION::Table.update(), Folder.update(), FP420Test.update(), DAClusterizerInZ_vect.update(), BscTest.update(), jsoncollector::StringJ.update(), jsoncollector::HistoJ< unsigned int >.update(), jsoncollector::HistoJ< T >.update(), BasicTrajectoryState.update(), progressbar.ProgressBar.update(), PxMeasurementDetSet.update(), edmNew::DetSetVector< SiPixelCluster >.update(), edmNew::DetSetVector< edm::Ref< edmNew::DetSetVector< SiPixelCluster >, SiPixelCluster, edmNew::DetSetVector< SiPixelCluster >::FindForDetSetVector > >.update(), const_iterator.update(), DetSetVector< ClusterType >.update(), edmNew::DetSetVector< edm::Ref< edmNew::DetSetVector< SiStripCluster >, SiStripCluster, edmNew::DetSetVector< SiStripCluster >::FindForDetSetVector > >.update(), edmNew::DetSetVector< T >.update(), edmNew::DetSetVector< SiStripCluster >.update(), and DetSetVector< T >.update().

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

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

Definition at line 12 of file VispaWidgetOwner.py.

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

Definition at line 55 of file VispaWidgetOwner.py.

55 
56  def initWidgetMovement(self, widget):
57  self._lastMovedWidgets = []
58  if self.multiSelectEnabled():
59  pos = widget.pos()
60  for child in self.children():
61  if child != widget and hasattr(child, "isSelected") and child.isSelected():
62  child.setDragReferencePoint(pos - child.pos())
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 
95  def keyPressEvent(self, event):
96  """ Calls delete() method of selected child widgets if multi-select is activated.
97  """
98  if self.multiSelectEnabled() and ( event.key() == Qt.Key_Backspace or event.key() == Qt.Key_Delete ):
99  selection = self.selectedWidgets()[:]
100  for widget in selection:
101  widget.delete()
def Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.lastMovedWidgets (   self)

Definition at line 84 of file VispaWidgetOwner.py.

References Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner._lastMovedWidgets.

84 
85  def lastMovedWidgets(self):
86  if hasattr(self, "_lastMovedWidgets"):
87  return self._lastMovedWidgets
88  return None
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(), PixelTrackFilterByKinematics.update(), SaveSimTrack.update(), PTStatistics.update(), PixelTrackFilter.update(), KillSecondariesTrackAction.update(), KillSecondariesRunAction.update(), reco::KalmanGhostTrackUpdater.update(), PrintTrackNumberAction.update(), GenericMVAComputerCache.update(), HIProtoTrackFilter.update(), PFMultiDepthClusterizer.update(), Basic2DGenericPFlowClusterizer.update(), HIPixelTrackFilter.update(), LagrangeChildUpdator.update(), VertexTrackUpdator< N >.update(), DummyVertexTrackUpdator< N >.update(), TrajectoryStateUpdator.update(), FastFedCablingTask.update(), PFlow2DClusterizerWithTime.update(), VpspScanTask.update(), MSLayersAtAngle.update(), ErrorCorrelation.update(), edm::RunningAverage.update(), DDG4ProductionCuts.update(), ApvTimingTask.update(), DaqScopeModeTask.update(), FedTimingTask.update(), OptoScanTask.update(), PedestalsTask.update(), ApvTimingHistosUsingDb.update(), NoiseHistosUsingDb.update(), GsfMultiStateUpdator.update(), OptoScanHistosUsingDb.update(), PedestalsHistosUsingDb.update(), PedsFullNoiseHistosUsingDb.update(), PedsOnlyHistosUsingDb.update(), VpspScanHistosUsingDb.update(), FineDelayTask.update(), LatencyTask.update(), MonopoleSteppingAction.update(), CalibrationTask.update(), CalibrationScanTask.update(), cond::persistency::ITagTable.update(), RHStopTracer.update(), FastFedCablingHistosUsingDb.update(), SCRegressionCalculator< VarCalc >.update(), PFClusterEnergyCorrectorBase.update(), PFCPositionCalculatorBase.update(), ValidHitPairFilter.update(), PrintSensitive.update(), SamplingHistosUsingDb.update(), FedCablingTask.update(), KFStrip1DUpdator.update(), LatencyHistosUsingDb.update(), CheckOverlap.update(), NoiseTask.update(), PedsOnlyTask.update(), CalibrationHistosUsingDb.update(), TkPixelMeasurementDet.update(), ChildUpdator.update(), FineDelayHistosUsingDb.update(), PedsFullNoiseTask.update(), CountProcessesAction.update(), PrintGeomInfoAction.update(), PrintMaterialBudgetInfo.update(), PrintGeomMatInfo.update(), progressbar.Widget.update(), KinematicConstrainedVertexUpdator.update(), ora::PVectorUpdater.update(), PhysicsTools::MVAComputerCache.update(), KFSwitching1DUpdator.update(), BaselinePFSCRegression.update(), ClusterShapeTrackFilter.update(), cond::persistency::GLOBAL_TAG::Table.update(), MaterialBudgetHcal.update(), StoreSecondary.update(), BinomialProbability.update(), TrackingMaterialProducer.update(), GraphPath< N, E >.update(), MuonServiceProxy.update(), pathelpers::Record.update(), cond::persistency::TAG::Table.update(), Observer< const EndOfTrack * >.update(), GflashG4Watcher.update(), Observer< T >.update(), Observer< const BeginOfJob * >.update(), funct::Master< F >.update(), KFUpdator.update(), Observer< const Event * >.update(), MaterialBudget.update(), MaterialBudgetForward.update(), Observer< const BeginOfTrack * >.update(), PFClusterBuilderBase.update(), Observer< const EndOfRun * >.update(), Observer< const T * >.update(), Observer< const BeginOfEvent * >.update(), Observer< const EndOfEvent * >.update(), Observer< const DDDWorld * >.update(), Observer< const G4Step * >.update(), Observer< const BeginOfRun * >.update(), CheckSecondary.update(), HcaluLUTTPGCoder.update(), KalmanVertexTrackUpdator< N >.update(), KalmanVertexTrackUpdator< 5 >.update(), ECAL2DPositionCalcWithDepthCorr.update(), CaloTrkProcessing.update(), MaterialBudgetAction.update(), pos::PixelConfig.update(), EcalSimHitsValidProducer.update(), edm::service::CondorStatusService.update(), ora::IRelationalUpdater.update(), FWJobMetadataManager.update(), BasicMultiTrajectoryState.update(), SiTrackerMultiRecHitUpdator.update(), PhysicsTools::TreeReader.update(), TrackingVerboseAction.update(), HcalTestAnalysis.update(), SiStripConfObject.update(), reco::GhostTrackFitter::PredictionUpdater.update(), KalmanVertexUpdator< N >.update(), ora::QueryableVectorUpdater.update(), HCalSD.update(), SingleParticleEvent.update(), KalmanVertexUpdator< 5 >.update(), MuonTrajectoryUpdator.update(), SiStripPartition.update(), fwlite::RecordWriter.update(), FiberSD.update(), FWParameterSetterBase.update(), KinematicConstrainedVertexUpdatorT< nTrk, nConstraint >.update(), TotemTestGem.update(), progressbar.Timer.update(), SimG4HcalValidation.update(), Bcm1fSD.update(), PltSD.update(), simwatcher::BeginOfTrackCounter.update(), MuonUpdatorAtVertex.update(), DQMOldReceiver.update(), TkAccumulatingSensitiveDetector.update(), ora::OraPtrUpdater.update(), LaserAlignmentSimulation.update(), HcalTB02Analysis.update(), cond::persistency::OraTagTable.update(), InitialClusteringStepBase.update(), ora::PrimitiveUpdater.update(), ora::UniqueRefUpdater.update(), FastTimerSD.update(), BHMSD.update(), ora::OraReferenceUpdater.update(), ora::CArrayUpdater.update(), HcalTB06Analysis.update(), TotemSD.update(), ApvAnalysisFactory.update(), progressbar.WidgetHFill.update(), ora::ObjectUpdater.update(), HcalForwardAnalysis.update(), SimTracer.update(), ora::BlobUpdater.update(), DTSegmentUpdator.update(), ora::InlineCArrayUpdater.update(), DTVDriftCalibration::cellInfo.update(), MuonSensitiveDetector.update(), sistrip::RawToDigiUnpacker.update(), DAClusterizerInZ.update(), ora::STLContainerUpdater.update(), HcalTB04Analysis.update(), sim_act::Signaler< EndOfEvent >.update(), sim_act::Signaler< BeginOfRun >.update(), sim_act::Signaler< EndOfTrack >.update(), sim_act::Signaler< DDDWorld >.update(), sim_act::Signaler< G4Step >.update(), sim_act::Signaler< T >.update(), sim_act::Signaler< BeginOfJob >.update(), sim_act::Signaler< BeginOfEvent >.update(), sim_act::Signaler< BeginOfTrack >.update(), sim_act::Signaler< EndOfRun >.update(), EcalTBH4Trigger.update(), DoCastorAnalysis.update(), ora::NamedRefUpdater.update(), CastorTestAnalysis.update(), ZdcTestAnalysis.update(), PhysicsTools::TreeReader::Value.update(), CaloSD.update(), BscSD.update(), QuadrupletSeedMerger.update(), edm::service::SimpleMemoryCheck.update(), DynamicTruncation.update(), PhysicsTools::MVAModuleHelper< Record, Object, Filler >::Value.update(), BetafuncEvtVtxGenerator.update(), cond::persistency::IPayloadMigrationTable.update(), evf::FastMonitoringService::Encoding.update(), ora::Container.update(), progressbar.Bar.update(), FP420SD.update(), edm::BMixingModule.update(), jsoncollector::IntJ.update(), HLTScalersClient::CountLSFifo_t.update(), progressbar.BouncingBar.update(), PFECALSuperClusterAlgo.update(), GaussianSumUtilities1D.update(), CastorShowerLibraryMaker.update(), cond::persistency::IGTTable.update(), edmNew::DetSetVector< T >::IterHelp.update, DTRecSegment2D.update(), StandAloneMuonFilter.update(), ora::Database.update(), MonitorElement.update(), jsoncollector::DoubleJ.update(), FWPSetTableManager.update(), DQMNet::Peer.update, CommissioningTask.update(), progressbar.FormatLabel.update(), cond::persistency::OraGTTable.update(), G4StepStatistics.update(), DQMNet::AutoPeer.update, TrajectoryStateOnSurface.update(), python.seqvaluedict.seqdict.update(), FWLiteESRecordWriterAnalyzer.update(), StMeasurementDetSet.update(), cond::persistency::PAYLOAD_MIGRATION::Table.update(), Folder.update(), FP420Test.update(), DAClusterizerInZ_vect.update(), BscTest.update(), jsoncollector::StringJ.update(), jsoncollector::HistoJ< unsigned int >.update(), jsoncollector::HistoJ< T >.update(), BasicTrajectoryState.update(), progressbar.ProgressBar.update(), PxMeasurementDetSet.update(), DetSetVector< ClusterType >.update(), edmNew::DetSetVector< SiPixelCluster >.update(), edmNew::DetSetVector< T >.update(), edmNew::DetSetVector< edm::Ref< edmNew::DetSetVector< SiPixelCluster >, SiPixelCluster, edmNew::DetSetVector< SiPixelCluster >::FindForDetSetVector > >.update(), edmNew::DetSetVector< SiStripCluster >.update(), edmNew::DetSetVector< edm::Ref< edmNew::DetSetVector< SiStripCluster >, SiStripCluster, edmNew::DetSetVector< SiStripCluster >::FindForDetSetVector > >.update(), DetSetVector< T >.update(), and const_iterator.update().

129  def mouseMoveEvent(self, event):
130  if self.multiSelectEnabled() and self._selectionRectStartPos and (event.pos() - self._selectionRectStartPos).manhattanLength() >= QApplication.startDragDistance():
131  eventX = event.pos().x()
132  eventY = event.pos().y()
133  startX = self._selectionRectStartPos.x()
134  startY = self._selectionRectStartPos.y()
135  oldRect = self._selectionRect
136  self._selectionRect = QRect(min(startX, eventX), min(startY, eventY), abs(eventX - startX), abs(eventY - startY))
137  if oldRect:
138  self.update(self._selectionRect.united(oldRect).adjusted(-5, -5, 5, 5))
139  else:
140  self.update(self._selectionRect)
141 
142  # dynamically update selection statur
143  # currently bad performance (2010-07-07)
144  # TODO: improve selection mechanism
145 # for child in self.children():
146 # if hasattr(child, "select") and hasattr(child, "isSelected"):
147 # child.select(self._selectionRect.contains(child.geometry()), True) # select, mulitSelect
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().

119  def mousePressEvent(self, event):
120  """ Calls deselectAllWidgets.
121  """
122  multiSelectEnabled = self.multiSelectEnabled()
123  if event.modifiers() != Qt.ControlModifier:
124  self.deselectAllWidgets()
125  if multiSelectEnabled:
126  self._selectionRectStartPos = QPoint(event.pos())
127  self._selectionRect = None
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(), Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor.children(), Vispa.Plugins.ConfigEditor.ToolDataAccessor.ToolDataAccessor.children(), Folder.children(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor.children(), Vispa.Views.LineDecayView.LineDecayContainer.children(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.multiSelectEnabled(), DDDWorldObserver< Event >.update(), PixelTrackFilterByKinematics.update(), SaveSimTrack.update(), PTStatistics.update(), PixelTrackFilter.update(), KillSecondariesTrackAction.update(), KillSecondariesRunAction.update(), reco::KalmanGhostTrackUpdater.update(), PrintTrackNumberAction.update(), GenericMVAComputerCache.update(), HIProtoTrackFilter.update(), PFMultiDepthClusterizer.update(), Basic2DGenericPFlowClusterizer.update(), HIPixelTrackFilter.update(), FastFedCablingTask.update(), LagrangeChildUpdator.update(), VertexTrackUpdator< N >.update(), DummyVertexTrackUpdator< N >.update(), TrajectoryStateUpdator.update(), PFlow2DClusterizerWithTime.update(), DaqScopeModeTask.update(), MSLayersAtAngle.update(), FedTimingTask.update(), VpspScanTask.update(), edm::RunningAverage.update(), DDG4ProductionCuts.update(), ErrorCorrelation.update(), ApvTimingTask.update(), OptoScanTask.update(), PedestalsTask.update(), GsfMultiStateUpdator.update(), ApvTimingHistosUsingDb.update(), NoiseHistosUsingDb.update(), OptoScanHistosUsingDb.update(), PedestalsHistosUsingDb.update(), PedsFullNoiseHistosUsingDb.update(), PedsOnlyHistosUsingDb.update(), VpspScanHistosUsingDb.update(), LatencyTask.update(), FineDelayTask.update(), MonopoleSteppingAction.update(), CalibrationScanTask.update(), CalibrationTask.update(), cond::persistency::ITagTable.update(), RHStopTracer.update(), FastFedCablingHistosUsingDb.update(), SCRegressionCalculator< VarCalc >.update(), PFClusterEnergyCorrectorBase.update(), PFCPositionCalculatorBase.update(), ValidHitPairFilter.update(), FedCablingTask.update(), PrintSensitive.update(), SamplingHistosUsingDb.update(), KFStrip1DUpdator.update(), CheckOverlap.update(), LatencyHistosUsingDb.update(), TkPixelMeasurementDet.update(), NoiseTask.update(), PedsOnlyTask.update(), CalibrationHistosUsingDb.update(), ChildUpdator.update(), FineDelayHistosUsingDb.update(), PedsFullNoiseTask.update(), CountProcessesAction.update(), PrintGeomInfoAction.update(), PrintMaterialBudgetInfo.update(), PrintGeomMatInfo.update(), progressbar.Widget.update(), KinematicConstrainedVertexUpdator.update(), ora::PVectorUpdater.update(), PhysicsTools::MVAComputerCache.update(), KFSwitching1DUpdator.update(), BaselinePFSCRegression.update(), ClusterShapeTrackFilter.update(), cond::persistency::GLOBAL_TAG::Table.update(), MaterialBudgetHcal.update(), BinomialProbability.update(), StoreSecondary.update(), TrackingMaterialProducer.update(), GraphPath< N, E >.update(), MuonServiceProxy.update(), pathelpers::Record.update(), cond::persistency::TAG::Table.update(), MaterialBudgetForward.update(), GflashG4Watcher.update(), Observer< const Event * >.update(), Observer< T >.update(), Observer< const EndOfEvent * >.update(), KFUpdator.update(), funct::Master< F >.update(), Observer< const BeginOfJob * >.update(), Observer< const G4Step * >.update(), Observer< const DDDWorld * >.update(), Observer< const BeginOfTrack * >.update(), Observer< const EndOfRun * >.update(), Observer< const EndOfTrack * >.update(), Observer< const T * >.update(), PFClusterBuilderBase.update(), Observer< const BeginOfEvent * >.update(), Observer< const BeginOfRun * >.update(), MaterialBudget.update(), CheckSecondary.update(), HcaluLUTTPGCoder.update(), KalmanVertexTrackUpdator< N >.update(), KalmanVertexTrackUpdator< 5 >.update(), ECAL2DPositionCalcWithDepthCorr.update(), CaloTrkProcessing.update(), pos::PixelConfig.update(), EcalSimHitsValidProducer.update(), MaterialBudgetAction.update(), ora::IRelationalUpdater.update(), edm::service::CondorStatusService.update(), FWJobMetadataManager.update(), BasicMultiTrajectoryState.update(), SiTrackerMultiRecHitUpdator.update(), TrackingVerboseAction.update(), PhysicsTools::TreeReader.update(), HcalTestAnalysis.update(), SiStripConfObject.update(), reco::GhostTrackFitter::PredictionUpdater.update(), KalmanVertexUpdator< N >.update(), HCalSD.update(), KalmanVertexUpdator< 5 >.update(), ora::QueryableVectorUpdater.update(), SingleParticleEvent.update(), SiStripPartition.update(), MuonTrajectoryUpdator.update(), fwlite::RecordWriter.update(), FiberSD.update(), FWParameterSetterBase.update(), KinematicConstrainedVertexUpdatorT< nTrk, nConstraint >.update(), TotemTestGem.update(), progressbar.Timer.update(), SimG4HcalValidation.update(), PltSD.update(), simwatcher::BeginOfTrackCounter.update(), Bcm1fSD.update(), MuonUpdatorAtVertex.update(), DQMOldReceiver.update(), TkAccumulatingSensitiveDetector.update(), ora::OraPtrUpdater.update(), HcalTB02Analysis.update(), cond::persistency::OraTagTable.update(), LaserAlignmentSimulation.update(), InitialClusteringStepBase.update(), ora::PrimitiveUpdater.update(), FastTimerSD.update(), ora::UniqueRefUpdater.update(), BHMSD.update(), ora::OraReferenceUpdater.update(), ora::CArrayUpdater.update(), ApvAnalysisFactory.update(), TotemSD.update(), HcalTB06Analysis.update(), ora::ObjectUpdater.update(), progressbar.WidgetHFill.update(), HcalForwardAnalysis.update(), SimTracer.update(), ora::BlobUpdater.update(), ora::InlineCArrayUpdater.update(), MuonSensitiveDetector.update(), DTSegmentUpdator.update(), DTVDriftCalibration::cellInfo.update(), sistrip::RawToDigiUnpacker.update(), DAClusterizerInZ.update(), ora::STLContainerUpdater.update(), HcalTB04Analysis.update(), sim_act::Signaler< DDDWorld >.update(), sim_act::Signaler< BeginOfJob >.update(), sim_act::Signaler< BeginOfTrack >.update(), sim_act::Signaler< EndOfTrack >.update(), sim_act::Signaler< EndOfEvent >.update(), sim_act::Signaler< T >.update(), sim_act::Signaler< BeginOfRun >.update(), sim_act::Signaler< EndOfRun >.update(), sim_act::Signaler< BeginOfEvent >.update(), sim_act::Signaler< G4Step >.update(), EcalTBH4Trigger.update(), DoCastorAnalysis.update(), ora::NamedRefUpdater.update(), ZdcTestAnalysis.update(), CastorTestAnalysis.update(), PhysicsTools::TreeReader::Value.update(), CaloSD.update(), QuadrupletSeedMerger.update(), BscSD.update(), edm::service::SimpleMemoryCheck.update(), DynamicTruncation.update(), BetafuncEvtVtxGenerator.update(), PhysicsTools::MVAModuleHelper< Record, Object, Filler >::Value.update(), evf::FastMonitoringService::Encoding.update(), cond::persistency::IPayloadMigrationTable.update(), ora::Container.update(), progressbar.Bar.update(), edm::BMixingModule.update(), FP420SD.update(), jsoncollector::IntJ.update(), HLTScalersClient::CountLSFifo_t.update(), PFECALSuperClusterAlgo.update(), progressbar.BouncingBar.update(), GaussianSumUtilities1D.update(), CastorShowerLibraryMaker.update(), cond::persistency::IGTTable.update(), edmNew::DetSetVector< T >::IterHelp.update, DTRecSegment2D.update(), StandAloneMuonFilter.update(), ora::Database.update(), MonitorElement.update(), jsoncollector::DoubleJ.update(), DQMNet::Peer.update, FWPSetTableManager.update(), CommissioningTask.update(), progressbar.FormatLabel.update(), cond::persistency::OraGTTable.update(), G4StepStatistics.update(), DQMNet::AutoPeer.update, TrajectoryStateOnSurface.update(), python.seqvaluedict.seqdict.update(), FWLiteESRecordWriterAnalyzer.update(), StMeasurementDetSet.update(), Folder.update(), cond::persistency::PAYLOAD_MIGRATION::Table.update(), FP420Test.update(), DAClusterizerInZ_vect.update(), BscTest.update(), jsoncollector::StringJ.update(), jsoncollector::HistoJ< T >.update(), jsoncollector::HistoJ< unsigned int >.update(), BasicTrajectoryState.update(), progressbar.ProgressBar.update(), PxMeasurementDetSet.update(), edmNew::DetSetVector< SiPixelCluster >.update(), edmNew::DetSetVector< edm::Ref< edmNew::DetSetVector< SiPixelCluster >, SiPixelCluster, edmNew::DetSetVector< SiPixelCluster >::FindForDetSetVector > >.update(), edmNew::DetSetVector< edm::Ref< edmNew::DetSetVector< SiStripCluster >, SiStripCluster, edmNew::DetSetVector< SiStripCluster >::FindForDetSetVector > >.update(), edmNew::DetSetVector< SiStripCluster >.update(), edmNew::DetSetVector< T >.update(), DetSetVector< ClusterType >.update(), const_iterator.update(), and DetSetVector< T >.update().

149  def mouseReleaseEvent(self, event):
150  if hasattr(self, "_selectionRect") and self._selectionRect and self.multiSelectEnabled():
151  for child in self.children():
152  if hasattr(child, "select") and hasattr(child, "isSelected") and self._selectionRect.contains(child.geometry()) and not child.isSelected():
153  child.select(True, True) # select, mulitSelect
154  self.update(self._selectionRect.adjusted(-5, -5, 5, 5))
155  self._selectionRect = None
156  self._selectionRectStartPos = None
def Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.multiSelectEnabled (   self)

Definition at line 15 of file VispaWidgetOwner.py.

References Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner._multiSelectEnabledFlag.

Referenced by Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.keyPressEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.mousePressEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.mouseReleaseEvent(), and Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.widgetDragged().

15 
16  def multiSelectEnabled(self):
17  return hasattr(self, "_multiSelectEnabledFlag") and self._multiSelectEnabledFlag
def Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.selectedWidgets (   self)
Returns a list of all selected widgets.

Definition at line 18 of file VispaWidgetOwner.py.

References Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner._selectedWidgets, Vispa.Share.BasicDataAccessor.BasicDataAccessor.children(), Vispa.Plugins.EdmBrowser.EventContentDataAccessor.EventContentDataAccessor.children(), Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor.children(), Vispa.Plugins.ConfigEditor.ToolDataAccessor.ToolDataAccessor.children(), Folder.children(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor.children(), and Vispa.Views.LineDecayView.LineDecayContainer.children().

Referenced by Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.keyPressEvent().

18 
19  def selectedWidgets(self):
20  """ Returns a list of all selected widgets.
21  """
22  if hasattr(self, "_selectedWidgets"):
23  return self._selectedWidgets
24  return [child for child in self.children() if hasattr(child, "isSelected") and child.isSelected()]
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 
90  def widgetAboutToDelete(self, widget):
91  """ This function is called from the delete() function of VispaWidget.
92  """
93  pass
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 python.multivaluedict.MyUserList.parent, edmIntegrityCheck.PublishToFileSystem.parent, edm::ThinnedAssociationBranches.parent(), confdb.HLTProcess.parent, FSimVertex.parent(), reco::PattRecoNode< Cluster >.parent(), reco::PattRecoNode< reco::PattRecoPeak< double > >.parent(), reco::PattRecoNode< reco::PattRecoPeak< float > >.parent(), DDI::Division.parent(), graphwalker< N, E >.parent(), graphwalker< ReferenceCountingPointer, ReferenceCountingPointer >.parent(), graphwalker< DDLogicalPart, DDPosData * >.parent(), edm::ModuleCallingContext.parent(), OpticalObject.parent(), EmDQMReco::FourVectorMonitorElements.parent, DDLSAX2FileHandler.parent(), DDFilteredView.parent(), FWPSetTableManager::PSetData.parent, edm::DocFormatHelper.parent(), DDExpandedView.parent(), DDDivision.parent(), dqmservices::TriggerSelector::TreeElement.parent(), options.HLTProcessOptions.parent, DDXMLElement.parent(), argparse.HelpFormatter._Section.parent, python.rootplot.argparse.HelpFormatter._Section.parent, globcontrol.parent, TiXmlNode.parent, and Vispa.Views.LineDecayView.DecayObject.parent().

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

47 
48  def widgetDoubleClicked(self, widget):
49  """ Forward selection information to super class if it is a VispaWidgetOwner.
50  """
51  #logging.debug(self.__class__.__name__ +": widgetDoubleClicked()")
52  if isinstance(self, QObject):
53  if isinstance(self.parent(), VispaWidgetOwner):
54  self.parent().widgetDoubleClicked(widget)
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(), Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor.children(), Vispa.Plugins.ConfigEditor.ToolDataAccessor.ToolDataAccessor.children(), Folder.children(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor.children(), Vispa.Views.LineDecayView.LineDecayContainer.children(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.multiSelectEnabled(), python.multivaluedict.MyUserList.parent, edmIntegrityCheck.PublishToFileSystem.parent, edm::ThinnedAssociationBranches.parent(), confdb.HLTProcess.parent, FSimVertex.parent(), reco::PattRecoNode< Cluster >.parent(), reco::PattRecoNode< reco::PattRecoPeak< double > >.parent(), reco::PattRecoNode< reco::PattRecoPeak< float > >.parent(), DDI::Division.parent(), graphwalker< N, E >.parent(), graphwalker< DDLogicalPart, DDPosData * >.parent(), graphwalker< ReferenceCountingPointer, ReferenceCountingPointer >.parent(), edm::ModuleCallingContext.parent(), OpticalObject.parent(), EmDQMReco::FourVectorMonitorElements.parent, DDLSAX2FileHandler.parent(), DDFilteredView.parent(), FWPSetTableManager::PSetData.parent, edm::DocFormatHelper.parent(), DDExpandedView.parent(), DDDivision.parent(), dqmservices::TriggerSelector::TreeElement.parent(), options.HLTProcessOptions.parent, DDXMLElement.parent(), argparse.HelpFormatter._Section.parent, python.rootplot.argparse.HelpFormatter._Section.parent, globcontrol.parent, TiXmlNode.parent, and Vispa.Views.LineDecayView.DecayObject.parent().

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

63 
64  def widgetDragged(self, widget):
65  """ Tell parent widget has moved.
66 
67  Only informs parent if it is a VispaWidgetOwner, too.
68  """
69  if isinstance(self.parent(), VispaWidgetOwner):
70  self.parent().widgetDragged(widget)
71 
72  if hasattr(self, "_lastMovedWidgets"):
73  self._lastMovedWidgets.append(widget)
74 
75  if self.multiSelectEnabled():
76  for child in self.children():
77  if hasattr(child, "dragReferencePoint") and child != widget and hasattr(child, "isSelected") and child.isSelected():
78  if hasattr(child, "setPreviousDragPosition"):
79  child.setPreviousDragPosition(child.pos())
80  child.move(widget.pos() - child.dragReferencePoint())
81  self._lastMovedWidgets.append(child)
82 
83 # apparently unused feature (2010-07-02), remove if really unnecessary
# 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 
26  def widgetSelected(self, widget, multiSelect=False):
27  """ Forward selection information to super class if it is a VispaWidgetOwner.
28  """
29  logging.debug(self.__class__.__name__ +": widgetSelected()")
30 
31  if isinstance(self, QObject):
32  if not hasattr(self, "_selectedWidgets"):
33  self._selectedWidgets = []
34 
35  if not multiSelect or not self.multiSelectEnabled():
36  self.deselectAllWidgets(widget)
37  self._selectedWidgets = []
38 
39  if widget.parent() == self and not widget in self._selectedWidgets:
40  self._selectedWidgets.append(widget)
41 
42  for widget in [child for child in self._selectedWidgets if hasattr(child, "isSelected") and not child.isSelected()]:
43  self._selectedWidgets.remove(widget)
44 
45  if isinstance(self.parent(), VispaWidgetOwner):
46  self.parent().widgetSelected(widget)

Member Data Documentation

Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner._lastMovedWidgets
private

Definition at line 56 of file VispaWidgetOwner.py.

Referenced by Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.lastMovedWidgets().

Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner._multiSelectEnabledFlag
private

Definition at line 13 of file VispaWidgetOwner.py.

Referenced by Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.multiSelectEnabled().

Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner._selectedWidgets
private

Definition at line 32 of file VispaWidgetOwner.py.

Referenced by Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.deselectAllWidgets(), and Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.selectedWidgets().

Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner._selectionRect
private

Definition at line 126 of file VispaWidgetOwner.py.

Referenced by Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.mouseMoveEvent(), and Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.mouseReleaseEvent().

Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner._selectionRectStartPos
private

Definition at line 125 of file VispaWidgetOwner.py.

Referenced by Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.mouseMoveEvent(), and Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.mouseReleaseEvent().