v_sim.UiPanel

g Atk.ImplementorIface Atk.ImplementorIface Gtk.Widget Gtk.Widget Atk.ImplementorIface->Gtk.Widget GObject.GInterface GObject.GInterface GObject.GInterface->Atk.ImplementorIface Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.Bin Gtk.Bin Gtk.Frame Gtk.Frame Gtk.Bin->Gtk.Frame Gtk.Buildable->Gtk.Widget Gtk.Container Gtk.Container Gtk.Container->Gtk.Bin v_sim.UiPanel v_sim.UiPanel Gtk.Frame->v_sim.UiPanel Gtk.Widget->Gtk.Container

Subclasses:

None

Methods

Inherited:

Gtk.Frame (9), Gtk.Bin (1), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10)

Structs:

v_sim.UiPanelClass (8), Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)

class

axes_init (main)

class

axes_setAxesExtension (axes)

class

axes_setBoxExtension (box, legend)

class

axes_setScaleExtension (scale)

class

config_getArea ()

class

elements_getStatic ()

class

getAllPanels ()

class

getAllWindows ()

class

getCommandPanel ()

class

getDockById (id)

class

getHeaderVisibility ()

class

getPanelById (id)

class

new (id, name, tabName)

class

newWithIconFromIconName (id, name, tabName, icon)

class

newWithIconFromPath (id, name, tabName, iconPath)

class

planes_getList ()

class

setCurrent (dataObj, view)

class

setHeaderVisibility (status)

class

surfaces_addSurface (surf, root)

class

surfaces_addSurfaces (surfs, name)

class

surfaces_editProperties (iter)

class

surfaces_exportXMLFile (filename)

class

surfaces_fieldsAt (model, iter)

class

surfaces_generateValues (nbValues, values, name, minVal, maxVal)

class

surfaces_getFields ()

class

surfaces_loadFile (file_name, table, meth)

class

surfaces_parseXMLFile (filename)

class

surfaces_showAll (show)

attach (dock)

detach ()

getContainer ()

getContainerId ()

getContainerWindow ()

getData ()

getFocused ()

getHeaderWidget ()

getId ()

getLabel ()

getView ()

getVisible ()

setContainer (window)

setContainerId (id)

setDockable (value)

Virtual Methods

Inherited:

Gtk.Frame (1), Gtk.Container (10), Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10)

Properties

Inherited:

Gtk.Frame (5), Gtk.Container (3), Gtk.Widget (39)

Style Properties

Inherited:

Gtk.Widget (17)

Signals

Inherited:

Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)

Name

Short Description

page-entered

This signal is emitted when a page of the Gtk.Notebook with all the V_Sim panels is entered.

Fields

Inherited:

Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)

Class Details

class v_sim.UiPanel(**kwargs)
Bases:

Gtk.Frame

Abstract:

No

Structure:

v_sim.UiPanelClass

Short form for a #VisuUiPanel_struct structure.

classmethod axes_init(main)
Parameters:

main (v_sim.UiMain) – a v_sim.UiMain object.

Returns:

the v_sim.UiPanel object dealing with axes.

Return type:

v_sim.UiPanel

This routine will create the v_sim.UiPanel where the axes and the label stuffs can be tuned, such as their colour, create scales…

classmethod axes_setAxesExtension(axes)
Parameters:

axes (v_sim.GlExtAxes or None) – a v_sim.GlExtAxes object.

Set the current axes extension handled by this v_sim.UiPanel.

New in version 3.7.

classmethod axes_setBoxExtension(box, legend)
Parameters:

Set the current box extension handled by this v_sim.UiPanel.

New in version 3.8.

classmethod axes_setScaleExtension(scale)
Parameters:

scale (v_sim.GlExtScale or None) – a v_sim.GlExtScale object.

Set the current scale extension handled by this v_sim.UiPanel.

New in version 3.8.

classmethod config_getArea()
Returns:

a Gtk.Box containing elements of the configure panel.

Return type:

Gtk.Widget

This routine can be used to extend the configure panel from plug-ins.

New in version 3.7.

classmethod elements_getStatic()
Returns:

a v_sim.UiPanel object.

Return type:

Gtk.Widget

Creates and retrieves the v_sim.UiPanel used to handle v_sim.Element.

New in version 3.8.

classmethod getAllPanels()
Returns:

a newly created list (use g_list_free() on it after use).

Return type:

[v_sim.UiPanel]

This routine can be used to know all existing v_sim.UiPanel.

classmethod getAllWindows()
Returns:

a newly created list (use g_list_free() on it after use).

Return type:

[v_sim.UiDockWindow]

This routine can be used to know all existing v_sim.UiDockWindow.

classmethod getCommandPanel()
Returns:

the v_sim.UiDockWindow that is inside the command panel.

Return type:

v_sim.UiDockWindow

There is always a v_sim.UiDockWindow that is inside the command panel. This routine gets it.

classmethod getDockById(id)
Parameters:

id (str) – a v_sim.UiDockWindow identifier.

Returns:

the v_sim.UiDockWindow that corresponds to this identifier. The dock window is built if not currently exist.

Return type:

v_sim.UiDockWindow

This routine associates a v_sim.UiDockWindow identifier to the object pointer.

classmethod getHeaderVisibility()
Returns:

True if the header uses text and label.

Return type:

bool

The header can be represented using the full image and label always or only the image when the tab is not on top.

New in version 3.8.

classmethod getPanelById(id)
Parameters:

id (str) – a v_sim.UiPanel identifier.

Returns:

the v_sim.UiPanel that corresponds to this identifier or None if none exists.

Return type:

v_sim.UiPanel

This routine associates a v_sim.UiPanel identifier to the object pointer.

classmethod new(id, name, tabName)
Parameters:
  • id (str) – a string without space and non internationalised ;

  • name (str) – a string in UTF-8 that can be internationalised ;

  • tabName (str) – a shorter name than name, in UTF-8 that can be internationalised.

Returns:

a newly created widget.

Return type:

Gtk.Widget

Create a new v_sim.UiPanel with the given id, displaying name in the combo box of a v_sim.UiDockWindow and tabName in the tab of the page notebook.

classmethod newWithIconFromIconName(id, name, tabName, icon)
Parameters:
  • id (str) – a string without space and non internationalised ;

  • name (str) – a string in UTF-8 that can be internationalised ;

  • tabName (str) – a shorter name than name, in UTF-8 that can be internationalised ;

  • icon (str) – the name of a stock icon.

Returns:

a newly created widget.

Return type:

Gtk.Widget

Create a new v_sim.UiPanel with the given id, displaying name in the combo box of a v_sim.UiDockWindow and tabName in the tab of the page notebook. The displayed icon will be taken from the stock.

classmethod newWithIconFromPath(id, name, tabName, iconPath)
Parameters:
  • id (str) – a string without space and non internationalised ;

  • name (str) – a string in UTF-8 that can be internationalised ;

  • tabName (str) – a shorter name than name, in UTF-8 that can be internationalised ;

  • iconPath (str) – a path to an icon (should be 20x20).

Returns:

a newly created widget.

Return type:

Gtk.Widget

Create a new v_sim.UiPanel with the given id, displaying name in the combo box of a v_sim.UiDockWindow and tabName in the tab of the page notebook. The displayed icon will be read from the iconPath.

classmethod planes_getList()
Returns:

the Gtk.ListStore used by this panel to store its planes. It should be considered read-only.

Return type:

Gtk.ListStore

This method gives read access to the Gtk.ListStore used to store the planes.

classmethod setCurrent(dataObj, view)
Parameters:

Set the currently focussed v_sim.Data. It then can be retrieve using v_sim.UiPanel.getData().

New in version 3.7.

classmethod setHeaderVisibility(status)
Parameters:

status (bool) – a boolean.

The header can be represented using the full image and label always or only the image when the tab is not on top.

classmethod surfaces_addSurface(surf, root)
Parameters:
Returns:

a location to store the iter.

Return type:

iter: Gtk.TreeIter

This routine can be used to add a v_sim.Surface to the tree view. iter is then populated with the row it has been inserted to.

New in version 3.7.

classmethod surfaces_addSurfaces(surfs, name)
Parameters:
Returns:

a location to store the iter.

Return type:

iter: Gtk.TreeIter

This routine can be used to add a v_sim.Surface to the tree view. iter is then populated with the row it has been inserted to.

New in version 3.7.

classmethod surfaces_editProperties(iter)
Parameters:

iter (Gtk.TreeIter) – the currently selected row iter (or None).

Opens a new window allowing to edit surface properties.

classmethod surfaces_exportXMLFile(filename)
Parameters:

filename (str) – a filename to export to.

Raises:

GLib.Error

Returns:

True if everything goes right.

Return type:

bool

Export to filename the list of isosurfaces values of the selected scalar-field file.

New in version 3.7.

classmethod surfaces_fieldsAt(model, iter)
Parameters:
Returns:

a v_sim.ScalarField object.

Return type:

v_sim.ScalarField

Retrieves the v_sim.ScalarField object stored at iter, if any.

New in version 3.8.

classmethod surfaces_generateValues(nbValues, values, name, minVal, maxVal)
Parameters:
  • nbValues (int) – a location of an integer to store the number of generated values ;

  • values (float) – a pointer on a float array. The target of this pointer must be None and it will be allocated after a call to this method. Use GLib.free() after use to free it.

  • name (str) – a pointer to store a name. The target of this pointer must be None on enter. It is associated only if a name is given.

  • minVal (float) – the minimum value for the range ;

  • maxVal (float) – the maximum value for the range.

Returns:

the dialog widget.

Return type:

Gtk.Widget

This method opens a little dialog window that is made to help the user enter a list of values for creation of iso-surfaces. These values are generated between minVal and maxVal.

classmethod surfaces_getFields()
Returns:

