CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Attributes | Private Attributes
Vispa.Main.StartupScreen.StartupScreen Class Reference
Inheritance diagram for Vispa.Main.StartupScreen.StartupScreen:
Vispa.Gui.VispaWidget.VispaWidget Vispa.Gui.ZoomableWidget.ZoomableWidget Vispa.Gui.Zoomable.Zoomable

Public Member Functions

def __init__
 
def analysisDesignerRecentFilesList
 
def boundingRect
 
def createDescriptionWidget
 
def createExecutionWidget
 
def createPrototypingWidget
 
def createVerifyingWidget
 
def mouseMoveEvent
 
def moveEvent
 
def pxlEditorRecentFilesList
 
def rearangeContent
 
def rearangeDescriptionWidgets
 
def setVisible
 
- Public Member Functions inherited from Vispa.Gui.VispaWidget.VispaWidget
def __init__
 
def autosize
 
def autosizeEnabled
 
def bodyWidget
 
def boundingRect
 
def colorHeaderBackgroundEnabled
 
def contentRect
 
def defineArrowBackgroundShape
 
def defineCircleBackgroundShape
 
def defineDistances
 
def defineRectBackgroundShape
 
def defineRoundRectBackgroundShape
 
def delete
 
def distances
 
def dragReferencePoint
 
def dragWidget
 
def drawBody
 
def drawHeaderBackground
 
def drawImage
 
def drawTextField
 
def drawTitle
 
def enableAutopositionizeWhenZooming
 
def enableAutosizing
 
def enableBackgroundGradient
 
def enableColorHeaderBackground
 
def getDistance
 
def height
 
def imageRectF
 
def imageSizeF
 
def isDeletable
 
def isDragable
 
def isSelectable
 
def isSelected
 
def isTitlePoint
 
def isUseBackgroundGradientEnabled
 
def keyPressEvent
 
def mouseDoubleClickEvent
 
def mouseMoveEvent
 
def mousePressEvent
 
def mouseReleaseEvent
 
def move
 
def noRearangeContent
 
def paint
 
def paintEvent
 
def penColor
 
def previousDragPosition
 
def rearangeContent
 
def resetMouseDragOffset
 
def resize
 
def scale
 
def scheduleCalculateDistances
 
def scheduleRearangeContent
 
def select
 
def setArrowShape
 
def setBodyWidget
 
def setColors
 
def setDeletable
 
def setDragable
 
def setDragReferencePoint
 
def setImage
 
def setMaximumSize
 
def setMinimumSize
 
def setPreviousDragPosition
 
def setSelectable
 
def setShape
 
def setText
 
def setTextFieldAutosizeFont
 
def setTextFieldAutotruncateText
 
def setTitle
 
def setZoom
 
def showEvent
 
def sizeHint
 
def text
 
def textField
 
def textFieldIsSet
 
def title
 
def titleField
 
def titleIsSet
 
def unzoomedX
 
def unzoomedY
 
def width
 
- Public Member Functions inherited from Vispa.Gui.ZoomableWidget.ZoomableWidget
def __init__
 
def exportImage
 
def setZoom
 
- Public Member Functions inherited from Vispa.Gui.Zoomable.Zoomable
def __init__
 
def decrementZoom
 
def incrementZoom
 
def setZoom
 
def zoom
 
def zoomFactor
 

Static Public Attributes

 AUTOSIZE = True
 
 AUTOSIZE_KEEP_ASPECT_RATIO = False
 
string BACKGROUND_SHAPE = 'ROUNDRECT'
 
string EXECUTING_DESCRIPTION = """Executing"""
 
string PROTOTYPING_DESCRIPTION = """Prototyping"""
 
 SELECTABLE_FLAG = False
 
string VERIFYING_DESCRIPTION = """Verifying"""
 
- Static Public Attributes inherited from Vispa.Gui.VispaWidget.VispaWidget
 ARROW_SHAPE = None
 
int ARROW_SHAPE_BOTTOM = 2
 
int ARROW_SHAPE_LEFT = 1
 
int ARROW_SHAPE_RIGHT = 3
 
int ARROW_SHAPE_TOP = 0
 
int ARROW_SIZE = 30
 
 AUTOPOSITIONIZE_WHEN_ZOOMING_FLAG = True
 
 AUTOSIZE = False
 
 AUTOSIZE_KEEP_ASPECT_RATIO = True
 
string BACKGROUND_SHAPE = 'RECT'
 
int BOTTOM_MARGIN = 5
 
 COLOR_HEADER_BACKGROUND_FLAG = True
 
