#3706 Annotations. Simple drilling reach circle

This commit is contained in:
Bjørn Erik Jensen
2018-11-26 11:08:38 +01:00
parent 4dc5c66b03
commit 6286a8729b
9 changed files with 103 additions and 132 deletions

View File

@@ -36,6 +36,7 @@
CAF_CMD_SOURCE_INIT(RicNewAnnotationFeature, "RicNewAnnotationFeature");
CAF_CMD_SOURCE_INIT(RicNewTextAnnotationFeature, "RicNewTextAnnotationFeature");
CAF_CMD_SOURCE_INIT(RicNewReachCircleAnnotationFeature, "RicNewReachCircleAnnotationFeature");
CAF_CMD_SOURCE_INIT(RicNewPolylineAnnotationFeature, "RicNewPolygonAnnotationFeature");
@@ -99,6 +100,30 @@ void RicNewTextAnnotationFeature::setupActionLook(QAction* actionToSetup)
actionToSetup->setText("New Text Annotation");
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicNewReachCircleAnnotationFeature::onActionTriggered(bool isChecked)
{
auto coll = annotationCollection();
if (coll)
{
auto newAnnotation = new RimReachCircleAnnotation();
coll->addAnnotation(newAnnotation);
coll->updateConnectedEditors();
RiuMainWindow::instance()->selectAsCurrentItem(newAnnotation);
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicNewReachCircleAnnotationFeature::setupActionLook(QAction* actionToSetup)
{
actionToSetup->setIcon(QIcon(":/Plus.png"));
actionToSetup->setText("New Reach Circle Annotation");
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------