Gui::MacroCommand Class Reference

The script command class This is a special type of command class. More...

#include <Command.h>

Inheritance diagram for Gui::MacroCommand:
Gui::Command Gui::CommandBase

List of all members.

Public Member Functions

const char * className () const
 The C++ class name is needed as context for the translation framework.
const char * getScriptName () const
 Returns the script name.
void languageChange ()
 Ignore when language has changed.
 MacroCommand (const char *name)
virtual ~MacroCommand ()
Methods to set the properties of the Script Command



void setScriptName (const char *)
 Sets the script name.

Static Public Member Functions

Methods to load and save macro commands.



static void load ()
 Loads all macros command from the preferences.
static void save ()
 Saves all macros command to the preferences.

Protected Member Functions

methods reimplemented for Command Framework



void activated (int iMsg)
 Method which get called when activated.
ActioncreateAction (void)
 Creates the used Action.

Protected Attributes

const char * sScriptName

Detailed Description

The script command class This is a special type of command class.

Its used to bind a macro or Python script to the FreeCAD command framework. An object of this class gets a string to the place where the script is in the file system. Unlike the other commands the resources can be set by several methods.

See also:
Command
CommandManager
Author:
Werner Mayer

Definition at line 362 of file Command.h.


Constructor & Destructor Documentation

MacroCommand::MacroCommand ( const char *  name  ) 

Definition at line 598 of file Gui/Command.cpp.

Referenced by load().

virtual Gui::MacroCommand::~MacroCommand (  )  [inline, virtual]

Definition at line 366 of file Command.h.


Member Function Documentation

void MacroCommand::activated ( int  iMsg  )  [protected, virtual]
const char* Gui::MacroCommand::className (  )  const [inline, virtual]

The C++ class name is needed as context for the translation framework.

Implements Gui::CommandBase.

Definition at line 382 of file Command.h.

Action * MacroCommand::createAction ( void   )  [protected, virtual]
const char* Gui::MacroCommand::getScriptName (  )  const [inline]

Returns the script name.

Definition at line 379 of file Command.h.

References sScriptName.

Referenced by Gui::Dialog::DlgCustomActionsImp::on_actionListWidget_itemActivated(), and save().

void Gui::MacroCommand::languageChange (  )  [inline, virtual]

Ignore when language has changed.

Reimplemented from Gui::Command.

Definition at line 381 of file Command.h.

void MacroCommand::load (  )  [static]
void MacroCommand::save ( void   )  [static]
void MacroCommand::setScriptName ( const char *  s  ) 

Member Data Documentation

const char* Gui::MacroCommand::sScriptName [protected]

Definition at line 400 of file Command.h.

Referenced by activated(), getScriptName(), and setScriptName().


The documentation for this class was generated from the following files:

Generated on Wed Nov 23 19:02:00 2011 for FreeCAD by  doxygen 1.6.1