tuple FILL_COLOR1 = QColor(188, 215, 241)
 
tuple FILL_COLOR2 = QColor(242, 230, 242)
 
 FOCUSPOLICY = Qt.StrongFocus
 
int HEIGHT = 80
 
int HORIZONTAL_INNER_MARGIN = 5
 
int LEFT_MARGIN = 5
 
int MINIMUM_HEIGHT = 0
 
int MINIMUM_WIDTH = 30
 
tuple PEN_COLOR = QColor(128, 186, 224)
 
int RIGHT_MARGIN = 5
 
int ROUNDRECT_RADIUS = 30
 
tuple SELECT_COLOR = QColor('darkblue')
 
 SELECTABLE_FLAG = True
 
int SELECTED_FRAME_WIDTH = 2
 
 TEXTFIELD_AUTOSIZE_FONT_FLAG = False
 
 TEXTFIELD_AUTOTRUNCATE_TEXT_FLAG = False
 
 TEXTFIELD_FLAGS = Qt.TextWordWrap
 
int TEXTFIELD_FONTSIZE = 12
 
int TEXTFIELD_FONTSIZE_MAX = 20
 
int TEXTFIELD_FONTSIZE_MIN = 2
 
tuple TITLE_COLOR = QColor(Qt.white)
 
int TITLEFIELD_FONTSIZE = 12
 
int TOP_MARGIN = 5
 
 USE_BACKGROUND_GRADIENT_FLAG = True
 
int VERTICAL_INNTER_MARGIN = 5
 
int WIDTH = 100
 

Private Attributes

 _activeSize
 
 _analysisDesignerRecentFilesList
 
 _descriptionActiveRects
 
 _descriptionWidgets
 
 _executionDescriptionWidget
 
 _executionRect
 
 _filenewIcon
 
 _fileopenIcon
 
 _hideDescriptions
 
 _prototypingDescriptionWidget
 
 _prototypingRect
 
 _pxlEditorRecentFilesList
 
 _verifyingDescriptionWidget
 
 _verifyingRect
 

Additional Inherited Members

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

Detailed Description

Definition at line 11 of file StartupScreen.py.

Constructor & Destructor Documentation

def Vispa.Main.StartupScreen.StartupScreen.__init__ (   self,
  parent 
)

Definition at line 25 of file StartupScreen.py.

25 
26  def __init__(self, parent):
28  self._descriptionActiveRects = [QRect(), QRect(), QRect()] # descriptions will be visible if mouse cursor is in the rect
29  VispaWidget.__init__(self, parent)
30  self._filenewIcon = QIcon(QPixmap(":/resources/filenew.svg"))
31  self._fileopenIcon = QIcon(QPixmap(":/resources/fileopen.svg"))
32  self.setImage(QSvgRenderer(":/resources/startup_development_cycle.svg"))
33  self.setDragable(False)
34  self.setMouseTracking(True) # receive mouse events even if no button is pressed
35  self._hideDescriptions = False
36 

Member Function Documentation

def Vispa.Main.StartupScreen.StartupScreen.analysisDesignerRecentFilesList (   self)

Definition at line 93 of file StartupScreen.py.

References Vispa.Main.StartupScreen.StartupScreen._analysisDesignerRecentFilesList.

def Vispa.Main.StartupScreen.StartupScreen.boundingRect (   self)

Definition at line 148 of file StartupScreen.py.

References Vispa.Main.StartupScreen.StartupScreen._descriptionWidgets.

Referenced by Vispa.Views.LineDecayView.DecayNode.containsPoint(), and Vispa.Views.LineDecayView.DecayNode.move().

149  def boundingRect(self):
150  br = VispaWidget.boundingRect(self)
151  for w in self._descriptionWidgets:
152  br = br.united(w.boundingRect())
153  return br
def Vispa.Main.StartupScreen.StartupScreen.createDescriptionWidget (   self,
  arrowDirection,
  description 
)

Definition at line 40 of file StartupScreen.py.

References Vispa.Main.StartupScreen.StartupScreen._hideDescriptions, python.multivaluedict.MyUserList.parent, FSimVertex.parent(), reco::PattRecoNode< Cluster >.parent(), DDI::Division.parent(), EmDQMReco::FourVectorMonitorElements.parent, graphwalker< ReferenceCountingPointer, ReferenceCountingPointer >.parent(), graphwalker< DDLogicalPart, DDPosData * >.parent(), graphwalker< N, E >.parent(), OpticalObject.parent(), DDLSAX2FileHandler.parent(), edm::DocFormatHelper.parent(), FWPSetTableManager::PSetData.parent, DDFilteredView.parent(), confdb.HLTProcess.parent, DDExpandedView.parent(), DDDivision.parent(), stor::TriggerSelector::TreeElement.parent(), DDXMLElement.parent(), argparse.HelpFormatter._Section.parent, python.rootplot.argparse.HelpFormatter._Section.parent, globcontrol.parent, TiXmlNode.parent, and Vispa.Views.LineDecayView.DecayObject.parent().

