changeset 1409:07fac4fdbe07

Removed dead code (RtViewer is not supposed to demonstrate measuring tools in a simple example)
author Benjamin Golinvaux <bgo@osimis.io>
date Mon, 04 May 2020 13:18:06 +0200
parents 875c9a28236e
children 08fd094f9582
files Samples/Common/RtViewerApp.cpp Samples/Common/RtViewerApp.h
diffstat 2 files changed, 1 insertions(+), 44 deletions(-) [+]
line wrap: on
line diff
--- a/Samples/Common/RtViewerApp.cpp	Mon May 04 13:17:31 2020 +0200
+++ b/Samples/Common/RtViewerApp.cpp	Mon May 04 13:18:06 2020 +0200
@@ -60,33 +60,6 @@
 
 namespace OrthancStone
 {
-  const char* RtViewerGuiToolToString(size_t i)
-  {
-    static const char* descs[] = {
-      "RtViewerGuiTool_Rotate",
-      "RtViewerGuiTool_Pan",
-      "RtViewerGuiTool_Zoom",
-      "RtViewerGuiTool_LineMeasure",
-      "RtViewerGuiTool_CircleMeasure",
-      "RtViewerGuiTool_AngleMeasure",
-      "RtViewerGuiTool_EllipseMeasure",
-      "RtViewerGuiTool_LAST"
-    };
-    if (i >= RtViewerGuiTool_LAST)
-    {
-      throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError, "Wrong tool index");
-    }
-    return descs[i];
-  }
-
-  void RtViewerApp::SelectNextTool()
-  {
-    currentTool_ = static_cast<RtViewerGuiTool>(currentTool_ + 1);
-    if (currentTool_ == RtViewerGuiTool_LAST)
-      currentTool_ = static_cast<RtViewerGuiTool>(0);;
-    printf("Current tool is now: %s\n", RtViewerGuiToolToString(currentTool_));
-  }
-
   void RtViewerApp::InvalidateAllViewports()
   {
     for (size_t i = 0; i < views_.size(); ++i)
@@ -104,8 +77,7 @@
   }
 
   RtViewerApp::RtViewerApp()
-    : currentTool_(RtViewerGuiTool_Rotate)
-    , undoStack_(new UndoStack)
+    : undoStack_(new UndoStack)
   {
     // Create the volumes that will be filled later on
     ctVolume_ = boost::make_shared<DicomVolumeImage>();
--- a/Samples/Common/RtViewerApp.h	Mon May 04 13:17:31 2020 +0200
+++ b/Samples/Common/RtViewerApp.h	Mon May 04 13:18:06 2020 +0200
@@ -51,20 +51,6 @@
   class SdlOpenGLViewport;
   class RtViewerView;
    
-  enum RtViewerGuiTool
-  {
-    RtViewerGuiTool_Rotate = 0,
-    RtViewerGuiTool_Pan,
-    RtViewerGuiTool_Zoom,
-    RtViewerGuiTool_LineMeasure,
-    RtViewerGuiTool_CircleMeasure,
-    RtViewerGuiTool_AngleMeasure,
-    RtViewerGuiTool_EllipseMeasure,
-    RtViewerGuiTool_LAST
-  };
-
-  const char* MeasureToolToString(size_t i);
-
   static const unsigned int FONT_SIZE_0 = 32;
   static const unsigned int FONT_SIZE_1 = 24;
 
@@ -172,7 +158,6 @@
 
     boost::shared_ptr<IFlexiblePointerTracker> activeTracker_;
 
-    RtViewerGuiTool currentTool_;
     boost::shared_ptr<UndoStack> undoStack_;
   };