CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
Vispa.Gui.MenuWidget.MenuWidget Class Reference
Inheritance diagram for Vispa.Gui.MenuWidget.MenuWidget:
Vispa.Gui.VispaWidget.VispaWidget Vispa.Gui.ZoomableWidget.ZoomableWidget Vispa.Gui.Zoomable.Zoomable

Public Member Functions

def __init__ (self, parent=None, associatedWidget=None, orientation=Qt.Horizontal)
 
def addEntry (self, name, slot=None)
 
def cursorHasEntered (self)
 
def drawMenuEntries (self, painter)
 
def enterEvent (self, event)
 
def entry (self, index)
 
def hide (self)
 
def leaveEvent (self, event)
 
def len (self)
 
def mouseMoveEvent (self, event)
 
def mousePressEvent (self, event)
 
def paint (self, painter, event=None)
 
def removeEntry (self, entry)
 
def setEntryText (self, entry, text)
 
def showEvent (self, event)
 
def sizeHint (self)
 
- Public Member Functions inherited from Vispa.Gui.VispaWidget.VispaWidget
def __init__ (self, parent=None)
 
def autosize (self, skipSizeHint=False)
 
def autosizeEnabled (self)
 
def bodyWidget (self)
 
def boundingRect (self)
 
def colorHeaderBackgroundEnabled (self)
 
def contentRect (self)
 
def defineArrowBackgroundShape (self)
 
def defineCircleBackgroundShape (self, painter)
 
def defineDistances (self, keepDefaultRatio=False)
 
def defineRectBackgroundShape (self, painter)
 
def defineRoundRectBackgroundShape (self, painter)
 
def delete (self)
 
def distances (self)
 
def dragReferencePoint (self)
 
def dragWidget (self, pPos)
 
def drawBody (self, painter)
 
def drawHeaderBackground (self, painter)
 
def drawImage (self, painter)
 
def drawTextField (self, painter)
 
def drawTitle (self, painter)
 
def enableAutopositionizeWhenZooming (self, auto)
 
def enableAutosizing (self, auto, keepAspectRatio=True)
 
def enableBackgroundGradient (self, enable=True)
 
def enableColorHeaderBackground (self, enable=True)
 
def getDistance (self, name, scale=None, keepDefaultRatio=False)
 
def height (self)
 
def imageRectF (self, width=None, height=None)
 
def imageSizeF (self)
 
def isDeletable (self)
 
def isDragable (self)
 
def isSelectable (self)
 
def isSelected (self)
 
def isTitlePoint (self, point)
 
def isUseBackgroundGradientEnabled (self)
 
def keyPressEvent (self, event)
 
def mouseDoubleClickEvent (self, event)
 
def mouseMoveEvent (self, event)
 
def mousePressEvent (self, event)
 
def mouseReleaseEvent (self, event)
 
def move (self, target)
 
def noRearangeContent (self, no=True)
 
def paint (self, painter, event=None)
 
def paintEvent (self, event)
 
def penColor (self)
 
def previousDragPosition (self)
 
def rearangeContent (self)
 
def resetMouseDragOffset (self)
 
def resize (self, width, height)
 
def scale (self)
 
def scheduleCalculateDistances (self)
 
def scheduleRearangeContent (self)
 
def select (self, sel=True, multiSelect=False)
 
def setArrowShape (self, direction)
 
def setBodyWidget (self, widget)
 
def setColors (self, penColor, fillColor1, fillColor2)
 
def setDeletable (self, deleteable)
 
def setDragable (self, dragable, recursive=False)
 
def setDragReferencePoint (self, pos)
 
def setImage (self, image)
 
def setMaximumSize (self, attr)
 
def setMinimumSize (self, attr)
 
def setPreviousDragPosition (self, position)
 
def setSelectable (self, selectable)
 
def setShape (self, shape)
 
def setText (self, text)
 
def setTextFieldAutosizeFont (self, auto)
 
def setTextFieldAutotruncateText (self, auto)
 
def setTitle (self, title)
 
