Browse Source

Change ctkCmdLineModuleObjectTreeWalker to expose QObject* currentObject()

MattClarkson 12 years ago
parent
commit
2c95ce4884

+ 5 - 0
Libs/CommandLineModules/QtGui/ctkCmdLineModuleObjectTreeWalker.cpp

@@ -122,6 +122,11 @@ QString ctkCmdLineModuleObjectTreeWalker::longFlag() const
   return v.isValid() ? v.toString() : QString();
 }
 
+QObject* ctkCmdLineModuleObjectTreeWalker::currentObject() const
+{
+  return CurrentObject;
+}
+
 int ctkCmdLineModuleObjectTreeWalker::index() const
 {
   QVariant v = property("index");

+ 1 - 0
Libs/CommandLineModules/QtGui/ctkCmdLineModuleObjectTreeWalker_p.h

@@ -53,6 +53,7 @@ public:
   QString name() const;
   QString label() const;
   QVariant value() const;
+  QObject* currentObject() const;
 
   void setValue(const QVariant& value);