40 
41  def createDescriptionWidget(self, arrowDirection, description):
42  widget = VispaWidget(self.parent())
43  widget.enableAutosizing(True, False)
44  widget.setSelectable(False)
45  widget.setArrowShape(arrowDirection)
46  widget.setVisible(not self._hideDescriptions)
47  widget.setDragable(False)
48  self._descriptionWidgets.append(widget)
49  return widget
def Vispa.Main.StartupScreen.StartupScreen.createExecutionWidget (   self)

Definition at line 72 of file StartupScreen.py.

72 
74  self._executionDescriptionWidget = self.createDescriptionWidget(VispaWidget.ARROW_SHAPE_RIGHT, self.EXECUTING_DESCRIPTION)
75 
76  bodyWidget = QWidget(self._executionDescriptionWidget)
77  bodyWidget.setLayout(QGridLayout())
78  bodyWidget.layout().setContentsMargins(0, 0, 0, 0)
79 
80  label=QLabel("Open and run existing analysis:")
81  bodyWidget.layout().addWidget(label, 0, 0)
82  analysisDesignerButton = QToolButton()
83  analysisDesignerButton.setText("Open analysis file")
84  analysisDesignerButton.setIcon(self._fileopenIcon)
85  self.connect(analysisDesignerButton, SIGNAL("clicked(bool)"), self.parent().openAnalysisFileSlot)
86  bodyWidget.layout().addWidget(analysisDesignerButton, 0, 1)
87  self._analysisDesignerRecentFilesList=QListWidget()
88  self._analysisDesignerRecentFilesList.setFixedSize(label.sizeHint().width()+analysisDesignerButton.sizeHint().width(),150)
89  self.connect(self._analysisDesignerRecentFilesList, SIGNAL("doubleClicked(QModelIndex)"), self.parent().openAnalysisFileSlot)
90  bodyWidget.layout().addWidget(self._analysisDesignerRecentFilesList, 1, 0, 1, 2)
91 
92  self._executionDescriptionWidget.setBodyWidget(bodyWidget)
def Vispa.Main.StartupScreen.StartupScreen.createPrototypingWidget (   self)

Definition at line 50 of file StartupScreen.py.

50 
52  self._prototypingDescriptionWidget = self.createDescriptionWidget(VispaWidget.ARROW_SHAPE_BOTTOM, self.PROTOTYPING_DESCRIPTION)
53 
54  bodyWidget = QWidget(self._prototypingDescriptionWidget)
55  bodyWidget.setLayout(QGridLayout())
56  bodyWidget.layout().setContentsMargins(0, 0, 0, 0)
57 
58  bodyWidget.layout().addWidget(QLabel("Design physics analysis:"), 0, 0)
59  analysisDesignerButton = QToolButton()
60  analysisDesignerButton.setText("Analysis Designer")
61  analysisDesignerButton.setIcon(self._filenewIcon)
62  self.connect(analysisDesignerButton, SIGNAL("clicked(bool)"), self.parent().newAnalysisDesignerSlot)
63  bodyWidget.layout().addWidget(analysisDesignerButton, 0, 1)
64  bodyWidget.layout().addWidget(QLabel("Create physics event:"), 1, 0)
65  pxlButton = QToolButton()
66  pxlButton.setText("PXL Editor")
67  pxlButton.setIcon(self._filenewIcon)
68  self.connect(pxlButton, SIGNAL("clicked(bool)"), self.parent().newPxlSlot)
69  bodyWidget.layout().addWidget(pxlButton, 1, 1)
70 
71  self._prototypingDescriptionWidget.setBodyWidget(bodyWidget)
def Vispa.Main.StartupScreen.StartupScreen.createVerifyingWidget (   self)

Definition at line 96 of file StartupScreen.py.