def setZoom (self, zoom)
 
def showEvent (self, event)
 
def sizeHint (self)
 
def text (self)
 
def textField (self)
 
def textFieldIsSet (self)
 
def title (self)
 
def titleField (self)
 
def titleIsSet (self)
 
def unzoomedX (self)
 
def unzoomedY (self)
 
def width (self)
 
- Public Member Functions inherited from Vispa.Gui.ZoomableWidget.ZoomableWidget
def __init__ (self, parent=None)
 
def exportImage (self, filename=None)
 
def setZoom (self, zoom)
 
- Public Member Functions inherited from Vispa.Gui.Zoomable.Zoomable
def __init__ (self)
 
def decrementZoom (self)
 
def incrementZoom (self)
 
def setZoom (self, zoom)
 
def zoom (self)
 
def zoomFactor (self)
 

Private Attributes

 _associatedWidget
 
 _cursorEntered
 
 _hoverEntry
 
 _hoverGradient
 
 _menuEntrySlots
 
 _menuEntryTextFields
 
 _scaleHeight
 
 _scaleWidth
 
 _spacer
 

Additional Inherited Members

- Public Attributes inherited from Vispa.Gui.VispaWidget.VispaWidget
 fillColor1
 
 fillColor2
 
 framePenColor
 
 HEIGHT
 
 WIDTH
 

Detailed Description

Definition at line 8 of file MenuWidget.py.

Constructor & Destructor Documentation

def Vispa.Gui.MenuWidget.MenuWidget.__init__ (   self,
  parent = None,
  associatedWidget = None,
  orientation = Qt.Horizontal 
)
Constructor

Definition at line 29 of file MenuWidget.py.

29  def __init__(self, parent=None, associatedWidget=None, orientation=Qt.Horizontal):
30  """ Constructor
31  """
32  logging.debug("%s: Constructor" % self.__class__.__name__)
33  self._cursorEntered = False
34 
36  self._menuEntrySlots = []
37  self._hoverEntry = None
38 
39  self._spacer = TextField()
40 
41  VispaWidget.__init__(self, parent)
42  self.hide()
43  self._associatedWidget = associatedWidget
44  self.setMouseTracking(True)
45  self.setDragable(False)
46  #self._hoverBrush = QBrush(self.HOVER_COLOR1)
47  self._hoverGradient = QRadialGradient()
48  self._hoverGradient.setColorAt(0, self.HOVER_COLOR1)
49  self._hoverGradient.setColorAt(1, self.HOVER_COLOR2)
50  #self._hoverBrush = QBrush(self.HOVER_COLOR1)
51 
52  self._spacer.setFontSizeRange(self.TEXTFIELD_FONTSIZE_MIN, self.TEXTFIELD_FONTSIZE_MAX)
53  #self._textField.setDefaultWidth(self.getDistance('textFieldWidth', 1, True))
54  #entry.setDefaultHeight(self.getDistance('textFieldHeight', 1, True))
55  self._spacer.setDefaultFontSize(self.TEXTFIELD_FONTSIZE)
56  self._spacer.setAutosizeFont(self.TEXTFIELD_AUTOSIZE_FONT_FLAG)
57  self._spacer.setAutotruncate(self.TEXTFIELD_AUTOTRUNCATE_TEXT_FLAG)
58  self._spacer.setAutoscale(True, False)
59  self._spacer.setPenColor(self.TITLE_COLOR)
60  self._spacer.setFont(self.font())
61  self._spacer.setText(" | ")
62  self._spacer.calculateDimensions()
63 
def __init__(self, parent=None, associatedWidget=None, orientation=Qt.Horizontal)
Definition: MenuWidget.py:29
def setDragable(self, dragable, recursive=False)
Definition: VispaWidget.py:517

Member Function Documentation

def Vispa.Gui.MenuWidget.MenuWidget.addEntry (   self,
  name,
  slot = None 
)

Definition at line 64 of file MenuWidget.py.

