CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
Vispa.Gui.WidgetContainer.WidgetContainer Class Reference
Inheritance diagram for Vispa.Gui.WidgetContainer.WidgetContainer:
Vispa.Gui.ConnectableWidget.ConnectableWidget Vispa.Gui.ConnectableWidgetOwner.ConnectableWidgetOwner Vispa.Gui.VispaWidget.VispaWidget Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner Vispa.Gui.ZoomableWidget.ZoomableWidget Vispa.Gui.Zoomable.Zoomable Vispa.Views.BoxDecayView.BoxDecayContainer Vispa.Views.LineDecayView.LineDecayContainer

Public Member Functions

def __init__ (self, parent=None)
 
def adjustContainerPositionWhenAutosizingEnabled (self)
 
def autolayoutChildren (self)
 
def autolayoutChildrenEnabled (self)
 
def autosize (self)
 
def collapsed (self)
 
def contentStartX (self)
 
def contentStartY (self)
 
def defineBackgroundBrush (self)
 
def enableAdjustContainerPositionWhenAutosizing (self, adjust)
 
def enableAutolayoutChildren (self, autolayout)
 
def mouseDoubleClickEvent (self, event)
 
def mouseMoveEvent (self, event)
 
def mousePressEvent (self, event)
 
def setNotCollapsable (self)
 
def setShowCollapseMenu (self, show=True)
 
def showMenu (self)
 
def sizeHint (self)
 
def toggleCollapse (self)
 
def widgetDragged (self, widget)
 
- Public Member Functions inherited from Vispa.Gui.ConnectableWidget.ConnectableWidget
def __init__ (self, parent=None, name=None)
 
def addMenuEntry (self, name, slot=None)
 
def addSinkPort (self, name, description=None)
 
def addSourcePort (self, name, description=None)
 
def arrangePorts (self, filter=None)
 
def attachedConnections (self)
 
def centerSinglePortVertically (self, ports, portX)
 
def defineDistances (self, keepDefaultRatio=False)
 
def deleteLater (self)
 
def dragWidget (self, pPos)
 
def drawBody (self, painter)
 
def drawPortLines (self, painter)
 
def drawPortNames (self, painter)
 
def dropArea (self, port)
 
def dropAreaPort (self, position)
 
def getEffectivePortHeight (self, port)
 
def getPortsHeight (self, portType)
 
def leaveEvent (self, event)
 
def menu (self)
 
def mouseMoveEvent (self, event)
 
def mousePressEvent (self, event)
 
def mouseReleaseEvent (self, event)
 
def move (self, target)
 
def port (self, name, type)
 
def portExists (self, name, description=None)
 
def ports (self)
 
def positionizeMenuWidget (self)
 
def rearangeContent (self)
 
def removeMenu (self)
 
def removeMenuEntry (self, entry)
 
def removePort (self, port)
 
def removePorts (self, filter=None)
 
def select (self, sel=True, multiSelect=False)
 
def setPortNamesPosition (self, position)
 
def setShowPortLines (self, show)
 
def setShowPortNames (self, show)
 
def setZoom (self, zoom)
 
def showMenu (self)
 
def sinkPort (self, name)
 
def sinkPorts (self)
 
def sizeHint (self)
 
def sourcePort (self, name)
 
def sourcePorts (self)
 
def updateAttachedConnections (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)
 
- Public Member Functions inherited from Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner
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)
 
- Public Member Functions inherited from Vispa.Gui.ConnectableWidgetOwner.ConnectableWidgetOwner
def deleteSelectedConnections (self)
 
def getWidgetByName (self, name)
 
def hideMenuWidgets (self)
 
def portConnection (self, port1, port2=None)
 
def propagateEventUnderConnectionWidget (self, connection, event)
 
def updateConnections (self)
 

Private Attributes

 _autolayoutChildrenEnabled
 
 _autosizeAdjustContainerPositionFlag
 
 _backgroundBrush
 
 _childrenVisible
 
 _collapsable
 
 _collapseMenuButton
 
 _hiddenChildren
 

Additional Inherited Members

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

Detailed Description

Definition at line 11 of file WidgetContainer.py.

Constructor & Destructor Documentation

def Vispa.Gui.WidgetContainer.WidgetContainer.__init__ (   self,
  parent = None 
)

Definition at line 30 of file WidgetContainer.py.

30  def __init__(self, parent=None):
31  #logging.debug(__name__ + ": __init__()")
32  self._childrenVisible = True
35  self._collapseMenuButton = None
36  self._collapsable=True
37  self._hiddenChildren = []
38 
39  ConnectableWidget.__init__(self, parent)
40 
41  self.enableAutolayoutChildren(self.AUTOLAYOUT_CHILDREN_ENABLED)
42  self.enableAdjustContainerPositionWhenAutosizing(self.AUTOSIZE_ADJUST_CONTAINER_POSITION)
43 
44  self.setShowCollapseMenu(True)
45 
def enableAutolayoutChildren(self, autolayout)
def enableAdjustContainerPositionWhenAutosizing(self, adjust)

