v_sim.Option

Fields

None

Methods

class

new (name, label, g_type)

copy ()

free ()

getLabel ()

getName ()

getType ()

getValue ()

getValueAndLabel ()

Details

class v_sim.Option

An opaque structure to store values. It is equivalent to GObject.Value but with a name and a label.

classmethod new(name, label, g_type)
Parameters:
  • name (str) – a string identifying the option ;

  • label (str) – a string describing shortly the option (must be in UTF-8).

  • g_type (GObject.GType) – the type of option to create.

Returns:

a newly created option, use v_sim.Option.free() to free it.

Return type:

v_sim.Option

Create a new #Option using the name as identifier.

copy()
Returns:

a newly created option, use v_sim.Option.free() to free it.

Return type:

v_sim.Option

Create a new v_sim.Option using the values from option self.

free()

Free the memory used by the data.

getLabel()
Returns:

a string owned by V_Sim, should not be freed.

Return type:

str

Get the label of the option.

getName()
Returns:

a string owned by V_Sim, should not be freed.

Return type:

str

Get the name of the option.

getType()
Returns:

a #OptionTypes value.

Return type:

GObject.GType

Get the type of the option.

getValue()
Returns:

the GObject.Value storing the option value.

Return type:

GObject.Value

Get the location of the storage for the option.

getValueAndLabel()
Returns:

a newly created markup string.

Return type:

str

This method returns a string with the value followed by the label in parenthesis and with Pango markup for smaller font.