References FWFramedTextTableCellRenderer.font(), FWTextTableCellRenderer.font(), Vispa.Gui.VispaWidget.TextField.font(), and Vispa.Gui.VispaWidget.VispaWidget.scheduleRearangeContent().

64  def addEntry(self, name, slot=None):
65  entry = TextField()
66  entry.setFontSizeRange(self.TEXTFIELD_FONTSIZE_MIN, self.TEXTFIELD_FONTSIZE_MAX)
67  #self._textField.setDefaultWidth(self.getDistance('textFieldWidth', 1, True))
68  #entry.setDefaultHeight(self.getDistance('textFieldHeight', 1, True))
69  entry.setDefaultFontSize(self.TEXTFIELD_FONTSIZE)
70  entry.setAutosizeFont(self.TEXTFIELD_AUTOSIZE_FONT_FLAG)
71  entry.setAutotruncate(self.TEXTFIELD_AUTOTRUNCATE_TEXT_FLAG)
72  entry.setAutoscale(True, False)
73  entry.setPenColor(self.TITLE_COLOR)
74  entry.setFont(self.font())
75  entry.setText(name)
76  entry.calculateDimensions()
77  self._menuEntryTextFields.append(entry)
78  self._menuEntrySlots.append(slot)
79 
81  return entry
82 
def addEntry(self, name, slot=None)
Definition: MenuWidget.py:64
def Vispa.Gui.MenuWidget.MenuWidget.cursorHasEntered (   self)
def Vispa.Gui.MenuWidget.MenuWidget.drawMenuEntries (   self,
  painter 
)
Tells TextField object of text field to draw title on widget.

Definition at line 144 of file MenuWidget.py.

References Vispa.Gui.MenuWidget.MenuWidget._hoverEntry, Vispa.Gui.MenuWidget.MenuWidget._hoverGradient, Vispa.Gui.MenuWidget.MenuWidget._menuEntryTextFields, ValidateGeometry.getDistance(), Vispa.Gui.VispaWidget.VispaWidget.getDistance(), min(), and Vispa.Gui.Zoomable.Zoomable.zoomFactor().

Referenced by Vispa.Gui.MenuWidget.MenuWidget.paint().

144  def drawMenuEntries(self, painter):
145  """ Tells TextField object of text field to draw title on widget.
146  """
147  x = self.getDistance('textFieldX')
148  y = self.getDistance('textFieldY')
149  spacerWidth = self._spacer.getWidth() * self.zoomFactor()
150  originalPen = QPen()
151  painter.setPen(originalPen)
152  firstFlag = True
153  for entry in self._menuEntryTextFields:
154  if not firstFlag:
155  self._spacer.paint(painter, x, y, self.zoomFactor())
156  x += spacerWidth
157  if self._hoverEntry == entry:
158  hoverRectXOffset = 0.3 * spacerWidth
159  hoverRectYOffset = 0.3 * self.getDistance('topMargin')
160  hoverWidth = entry.getWidth() * self.zoomFactor() + 2 * hoverRectXOffset
161  hoverHeight = entry.getHeight() * self.zoomFactor() + 2 * hoverRectYOffset
162  #self._hoverGradient.setColorAt(0, self.HOVER_COLOR1)
163  #self._hoverGradient.setColorAt(1, self.HOVER_COLOR2)
164  self._hoverGradient.setCenter(QPointF(entry.getDrawRect(self.zoomFactor()).center()))
165  self._hoverGradient.setFocalPoint(QPointF(entry.getDrawRect(self.zoomFactor()).center()))
166  self._hoverGradient.setRadius(min(hoverWidth, hoverHeight))
167  #painter.setBrush(self._hoverBrush)
168  painter.setBrush(self._hoverGradient)
169  painter.setPen(Qt.NoPen)
170  #painter.drawRoundedRect(entry.getDrawRect(self.zoomFactor()), 10, 10)
171  painter.drawRoundedRect(x - hoverRectXOffset, y - hoverRectYOffset, hoverWidth, hoverHeight, 5, 5)
172  painter.setPen(originalPen)
173  entry.paint(painter, x, y, self.zoomFactor())
174  x += entry.getWidth() * self.zoomFactor()
175  firstFlag = False
176 
def getDistance(self, name, scale=None, keepDefaultRatio=False)
def drawMenuEntries(self, painter)
Definition: MenuWidget.py:144
T min(T a, T b)
Definition: MathUtil.h:58
def Vispa.Gui.MenuWidget.MenuWidget.enterEvent (   self,
  event 
)