Member Function Documentation

def Vispa.Gui.WidgetContainer.WidgetContainer.adjustContainerPositionWhenAutosizingEnabled (   self)
def Vispa.Gui.WidgetContainer.WidgetContainer.autolayoutChildren (   self)
This function arranges children one after each other in a column.

See setAuotlayoutChildrenEnabled().

Definition at line 138 of file WidgetContainer.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.WidgetContainer.WidgetContainer.contentStartX(), Vispa.Gui.WidgetContainer.WidgetContainer.contentStartY(), ValidateGeometry.getDistance(), and Vispa.Gui.VispaWidget.VispaWidget.getDistance().

Referenced by Vispa.Views.LineDecayView.LineDecayContainer.autolayoutPostprocess(), and Vispa.Gui.WidgetContainer.WidgetContainer.autosize().

139  """ This function arranges children one after each other in a column.
140 
141  See setAuotlayoutChildrenEnabled().
142  """
143  #logging.debug(self.__class__.__name__ +": autolayoutChildren()")
144 
145  # round to prevent drifting when zoom != 100%
146  xPos = round(self.contentStartX())
147  yPos = round(self.contentStartY())
148 
149  for child in self.children():
150  if isinstance(child, VispaWidget) and child.isVisible():
151  child.move(xPos, yPos)
152  yPos += child.height() + self.getDistance("topMargin")
153 
def getDistance(self, name, scale=None, keepDefaultRatio=False)
def Vispa.Gui.WidgetContainer.WidgetContainer.autolayoutChildrenEnabled (   self)
def Vispa.Gui.WidgetContainer.WidgetContainer.autosize (   self)
Overwrite VispaWidget's function.

This adds size and position handling for left and top sides of container.
VispaWidget only takes care of right and bottom sides as widget position remains constant.
This function also adjusts the container's position as needed to include all children.

Definition at line 100 of file WidgetContainer.py.

