easymodel.cascade.AbstractCascadeView¶
-
class
easymodel.cascade.AbstractCascadeView(depth, parent=None, flags=0)[source]¶ Bases:
PySide.QtGui.QWidgetA 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 acceptDropsaccessibleDescriptionaccessibleNameactionEventactionsactivateWindowaddActionaddActionsadd_lvl_to_ui(level, header)Abstract method that is responsible for inserting the level and header into the ui. adjustSizeautoFillBackgroundbackgroundRolebaseSizeblockSignalsbuild_view()Creates all levels and adds them to the ui changeEventchildAtchildEventchildrenchildrenRectchildrenRegionclearFocusclearMaskclosecloseEventcolorCountconnectconnectNotifycontentsMarginscontentsRectcontextMenuEventcontextMenuPolicycreateWinIdcreate_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 cursorcustomEventdeleteLaterdestroydevTypedisconnectdisconnectNotifydragEnterEventdragLeaveEventdragMoveEventdropEventdumpObjectInfodumpObjectTreedynamicPropertyNameseffectiveWinIdemitensurePolishedenterEventeventeventFilterfindChildfindChildrenfocusInEventfocusNextChildfocusNextPrevChildfocusOutEventfocusPolicyfocusPreviousChildfocusProxyfocusWidgetfontfontInfofontMetricsforegroundRoleframeGeometryframeSizegeometrygetContentsMarginsgrabGesturegrabKeyboardgrabMousegrabShortcutgraphicsEffectgraphicsProxyWidgethasFocushasMouseTrackingheightheightForWidthheightMMhidehideEventinheritsinputContextinputMethodEventinputMethodHintsinputMethodQueryinsertActioninsertActionsinstallEventFilterisActiveWindowisAncestorOfisEnabledisEnabledToisFullScreenisHiddenisLeftToRightisMaximizedisMinimizedisModalisRightToLeftisVisibleisVisibleToisWidgetTypeisWindowisWindowModifiedkeyPressEventkeyReleaseEventkeyboardGrabberkillTimerlanguageChangelayoutlayoutDirectionleaveEventlocalelogicalDpiXlogicalDpiYlowermapFrommapFromGlobalmapFromParentmapTomapToGlobalmapToParentmaskmaximumHeightmaximumSizemaximumWidthmetaObjectmetricminimumHeightminimumSizeminimumSizeHintminimumWidthmouseDoubleClickEventmouseGrabbermouseMoveEventmousePressEventmouseReleaseEventmovemoveEventmoveToThreadnativeParentWidgetnextInFocusChainnormalGeometrynumColorsobjectNameoverrideWindowFlagsoverrideWindowStatepaintEnginepaintEventpaintingActivepaletteparentparentWidgetphysicalDpiXphysicalDpiYpospreviousInFocusChainpropertyraise_receiversrectregisterUserDatareleaseKeyboardreleaseMousereleaseShortcutremoveActionremoveEventFilterrenderrepaintresetInputContextresizeresizeEventrestoreGeometrysaveGeometryscrollselected_indexes(depth)Get the selected indexes of a certain depth level sendersenderSignalIndexsetAcceptDropssetAccessibleDescriptionsetAccessibleNamesetAttributesetAutoFillBackgroundsetBackgroundRolesetBaseSizesetContentsMarginssetContextMenuPolicysetCursorsetDisabledsetEnabledsetFixedHeightsetFixedSizesetFixedWidthsetFocussetFocusPolicysetFocusProxysetFontsetForegroundRolesetGeometrysetGraphicsEffectsetHiddensetInputContextsetInputMethodHintssetLayoutsetLayoutDirectionsetLocalesetMasksetMaximumHeightsetMaximumSizesetMaximumWidthsetMinimumHeightsetMinimumSizesetMinimumWidthsetMouseTrackingsetObjectNamesetPalettesetParentsetPropertysetShortcutAutoRepeatsetShortcutEnabledsetSizeIncrementsetSizePolicysetStatusTipsetStylesetStyleSheetsetTabOrdersetToolTipsetUpdatesEnabledsetVisiblesetWhatsThissetWindowFilePathsetWindowFlagssetWindowIconsetWindowIconTextsetWindowModalitysetWindowModifiedsetWindowOpacitysetWindowRolesetWindowStatesetWindowTitleset_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 showshowEventshowFullScreenshowMaximizedshowMinimizedshowNormalsignalsBlockedsizesizeHintsizeIncrementsizePolicystackUnderstartTimerstatusTipstylestyleSheettabletEventtestAttributethreadtimerEventtoolTiptrtrUtf8underMouseungrabGestureunsetCursorunsetLayoutDirectionunsetLocaleupdateupdateGeometryupdateMicroFocusupdatesEnabledvisibleRegionwhatsThiswheelEventwidthwidthMMwinIdwindowwindowFilePathwindowFlagswindowIconwindowIconTextwindowModalitywindowOpacitywindowRolewindowStatewindowTitlewindowTypexx11Infox11PictureHandleyAttributes
DrawChildrenDrawWindowBackgroundIgnoreMaskPdmDepthPdmDpiXPdmDpiYPdmHeightPdmHeightMMPdmNumColorsPdmPhysicalDpiXPdmPhysicalDpiYPdmWidthPdmWidthMMcustomContextMenuRequesteddepthReturn amount of levels destroyedmodelReturn the model paintersstaticMetaObject-
model¶ Return the model
Returns: the model Return type: QtGui.QAbstractItemModelRaises: 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: AbstractLevelRaises: 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.QAbstractItemModelRaises: 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 (