Definition at line 210 of file MenuWidget.py.

References Vispa.Gui.MenuWidget.MenuWidget._cursorEntered.

210  def enterEvent(self, event):
211  self._cursorEntered = True
212 
def Vispa.Gui.MenuWidget.MenuWidget.entry (   self,
  index 
)

Definition at line 98 of file MenuWidget.py.

References Vispa.Gui.MenuWidget.MenuWidget._menuEntryTextFields, and Vispa.Gui.MenuWidget.MenuWidget.len().

98  def entry(self, index):
99  if len(self._menuEntryTextFields) >= index + 1:
100  return self._menuEntryTextFields[index]
101  return None
102 
def Vispa.Gui.MenuWidget.MenuWidget.hide (   self)
def Vispa.Gui.MenuWidget.MenuWidget.leaveEvent (   self,
  event 
)

Definition at line 195 of file MenuWidget.py.

References Vispa.Gui.MenuWidget.MenuWidget._associatedWidget, Vispa.Gui.MenuWidget.MenuWidget._hoverEntry, Vispa.Gui.MenuWidget.MenuWidget.hide(), edmIntegrityCheck.PublishToFileSystem.parent, edm::ThinnedAssociationBranches.parent(), confdb.HLTProcess.parent, reco::PattRecoNode< Cluster >.parent(), FSimVertex.parent(), DDI::Division.parent(), math::GraphWalker< N, E >.parent(), math::GraphWalker< ReferenceCountingPointer, ReferenceCountingPointer >.parent(), math::GraphWalker< DDLogicalPart, DDPosData * >.parent(), GraphWalker< N, E >.parent(), edm::ModuleCallingContext.parent(), DDLSAX2FileHandler.parent(), OpticalObject.parent(), emtf::Node.parent, edm::DocFormatHelper.parent(), FWPSetTableManager::PSetData.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, Vispa.Views.LineDecayView.DecayObject.parent(), DDDWorldObserver< Event >.update(), ECALPFSeedCleaner.update(), KillSecondariesRunAction.update(), KillSecondariesTrackAction.update(), SaveSimTrack.update(), PTStatistics.update(), PrintTrackNumberAction.update(), Basic2DGenericPFlowClusterizer.update(), PFMultiDepthClusterizer.update(), reco::KalmanGhostTrackUpdater.update(), GenericMVAComputerCache.update(), DDG4ProductionCuts.update(), RecHitTopologicalCleanerBase.update(), PFlow2DClusterizerWithTime.update(), FastFedCablingTask.update(), LagrangeChildUpdator.update(), VertexTrackUpdator< N >.update(), DummyVertexTrackUpdator< N >.update(), TrajectoryStateUpdator.update(), ErrorCorrelation.update(), ApvTimingTask.update(), MSLayersAtAngle.update(), FedTimingTask.update(), VpspScanTask.update(), OptoScanHistosUsingDb.update(), PedestalsHistosUsingDb.update(), PedsFullNoiseHistosUsingDb.update(), PedsOnlyHistosUsingDb.update(), VpspScanHistosUsingDb.update(), AlignableDet.update(), OptoScanTask.update(), PedestalsTask.update(), PrintSensitive.update(), GsfMultiStateUpdator.update(), ApvTimingHistosUsingDb.update(), DaqScopeModeHistosUsingDb.update(), NoiseHistosUsingDb.update(), CalibrationScanTask.update(), FineDelayTask.update(), LatencyTask.update(), MonopoleSteppingAction.update(), CalibrationTask.update(), edm::SubProcessParentageHelper.update(), FastFedCablingHistosUsingDb.update(), SCRegressionCalculator< VarCalc >.update(), PFClusterEnergyCorrectorBase.update(), PFCPositionCalculatorBase.update(), AlignableDetUnit.update(), FedCablingTask.update(), RHStopTracer.update(), KFStrip1DUpdator.update(), TkPhase2OTMeasurementDet.update(), cond::persistency::ITagTable.update(), CheckOverlap.update(), LatencyHistosUsingDb.update(), TkPixelMeasurementDet.update(), NoiseTask.update(), PedsOnlyTask.update(), CountProcessesAction.update(), PrintGeomInfoAction.update(), PrintGeomSummary.update(), CalibrationHistosUsingDb.update(), ChildUpdator.update(), FineDelayHistosUsingDb.update(), PedsFullNoiseTask.update(), PrintMaterialBudgetInfo.update(), progressbar.Widget.update(), BaselinePFSCRegression.update(), KinematicConstrainedVertexUpdator.update(), AlignableCSCChamber.update(), KFSwitching1DUpdator.update(), PhysicsTools::MVAComputerCache.update(), HGCScintSD.update(), StoreSecondary.update(), cond::persistency::GLOBAL_TAG::Table.update(), MaterialBudgetHcal.update(), DaqScopeModeTask.update(), edm::RunningAverage.update(), HFNoseSD.update(), HGCalSD.update(), FastTimerSD.update(), HGCalTBMB.update(), Observer< const G4Step * >.update(), Observer< const DDDWorld * >.update(), Observer< const T * >.update(), AlignableTracker.update(), BinomialProbability.update(), Observer< T >.update(), Observer< const EndOfRun * >.update(), Observer< const BeginOfTrack * >.update(), Observer< const EndOfJob * >.update(), Observer< const EndOfTrack * >.update(), Observer< const BeginOfJob * >.update(), Observer< const EndOfEvent * >.update(), Observer< const BeginOfRun * >.update(), Observer< const Event * >.update(), Observer< const BeginOfEvent * >.update(), PFClusterBuilderBase.update(), GflashG4Watcher.update(), MuonServiceProxy.update(), pathelpers::Record.update(), HGCSD.update(), cond::persistency::TAG::Table.update(), edm::storage::StatisticsSenderService::FileStatistics.update(), RealisticSimClusterMapper.update(), funct::Master< F >.update(), KFUpdator.update(), MaterialBudgetForward.update(), MaterialBudget.update(), AlignableComposite.update(), CaloTrkProcessing.update(), CheckSecondary.update(), ECAL2DPositionCalcWithDepthCorr.update(), KalmanVertexTrackUpdator< N >.update(), SimG4FluxProducer.update(), KalmanVertexTrackUpdator< 5 >.update(), EcalSimHitsValidProducer.update(), TrackingMaterialProducer.update(), HcalTestAnalysis.update(), FWJobMetadataManager.update(), TrackingVerboseAction.update(), PhysicsTools::TreeReader.update(), SiTrackerMultiRecHitUpdator.update(), L1TMuonBarrelKalmanAlgo.update(), BasicMultiTrajectoryState.update(), MaterialBudgetAction.update(), KalmanVertexUpdator< 5 >.update(), SingleParticleEvent.update(), reco::GhostTrackFitter::PredictionUpdater.update(), KalmanVertexUpdator< N >.update(), pos::PixelConfig.update(), MuonTrajectoryUpdator.update(), AlignableMuon.update(), edm::service::CondorStatusService.update(), SiStripConfObject.update(), SiStripPartition.update(), fwlite::RecordWriter.update(), TimingSD.update(), fastsim::Geometry.update(), FWParameterSetterBase.update(), HGCPassive.update(), FiberSD.update(), HCalSD.update(), TotemTestGem.update(), progressbar.Timer.update(), SimG4HcalValidation.update(), simwatcher::BeginOfTrackCounter.update(), HcaluLUTTPGCoder.update(), MuonSensitiveDetector.update(), KinematicConstrainedVertexUpdatorT< nTrk, nConstraint >.update(), TkAccumulatingSensitiveDetector.update(), Alignable.update(), MuonUpdatorAtVertex.update(), DQMOldReceiver.update(), HcalTB02Analysis.update(), LaserAlignmentSimulation.update(), TotemSD.update(), CaloSteppingAction.update(), sim_act::Signaler< BeginOfTrack >.update(), sim_act::Signaler< BeginOfEvent >.update(), sim_act::Signaler< BeginOfJob >.update(), sim_act::Signaler< EndOfRun >.update(), sim_act::Signaler< DDDWorld >.update(), sim_act::Signaler< G4Step >.update(), ApvAnalysisFactory.update(), sim_act::Signaler< EndOfTrack >.update(), sim_act::Signaler< EndOfEvent >.update(), sim_act::Signaler< T >.update(), sim_act::Signaler< BeginOfRun >.update(), SimTracer.update(), progressbar.WidgetHFill.update(), HcalForwardAnalysis.update(), DTSegmentUpdator.update(), FP420SD.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(), 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(), TrajectoryStateOnSurface.update(), progressbar.FormatLabel.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< T >.update(), jsoncollector::HistoJ< unsigned int >.update(), BasicTrajectoryState.update(), progressbar.ProgressBar.update(), PxMeasurementDetSet.update(), Phase2OTMeasurementDetSet.update(), edmStreamStallGrapher.Stack.update(), crabFunctions.CrabTask.update(), DetSetVector< T >.update(), edmNew::DetSetVector< T >.update(), DetSetVector< ClusterType >.update(), DetSetVector< SiPixelCluster >.update(), DetSetVector< SiStripCluster >.update(), and const_iterator.update().