References Vispa.Gui.WidgetContainer.WidgetContainer._autolayoutChildrenEnabled, Vispa.Gui.WidgetContainer.WidgetContainer._autosizeAdjustContainerPositionFlag, Vispa.Gui.WidgetContainer.WidgetContainer._childrenVisible, Vispa.Gui.WidgetContainer.WidgetContainer.autolayoutChildren(), 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(), Vispa.Gui.WidgetContainer.WidgetContainer.contentStartX(), Vispa.Gui.WidgetContainer.WidgetContainer.contentStartY(), Signal< void(BranchDescription const &)>.emit(), edm::signalslot::Signal< void(StreamContext const &)>.emit(), edm::signalslot::Signal< void(edm::BranchDescription const &)>.emit(), edm::signalslot::Signal< T >.emit(), edm::signalslot::Signal< void(ModuleDescription const &)>.emit(), edm::signalslot::Signal< void(StreamContext const &, TerminationOrigin)>.emit(), edm::signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)>.emit(), edm::signalslot::Signal< void(PathsAndConsumesOfModulesBase const &, ProcessContext const &)>.emit(), edm::signalslot::Signal< void(const edmplugin::PluginFactoryBase *)>.emit(), edm::signalslot::Signal< void(const boost::filesystem::path &)>.emit(), edm::signalslot::Signal< void(GlobalContext const &, TerminationOrigin)>.emit(), edm::signalslot::Signal< void(StreamContext const &, PathContext const &)>.emit(), edm::signalslot::Signal< void(GlobalContext const &)>.emit(), edm::signalslot::Signal< void(const edmplugin::SharedLibrary &)>.emit(), edm::signalslot::Signal< void(LuminosityBlockIndex)>.emit(), edm::signalslot::Signal< void(eventsetup::ComponentDescription const *, eventsetup::EventSetupRecordKey const &, eventsetup::DataKey const &)>.emit(), edm::signalslot::Signal< void(RunIndex)>.emit(), edm::signalslot::Signal< void(std::string const &, bool)>.emit(), edm::signalslot::Signal< void()>.emit(), edm::signalslot::Signal< void(edm::StreamContext const &, edm::ModuleCallingContext const &)>.emit(), edm::signalslot::Signal< void(StreamContext const &, PathContext const &, HLTPathStatus const &)>.emit(), edm::signalslot::Signal< void(TerminationOrigin)>.emit(), edm::signalslot::Signal< void(const std::string &, const edmplugin::PluginInfo &)>.emit(), edm::signalslot::Signal< void(service::SystemBounds const &)>.emit(), edm::signalslot::Signal< void(const std::string &, const std::string &)>.emit(), edm::signalslot::Signal< void(StreamID)>.emit(), edm::signalslot::Signal< void(GlobalContext const &, ModuleCallingContext const &)>.emit(), AlignableDetUnit.move(), AlignableBeamSpot.move(), fastsim::HelixTrajectory.move(), fastsim::StraightTrajectory.move(), AlignableComposite.move(), CaloGeometryHelper.move(), fastsim::Trajectory.move(), Alignable.move(), GloballyPositioned< T >.move(), Vispa.Gui.ConnectableWidget.ConnectableWidget.move(), Vispa.Gui.ConnectableWidgetOwner.ConnectableWidgetOwner.updateConnections(), Quad.x, reco::MuonRPCHitMatch.x, RPFlatParams::EP.x, gen::PdfInfo.x, stAPVGain.x, EnergyDepositUnit.x(), MadKinematicDescriptor.x, AmplitudeSegmentFP420.x(), TwoBodyDecayParameters.x, TkLayerMap::XYbin.x, SimplePixel.x, SignalPoint.x(), ScoutingVertex.x(), reco::MuonChamberMatch.x, EnergySegmentFP420.x(), lumiregperbunch.bsmeas.x, Geom::Polar2Cartesian< T >.x(), reco::MuonMETCorrectionData.x(), SiStripFineDelayTOF.x(), HFShowerPhoton.x(), PixelClusterizerBase::AccretionCluster.x, ME0DigiPreReco.x(), CTPPSTimingLocalTrack.x, online::BeamSpot_v1.x, BinomialProbHelper.x(), HGCal_helpers::Coordinates.x, LHCInterpolatedOpticalFunctionsSet::Kinematics.x, EcalTBHodoscopeRecInfoAlgo::BeamTrack.x, Phase2ITPixelCluster::Pixel.x, FTLCluster::FTLHit.x(), reco::MuonSegmentMatch.x, BeamSpotFakeConditions.x, SiPixelCluster::Pixel.x, PhiInterval.x, ClusterShape.x, BSvsPVHistogramMaker.x(), RHStopTracer::StopPoint.x, TotemTestHistoClass::Hit.x, PGlobalSimHit::Vtx.x, VertexType.x, MTDHit.x, MTDClusterizerBase::AccretionCluster.x, egPM::AbsEtaNrClus.x, PV2DBase< float, PointTag, LocalTag >.x(), PV2DBase< T, VectorTag, FrameTag >.x(), PV2DBase< float, VectorTag, GlobalTag >.x(), PV2DBase< T, PointTag, FrameTag >.x(), PV2DBase< double, PointTag, LocalTag >.x(), Point2DBase< Scalar, LocalTag >.x(), Point2DBase< U, FrameTag >.x(), Vector2DBase< U, FrameTag >.x(), Point2DBase< T, Frame >.x(), Vector2DBase< U, Frame >.x(), Vector2DBase< T, Frame >.x(), Point2DBase< U, Frame >.x(), Point2DBase< T, FrameTag >.x(), Vector2DBase< T, FrameTag >.x(), PV2DBase< T, PVType, FrameType >.x(), mathSSE::Rot3< Scalar >.x(), mathSSE::Rot3< double >.x(), mathSSE::Rot3< float >.x(), mathSSE::Rot3< align::Scalar >.x(), mathSSE::Rot3< T >.x(), HcalForwardAnalysis::Photon.x, Geom::Cylindrical2Cartesian< T >.x(), ParabolaFit::Point.x, BeamSpotOnline.x(), MuScleFitMuon.x(), RooCMSShape.x, HGCalRecHitValidation::HitsInfo.x, Pixinfo.x, egPM::AbsEtaNrClusPhi.x, funct::GaussLegendreIntegrator.x, QcdLowPtDQM::Pixel.x(), reco::CastorCell.x(), Hit.x, DigitizerUtility::EnergyDepositUnit.x(), PV3DBase< float, VectorTag, LocalTag >.x(), PV3DBase< Scalar, VectorTag, GlobalTag >.x(), PV3DBase< T, VectorTag, FrameTag >.x(), PV3DBase< T, PointTag, FrameTag >.x(), Point3DBase< Scalar, LocalTag >.x(), Point3DBase< U, LocalTag >.x(), Vector3DBase< U, LocalTag >.x(), Point3DBase< U, GlobalTag >.x(), Vector3DBase< U, GlobalTag >.x(), MonitorTrackResidualsBase< pixel_or_strip >::HistoXY.x, Point3DBase< U, FrameTag >.x(), Vector3DBase< U, FrameTag >.x(), Point3DBase< T, Frame >.x(), Vector3DBase< U, Frame >.x(), Vector3DBase< T, Frame >.x(), Point3DBase< U, Frame >.x(), Vector3DBase< T, FrameTag >.x(), PV3DBase< T, PVType, FrameType >.x(), Basic2DVector< Scalar >.x(), Basic2DVector< double >.x(), Basic2DVector< float >.x(), HGCalDigiValidation::digiInfo.x, Basic2DVector< U >.x(), Basic2DVector< T >.x(), HGCalSimHitValidation::hitsinfo.x, PixelModule.x, Clust.x, l1t::emtf::AMC13Header.x, reco::BeamSpot.x(), python.rootplot.utilities.Hist2D.x, Geom::Spherical2Cartesian< T >.x(), egPM::AbsEtaNrClusEt.x, VertexClassifier::GeneratedPrimaryVertex.x, PixelUnpackingRegions::Module.x, reco::CastorEgamma.x(), reco::CastorJet.x(), Rechit.x, HcalForwardAnalysis.x, Basic3DVector< long double >.x(), PrimaryVertexAnalyzer4PUSlimmed::simPrimaryVertex.x, hit.x, DigitizerUtility::SignalPoint.x(), Geom::Cartesian2Cartesian3D< T >.x(), QcdLowPtDQM::Vertex.x(), Basic3DVector< Scalar >.x(), Basic3DVector< float >.x(), Basic3DVector< align::Scalar >.x(), Basic3DVector< U >.x(), Basic3DVector< float > constituentCentre Basic3DVector< float >.x(), Basic3DVector< double >.x(), Basic3DVector< T >.x(), reco::CastorCluster.x(), Phase2ITPixelCluster.x(), RecHitsSortedInPhi.x, SiPixelCluster.x(), GaussianSumUtilities1D::FinderState.x, XHistogram::position.x, FTLCluster.x(), SiStripRecHitsValid::RecHitProperties.x, TrackClassifier::GeneratedPrimaryVertex.x, reco::Vertex.x(), funct::GaussIntegrator.x, PrimaryVertexAnalyzer4PUSlimmed::recoPrimaryVertex.x, mathSSE::Rot2< Scalar >.x(), mathSSE::Rot2< T >.x(), CTPPSLocalTrackLite.x, MuonGeometryArrange::MGACollection.x, python.rootplot.utilities.Hist.x, SOAFrame< T >.x(), HGCalCLUEAlgo::Hexel.x, reco::CaloCluster.x(), EPOS::EPOS_Wrapper.x(), BeamSpotOnlineRaw_v4.x, HGCalImagingAlgo::Hexel.x, HitDoublets.x(), lhef::HEPEUP::FiveVector.x, RawParticle.x(), MuScleFitUtils.x, SiPixelDigitizerAlgorithm::EnergyDepositUnit.x(), Rot3< Scalar >.x(), Rot3< double >.x(), Rot3< float >.x(), Rot3< align::Scalar >.x(), Rot3< T >.x(), SiStripTrackingRecHitsValid::RecHitProperties.x, SiPixelDigitizerAlgorithm::SignalPoint.x(), perftools::detail::Hist.x, TkRotation< Scalar >.x(), TkRotation< double >.x(), TkRotation< float >.x(), TkRotation< align::Scalar >.x(), TkRotation< U >.x(), TkRotation< T >.x(), hitfit::Fourvec_Event.x(), Rot2< Scalar >.x(), Rot2< T >.x(), TkRotation2D< Scalar >.x(), TkRotation2D< T >.x(), PDF.x, edmStreamStallGrapher.Point.x, svgfig.Plot.x, svgfig.Frame.x, Vispa.Views.LineDecayView.DecayNode.x(), PMuonSimHit::Vtx.x, PTrackerSimHit::Vtx.x, svgfig.Text.x, svgfig.TextGlobal.x, svgfig.VLine.x, Quad.y, RPFlatParams::EP.y, stAPVGain.y, EnergyDepositUnit.y(), MadKinematicDescriptor.y, AmplitudeSegmentFP420.y(), TwoBodyDecayParameters.y, TkLayerMap::XYbin.y, SignalPoint.y(), ScoutingVertex.y(), SimplePixel.y, RPCCluster.y(), reco::MuonChamberMatch.y, EnergySegmentFP420.y(), lumiregperbunch.bsmeas.y, Geom::Polar2Cartesian< T >.y(), reco::MuonMETCorrectionData.y(), SiStripFineDelayTOF.y(), HFShowerPhoton.y(), ME0DigiPreReco.y(), CTPPSTimingLocalTrack.y, PixelClusterizerBase::AccretionCluster.y, online::BeamSpot_v1.y, HGCal_helpers::Coordinates.y, FTLCluster::FTLHit.y(), Phase2ITPixelCluster::Pixel.y, LHCInterpolatedOpticalFunctionsSet::Kinematics.y, reco::MuonSegmentMatch.y, BeamSpotFakeConditions.y, PhiInterval.y, SiPixelCluster::Pixel.y, ClusterShape.y, RHStopTracer::StopPoint.y, BSvsPVHistogramMaker.y(), TotemTestHistoClass::Hit.y, PGlobalSimHit::Vtx.y, VertexType.y, MTDHit.y, MTDClusterizerBase::AccretionCluster.y, egPM::AbsEtaNrClus.y, PV2DBase< float, PointTag, LocalTag >.y(), Point2DBase< T, Frame >.y(), Point2DBase< U, Frame >.y(), Point2DBase< Scalar, LocalTag >.y(), PV2DBase< float, VectorTag, GlobalTag >.y(), PV2DBase< T, PVType, FrameType >.y(), Point2DBase< U, FrameTag >.y(), PV2DBase< T, VectorTag, FrameTag >.y(), Vector2DBase< U, FrameTag >.y(), PV2DBase< T, PointTag, FrameTag >.y(), PV2DBase< double, PointTag, LocalTag >.y(), Vector2DBase< U, Frame >.y(), Point2DBase< T, FrameTag >.y(), Vector2DBase< T, FrameTag >.y(), Vector2DBase< T, Frame >.y(), mathSSE::Rot3< align::Scalar >.y(), mathSSE::Rot3< T >.y(), mathSSE::Rot3< double >.y(), mathSSE::Rot3< Scalar >.y(), mathSSE::Rot3< float >.y(), HcalForwardAnalysis::Photon.y, Geom::Cylindrical2Cartesian< T >.y(), ParabolaFit::Point.y, BeamSpotOnline.y(), MuScleFitMuon.y(), HGCalRecHitValidation::HitsInfo.y, Pixinfo.y, egPM::AbsEtaNrClusPhi.y, QcdLowPtDQM::Pixel.y(), Hit.y, reco::CastorCell.y(), Point3DBase< U, FrameTag >.y(), Point3DBase< U, Frame >.y(), PV3DBase< Scalar, VectorTag, GlobalTag >.y(), PV3DBase< T, PointTag, FrameTag >.y(), Point3DBase< Scalar, LocalTag >.y(), Vector3DBase< U, FrameTag >.y(), Vector3DBase< U, Frame >.y(), Point3DBase< U, LocalTag >.y(), PV3DBase< float, VectorTag, LocalTag >.y(), PV3DBase< T, PVType, FrameType >.y(), Vector3DBase< U, GlobalTag >.y(), Vector3DBase< T, Frame >.y(), DigitizerUtility::EnergyDepositUnit.y(), Vector3DBase< U, LocalTag >.y(), Point3DBase< T, Frame >.y(), PV3DBase< T, VectorTag, FrameTag >.y(), MonitorTrackResidualsBase< pixel_or_strip >::HistoXY.y, Vector3DBase< T, FrameTag >.y(), Point3DBase< U, GlobalTag >.y(), HGCalDigiValidation::digiInfo.y, Basic2DVector< U >.y(), Basic2DVector< Scalar >.y(), Basic2DVector< float >.y(), Basic2DVector< T >.y(), Basic2DVector< double >.y(), HGCalSimHitValidation::hitsinfo.y, PixelModule.y, Clust.y, reco::BeamSpot.y(), Geom::Spherical2Cartesian< T >.y(), python.rootplot.utilities.Hist2D.y, egPM::AbsEtaNrClusEt.y, VertexClassifier::GeneratedPrimaryVertex.y, PixelUnpackingRegions::Module.y, Rechit.y, reco::CastorEgamma.y(), reco::CastorJet.y(), HcalForwardAnalysis.y, PrimaryVertexAnalyzer4PUSlimmed::simPrimaryVertex.y, Basic3DVector< long double >.y(), hit.y, DigitizerUtility::SignalPoint.y(), Geom::Cartesian2Cartesian3D< T >.y(), QcdLowPtDQM::Vertex.y(), Basic3DVector< float > constituentCentre Basic3DVector< float >.y(), Basic3DVector< U >.y(), Basic3DVector< float >.y(), Basic3DVector< align::Scalar >.y(), Basic3DVector< double >.y(), Basic3DVector< T >.y(), Basic3DVector< Scalar >.y(), reco::CastorCluster.y(), RecHitsSortedInPhi.y, GaussianSumUtilities1D::FinderState.y, XHistogram::position.y, reco::Candidate.y(), Phase2ITPixelCluster.y(), SiStripRecHitsValid::RecHitProperties.y, contrib::CMSBoostedTauSeedingAlgorithmStructure.y(), TrackClassifier::GeneratedPrimaryVertex.y, SiPixelCluster.y(), FTLCluster.y(), reco::Vertex.y(), reco::Particle.y(), PrimaryVertexAnalyzer4PUSlimmed::recoPrimaryVertex.y, reco::ParticleState.y(), mathSSE::Rot2< T >.y(), mathSSE::Rot2< Scalar >.y(), MuonGeometryArrange::MGACollection.y, CTPPSLocalTrackLite.y, python.rootplot.utilities.Hist.y, CandidateWithRef< Ref >.y(), HGCalClusterT< C >.y(), reco::LeafCandidate.y(), SOAFrame< T >.y(), python.rootplot.root2matplotlib.Hist.y, CaloParticle.y(), UrbanMscModel93.y, HGCalCLUEAlgo::Hexel.y, SimCluster.y(), EPOS::EPOS_Wrapper.y(), BeamSpotOnlineRaw_v4.y, reco::CaloCluster.y(), HGCalImagingAlgo::Hexel.y, HitDoublets.y(), RawParticle.y(), pat::PackedGenParticle.y(), TrackingParticle.y(), SiPixelDigitizerAlgorithm::EnergyDepositUnit.y(), Rot3< float >.y(), Rot3< double >.y(), Rot3< T >.y(), Rot3< Scalar >.y(), Rot3< align::Scalar >.y(), SiStripTrackingRecHitsValid::RecHitProperties.y, SiPixelDigitizerAlgorithm::SignalPoint.y(), TkRotation< Scalar >.y(), Exhume::CrossSection.y, TkRotation< U >.y(), TkRotation< float >.y(), TkRotation< double >.y(), TkRotation< T >.y(), TkRotation< align::Scalar >.y(), Rot2< Scalar >.y(), Rot2< T >.y(), TkRotation2D< T >.y(), TkRotation2D< Scalar >.y(), edmStreamStallGrapher.Point.y, pat::PackedCandidate.y(), svgfig.Plot.y, svgfig.Frame.y, Vispa.Views.LineDecayView.DecayNode.y(), PMuonSimHit::Vtx.y, svgfig.Curve.Sample.y, PTrackerSimHit::Vtx.y, svgfig.Text.y, svgfig.TextGlobal.y, and svgfig.HLine.y.

