// Part of the Architektonas Project
// Originally part of QCad Community Edition by Andrew Mustun
// Extensively rewritten and refactored by James L. Hammons
-// (C) 2010 Underground Software
+// Portions copyright (C) 2001-2003 RibbonSoft
+// Copyright (C) 2010 Underground Software
+// See the README and GPLv2 files for licensing and warranty information
//
// JLH = James L. Hammons <jlhamm@acm.org>
//
#include "actioninfototallength.h"
-#include "rs_dialogfactory.h"
+#include "debug.h"
+#include "dialogfactory.h"
-ActionInfoTotalLength::ActionInfoTotalLength(RS_EntityContainer & container, GraphicView & graphicView): ActionInterface("Info Total Length",
+ActionInfoTotalLength::ActionInfoTotalLength(EntityContainer & container, GraphicView & graphicView): ActionInterface("Info Total Length",
container, graphicView)
{
}
void ActionInfoTotalLength::trigger()
{
- RS_DEBUG->print("ActionInfoTotalLength::trigger()");
+ DEBUG->print("ActionInfoTotalLength::trigger()");
double len = 0.0;
- for(RS_Entity * e=container->firstEntity(RS2::ResolveNone); e!=NULL;
+ for(Entity * e=container->firstEntity(RS2::ResolveNone); e!=NULL;
e=container->nextEntity(RS2::ResolveNone))
{
if (e->isVisible() && e->isSelected())
}
if (len > 0.0)
- RS_DIALOGFACTORY->commandMessage(
+ DIALOGFACTORY->commandMessage(
tr("Total Length of selected entities: %1").arg(len));
else
- RS_DIALOGFACTORY->commandMessage(tr("At least one of the selected "
+ DIALOGFACTORY->commandMessage(tr("At least one of the selected "
"entities cannot be measured."));
finish();
void ActionInfoTotalLength::updateToolBar()
{
- if (RS_DIALOGFACTORY != NULL)
+ if (DIALOGFACTORY != NULL)
{
if (!isFinished())
- RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarInfo);
+ DIALOGFACTORY->requestToolBar(RS2::ToolBarInfo);
else
- RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
+ DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
}
}