*/
ActionHandler::ActionHandler(QG_MainWindowInterface * mw)
{
- RS_DEBUG->print("ActionHandler::ActionHandler");
+ DEBUG->print("ActionHandler::ActionHandler");
mainWindow = mw;
snapFree = NULL;
restrictVertical = NULL;
lockRelativeZero = NULL;
- RS_DEBUG->print("ActionHandler::ActionHandler: OK");
+ DEBUG->print("ActionHandler::ActionHandler: OK");
}
/**
*/
ActionHandler::~ActionHandler()
{
- RS_DEBUG->print("ActionHandler::~ActionHandler");
- RS_DEBUG->print("ActionHandler::~ActionHandler: OK");
+ DEBUG->print("ActionHandler::~ActionHandler");
+ DEBUG->print("ActionHandler::~ActionHandler: OK");
}
/**
ActionInterface * ActionHandler::setCurrentAction(ActionInterface * action)
{
GraphicView * gv = mainWindow->getGraphicView();
- RS_Document * doc = mainWindow->getDocument();
+ Document * doc = mainWindow->getDocument();
// only global options are allowed without a document:
if (gv == NULL || doc == NULL)
*/
ActionInterface * ActionHandler::setCurrentAction(RS2::ActionType id)
{
- RS_DEBUG->print("ActionHandler::setCurrentAction()");
+ DEBUG->print("ActionHandler::setCurrentAction()");
GraphicView * gv = mainWindow->getGraphicView();
- RS_Document * doc = mainWindow->getDocument();
+ Document * doc = mainWindow->getDocument();
ActionInterface * a = NULL;
// only global options are allowed without a document:
if (gv == NULL || doc == NULL)
{
- RS_DEBUG->print(RS_Debug::D_WARNING,
+ DEBUG->print(Debug::D_WARNING,
"ActionHandler::setCurrentAction: graphic view or document is NULL");
return NULL;
}
#endif
default:
- RS_DEBUG->print(RS_Debug::D_WARNING,
+ DEBUG->print(Debug::D_WARNING,
"ActionHandler::setCurrentAction(): No such action found.");
break;
}
if (a)
gv->setCurrentAction(a);
- RS_DEBUG->print("ActionHandler::setCurrentAction(): OK");
+ DEBUG->print("ActionHandler::setCurrentAction(): OK");
return a;
}
// it might be intended to launch a new keycode
//if (!e.isAccepted()) {
// keycode for new action:
- RS2::ActionType type = RS_COMMANDS->keycodeToAction(code);
+ RS2::ActionType type = COMMANDS->keycodeToAction(code);
if (type != RS2::ActionNone)
{
// some actions require special handling (GUI update):
*/
bool ActionHandler::command(const QString & cmd)
{
- RS_DEBUG->print("ActionHandler::command: %s", cmd.toLatin1().data());
+ DEBUG->print("ActionHandler::command: %s", cmd.toLatin1().data());
QString c = cmd.toLower();
if (c == "\n")
if (gv)
gv->back();
- RS_DEBUG->print("ActionHandler::command: back");
+ DEBUG->print("ActionHandler::command: back");
return true;
}
// pass command on to running action:
- RS_CommandEvent e(cmd);
+ CommandEvent e(cmd);
GraphicView * gv = mainWindow->getGraphicView();
if (gv)
{
- RS_DEBUG->print("ActionHandler::command: trigger command event in graphic view");
+ DEBUG->print("ActionHandler::command: trigger command event in graphic view");
gv->commandEvent(&e);
}
// it might be intended to launch a new command
if (!e.isAccepted())
{
- RS_DEBUG->print("ActionHandler::command: convert cmd to action type");
+ DEBUG->print("ActionHandler::command: convert cmd to action type");
// command for new action:
- RS2::ActionType type = RS_COMMANDS->cmdToAction(cmd);
+ RS2::ActionType type = COMMANDS->cmdToAction(cmd);
if (type != RS2::ActionNone)
{
- RS_DEBUG->print("ActionHandler::command: setting current action");
+ DEBUG->print("ActionHandler::command: setting current action");
setCurrentAction(type);
- RS_DEBUG->print("ActionHandler::command: current action set");
+ DEBUG->print("ActionHandler::command: current action set");
return true;
}
}
- RS_DEBUG->print("ActionHandler::command: current action not set");
+ DEBUG->print("ActionHandler::command: current action not set");
return false;
}