100  def autosize(self):
101  """ Overwrite VispaWidget's function.
102 
103  This adds size and position handling for left and top sides of container.
104  VispaWidget only takes care of right and bottom sides as widget position remains constant.
105  This function also adjusts the container's position as needed to include all children.
106  """
108  self.autolayoutChildren()
109  self.updateConnections()
110 
111  childrenRect = WidgetContainer.childrenRect(self)
112  if self._autosizeAdjustContainerPositionFlag and self._childrenVisible and (childrenRect.width() != 0 or childrenRect.height() != 0):
113  # increase / decrease size of container on left and top side
114 
115  # round to prevent drifting wehen zoom != 100%
116  xMargin = round(self.contentStartX())
117  yMargin = round(self.contentStartY())
118  childrenRectX = childrenRect.x()
119  childrenRectY = childrenRect.y()
120 
121  xOffset = 0
122  yOffset = 0
123  if childrenRectX != xMargin:
124  xOffset = - childrenRectX + xMargin
125  if childrenRectY != yMargin:
126  yOffset = - childrenRectY + yMargin
127 
128  if xOffset != 0 or yOffset != 0:
129  self.move(self.x() - xOffset , self.y() - yOffset)
130  for child in self.children():
131  #if isinstance(child,QWidget): # needed for PyQt4.5
132  if hasattr(child, "move"):
133  child.move(child.x() + xOffset, child.y() + yOffset)
134 
135  VispaWidget.autosize(self)
136  self.emit(SIGNAL("sizeChanged"), self)
137 
def Vispa.Gui.WidgetContainer.WidgetContainer.collapsed (   self)
Returns True if widget is collapsed. In this case the children are not visible.

