Gladeui.Command¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
|
|
|
|
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class Gladeui.Command(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- 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.
- classmethod add_signal(glade_widget, signal)¶
- Parameters:
glade_widget (
Gladeui.Widget
) – aGladeui.Widget
signal (
Gladeui.Signal
) – aGladeui.Signal
TODO: write me
- 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
- classmethod create(adaptor, parent, placeholder, project)¶
- Parameters:
adaptor (
Gladeui.WidgetAdaptor
) – AGladeui.WidgetAdaptor
parent (
Gladeui.Widget
orNone
) – the parentGladeui.Widget
to add the new widget to.placeholder (
Gladeui.Placeholder
orNone
) – the placeholder which will be substituted by the widgetproject (
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
- classmethod cut(widgets)¶
- Parameters:
widgets ([
Gladeui.Widget
]) – aGLib.List
ofGladeui.Widgets
Removes the list of widgets and adds them to the clipboard.
- classmethod delete(widgets)¶
- Parameters:
widgets ([
Gladeui.Widget
]) – aGLib.List
ofGladeui.Widgets
Performs a delete command on the list of widgets.
- classmethod dnd(widgets, parent, placeholder)¶
- Parameters:
widgets ([
Gladeui.Widget
]) – aGLib.List
ofGladeui.Widget
parent (
Gladeui.Widget
orNone
) – aGladeui.Widget
placeholder (
Gladeui.Placeholder
orNone
) – 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).
- classmethod lock_widget(widget, locked)¶
- Parameters:
widget (
Gladeui.Widget
) – AGladeui.Widget
locked (
Gladeui.Widget
) – TheGladeui.Widget
to lock
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:
widgets ([
Gladeui.Widget
]) – aGLib.List
ofGladeui.Widget
parent (
Gladeui.Widget
orNone
) – aGladeui.Widget
placeholder (
Gladeui.Placeholder
orNone
) – 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).
- 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
- classmethod set_i18n(property, translatable, context, comment)¶
- Parameters:
property (
Gladeui.Property
) – aGladeui.Property
Sets the i18n data on the property.
- classmethod set_name(glade_widget, name)¶
- Parameters:
glade_widget (
Gladeui.Widget
) –name (
str
) –
- 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.
- 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.
- 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.
- 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 formajor (
int
) – The new major version of catalog to targetminor (
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:
project (
Gladeui.Project
) – AGladeui.Project
widget (
Gladeui.Widget
) – TheGladeui.Widget
to make template
Sets widget to be the template widget in project.
- classmethod set_properties_list(project, props)¶
- Parameters:
project (
Gladeui.Project
) – aGladeui.Project
props ([
Gladeui.Property
]) – List ofGladeui.Property
- 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.
- classmethod set_property_value(property, value)¶
- Parameters:
property (
Gladeui.Property
) –value (
GObject.Value
) –
- classmethod unlock_widget(widget)¶
- Parameters:
widget (
Gladeui.Widget
) – AGladeui.Widget
Unlocks widget so that it can be removed from the project again
- collapse(other)¶
- Parameters:
other (
Gladeui.Command
) – anotherGladeui.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:
Undo the effects of self
- unifies(other)¶
- Parameters:
other (
Gladeui.Command
) – anotherGladeui.Command
- Returns:
whether they can be unified.
- Return type:
Checks whether self and other can be unified to make one single command.
- do_collapse(other) virtual¶
- Parameters:
other (
Gladeui.Command
) – anotherGladeui.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:
Executes command
- do_undo() virtual¶
- Returns:
whether the command was successfully reversed
- Return type:
Undo the effects of command
- do_unifies(other) virtual¶
- Parameters:
other (
Gladeui.Command
) – anotherGladeui.Command
- Returns:
whether they can be unified.
- Return type:
Checks whether command and other can be unified to make one single command.