-// rs_actioninfototallength.cpp
+// actioninfototallength.cpp
//
// Part of the Architektonas Project
// Originally part of QCad Community Edition by Andrew Mustun
// JLH 06/04/2010 Added this text. :-)
//
-#include "rs_actioninfototallength.h"
+#include "actioninfototallength.h"
#include "rs_dialogfactory.h"
-RS_ActionInfoTotalLength::RS_ActionInfoTotalLength(RS_EntityContainer & container, GraphicView & graphicView): RS_ActionInterface("Info Total Length",
+ActionInfoTotalLength::ActionInfoTotalLength(RS_EntityContainer & container, GraphicView & graphicView): ActionInterface("Info Total Length",
container, graphicView)
{
}
-RS_ActionInfoTotalLength::~RS_ActionInfoTotalLength()
+ActionInfoTotalLength::~ActionInfoTotalLength()
{
}
-void RS_ActionInfoTotalLength::init(int status)
+void ActionInfoTotalLength::init(int status)
{
- RS_ActionInterface::init(status);
+ ActionInterface::init(status);
trigger();
}
-void RS_ActionInfoTotalLength::trigger()
+void ActionInfoTotalLength::trigger()
{
- RS_DEBUG->print("RS_ActionInfoTotalLength::trigger()");
+ RS_DEBUG->print("ActionInfoTotalLength::trigger()");
double len = 0.0;
- for (RS_Entity * e = container->firstEntity(RS2::ResolveNone);
- e != NULL;
- e = container->nextEntity(RS2::ResolveNone))
-
+ for(RS_Entity * e=container->firstEntity(RS2::ResolveNone); e!=NULL;
+ e=container->nextEntity(RS2::ResolveNone))
+ {
if (e->isVisible() && e->isSelected())
{
double l = e->getLength();
else
len += l;
}
+ }
if (len > 0.0)
RS_DIALOGFACTORY->commandMessage(
finish();
}
-void RS_ActionInfoTotalLength::updateToolBar()
+void ActionInfoTotalLength::updateToolBar()
{
if (RS_DIALOGFACTORY != NULL)
{
RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
}
}
-
-// EOF