FreeCAD C++
|
#include <Gui/Command.h>
The CommandBase class This lightweight class is the base class of all commands in FreeCAD. It represents the link between the FreeCAD command framework and the QAction world of Qt.
Public Member Functions | |
Action * | getAction () const |
Methods to get the properties of the command | |
virtual const char * | getMenuText () const |
virtual const char * | getToolTipText () const |
virtual const char * | getStatusTip () const |
virtual const char * | getWhatsThis () const |
virtual const char * | getPixmap () const |
virtual const char * | getAccel () const |
Methods to set the properties of the command | |
void | setWhatsThis (const char *) |
void | setMenuText (const char *) |
void | setToolTipText (const char *) |
void | setStatusTip (const char *) |
void | setPixmap (const char *) |
void | setAccel (const char *) |
Protected Attributes | |
Action * | _pcAction |
Attributes set by the inherited constructor. | |
They set up the most important properties of the command. In the constructor are set default values. The real values should be set in the constructor of the inheriting class. | |
const char * | sMenuText |
const char * | sToolTipText |
const char * | sWhatsThis |
const char * | sStatusTip |
const char * | sPixmap |
const char * | sAccel |
Methods to override when creating a new command | |
virtual Action * | createAction (void) |
Creates the used Action when adding to a widget. The default implementation does nothing. | |
virtual void | languageChange ()=0 |
Reassigns QAction stuff after the language has changed. | |
virtual void | updateAction (int mode)=0 |
Updates the QAction with respect to the passed mode. | |
virtual const char * | className () const =0 |
The C++ class name is needed as context for the translation framework. | |
Action* Gui::CommandBase::getAction | ( | ) | const |
Returns the Action object of this command, or 0 if it doesn't exist.