workspace

Convenience functions and classes to present views to the user

class camelot.view.workspace.DesktopBackground(gui_context, parent)[source]

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

set_actions(actions)[source]
Parameters:actions – a list of EntityActions
class camelot.view.workspace.DesktopWorkspace(app_admin, parent)[source]

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()[source]
Returns:The currently active view or None in case of the ‘Start’ tab.
add_view(view, icon=None, title='...')[source]

Add a Widget implementing AbstractView to the workspace.

change_icon(new_icon)[source]

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)[source]

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()[source]

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

refresh()[source]

Refresh all views on the desktop

set_view(view, icon=None, title='...')[source]

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

camelot.view.workspace.show_top_level(view, parent)[source]

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.

Previous topic

utils

Next topic

Advanced Topics

This Page