### Navigation

- index
- modules |
- next |
- previous |
- Camelot documentation »
- Camelot API »
- view »

# workspace

Convenience functions and classes to present views to the user

class `camelot.view.workspace.``DesktopBackground`(gui_context, parent)

  A custom background widget for the desktop. This widget is contained by the first tab (‘Start’ tab) of the desktop workspace.

  `set_actions`(actions)

    Parameters: | actions – a list of EntityActions

class `camelot.view.workspace.``DesktopWorkspace`(*args, **kwargs)

  A tab based workspace that can be used by views to display themselves.

  In essence this is a wrapper around QTabWidget to do some initial setup and provide it with a background widget. This was originallly implemented using the QMdiArea, but the QMdiArea has too many drawbacks, like not being able to add close buttons to the tabs in a decent way.

  `background`

  The widget class to be used as the view for the uncloseable ‘Start’ tab.

  `active_view`()

    Returns: | The currently active view or None in case of the ‘Start’ tab.

  `add_view`(*args, **kwargs)

    Add a Widget implementing AbstractView to the workspace.

  `change_icon`(new_icon)

    Slot to be called when the icon of a view needs to change.

    Note: the icon of the ‘Start’ tab cannot be overwritten.

  `change_title`(new_title)

    Slot to be called when the tile of a view needs to change.

    Note: the title of the ‘Start’ tab cannot be overwritten.

  `close_all_views`()

    Remove all views, except the ‘Start’ tab, from the workspace.

  `refresh`()

    Refresh all views on the desktop

  `set_view`(view, icon=None, title='...')

    Remove the currently active view and replace it with a new view.

`camelot.view.workspace.``show_top_level`(view, parent)

  Show a widget as a top level window :param view: the widget extend AbstractView :param parent: the widget with regard to which the top level window will be placed.

### Navigation

- index
- modules |
- next |
- previous |
- Camelot documentation »
- Camelot API »
- view »

Comments
blog comments powered by Disqus