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) | 
|---|
Class Details¶
- 
class Gladeui.Command(**kwargs)¶
- Bases: - GObject.Object- Abstract: - No - Structure: - Gladeui.CommandClass- 
classmethod add(widgets, parent, placeholder, project, pasting)¶
- Parameters: - widgets ([Gladeui.Widget]) – aGLib.List
- parent (Gladeui.Widget) – aGladeui.Widget
- placeholder (Gladeui.Placeholder) – aGladeui.Placeholder
- project (Gladeui.Project) – aGladeui.Project
- pasting (bool) – whether we are pasting an existing widget or creating a new one.
 - 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. 
- widgets ([
 - 
classmethod add_signal(glade_widget, signal)¶
- Parameters: - glade_widget (Gladeui.Widget) – aGladeui.Widget
- signal (Gladeui.Signal) – aGladeui.Signal
 - TODO: write me 
- glade_widget (
 - 
classmethod change_signal(glade_widget, old_signal, new_signal)¶
- Parameters: - glade_widget (Gladeui.Widget) – aGladeui.Widget
- old_signal (Gladeui.Signal) – aGladeui.Signal
- new_signal (Gladeui.Signal) – aGladeui.Signal
 - TODO: write me 
- glade_widget (
 - 
classmethod create(adaptor, parent, placeholder, project)¶
- Parameters: - adaptor (Gladeui.WidgetAdaptor) – AGladeui.WidgetAdaptor
- parent (Gladeui.WidgetorNone) – the parentGladeui.Widgetto add the new widget to.
- placeholder (Gladeui.PlaceholderorNone) – the placeholder which will be substituted by the widget
- project (Gladeui.Project) – the project his widget belongs to.
 - Returns: - the newly created widget. - Return type: - Creates a new widget using adaptor and put in place of the placeholder in the project 
- adaptor (
 - 
classmethod cut(widgets)¶
- Parameters: - widgets ([ - Gladeui.Widget]) – a- GLib.Listof- Gladeui.Widgets- Removes the list of widgets and adds them to the clipboard. 
 - 
classmethod delete(widgets)¶
- Parameters: - widgets ([ - Gladeui.Widget]) – a- GLib.Listof- Gladeui.Widgets- Performs a delete command on the list of widgets. 
 - 
classmethod dnd(widgets, parent, placeholder)¶
- Parameters: - widgets ([Gladeui.Widget]) – aGLib.ListofGladeui.Widget
- parent (Gladeui.WidgetorNone) – aGladeui.Widget
- placeholder (Gladeui.PlaceholderorNone) – aGladeui.Placeholder
 - 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). 
- widgets ([
 - 
classmethod lock_widget(widget, locked)¶
- Parameters: - widget (Gladeui.Widget) – AGladeui.Widget
- locked (Gladeui.Widget) – TheGladeui.Widgetto lock
 - Sets locked to be in a locked up state spoken for by widget, locked widgets cannot be removed from the project until unlocked. 
- widget (
 - 
classmethod paste(widgets, parent, placeholder, project)¶
- Parameters: - widgets ([Gladeui.Widget]) – aGLib.ListofGladeui.Widget
- parent (Gladeui.WidgetorNone) – aGladeui.Widget
- placeholder (Gladeui.PlaceholderorNone) – aGladeui.Placeholder
- project (Gladeui.Project) – aGladeui.Project
 - 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). 
- widgets ([
 - 
classmethod pop_group()¶
- Mark the end of a command group. 
 - 
classmethod remove_signal(glade_widget, signal)¶
- Parameters: - glade_widget (Gladeui.Widget) – aGladeui.Widget
- signal (Gladeui.Signal) – aGladeui.Signal
 - TODO: write me 
- glade_widget (
 - 
classmethod set_i18n(property, translatable, context, comment)¶
- Parameters: - property (Gladeui.Property) – aGladeui.Property
- translatable (bool) – abool
- context (str) – a #conststr*
- comment (str) – a #conststr*
 - Sets the i18n data on the property. 
- property (
 - 
classmethod set_name(glade_widget, name)¶
- Parameters: - glade_widget (Gladeui.Widget) –
- name (str) –
 
- glade_widget (
 - 
classmethod set_project_domain(project, domain)¶
- Parameters: - project (Gladeui.Project) – AGladeui.Project
- domain (str) – The translation domain for project
 - Sets domain as the translation domain for project. 
- project (
 - 
classmethod set_project_license(project, license)¶
- Parameters: - project (Gladeui.Project) – AGladeui.Project
- license (str) – License of project
 - Sets the license agreement for project. It will be saved in the xml as comment. 
- project (
 - 
classmethod set_project_resource_path(project, path)¶
- Parameters: - project (Gladeui.Project) – AGladeui.Project
- path (str) – path to load resources from.
 - Sets a resource path project. 
- project (
 - 
classmethod set_project_target(project, catalog, major, minor)¶
- Parameters: - project (Gladeui.Project) – AGladeui.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. 
- project (
 - 
classmethod set_project_template(project, widget)¶
- Parameters: - project (Gladeui.Project) – AGladeui.Project
- widget (Gladeui.Widget) – TheGladeui.Widgetto make template
 - Sets widget to be the template widget in project. 
- project (
 - 
classmethod set_properties_list(project, props)¶
- Parameters: - project (Gladeui.Project) – aGladeui.Project
- props ([Gladeui.Property]) – List ofGladeui.Property
 
- project (
 - 
classmethod set_property_enabled(property, enabled)¶
- Parameters: - property (Gladeui.Property) – An optionalGladeui.Property
- enabled (bool) – Whether the property should be enabled
 - Enables or disables property. - property must be an optional property. 
- property (
 - 
classmethod set_property_value(property, value)¶
- Parameters: - property (Gladeui.Property) –
- value (GObject.Value) –
 
- property (
 - 
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. 
 - 
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. 
 
- 
classmethod