195  def leaveEvent(self, event):
196  #logging.debug("%s: leaveEvent()" % self.__class__.__name__)
197  if not self._associatedWidget or self.parent().childAt(self.parent().mapFromGlobal(self.cursor().pos())) != self._associatedWidget:
198  self.hide()
199  self._hoverEntry = None
200  self.update()
201 
def Vispa.Gui.MenuWidget.MenuWidget.len (   self)
def Vispa.Gui.MenuWidget.MenuWidget.mouseMoveEvent (   self,
  event 
)

Definition at line 177 of file MenuWidget.py.

References Vispa.Gui.MenuWidget.MenuWidget._hoverEntry, Vispa.Gui.MenuWidget.MenuWidget._menuEntryTextFields, electrons_cff.bool, edm.contains(), 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(), FastFedCablingTask.update(), RecHitTopologicalCleanerBase.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(), FedCablingTask.update(), AlignableDetUnit.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(), 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(), AlignableTracker.update(), Observer< const Event * >.update(), Observer< const EndOfJob * >.update(), Observer< T >.update(), BinomialProbability.update(), Observer< const EndOfTrack * >.update(), Observer< const BeginOfJob * >.update(), Observer< const BeginOfTrack * >.update(), Observer< const EndOfEvent * >.update(), Observer< const G4Step * >.update(), Observer< const EndOfRun * >.update(), Observer< const T * >.update(), Observer< const BeginOfEvent * >.update(), Observer< const BeginOfRun * >.update(), Observer< const DDDWorld * >.update(), GflashG4Watcher.update(), pathelpers::Record.update(), MuonServiceProxy.update(), PFClusterBuilderBase.update(), HGCSD.update(), edm::storage::StatisticsSenderService::FileStatistics.update(), cond::persistency::TAG::Table.update(), RealisticSimClusterMapper.update(), funct::Master< F >.update(), KFUpdator.update(), MaterialBudget.update(), MaterialBudgetForward.update(), CaloTrkProcessing.update(), AlignableComposite.update(), CheckSecondary.update(), SimG4FluxProducer.update(), KalmanVertexTrackUpdator< 5 >.update(), ECAL2DPositionCalcWithDepthCorr.update(), EcalSimHitsValidProducer.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(), fwlite::RecordWriter.update(), MuonTrajectoryUpdator.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< T >.update(), ApvAnalysisFactory.update(), sim_act::Signaler< EndOfTrack >.update(), sim_act::Signaler< EndOfEvent >.update(), sim_act::Signaler< BeginOfRun >.update(), sim_act::Signaler< BeginOfTrack >.update(), sim_act::Signaler< BeginOfEvent >.update(), sim_act::Signaler< DDDWorld >.update(), sim_act::Signaler< BeginOfJob >.update(), sim_act::Signaler< G4Step >.update(), sim_act::Signaler< EndOfRun >.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(), 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< T >.update(), jsoncollector::HistoJ< unsigned int >.update(), BasicTrajectoryState.update(), progressbar.ProgressBar.update(), PxMeasurementDetSet.update(), Phase2OTMeasurementDetSet.update(), edmStreamStallGrapher.Stack.update(), crabFunctions.CrabTask.update(), const_iterator.update(), edmNew::DetSetVector< T >.update(), DetSetVector< T >.update(), DetSetVector< SiPixelCluster >.update(), DetSetVector< ClusterType >.update(), DetSetVector< SiStripCluster >.update(), and Vispa.Gui.Zoomable.Zoomable.zoomFactor().