Otherwise False is returned.

Definition at line 192 of file WidgetContainer.py.

References Vispa.Gui.WidgetContainer.WidgetContainer._childrenVisible.

Referenced by Vispa.Views.LineDecayView.LineDecayContainer.childrenRect(), Vispa.Views.LineDecayView.LineDecayContainer.paint(), and Vispa.Views.LineDecayView.LineDecayContainer.sizeHint().

192  def collapsed(self):
193  """ Returns True if widget is collapsed. In this case the children are not visible.
194 
195  Otherwise False is returned.
196  """
197  return not self._childrenVisible
198 
def Vispa.Gui.WidgetContainer.WidgetContainer.contentStartX (   self)
Get start x coordinate position of widget content. Especially for autolayoutChildren().

Definition at line 90 of file WidgetContainer.py.

References ValidateGeometry.getDistance(), and Vispa.Gui.VispaWidget.VispaWidget.getDistance().

Referenced by Vispa.Views.BoxDecayView.BoxDecayContainer.autolayoutAlgorithm(), Vispa.Gui.WidgetContainer.WidgetContainer.autolayoutChildren(), and Vispa.Gui.WidgetContainer.WidgetContainer.autosize().

90  def contentStartX(self):
91  """ Get start x coordinate position of widget content. Especially for autolayoutChildren().
92  """
93  return self.getDistance("contentStartX")
94 
def getDistance(self, name, scale=None, keepDefaultRatio=False)
def Vispa.Gui.WidgetContainer.WidgetContainer.contentStartY (   self)
Get start y coordinate position of widget content. Especially for autolayoutChildren().

