easymodel.cascade.AbstractCascadeView¶
-
class
easymodel.cascade.
AbstractCascadeView
(depth, parent=None, flags=0)[source]¶ Bases:
PySide.QtGui.QWidget
A abstract class for a cascade view
A tree cascade view can be compared to a
QtGui.QColumnView
. The cascade view uses a tree model and on initialisation creates levels up to a certain depth. Each level displays on level of hierarchy of the model.When subclassing implement
AbstractCascadeView.create_level()
,AbstractCascadeView.add_lvl_to_ui()
,AbstractCascadeView.create_level()
and for headers reimplementAbstractCascadeView.create_header()
Constructs an AbstractCascadeView
Parameters: - depth (
int
) – the depth of the tree - parent (
QtGui.QWidget
) – the parent of the widget - flags (
QtCore.Qt.WindowFlags
) – the flags for the widget
Raises: None
-
__init__
(depth, parent=None, flags=0)[source]¶ Constructs an AbstractCascadeView
Parameters: - depth (
int
) – the depth of the tree - parent (
QtGui.QWidget
) – the parent of the widget - flags (
QtCore.Qt.WindowFlags
) – the flags for the widget
Raises: None
- depth (
Methods
__init__
(depth[, parent, flags])Constructs an AbstractCascadeView acceptDrops
accessibleDescription
accessibleName
actionEvent
actions
activateWindow
addAction
addActions
add_lvl_to_ui
(level, header)Abstract method that is responsible for inserting the level and header into the ui. adjustSize
autoFillBackground
backgroundRole
baseSize
blockSignals
build_view
()Creates all levels and adds them to the ui changeEvent
childAt
childEvent
children
childrenRect
childrenRegion
clearFocus
clearMask
close
closeEvent
colorCount
connect
connectNotify
contentsMargins
contentsRect
contextMenuEvent
contextMenuPolicy
createWinId
create_header
(depth)Create and return a widget that will be used as a header for the given depth create_level
(depth)Create and return a level for the given depth cursor
customEvent
deleteLater
destroy
devType
disconnect
disconnectNotify
dragEnterEvent
dragLeaveEvent
dragMoveEvent
dropEvent
dumpObjectInfo
dumpObjectTree
dynamicPropertyNames
effectiveWinId
emit
ensurePolished
enterEvent
event
eventFilter
findChild
findChildren
focusInEvent
focusNextChild
focusNextPrevChild
focusOutEvent
focusPolicy
focusPreviousChild
focusProxy
focusWidget
font
fontInfo
fontMetrics
foregroundRole
frameGeometry
frameSize
geometry
getContentsMargins
grabGesture
grabKeyboard
grabMouse
grabShortcut
graphicsEffect
graphicsProxyWidget
hasFocus
hasMouseTracking
height
heightForWidth
heightMM
hide
hideEvent
inherits
inputContext
inputMethodEvent
inputMethodHints
inputMethodQuery
insertAction
insertActions
installEventFilter
isActiveWindow
isAncestorOf
isEnabled
isEnabledTo
isFullScreen
isHidden
isLeftToRight
isMaximized
isMinimized
isModal
isRightToLeft
isVisible
isVisibleTo
isWidgetType
isWindow
isWindowModified
keyPressEvent
keyReleaseEvent
keyboardGrabber
killTimer
languageChange
layout
layoutDirection
leaveEvent
locale
logicalDpiX
logicalDpiY
lower
mapFrom
mapFromGlobal
mapFromParent
mapTo
mapToGlobal
mapToParent
mask
maximumHeight
maximumSize
maximumWidth
metaObject
metric
minimumHeight
minimumSize
minimumSizeHint
minimumWidth
mouseDoubleClickEvent
mouseGrabber
mouseMoveEvent
mousePressEvent
mouseReleaseEvent
move
moveEvent
moveToThread
nativeParentWidget
nextInFocusChain
normalGeometry
numColors
objectName
overrideWindowFlags
overrideWindowState
paintEngine
paintEvent
paintingActive
palette
parent
parentWidget
physicalDpiX
physicalDpiY
pos
previousInFocusChain
property
raise_
receivers
rect
registerUserData
releaseKeyboard
releaseMouse
releaseShortcut
removeAction
removeEventFilter
render
repaint
resetInputContext
resize
resizeEvent
restoreGeometry
saveGeometry
scroll
selected_indexes
(depth)Get the selected indexes of a certain depth level sender
senderSignalIndex
setAcceptDrops
setAccessibleDescription
setAccessibleName
setAttribute
setAutoFillBackground
setBackgroundRole
setBaseSize
setContentsMargins
setContextMenuPolicy
setCursor
setDisabled
setEnabled
setFixedHeight
setFixedSize
setFixedWidth
setFocus
setFocusPolicy
setFocusProxy
setFont
setForegroundRole
setGeometry
setGraphicsEffect
setHidden
setInputContext
setInputMethodHints
setLayout
setLayoutDirection
setLocale
setMask
setMaximumHeight
setMaximumSize
setMaximumWidth
setMinimumHeight
setMinimumSize
setMinimumWidth
setMouseTracking
setObjectName
setPalette
setParent
setProperty
setShortcutAutoRepeat
setShortcutEnabled
setSizeIncrement
setSizePolicy
setStatusTip
setStyle
setStyleSheet
setTabOrder
setToolTip
setUpdatesEnabled
setVisible
setWhatsThis
setWindowFilePath
setWindowFlags
setWindowIcon
setWindowIconText
setWindowModality
setWindowModified
setWindowOpacity
setWindowRole
setWindowState
setWindowTitle
set_index
(depth, index)Set the level at the given depth to the given index set_root
(depth, index)Set the level’s root of the given depth to index show
showEvent
showFullScreen
showMaximized
showMinimized
showNormal
signalsBlocked
size
sizeHint
sizeIncrement
sizePolicy
stackUnder
startTimer
statusTip
style
styleSheet
tabletEvent
testAttribute
thread
timerEvent
toolTip
tr
trUtf8
underMouse
ungrabGesture
unsetCursor
unsetLayoutDirection
unsetLocale
update
updateGeometry
updateMicroFocus
updatesEnabled
visibleRegion
whatsThis
wheelEvent
width
widthMM
winId
window
windowFilePath
windowFlags
windowIcon
windowIconText
windowModality
windowOpacity
windowRole
windowState
windowTitle
windowType
x
x11Info
x11PictureHandle
y
Attributes
DrawChildren
DrawWindowBackground
IgnoreMask
PdmDepth
PdmDpiX
PdmDpiY
PdmHeight
PdmHeightMM
PdmNumColors
PdmPhysicalDpiX
PdmPhysicalDpiY
PdmWidth
PdmWidthMM
customContextMenuRequested
depth
Return amount of levels destroyed
model
Return the model painters
staticMetaObject
-
model
¶ Return the model
Returns: the model Return type: QtGui.QAbstractItemModel
Raises: None
-
build_view
()[source]¶ Creates all levels and adds them to the ui
Returns: None Return type: None Raises: None
-
create_level
(depth)[source]¶ Create and return a level for the given depth
The model and root of the level will be automatically set by the view.
Parameters: depth ( int
) – the depth level that the level should handleReturns: a new level for the given depth Return type: AbstractLevel
Raises: NotImplementedError
-
create_header
(depth)[source]¶ Create and return a widget that will be used as a header for the given depth
Override this method if you want to have header widgets. The default implementation returns None. You can return None if you do not want a header for the given depth
Parameters: depth ( int
) – the depth levelReturns: a Widget that is used for the header or None Return type: QtGui.QWidget
| NoneRaises: None
-
add_lvl_to_ui
(level, header)[source]¶ Abstract method that is responsible for inserting the level and header into the ui.
Parameters: - level (
AbstractLevel
) – a newly created level - header (
QtCore.QWidget
| None) – a newly created header
Returns: None
Return type: Raises: NotImplementedError
- level (
-
set_root
(depth, index)[source]¶ Set the level’s root of the given depth to index
This calls
AbstractLevel._set_root()
of the level.Parameters: - depth (
int
) – the depth level - index (
QtCore.QModelIndex
) – the new root index
Returns: None
Return type: Raises: None
- depth (
-
depth
¶ Return amount of levels
Returns: the depth Return type: QtGui.QAbstractItemModel
Raises: None
-
selected_indexes
(depth)[source]¶ Get the selected indexes of a certain depth level
Parameters: depth ( int
) – the depth levelReturns: the selected indexes of the given depth level Return type: list of QtCore.QModelIndex Raises: None
-
set_index
(depth, index)[source]¶ Set the level at the given depth to the given index
Parameters: - depth (
int
) – addresses the level at the given depth - index (
QtCore.QModelIndex
) – the index to set the level to
Returns: None
Return type: Raises: None
- depth (
-
staticMetaObject
= <PySide.QtCore.QMetaObject object>¶
- depth (