177  def mouseMoveEvent(self, event):
178  if bool(event.buttons() & Qt.LeftButton):
179  VispaWidget.mouseMoveEvent(self, event)
180  return
181  for entry in self._menuEntryTextFields:
182  if entry.getDrawRect(self.zoomFactor()).contains(event.pos()):
183  self._hoverEntry = entry
184  self.update()
185  break
186 
bool contains(EventRange const &lh, EventID const &rh)
Definition: EventRange.cc:38
def mouseMoveEvent(self, event)
Definition: MenuWidget.py:177
def Vispa.Gui.MenuWidget.MenuWidget.mousePressEvent (   self,
  event 
)

Definition at line 187 of file MenuWidget.py.

References Vispa.Gui.MenuWidget.MenuWidget._menuEntrySlots, Vispa.Gui.MenuWidget.MenuWidget._menuEntryTextFields, edm.contains(), Vispa.Gui.MenuWidget.MenuWidget.hide(), and Vispa.Gui.Zoomable.Zoomable.zoomFactor().

187  def mousePressEvent(self, event):
188  VispaWidget.mousePressEvent(self, event)
189  for i, entry in enumerate(self._menuEntryTextFields):
190  if self._menuEntrySlots[i] and entry.getDrawRect(self.zoomFactor()).contains(event.pos()):
191  self.hide()
192  self._menuEntrySlots[i]()
193  break
194 
bool contains(EventRange const &lh, EventID const &rh)
Definition: EventRange.cc:38
def mousePressEvent(self, event)
Definition: MenuWidget.py:187
def Vispa.Gui.MenuWidget.MenuWidget.paint (   self,
  painter,
  event = None 
)
Takes care of painting widget content on given painter.