96 
98  self._verifyingDescriptionWidget = self.createDescriptionWidget(VispaWidget.ARROW_SHAPE_LEFT, self.VERIFYING_DESCRIPTION)
99 
100  bodyWidget = QWidget(self._verifyingDescriptionWidget)
101  bodyWidget.setLayout(QGridLayout())
102  bodyWidget.layout().setContentsMargins(0, 0, 0, 0)
103 
104  label=QLabel("Browse an existing PXL data file:")
105  bodyWidget.layout().addWidget(label, 0, 0)
106  analysisDesignerButton = QToolButton()
107  analysisDesignerButton.setText("Open PXL file")
108  analysisDesignerButton.setIcon(self._fileopenIcon)
109  self.connect(analysisDesignerButton, SIGNAL("clicked(bool)"), self.parent().openPxlFileSlot)
110  bodyWidget.layout().addWidget(analysisDesignerButton, 0, 1)
111  self._pxlEditorRecentFilesList=QListWidget()
112  self._pxlEditorRecentFilesList.setFixedSize(label.sizeHint().width()+analysisDesignerButton.sizeHint().width(),150)
113  self.connect(self._pxlEditorRecentFilesList, SIGNAL("doubleClicked(QModelIndex)"), self.parent().openPxlFileSlot)
114  bodyWidget.layout().addWidget(self._pxlEditorRecentFilesList, 1, 0, 1, 2)
115 
116  self._verifyingDescriptionWidget.setBodyWidget(bodyWidget)
def Vispa.Main.StartupScreen.StartupScreen.mouseMoveEvent (   self,
  event 
)

Definition at line 120 of file StartupScreen.py.

References Vispa.Main.StartupScreen.StartupScreen._descriptionActiveRects, Vispa.Main.StartupScreen.StartupScreen._descriptionWidgets, Vispa.Main.StartupScreen.StartupScreen._hideDescriptions, edm.contains(), and Vispa.Main.StartupScreen.StartupScreen.setVisible().

121  def mouseMoveEvent(self, event):
122  if bool(event.buttons()):
123  VispaWidget.mouseMoveEvent(self, event)
124  elif self._hideDescriptions:
125  for i in range(len(self._descriptionWidgets)):
126  self._descriptionWidgets[i].setVisible(self._descriptionActiveRects[i].contains(event.pos()))
bool contains(EventRange const &lh, EventID const &rh)
Definition: EventRange.cc:38
def Vispa.Main.StartupScreen.StartupScreen.moveEvent (   self,
  event 
)

Definition at line 127 of file StartupScreen.py.

References Vispa.Main.StartupScreen.StartupScreen.rearangeDescriptionWidgets().

128  def moveEvent(self, event):
129  VispaWidget.moveEvent(self, event)
def Vispa.Main.StartupScreen.StartupScreen.pxlEditorRecentFilesList (   self)

Definition at line 117 of file StartupScreen.py.

References Vispa.Main.StartupScreen.StartupScreen._pxlEditorRecentFilesList.

118  def pxlEditorRecentFilesList(self):
119  return self._pxlEditorRecentFilesList
def Vispa.Main.StartupScreen.StartupScreen.rearangeContent (   self)

Definition at line 131 of file StartupScreen.py.

References Vispa.Main.StartupScreen.StartupScreen.rearangeDescriptionWidgets().

132  def rearangeContent(self):
133  VispaWidget.rearangeContent(self)
def Vispa.Main.StartupScreen.StartupScreen.rearangeDescriptionWidgets (   self)

Definition at line 135 of file StartupScreen.py.

Referenced by Vispa.Main.StartupScreen.StartupScreen.moveEvent(), and Vispa.Main.StartupScreen.StartupScreen.rearangeContent().

137  self._activeSize = QSize(0.3 * self.width(), 0.1 * self.height())
138  self._prototypingRect = QRect(QPoint(0.5 * (self.width() - self._activeSize.width()), 0), self._activeSize)
139  self._executionRect = QRect(QPoint(0, 0.635 * self.height()), self._activeSize)
140  self._verifyingRect = QRect(QPoint(self.width() -self._activeSize.width(), 0.635 * self.height()), self._activeSize)
144 
145  self._prototypingDescriptionWidget.move(self.mapToParent(self._prototypingRect.topLeft()) + QPoint((self._prototypingRect.width() - self._prototypingDescriptionWidget.width()) * 0.5, - self._prototypingDescriptionWidget.height()))
146  self._executionDescriptionWidget.move(self.mapToParent(self._executionRect.topLeft()) - QPoint(self._executionDescriptionWidget.width(), - 0.5 * (self._executionRect.height() - self._executionDescriptionWidget.height())))
147  self._verifyingDescriptionWidget.move(self.mapToParent(self._verifyingRect.topRight()) - QPoint(0, - 0.5 * (self._verifyingRect.height() - self._verifyingDescriptionWidget.height())))
def Vispa.Main.StartupScreen.StartupScreen.setVisible (   self,
  visible 
)