Definition at line 95 of file WidgetContainer.py.

References ValidateGeometry.getDistance(), and Vispa.Gui.VispaWidget.VispaWidget.getDistance().

Referenced by Vispa.Views.BoxDecayView.BoxDecayContainer.autolayoutAlgorithm(), Vispa.Gui.WidgetContainer.WidgetContainer.autolayoutChildren(), and Vispa.Gui.WidgetContainer.WidgetContainer.autosize().

95  def contentStartY(self):
96  """ Get start y coordinate position of widget content. Especially for autolayoutChildren().
97  """
98  return self.getDistance("contentStartY")
99 
def getDistance(self, name, scale=None, keepDefaultRatio=False)
def Vispa.Gui.WidgetContainer.WidgetContainer.defineBackgroundBrush (   self)
If container is collapsed use single background color.

Definition at line 62 of file WidgetContainer.py.

References Vispa.Gui.WidgetContainer.WidgetContainer._childrenVisible.

63  """ If container is collapsed use single background color.
64  """
65  if self._childrenVisible:
66  ConnectableWidget.defineBackgroundBrush(self)
67  else:
68  self._backgroundBrush = self.penColor()
69 
def Vispa.Gui.WidgetContainer.WidgetContainer.enableAdjustContainerPositionWhenAutosizing (   self,
  adjust 
)
def Vispa.Gui.WidgetContainer.WidgetContainer.enableAutolayoutChildren (   self,
  autolayout 
)
If autolayout is True children of this container are arranged when this container auto-sizes.

