Package Camelot :: Package camelot :: Package admin :: Package application_action :: Class ApplicationActionFromGuiFunction
[frames] | no frames]

Class ApplicationActionFromGuiFunction

source code


Create an application action object from a function that is supposed to run in the GUI thread
Instance Methods
 
__init__(self, name, gui_function, icon=None, verbose_name=None)
is triggered, this function takes a its single argument a parent QObject :param icon: a camelot.view.art.Icon object :param verbose_name: the name used to display the action, if not given, the capitalized name will be used
source code
 
run(self, parent)
Execute the action, called within the gui thread
source code
 
get_icon(self)
Returns: a camelot.view.art.Icon object
source code
 
get_verbose_name(self)
Returns: the name of the action, as it can be shown to the user
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__init__(self, name, gui_function, icon=None, verbose_name=None)
(Constructor)

source code 
is triggered, this function takes a its single argument a parent QObject :param icon: a camelot.view.art.Icon object :param verbose_name: the name used to display the action, if not given, the capitalized name will be used
Parameters:
  • name - a unicode string naming this action
  • gui_function - the function that will be called when the action
Overrides: object.__init__

run(self, parent)

source code 

Execute the action, called within the gui thread

execution of the action

Parameters:
  • parent - a QWidget that can be used as a parent for widgets during the
Overrides: ApplicationAction.run
(inherited documentation)

get_icon(self)

source code 
Returns:
a camelot.view.art.Icon object
Overrides: ApplicationAction.get_icon
(inherited documentation)

get_verbose_name(self)

source code 
Returns:
the name of the action, as it can be shown to the user
Overrides: ApplicationAction.get_verbose_name
(inherited documentation)