Definition at line 154 of file StartupScreen.py.

References Vispa.Main.StartupScreen.StartupScreen._hideDescriptions.

Referenced by Vispa.Main.StartupScreen.StartupScreen.mouseMoveEvent().

155  def setVisible(self, visible):
156  VispaWidget.setVisible(self, visible)
157  self._executionDescriptionWidget.setVisible(visible and not self._hideDescriptions)
158  self._prototypingDescriptionWidget.setVisible(visible and not self._hideDescriptions)
159  self._verifyingDescriptionWidget.setVisible(visible and not self._hideDescriptions)

Member Data Documentation

Vispa.Main.StartupScreen.StartupScreen._activeSize
private

Definition at line 136 of file StartupScreen.py.

Vispa.Main.StartupScreen.StartupScreen._analysisDesignerRecentFilesList
private

Definition at line 86 of file StartupScreen.py.

Referenced by Vispa.Main.StartupScreen.StartupScreen.analysisDesignerRecentFilesList().

Vispa.Main.StartupScreen.StartupScreen._descriptionActiveRects
private

Definition at line 27 of file StartupScreen.py.

Referenced by Vispa.Main.StartupScreen.StartupScreen.mouseMoveEvent().

Vispa.Main.StartupScreen.StartupScreen._descriptionWidgets
private

Definition at line 26 of file StartupScreen.py.

Referenced by Vispa.Main.StartupScreen.StartupScreen.boundingRect(), and Vispa.Main.StartupScreen.StartupScreen.mouseMoveEvent().

Vispa.Main.StartupScreen.StartupScreen._executionDescriptionWidget
private

Definition at line 73 of file StartupScreen.py.

Vispa.Main.StartupScreen.StartupScreen._executionRect
private

Definition at line 138 of file StartupScreen.py.

Vispa.Main.StartupScreen.StartupScreen._filenewIcon
private

Definition at line 29 of file StartupScreen.py.

Vispa.Main.StartupScreen.StartupScreen._fileopenIcon
private

Definition at line 30 of file StartupScreen.py.

Vispa.Main.StartupScreen.StartupScreen._hideDescriptions
private

Definition at line 34 of file StartupScreen.py.

Referenced by Vispa.Main.StartupScreen.StartupScreen.createDescriptionWidget(), Vispa.Main.StartupScreen.StartupScreen.mouseMoveEvent(), and Vispa.Main.StartupScreen.StartupScreen.setVisible().

Vispa.Main.StartupScreen.StartupScreen._prototypingDescriptionWidget
private

Definition at line 51 of file StartupScreen.py.

Vispa.Main.StartupScreen.StartupScreen._prototypingRect
private

Definition at line 137 of file StartupScreen.py.

Vispa.Main.StartupScreen.StartupScreen._pxlEditorRecentFilesList
private

Definition at line 110 of file StartupScreen.py.

Referenced by Vispa.Main.StartupScreen.StartupScreen.pxlEditorRecentFilesList().

Vispa.Main.StartupScreen.StartupScreen._verifyingDescriptionWidget
private

Definition at line 97 of file StartupScreen.py.

Vispa.Main.StartupScreen.StartupScreen._verifyingRect
private

Definition at line 139 of file StartupScreen.py.

Vispa.Main.StartupScreen.StartupScreen.AUTOSIZE = True
static

Definition at line 16 of file StartupScreen.py.

Vispa.Main.StartupScreen.StartupScreen.AUTOSIZE_KEEP_ASPECT_RATIO = False
static

Definition at line 17 of file StartupScreen.py.

string Vispa.Main.StartupScreen.StartupScreen.BACKGROUND_SHAPE = 'ROUNDRECT'
static

Definition at line 14 of file StartupScreen.py.

string Vispa.Main.StartupScreen.StartupScreen.EXECUTING_DESCRIPTION = """Executing"""
static

Definition at line 21 of file StartupScreen.py.

string Vispa.Main.StartupScreen.StartupScreen.PROTOTYPING_DESCRIPTION = """Prototyping"""
static

Definition at line 19 of file StartupScreen.py.

Vispa.Main.StartupScreen.StartupScreen.SELECTABLE_FLAG = False
static

Definition at line 15 of file StartupScreen.py.

string Vispa.Main.StartupScreen.StartupScreen.VERIFYING_DESCRIPTION = """Verifying"""
static

Definition at line 23 of file StartupScreen.py.