If this option is enabled make sure children are not dragable because that would conflict with  autolayouting.

Definition at line 46 of file WidgetContainer.py.

References Vispa.Gui.WidgetContainer.WidgetContainer._autolayoutChildrenEnabled.

46  def enableAutolayoutChildren(self, autolayout):
47  """ If autolayout is True children of this container are arranged when this container auto-sizes.
48 
49  If this option is enabled make sure children are not dragable because that would conflict with autolayouting.
50  """
51  self._autolayoutChildrenEnabled = autolayout
52 
def enableAutolayoutChildren(self, autolayout)
def Vispa.Gui.WidgetContainer.WidgetContainer.mouseDoubleClickEvent (   self,
  event 
)
Call toggleCollapse().

Definition at line 167 of file WidgetContainer.py.

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

167  def mouseDoubleClickEvent(self, event):
168  """ Call toggleCollapse().
169  """
170  if event.pos().y() <= self.getDistance("titleFieldBottom"):
171  self.toggleCollapse()
172  if isinstance(self.parent(), ConnectableWidgetOwner):
173  self.parent().widgetDoubleClicked(self)
174 
def getDistance(self, name, scale=None, keepDefaultRatio=False)
def Vispa.Gui.WidgetContainer.WidgetContainer.mouseMoveEvent (   self,
  event 
)

Definition at line 181 of file WidgetContainer.py.

References electrons_cff.bool, ValidateGeometry.getDistance(), Vispa.Gui.VispaWidget.VispaWidget.getDistance(), evf::ExceptionGenerator.menu, options.HLTProcessOptions.menu, Vispa.Gui.ConnectableWidget.ConnectableWidget.menu(), Vispa.Gui.ConnectableWidget.ConnectableWidget.positionizeMenuWidget(), and Vispa.Gui.ConnectableWidget.ConnectableWidget.showMenu().

181  def mouseMoveEvent(self, event):
182  if bool(event.buttons() & Qt.LeftButton):
183  VispaWidget.mouseMoveEvent(self, event)
184  elif self.menu():
185  self.positionizeMenuWidget()
186 
187  if event.pos().y() <= self.getDistance("titleFieldBottom"):
188  self.showMenu()
189  elif self.menu():
190  self.menu().hide()
191 
def getDistance(self, name, scale=None, keepDefaultRatio=False)
def Vispa.Gui.WidgetContainer.WidgetContainer.mousePressEvent (   self,
  event 
)
Makes sure event is forwarded to both base classes.

Definition at line 175 of file WidgetContainer.py.

175  def mousePressEvent(self, event):
176  """ Makes sure event is forwarded to both base classes.
177  """
178  ConnectableWidgetOwner.mousePressEvent(self, event)
179  VispaWidget.mousePressEvent(self, event)
180 
def Vispa.Gui.WidgetContainer.WidgetContainer.setNotCollapsable (   self)
def Vispa.Gui.WidgetContainer.WidgetContainer.showMenu (   self)
def Vispa.Gui.WidgetContainer.WidgetContainer.sizeHint (   self)
Calculates needed space for content.

Definition at line 70 of file WidgetContainer.py.

References Vispa.Views.LineDecayView.LineDecayContainer.childrenRect(), ValidateGeometry.getDistance(), Vispa.Gui.VispaWidget.VispaWidget.getDistance(), SiStripPI.max, and Vispa.Gui.Zoomable.Zoomable.zoomFactor().