Definition at line 138 of file MenuWidget.py.

References Vispa.Gui.MenuWidget.MenuWidget.drawMenuEntries().

Referenced by Vispa.Gui.VispaWidget.VispaWidget.paintEvent().

138  def paint(self, painter, event=None):
139  """ Takes care of painting widget content on given painter.
140  """
141  VispaWidget.paint(self, painter, event)
142  self.drawMenuEntries(painter)
143 
def drawMenuEntries(self, painter)
Definition: MenuWidget.py:144
def paint(self, painter, event=None)
Definition: MenuWidget.py:138
def Vispa.Gui.MenuWidget.MenuWidget.removeEntry (   self,
  entry 
)

Definition at line 83 of file MenuWidget.py.

References Vispa.Gui.MenuWidget.MenuWidget._menuEntryTextFields.

83  def removeEntry(self, entry):
84  if entry in self._menuEntryTextFields:
85  index = self._menuEntryTextFields.index(entry)
86  self._menuEntryTextFields.remove(entry)
87  self._menuEntrySlots.pop(index)
88 
def removeEntry(self, entry)
Definition: MenuWidget.py:83
def Vispa.Gui.MenuWidget.MenuWidget.setEntryText (   self,
  entry,
  text 
)

Definition at line 89 of file MenuWidget.py.

