]> Shamusworld >> Repos - architektonas/blobdiff - src/applicationwindow.cpp
Added action for adding circles to the drawing.
[architektonas] / src / applicationwindow.cpp
index 23374171066c7ac90c2aa9f4d5e87ca641b777cf..8e7891c613ed8e7691fde9e30d905358f5a1040f 100644 (file)
@@ -5,7 +5,7 @@
 // (C) 2011 Underground Software
 // See the README and GPLv3 files for licensing and warranty information
 //
-// JLH = James L. Hammons <jlhamm@acm.org>
+// JLH = James Hammons <jlhamm@acm.org>
 //
 // Who  When        What
 // ---  ----------  -------------------------------------------------------------
@@ -112,6 +112,15 @@ void ApplicationWindow::AddLineTool(void)
        drawing->SetAddLineToolActive(addLineAct->isChecked());
 }
 
+void ApplicationWindow::AddCircleTool(void)
+{
+       addLineAct->setChecked(false);
+       addArcAct->setChecked(false);
+       rotateAct->setChecked(false);
+       RotateTool();
+       drawing->SetAddCircleToolActive(addCircleAct->isChecked());
+}
+
 void ApplicationWindow::ZoomInTool(void)
 {
        double zoomFactor = 2.0;
@@ -217,6 +226,7 @@ void ApplicationWindow::CreateActions(void)
        connect(addLineAct, SIGNAL(triggered()), this, SLOT(AddLineTool()));
 
        addCircleAct = CreateAction(tr("Add &Circle"), tr("Add Circle"), tr("Adds circles to the drawing."), QIcon(":/res/generic-tool.png"), QKeySequence("A,C"), true);
+       connect(addCircleAct, SIGNAL(triggered()), this, SLOT(AddCircleTool()));
 
        addArcAct = CreateAction(tr("Add &Arc"), tr("Add Arc"), tr("Adds arcs to the drawing."), QIcon(":/res/generic-tool.png"), QKeySequence("A,A"), true);