Gladeui.Command

g GObject.Object GObject.Object Gladeui.Command Gladeui.Command GObject.Object->Gladeui.Command

Subclasses:None

Methods

Inherited:GObject.Object (37)
Structs:GObject.ObjectClass (5)
class add (widgets, parent, placeholder, project, pasting)
class add_signal (glade_widget, signal)
class change_signal (glade_widget, old_signal, new_signal)
class create (adaptor, parent, placeholder, project)
class cut (widgets)
class delete (widgets)
class dnd (widgets, parent, placeholder)
class get_group_depth ()
class lock_widget (widget, locked)
class paste (widgets, parent, placeholder, project)
class pop_group ()
class remove_signal (glade_widget, signal)
class set_i18n (property, translatable, context, comment)
class set_name (glade_widget, name)
class set_project_domain (project, domain)
class set_project_license (project, license)
class set_project_resource_path (project, path)
class set_project_target (project, catalog, major, minor)
class set_project_template (project, widget)
class set_properties_list (project, props)
class set_property_enabled (property, enabled)
class set_property_value (property, value)
class unlock_widget (widget)
  collapse (other)
  description ()
  execute ()
  group_id ()
  undo ()
  unifies (other)

Virtual Methods

Inherited:GObject.Object (7)
  do_collapse (other)
  do_execute ()
  do_undo ()
  do_unifies (other)

Properties

None

Signals

Inherited:GObject.Object (1)

Fields

Inherited:GObject.Object (1)
Name Type Access Description
parent_instance GObject.Object r  

Class Details

class Gladeui.Command(**kwargs)
Bases:GObject.Object
Abstract:No
Structure:Gladeui.CommandClass
classmethod add(widgets, parent, placeholder, project, pasting)
Parameters:

Performs an add command on all widgets in widgets to parent, possibly replacing placeholder (note toplevels don’t need a parent; the active project will be used when pasting toplevel objects). Pasted widgets will persist packing properties from their cut/copy source while newly added widgets will prefer packing defaults.

classmethod add_signal(glade_widget, signal)
Parameters:

TODO: write me

classmethod change_signal(glade_widget, old_signal, new_signal)
Parameters:

TODO: write me

classmethod create(adaptor, parent, placeholder, project)
Parameters:
Returns:

the newly created widget.

Return type:

Gladeui.Widget

Creates a new widget using adaptor and put in place of the placeholder in the project

classmethod cut(widgets)
Parameters:widgets ([Gladeui.Widget]) – a GLib.List of Gladeui.Widgets

Removes the list of widgets and adds them to the clipboard.

classmethod delete(widgets)
Parameters:widgets ([Gladeui.Widget]) – a GLib.List of Gladeui.Widgets

Performs a delete command on the list of widgets.

classmethod dnd(widgets, parent, placeholder)
Parameters:

Performs a drag-n-drop command, i.e. removes the list of widgets and adds them to the new parent, possibly replacing placeholder (note toplevels dont need a parent; the active project will be used when pasting toplevel objects).

classmethod get_group_depth()
Return type:int
classmethod lock_widget(widget, locked)
Parameters:

Sets locked to be in a locked up state spoken for by widget, locked widgets cannot be removed from the project until unlocked.

classmethod paste(widgets, parent, placeholder, project)
Parameters:

Performs a paste command on all widgets in widgets to parent, possibly replacing placeholder (note toplevels dont need a parent; the active project will be used when pasting toplevel objects).

classmethod pop_group()

Mark the end of a command group.

classmethod remove_signal(glade_widget, signal)
Parameters:

TODO: write me

classmethod set_i18n(property, translatable, context, comment)
Parameters:

Sets the i18n data on the property.

classmethod set_name(glade_widget, name)
Parameters:
classmethod set_project_domain(project, domain)
Parameters:

Sets domain as the translation domain for project.

classmethod set_project_license(project, license)
Parameters:

Sets the license agreement for project. It will be saved in the xml as comment.

classmethod set_project_resource_path(project, path)
Parameters:

Sets a resource path project.

classmethod set_project_target(project, catalog, major, minor)
Parameters:
  • project (Gladeui.Project) – A Gladeui.Project
  • catalog (str) – The name of the catalog to set the project’s target for
  • major (int) – The new major version of catalog to target
  • minor (int) – The new minor version of catalog to target

Sets the target of catalog to major.`minor` in project.

classmethod set_project_template(project, widget)
Parameters:

Sets widget to be the template widget in project.

classmethod set_properties_list(project, props)
Parameters:
classmethod set_property_enabled(property, enabled)
Parameters:

Enables or disables property.

property must be an optional property.

classmethod set_property_value(property, value)
Parameters:
classmethod unlock_widget(widget)
Parameters:widget (Gladeui.Widget) – A Gladeui.Widget

Unlocks widget so that it can be removed from the project again

collapse(other)
Parameters:other (Gladeui.Command) – another Gladeui.Command

Merges other into self, so that self now covers both commands and other can be dispensed with.

description()
Return type:str
execute()
Returns:whether the command was successfully executed
Return type:bool

Executes self

group_id()
Return type:int
undo()
Returns:whether the command was successfully reversed
Return type:bool

Undo the effects of self

unifies(other)
Parameters:other (Gladeui.Command) – another Gladeui.Command
Returns:whether they can be unified.
Return type:bool

Checks whether self and other can be unified to make one single command.

do_collapse(other) virtual
Parameters:other (Gladeui.Command) – another Gladeui.Command

Merges other into command, so that command now covers both commands and other can be dispensed with.

do_execute() virtual
Returns:whether the command was successfully executed
Return type:bool

Executes command

do_undo() virtual
Returns:whether the command was successfully reversed
Return type:bool

Undo the effects of command

do_unifies(other) virtual
Parameters:other (Gladeui.Command) – another Gladeui.Command
Returns:whether they can be unified.
Return type:bool

Checks whether command and other can be unified to make one single command.