References Vispa.Gui.MenuWidget.MenuWidget._menuEntryTextFields, and Vispa.Gui.VispaWidget.VispaWidget.scheduleRearangeContent().

89  def setEntryText(self, entry, text):
90  if entry in self._menuEntryTextFields:
91  entry.setText(text)
92  entry.calculateDimensions()
94 
def setEntryText(self, entry, text)
Definition: MenuWidget.py:89
def Vispa.Gui.MenuWidget.MenuWidget.showEvent (   self,
  event 
)

Definition at line 206 of file MenuWidget.py.

References Vispa.Gui.MenuWidget.MenuWidget._cursorEntered.

206  def showEvent(self, event):
207  VispaWidget.showEvent(self, event)
208  self._cursorEntered = False
209 
def Vispa.Gui.MenuWidget.MenuWidget.sizeHint (   self)
Calculates needed space for widget content.

Definition at line 103 of file MenuWidget.py.

Referenced by Vispa.Gui.VispaWidget.VispaWidget.autosize().

103  def sizeHint(self):
104  """ Calculates needed space for widget content.
105  """
106  self._scaleWidth = 1 # for getDistance()
107  self._scaleHeight = 1
108 
109  neededWidth = self.getDistance('leftMargin', 1) + self.getDistance('rightMargin', 1)
110  neededHeight = self.getDistance('topMargin', 1) + self.getDistance('bottomMargin', 1)
111 
112  textFieldWidth = 0
113  textFieldHeight = 0
114  for entry in self._menuEntryTextFields:
115  textFieldWidth += entry.getWidth()
116  textFieldHeight = max(textFieldHeight, entry.getHeight())
117  textFieldWidth += max(0, (len(self._menuEntryTextFields) -1) * self._spacer.getWidth())
118 
119  neededWidth += textFieldWidth
120  neededHeight += textFieldHeight
121 
122  # evaluate maximum size
123  maxWidth = self.maximumSize().width()
124  maxHeight = self.maximumSize().height()
125 
126  maxScaleWidth = min(1.0, 1.0 * maxWidth/neededWidth)
127  maxScaleHeight = min(1.0, 1.0 * maxHeight/neededHeight)
128  if maxScaleWidth != 1.0 or maxScaleHeight != 1.0:
129  # this is not limited by keepAspectRationFlag
130  # as it is about absolute sizes here
131  # ratio is evaluated in autosize()
132  scale = min(maxScaleWidth, maxScaleHeight)
133  neededWidth *= scale
134  neededHeight *= scale
135 
136  return QSize(max(self.minimumSize().width(), neededWidth), max(self.minimumSize().height(), neededHeight))
137 
def getDistance(self, name, scale=None, keepDefaultRatio=False)
T min(T a, T b)
Definition: MathUtil.h:58

Member Data Documentation

Vispa.Gui.MenuWidget.MenuWidget._associatedWidget
private

Definition at line 43 of file MenuWidget.py.

Referenced by Vispa.Gui.MenuWidget.MenuWidget.leaveEvent().

Vispa.Gui.MenuWidget.MenuWidget._cursorEntered
private
Vispa.Gui.MenuWidget.MenuWidget._hoverGradient
private

Definition at line 47 of file MenuWidget.py.

Referenced by Vispa.Gui.MenuWidget.MenuWidget.drawMenuEntries().

Vispa.Gui.MenuWidget.MenuWidget._menuEntrySlots
private

Definition at line 36 of file MenuWidget.py.

Referenced by Vispa.Gui.MenuWidget.MenuWidget.mousePressEvent().

Vispa.Gui.MenuWidget.MenuWidget._scaleHeight
private
Vispa.Gui.MenuWidget.MenuWidget._scaleWidth
private
Vispa.Gui.MenuWidget.MenuWidget._spacer
private

Definition at line 39 of file MenuWidget.py.