the Gtk.ListStore used by this panel to store its scalar fields. It should be considered read-only.

Return type:

Gtk.ListStore

This method gives read access to the Gtk.ListStore used to store the scalar field files.

classmethod surfaces_loadFile(file_name, table, meth)
Parameters:
Returns:

True in case of success.

iter:

a location to store the Gtk.TreeIter that will be set.

Return type:

(bool, iter: Gtk.TreeIter)

Tries to load the given file_name and if it succeeds, adds loaded surfaces to the isosurfaces panel. If file_name is a v_sim.ScalarField then, meth is used to load it. If fitToBox is not None, the load surfaces or scalar fields are fit to it.

classmethod surfaces_parseXMLFile(filename)
Parameters:

filename (str) – a location to read the XML data.

Raises:

GLib.Error

Returns:

True on success.

Return type:

bool

This routine reads an XML file and setup the resources and the isovalues to the selected row accordingly.

classmethod surfaces_showAll(show)
Parameters:

show (bool) – True to show all surfaces, False to hide them.

Returns:

True if surface list should be rebuild and redraw.

Return type:

bool

Shows or hides all surfaces and check their “draw” status in the panel accordingly.

attach(dock)
Parameters:

dock (v_sim.UiDockWindow) – a v_sim.UiDockWindow.

Put the given self in the given dock window. It adds in this dock window a new page in the Gtk.Notebook using as tab header the widget returned by v_sim.UiPanel.getHeaderWidget().

detach()

Remove the given self from its current container and add it to the list of hidden tool panels. It can be added again using the pop-up menu of any v_sim.UiDockWindow.

getContainer()
Returns:

a v_sim.UiDockWindow object.

Return type:

v_sim.UiDockWindow

Return the v_sim.UiDockWindow that the given self is attached to or None if the self is currently dettached.

getContainerId()
Returns:

a string owned by V_Sim.

Return type:

str

Return the identifying string of the v_sim.UiDockWindow that the given self is attached to or None if the self is currently dettached.

getContainerWindow()
Returns:

a Gtk.Window object.

Return type:

Gtk.Window

Return the Gtk.Window that the given self is rendered in or None if the self is currently dettached.

getData()
Returns:

the currently focused v_sim.Data (can be None if none).

Return type:

v_sim.Data

The self is supposed to work on a v_sim.Data, this routine can be used to get it.

getFocused()
Returns:

the currently focused v_sim.Boxed (can be None if none).

Return type:

v_sim.Boxed or None

Retrieves the currently focused v_sim.Boxed object in the default v_sim.UiRenderingWindow.

New in version 3.7.

getHeaderWidget()
Returns:

a container widget that should be put in the tab of a Gtk.Notebook.

Return type:

Gtk.Widget

The v_sim.UiPanel should be used in a page of a Gtk.Notebook. This routine is used to get the widget that should be used in the tab. This widget is a container with an icon and a label.

getId()
Returns:

a constant string identifying this v_sim.UiPanel.

Return type:

str

The v_sim.UiPanel can be identifyed by an id (a string without space, usually using ASCII characters only).

getLabel()
Returns:

an UTF-8 internationalised name (property of V_Sim, should not be freed).

Return type:

str

The v_sim.UiPanel has two label, a short one, used in the tab of a Gtk.Notebook and one longer. This routine gets the longer.

getView()
Returns:

the current v_sim.GlView, or None.

Return type:

v_sim.GlView

Convenient routine to get the current v_sim.GlView, see v_sim.UiPanelClass.setCurrent().

New in version 3.7.

getVisible()
Returns:

True if the given self is potentialy visible to the user.

Return type:

bool

This is used to retrieve if the self is currently realised and the visualised page of the Gtk.Notebook it is associated to.

setContainer(window)
Parameters:

window (v_sim.UiDockWindow) – a v_sim.UiDockWindow.

Change the container of a visu_ui_panel. If it is currently attached to a v_sim.UiDockWindow, it firstly detachs it.

setContainerId(id)
Parameters:

id (str) – a v_sim.UiDockWindow identifier.

Change the container of a visu_ui_panel using the given id. If it is currently attached to a v_sim.UiDockWindow, it firstly detachs it.

setDockable(value)
Parameters:

value (bool) – a boolean.

A v_sim.UiPanel can be moved between different v_sim.UiDockWindow or not. This ability is controlled by the dockable flag. Change it with this method. If self is set dockable, then, it can be hidden or moved to another or a new v_sim.UiDockWindow with the pop-up memu that is triggered by a small button in the header widget (see v_sim.UiPanel.getHeaderWidget()).

Signal Details

v_sim.UiPanel.signals.page_entered(ui_panel)
Signal Name:

page-entered

Flags:

RUN_FIRST, ACTION

Parameters:

ui_panel (v_sim.UiPanel) – The object which received the signal

This signal is emitted when a page of the Gtk.Notebook with all the V_Sim panels is entered.

New in version 3.3.