소스 검색

Added helper method categoryDotTitle in ctkCmdLineModuleDescription

MattClarkson 13 년 전
부모
커밋
f5cc110b11
2개의 변경된 파일13개의 추가작업 그리고 0개의 파일을 삭제
  1. 8 0
      Libs/CommandLineModules/Core/ctkCmdLineModuleDescription.cpp
  2. 5 0
      Libs/CommandLineModules/Core/ctkCmdLineModuleDescription.h

+ 8 - 0
Libs/CommandLineModules/Core/ctkCmdLineModuleDescription.cpp

@@ -65,6 +65,14 @@ QString ctkCmdLineModuleDescription::title() const
   return d->Title;
 }
 
+
+//----------------------------------------------------------------------------
+QString ctkCmdLineModuleDescription::categoryDotTitle() const
+{
+  return this->category() + "." + this->title();
+}
+
+
 //----------------------------------------------------------------------------
 QString ctkCmdLineModuleDescription::description() const
 {

+ 5 - 0
Libs/CommandLineModules/Core/ctkCmdLineModuleDescription.h

@@ -66,6 +66,11 @@ public:
   QString title() const;
 
   /**
+   * @brief Helper method that returns the category followed by a dot followed by the title.
+   */
+  QString categoryDotTitle() const;
+
+  /**
    * @brief Returns the title, derived from the \code <description> \endcode tag.
    */
   QString description() const;