70  def sizeHint(self):
71  """ Calculates needed space for content.
72  """
73  #logging.debug(__name__ +": sizeHint()")
74  childrenRect = self.childrenRect()
75  width = childrenRect.bottomRight().x() + self.getDistance('rightMargin')
76  height = childrenRect.bottomRight().y() + self.getDistance('bottomMargin')
77 
78  # make zoom independent
79  width = 1.0 / self.zoomFactor() * width
80  height = 1.0 / self.zoomFactor() * height
81 
82  # from now on in 100% dimensions
83  superClassNeededSpace = VispaWidget.sizeHint(self)
84 
85  width = max(width, superClassNeededSpace.width(), WidgetContainer.WIDTH)
86  height = max(height, superClassNeededSpace.height(), WidgetContainer.HEIGHT)
87 
88  return QSize(width, height)
89 
def getDistance(self, name, scale=None, keepDefaultRatio=False)
def Vispa.Gui.WidgetContainer.WidgetContainer.toggleCollapse (   self)
Toggles visibility of children between True and False.

Definition at line 199 of file WidgetContainer.py.

References Vispa.Gui.WidgetContainer.WidgetContainer._childrenVisible, Vispa.Gui.WidgetContainer.WidgetContainer._hiddenChildren, Vispa.Gui.VispaWidget.VispaWidget.autosize(), 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(), Vispa.Gui.VispaWidget.VispaWidget.enableBackgroundGradient(), Vispa.Gui.VispaWidget.VispaWidget.enableColorHeaderBackground(), evf::ExceptionGenerator.menu, options.HLTProcessOptions.menu, Vispa.Gui.ConnectableWidget.ConnectableWidget.menu(), Vispa.Gui.VispaWidget.VispaWidget.setColors(), and Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.widgetDragged().

Referenced by Vispa.Gui.WidgetContainer.WidgetContainer.mouseDoubleClickEvent(), and Vispa.Gui.WidgetContainer.WidgetContainer.setShowCollapseMenu().

199  def toggleCollapse(self):
200  """ Toggles visibility of children between True and False.
201  """
202  if self.menu():
203  self.menu().hide()
204 
205 
206  if self._childrenVisible:
207  self._hiddenChildren = []
208  self._childrenVisible = False
209  else:
210  self._childrenVisible = True
211 
212  for child in self.children():
213  if isinstance(child,QWidget): # needed for PyQt4.5
214  if not self._childrenVisible and not child.isVisible():
215  # remember already hidden children while hiding
216  self._hiddenChildren.append(child)
217  elif not child in self._hiddenChildren:
218  # prevent to make previously hidden children visible
219  child.setVisible(self._childrenVisible)
220 
221  if self._childrenVisible:
222  self.enableBackgroundGradient(self.setColors(self.PEN_COLOR, self.FILL_COLOR1, self.FILL_COLOR2))
223  self.enableColorHeaderBackground(self.COLOR_HEADER_BACKGROUND_FLAG)
224  self.setColors(self.PEN_COLOR, self.FILL_COLOR1, self.FILL_COLOR2)
225  else:
226  self.enableBackgroundGradient(False)
227  self.enableColorHeaderBackground(False)
228  self.setColors(self.PEN_COLOR, self.PEN_COLOR, None)
229 
230  self.autosize()
231  self.widgetDragged(self)
232 
def autosize(self, skipSizeHint=False)
Definition: VispaWidget.py:833
def enableColorHeaderBackground(self, enable=True)
Definition: VispaWidget.py:610
def enableBackgroundGradient(self, enable=True)
Definition: VispaWidget.py:620
def setColors(self, penColor, fillColor1, fillColor2)
Definition: VispaWidget.py:531
def Vispa.Gui.WidgetContainer.WidgetContainer.widgetDragged (   self,
  widget 
)
Call autosize().

Overwritten function of ConnectableWidgetOwner.

Definition at line 154 of file WidgetContainer.py.

References Vispa.Gui.VispaWidget.VispaWidget.autosize(), and Vispa.Gui.VispaWidget.VispaWidget.autosizeEnabled().

154  def widgetDragged(self, widget):
155  """ Call autosize().
156 
157  Overwritten function of ConnectableWidgetOwner.
158  """
159  if self.autosizeEnabled():
160  self.autosize()
161  # not sure this is still needed (2010-07-06), remove if possible
162  #for connection in [child for child in self.children() if isinstance(child, PortConnection)]:
163  # connection.updateConnection()
164 
165  ConnectableWidgetOwner.widgetDragged(self, widget)
166 
def autosize(self, skipSizeHint=False)
Definition: VispaWidget.py:833

Member Data Documentation

Vispa.Gui.WidgetContainer.WidgetContainer._backgroundBrush
private

Definition at line 68 of file WidgetContainer.py.

Vispa.Gui.WidgetContainer.WidgetContainer._collapsable
private
Vispa.Gui.WidgetContainer.WidgetContainer._collapseMenuButton
private
Vispa.Gui.WidgetContainer.WidgetContainer._hiddenChildren
private