Prechádzať zdrojové kódy

ENH: PluginGenerator: Renamed *Section files *Extension

Sascha Zelzer 14 rokov pred
rodič
commit
98de7f1ff8

+ 2 - 1
Plugins/org.commontk.plugingenerator.core/CMakeLists.txt

@@ -3,9 +3,10 @@ PROJECT(org_commontk_plugingenerator_core)
 SET(PLUGIN_export_directive "org_commontk_plugingenerator_core_EXPORT")
 
 SET(PLUGIN_SRCS
+  ctkPluginGeneratorAbstractExtension.cpp
   ctkPluginGeneratorAbstractTemplate.cpp
+  ctkPluginGeneratorCMakeLists.cpp
   ctkPluginGeneratorCodeModel.cpp
-  ctkPluginGeneratorExtension.cpp
 )
 
 SET(PLUGIN_MOC_SRCS

+ 2 - 2
Plugins/org.commontk.plugingenerator.core/ctkPluginGeneratorExtension.cpp

@@ -20,8 +20,8 @@
 =============================================================================*/
 
 
-#include "ctkPluginGeneratorExtension.h"
+#include "ctkPluginGeneratorAbstractExtension.h"
 
-ctkPluginGeneratorExtension::ctkPluginGeneratorExtension()
+ctkPluginGeneratorAbstractExtension::ctkPluginGeneratorAbstractExtension()
 {
 }

+ 15 - 13
Plugins/org.commontk.plugingenerator.core/ctkPluginGeneratorExtension.h

@@ -20,31 +20,33 @@
 =============================================================================*/
 
 
-#ifndef CTKPLUGINGENERATOREXTENSION_H
-#define CTKPLUGINGENERATOREXTENSION_H
+#ifndef CTKPLUGINGENERATORABSTRACTEXTENSION_H
+#define CTKPLUGINGENERATORABSTRACTEXTENSION_H
 
-class ctkPluginGeneratorExtension
+#include <QHash>
+
+class ctkPluginGeneratorAbstractExtension
 {
 public:
-    ctkPluginGeneratorExtension();
+    ctkPluginGeneratorAbstractExtension();
 
-    virtual void GetCommandLineArgs() const = 0;
+    virtual void getCommandLineArgs() const = 0;
 
-    void SetParameter(const QHash<QString, QVariant>& params);
-    QHash<QString, QVariant> GetParameter() const;
+    void setParameter(const QHash<QString, QVariant>& params);
+    QHash<QString, QVariant> getParameter() const;
 
-    bool IsValid() const;
+    bool isValid() const;
 
-    void SetErrorMessage(const QString& errMsg);
-    QString GetErrorMessage() const;
+    void setErrorMessage(const QString& errMsg);
+    QString getErrorMessage() const;
 
-    void Generate()
+    void generate();
 
 protected:
 
-    virtual void VerifyParameter(const QHash<QString, QVariant>& params) = 0;
+    virtual void verifyParameter(const QHash<QString, QVariant>& params) = 0;
 
 
 };
 
-#endif // CTKPLUGINGENERATOREXTENSION_H
+#endif // CTKPLUGINGENERATORABSTRACTEXTENSION_H

+ 30 - 8
Plugins/org.commontk.plugingenerator.core/ctkPluginGeneratorAbstractTemplate.cpp

@@ -23,39 +23,61 @@
 #include "ctkPluginGeneratorAbstractTemplate.h"
 
 #include <QHash>
+#include <QFile>
 
 class ctkPluginGeneratorAbstractTemplatePrivate
 {
 public:
 
-  QHash<QString, QString> contentMap;
+  QHash<QString, QStringList> contentMap;
 };
 
 ctkPluginGeneratorAbstractTemplate::ctkPluginGeneratorAbstractTemplate(
-    const QString& name, QObject* parent)
+    const QString& name, ctkPluginGeneratorAbstractTemplate* parent)
       : QObject(parent), d_ptr(new ctkPluginGeneratorAbstractTemplatePrivate)
 {
   this->setObjectName(name);
 }
 
-void ctkPluginGeneratorAbstractTemplate::AddContent(const QString &marker, const QString &content)
+ctkPluginGeneratorAbstractTemplate::~ctkPluginGeneratorAbstractTemplate()
 {
-  Q_D(ctkPluginGeneratorAbstractTemplate);
-  d->contentMap.insert(marker, content);
+
 }
 
-QString ctkPluginGeneratorAbstractTemplate::GetContent(const QString &marker) const
+void ctkPluginGeneratorAbstractTemplate::addContent(const QString &marker, const QString &content, Position pos)
 {
   Q_D(ctkPluginGeneratorAbstractTemplate);
+  if (pos == START)
+  {
+    d->contentMap[marker].prepend(content);
+  }
+  else if (pos == END)
+  {
+    d->contentMap[marker].append(content);
+  }
+}
+
+QStringList ctkPluginGeneratorAbstractTemplate::getContent(const QString &marker) const
+{
+  Q_D(const ctkPluginGeneratorAbstractTemplate);
   if (d->contentMap.contains(marker))
   {
     return d->contentMap[marker];
   }
 
-  return QString();
+  return QStringList();
+}
+
+void ctkPluginGeneratorAbstractTemplate::create(const QString& location)
+{
+  const QString filename = location + "/" + this->objectName();
+  QFile file(filename);
+  file.open(QIODevice::WriteOnly | QIODevice::Text);
+  file.write(this->generateContent().toAscii());
+  file.close();
 }
 
-QStringList ctkPluginGeneratorAbstractTemplate::GetMarkers() const
+QStringList ctkPluginGeneratorAbstractTemplate::getMarkers() const
 {
   return QStringList();
 }

+ 18 - 6
Plugins/org.commontk.plugingenerator.core/ctkPluginGeneratorAbstractTemplate.h

@@ -25,6 +25,7 @@
 
 #include <QObject>
 #include <QScopedPointer>
+#include <QStringList>
 
 class ctkPluginGeneratorAbstractTemplatePrivate;
 
@@ -34,19 +35,30 @@ class ctkPluginGeneratorAbstractTemplate : public QObject
 
 public:
 
-    ctkPluginGeneratorAbstractTemplate(const QString& name, QObject* parent = 0);
+  enum Position {
+    START,
+    END
+  };
 
-    void AddContent(const QString& marker, const QString& content);
+  ctkPluginGeneratorAbstractTemplate(const QString& name, ctkPluginGeneratorAbstractTemplate* parent = 0);
 
-    QString GetContent(const QString& marker) const;
+  virtual ~ctkPluginGeneratorAbstractTemplate();
 
-    virtual QStringList GetMarkers() const;
+  void addContent(const QString& marker, const QString& content, Position pos = END);
 
-    virtual QString GenerateContent() = 0;
+  QStringList getContent(const QString& marker) const;
+
+  virtual void create(const QString& location);
+
+  virtual QStringList getMarkers() const;
+
+  virtual QString generateContent() = 0;
 
 private:
 
-    const QScopedPointer<ctkPluginGeneratorAbstractTemplatePrivate> d_ptr;
+  Q_DECLARE_PRIVATE(ctkPluginGeneratorAbstractTemplate)
+
+  const QScopedPointer<ctkPluginGeneratorAbstractTemplatePrivate> d_ptr;
 };
 
 #endif // CTKPLUGINGENERATORABSTRACTTEMPLATE_H

+ 98 - 0
Plugins/org.commontk.plugingenerator.core/ctkPluginGeneratorCMakeLists.cpp

@@ -0,0 +1,98 @@
+/*=============================================================================
+
+  Library: CTK
+
+  Copyright (c) 2010 German Cancer Research Center,
+    Division of Medical and Biological Informatics
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+=============================================================================*/
+
+
+#include "ctkPluginGeneratorCMakeLists.h"
+
+#include <QTextStream>
+
+const QString ctkPluginGeneratorCMakeLists::PLUGIN_PROJECT_NAME_MARKER = "plugin_project_name";
+const QString ctkPluginGeneratorCMakeLists::PLUGIN_EXPORT_DIRECTIVE_MARKER = "plugin_export_directive";
+const QString ctkPluginGeneratorCMakeLists::PLUGIN_SRCS_MARKER = "plugin_srcs";
+const QString ctkPluginGeneratorCMakeLists::PLUGIN_MOC_SRCS_MARKER = "plugin_moc_srcs";
+const QString ctkPluginGeneratorCMakeLists::PLUGIN_RESOURCES_MARKER = "plugin_resources";
+
+ctkPluginGeneratorCMakeLists::ctkPluginGeneratorCMakeLists(QObject *parent) :
+    ctkPluginGeneratorAbstractTemplate("CMakeLists.txt", parent)
+{
+}
+
+QString ctkPluginGeneratorCMakeLists::generateContent()
+{
+  QString content;
+  QTextStream stream(&content);
+
+  stream
+    << "PROJECT(" << this->getContent(PLUGIN_PROJECT_NAME_MARKER).front() << ")\n\n"
+    << "SET(PLUGIN_export_directive \"" << this->getContent(PLUGIN_EXPORT_DIRECTIVE_MARKER).front() << "\")\n\n"
+    << "SET(PLUGIN_SRCS\n";
+
+  for (QStringListIterator it(this->getContent(PLUGIN_SRCS_MARKER)); it.hasNext();)
+  {
+    stream << "  " << it.next() << "\n";
+  }
+
+  stream
+    << ")\n\n"
+    << "# Files which should be processed my Qts moc\n"
+    << "SET(PLUGIN_MOC_SRCS\n";
+
+  for (QStringListIterator it(this->getContent(PLUGIN_MOC_SRCS_MARKER)); it.hasNext();)
+  {
+    stream << "  " << it.next() << "\n";
+  }
+
+  stream
+    << ")\n\n"
+    << "# QRC Files which should be compiled into the plugin\n"
+    << "SET(PLUGIN_resources\n";
+
+  for (QStringListIterator it(this->getContent(PLUGIN_RESOURCES_MARKER)); it.hasNext();)
+  {
+    stream << "  " << it.next() << "\n";
+  }
+
+  stream
+    << ")\n\n"
+    << "#Compute the library dependencies\n"
+    << "ctkMacroGetTargetLibraries(PLUGIN_target_libraries)\n\n"
+    << "ctkMacroBuildPlugin(\n"
+    << "  NAME ${PROJECT_NAME}\n"
+    << "  EXPORT_DIRECTIVE ${PLUGIN_export_directive}\n"
+    << "  SRCS ${PLUGIN_SRCS}\n"
+    << "  MOC_SRCS ${PLUGIN_MOC_SRCS}\n"
+    << "  RESOURCES ${PLUGIN_resources}\n"
+    << "  TARGET_LIBRARIES ${PLUGIN_target_libraries}\n"
+    << ")\n";
+
+  return content;
+}
+
+QStringList ctkPluginGeneratorCMakeLists::getMarkers() const
+{
+  QStringList markers;
+  markers << PLUGIN_PROJECT_NAME_MARKER
+      << PLUGIN_EXPORT_DIRECTIVE_MARKER
+      << PLUGIN_SRCS_MARKER
+      << PLUGIN_MOC_SRCS_MARKER
+      << PLUGIN_RESOURCES_MARKER;
+  return markers;
+}

+ 48 - 0
Plugins/org.commontk.plugingenerator.core/ctkPluginGeneratorCMakeLists.h

@@ -0,0 +1,48 @@
+/*=============================================================================
+
+  Library: CTK
+
+  Copyright (c) 2010 German Cancer Research Center,
+    Division of Medical and Biological Informatics
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+=============================================================================*/
+
+
+#ifndef CTKPLUGINGENERATORCMAKELISTS_H
+#define CTKPLUGINGENERATORCMAKELISTS_H
+
+#include "ctkPluginGeneratorAbstractTemplate.h"
+
+class ctkPluginGeneratorCMakeLists : public ctkPluginGeneratorAbstractTemplate
+{
+  Q_OBJECT
+
+public:
+
+  static const QString PLUGIN_PROJECT_NAME_MARKER;
+  static const QString PLUGIN_EXPORT_DIRECTIVE_MARKER;
+  static const QString PLUGIN_SRCS_MARKER;
+  static const QString PLUGIN_MOC_SRCS_MARKER;
+  static const QString PLUGIN_RESOURCES_MARKER;
+
+  ctkPluginGeneratorCMakeLists(QObject *parent = 0);
+
+  QString generateContent();
+
+  QStringList getMarkers() const;
+
+};
+
+#endif // CTKPLUGINGENERATORCMAKELISTS_H

+ 114 - 1
Plugins/org.commontk.plugingenerator.core/ctkPluginGeneratorCodeModel.cpp

@@ -22,14 +22,127 @@
 
 #include "ctkPluginGeneratorCodeModel.h"
 
+#include <QDir>
+#include <QHash>
+
 class ctkPluginGeneratorCodeModelPrivate
 {
 public:
 
-  QList<QObject*> rootTemplates;
+  QHash<QString, ctkPluginGeneratorAbstractTemplate*> rootTemplates;
+
+};
+
+class ctkPluginGeneratorFolderTemplate : public ctkPluginGeneratorAbstractTemplate
+{
+public:
+
+  ctkPluginGeneratorFolderTemplate(const QString& name, ctkPluginGeneratorAbstractTemplate* parent)
+    : ctkPluginGeneratorAbstractTemplate(name, parent)
+  {}
+
+  QString generateContent()
+  {
+    return "";
+  }
 
+  void create(const QString& location)
+  {
+    QDir dir(location);
+    if (dir.mkdir(this->objectName()))
+    {
+      QString currLocation = location + QDir::separator() + this->objectName();
+      QListIterator<QObject*> it(this->children());
+      while (it.hasNext())
+      {
+        qobject_cast<ctkPluginGeneratorAbstractTemplate*>(it.next())->create(currLocation);
+      }
+    }
+    else
+    {
+      throw std::exception("The directory " + location.append(this->objectName()).toAscii() + " could not be created");
+    }
+  }
 };
 
 ctkPluginGeneratorCodeModel::ctkPluginGeneratorCodeModel()
+  : d_ptr(new ctkPluginGeneratorCodeModelPrivate)
+{
+}
+
+ctkPluginGeneratorCodeModel::~ctkPluginGeneratorCodeModel()
+{
+}
+
+void ctkPluginGeneratorCodeModel::addTemplate(ctkPluginGeneratorAbstractTemplate *templ,
+                                              const QString& path)
+{
+  Q_D(ctkPluginGeneratorCodeModel);
+  if (path.isEmpty())
+  {
+    d->rootTemplates.insert(templ->objectName(), templ);
+  }
+  else
+  {
+    ctkPluginGeneratorAbstractTemplate* parentTemplate = 0;
+    QStringList paths = path.split("/", QString::SkipEmptyParts);
+    QStringListIterator it(paths);
+    if (it.hasNext())
+    {
+      QString rootEntry = it.next();
+      // search the root templates
+      if (d->rootTemplates.contains(rootEntry))
+      {
+        if (!dynamic_cast<ctkPluginGeneratorFolderTemplate*>(d->rootTemplates[rootEntry]))
+        {
+          throw std::exception("The segment \"" + rootEntry.toAscii() + "\" in \"" + path.toAscii() + "\" is not a folder");
+        }
+        parentTemplate = d->rootTemplates[rootEntry];
+      }
+      else
+      {
+        parentTemplate = new ctkPluginGeneratorFolderTemplate(rootEntry);
+        d->rootTemplates.insert(rootEntry, parentTemplate);
+      }
+      while (it.hasNext())
+      {
+        QString currEntry = it.next();
+        QListIterator<QObject*> children(parentTemplate->children());
+        bool childFound = false;
+        while (children.hasNext())
+        {
+          QObject* child = it.next();
+          if (child->objectName() == currEntry)
+          {
+            childFound = true;
+            parentTemplate = qobject_cast<ctkPluginGeneratorAbstractTemplate*>(child);
+            if (parentTemplate == 0)
+            {
+              throw std::exception("The segment \"" + currEntry.toAscii() + "\" in \"" + path.toAscii() + "\" is not a folder");
+            }
+            break;
+          }
+        }
+
+        if (!childFound)
+        {
+          parentTemplate = new ctkPluginGeneratorFolderTemplate(currEntry, parentTemplate);
+        }
+      }
+    }
+
+    templ->setParent(parentTemplate);
+  }
+}
+
+void ctkPluginGeneratorCodeModel::create(const QString& location)
 {
+  Q_D(ctkPluginGeneratorCodeModel);
+
+  QListIterator<ctkPluginGeneratorAbstractTemplate*> it(d->rootTemplates);
+  while (it.hasNext())
+  {
+    ctkPluginGeneratorAbstractTemplate* templ = it.next();
+    templ->create(location);
+  }
 }

+ 9 - 1
Plugins/org.commontk.plugingenerator.core/ctkPluginGeneratorCodeModel.h

@@ -38,10 +38,18 @@ class ctkPluginGeneratorCodeModel : public QObject
 public:
     ctkPluginGeneratorCodeModel();
 
-    void AddTemplate(ctkPluginGeneratorAbstractTemplate* templ);
+    virtual ~ctkPluginGeneratorCodeModel();
+
+    void addTemplate(ctkPluginGeneratorAbstractTemplate* templ, const QString& path = "");
+
+    ctkPluginGeneratorAbstractTemplate* getTemplate(const QString& path) const;
+
+    void create(const QString& location);
 
 private:
 
+    Q_DECLARE_PRIVATE(ctkPluginGeneratorCodeModel)
+
     const QScopedPointer<ctkPluginGeneratorCodeModelPrivate> d_ptr;
 
 

+ 6 - 6
Plugins/org.commontk.plugingenerator.ui/CMakeLists.txt

@@ -3,18 +3,18 @@ PROJECT(org_commontk_plugingenerator_ui)
 SET(PLUGIN_export_directive "org_commontk_plugingenerator_ui_EXPORT")
 
 SET(PLUGIN_SRCS
-  ctkPluginGeneratorAbstractUiSection.cpp
-  ctkPluginGeneratorMainSection.cpp
+  ctkPluginGeneratorAbstractUiExtension.cpp
+  ctkPluginGeneratorMainExtension.cpp
 )
 
 SET(PLUGIN_MOC_SRCS
-  ctkPluginGeneratorAbstractUiSection.h
-  ctkPluginGeneratorMainSection.h
+  ctkPluginGeneratorAbstractUiExtension.h
+  ctkPluginGeneratorMainExtension.h
 )
 
 SET(PLUGIN_UI_FORMS
-  ctkPluginGeneratorMainSection.ui
-  ctkPluginGeneratorManifestSection.ui
+  ctkPluginGeneratorMainExtension.ui
+  ctkPluginGeneratorManifestExtension.ui
 )
 
 SET(PLUGIN_resources

+ 14 - 14
Plugins/org.commontk.plugingenerator.ui/ctkPluginGeneratorAbstractUiSection.cpp

@@ -19,50 +19,50 @@
 
 =============================================================================*/
 
-#include "ctkPluginGeneratorAbstractUiSection.h"
+#include "ctkPluginGeneratorAbstractUiExtension.h"
 
-ctkPluginGeneratorAbstractUiSection::ctkPluginGeneratorAbstractUiSection()
+ctkPluginGeneratorAbstractUiExtension::ctkPluginGeneratorAbstractUiExtension()
   : sectionWidget(0)
 {
 
 }
 
-ctkPluginGeneratorAbstractUiSection::~ctkPluginGeneratorAbstractUiSection()
+ctkPluginGeneratorAbstractUiExtension::~ctkPluginGeneratorAbstractUiExtension()
 {
 
 }
 
-QWidget* ctkPluginGeneratorAbstractUiSection::getWidget()
+QWidget* ctkPluginGeneratorAbstractUiExtension::getWidget()
 {
   return sectionWidget;
 }
 
-QString ctkPluginGeneratorAbstractUiSection::getDescription() const
+QString ctkPluginGeneratorAbstractUiExtension::getDescription() const
 {
   return this->description;
 }
 
-QString ctkPluginGeneratorAbstractUiSection::getTitle() const
+QString ctkPluginGeneratorAbstractUiExtension::getTitle() const
 {
   return this->title;
 }
 
-QString ctkPluginGeneratorAbstractUiSection::getErrorMessage() const
+QString ctkPluginGeneratorAbstractUiExtension::getErrorMessage() const
 {
   return this->errorMessage;
 }
 
-QString ctkPluginGeneratorAbstractUiSection::getMessage() const
+QString ctkPluginGeneratorAbstractUiExtension::getMessage() const
 {
   return this->message;
 }
 
-QIcon ctkPluginGeneratorAbstractUiSection::getIcon() const
+QIcon ctkPluginGeneratorAbstractUiExtension::getIcon() const
 {
   return this->icon;
 }
 
-void ctkPluginGeneratorAbstractUiSection::setDescription(const QString& description)
+void ctkPluginGeneratorAbstractUiExtension::setDescription(const QString& description)
 {
   if (this->description != description)
   {
@@ -71,7 +71,7 @@ void ctkPluginGeneratorAbstractUiSection::setDescription(const QString& descript
   }
 }
 
-void ctkPluginGeneratorAbstractUiSection::setTitle(const QString& title)
+void ctkPluginGeneratorAbstractUiExtension::setTitle(const QString& title)
 {
   if (this->title != title)
   {
@@ -80,7 +80,7 @@ void ctkPluginGeneratorAbstractUiSection::setTitle(const QString& title)
   }
 }
 
-void ctkPluginGeneratorAbstractUiSection::setErrorMessage(const QString& errorMsg)
+void ctkPluginGeneratorAbstractUiExtension::setErrorMessage(const QString& errorMsg)
 {
   if (this->errorMessage != errorMsg)
   {
@@ -89,7 +89,7 @@ void ctkPluginGeneratorAbstractUiSection::setErrorMessage(const QString& errorMs
   }
 }
 
-void ctkPluginGeneratorAbstractUiSection::setMessage(const QString& msg)
+void ctkPluginGeneratorAbstractUiExtension::setMessage(const QString& msg)
 {
   if (this->message != msg)
   {
@@ -98,7 +98,7 @@ void ctkPluginGeneratorAbstractUiSection::setMessage(const QString& msg)
   }
 }
 
-void ctkPluginGeneratorAbstractUiSection::setIcon(const QIcon& icon)
+void ctkPluginGeneratorAbstractUiExtension::setIcon(const QIcon& icon)
 {
   this->icon = icon;
   emit iconChanged(icon);

+ 6 - 6
Plugins/org.commontk.plugingenerator.ui/ctkPluginGeneratorAbstractUiSection.h

@@ -19,23 +19,23 @@
 
 =============================================================================*/
 
-#ifndef CTKPLUGINGENERATORUISECTION_H
-#define CTKPLUGINGENERATORUISECTION_H
+#ifndef CTKPLUGINGENERATORABSTRACTUIEXTENSION_H
+#define CTKPLUGINGENERATORABSTRACTUIEXTENSION_H
 
 #include <QObject>
 #include <QIcon>
 
 class QWidget;
 
-class ctkPluginGeneratorAbstractUiSection : public QObject
+class ctkPluginGeneratorAbstractUiExtension : public QObject
 {
 
   Q_OBJECT
 
 public:
 
-  ctkPluginGeneratorAbstractUiSection();
-  virtual ~ctkPluginGeneratorAbstractUiSection();
+  ctkPluginGeneratorAbstractUiExtension();
+  virtual ~ctkPluginGeneratorAbstractUiExtension();
 
   QWidget* getWidget();
 
@@ -79,4 +79,4 @@ private:
 
 };
 
-#endif // CTKPLUGINGENERATORUISECTION_H
+#endif // CTKPLUGINGENERATORABSTRACTUIEXTENSION_H

+ 6 - 6
Plugins/org.commontk.plugingenerator.ui/ctkPluginGeneratorMainSection.cpp

@@ -20,18 +20,18 @@
 =============================================================================*/
 
 
-#include "ctkPluginGeneratorMainSection.h"
+#include "ctkPluginGeneratorMainExtension.h"
 
-ctkPluginGeneratorMainSection::ctkPluginGeneratorMainSection()
+ctkPluginGeneratorMainExtension::ctkPluginGeneratorMainExtension()
   : ui(0)
 {
 
 }
 
 
-QWidget* ctkPluginGeneratorMainSection::createWidget(QWidget* parent)
+QWidget* ctkPluginGeneratorMainExtension::createWidget(QWidget* parent)
 {
-  ui = new Ui::ctkPluginGeneratorMainSection();
+  ui = new Ui::ctkPluginGeneratorMainExtension();
   QWidget* container = new QWidget(parent);
   ui->setupUi(container);
 
@@ -40,12 +40,12 @@ QWidget* ctkPluginGeneratorMainSection::createWidget(QWidget* parent)
   return container;
 }
 
-void ctkPluginGeneratorMainSection::connectSignals()
+void ctkPluginGeneratorMainExtension::connectSignals()
 {
   connect(ui->symbolicNameEdit, SIGNAL(textChanged(QString)), this, SLOT(verifySection()));
 }
 
-void ctkPluginGeneratorMainSection::verifySection()
+void ctkPluginGeneratorMainExtension::verifySection()
 {
   if (ui->symbolicNameEdit->text().isEmpty())
   {

+ 8 - 8
Plugins/org.commontk.plugingenerator.ui/ctkPluginGeneratorMainSection.h

@@ -20,19 +20,19 @@
 =============================================================================*/
 
 
-#ifndef CTKPLUGINGENERATORMAINSECTION_H
-#define CTKPLUGINGENERATORMAINSECTION_H
+#ifndef CTKPLUGINGENERATORMAINEXTENSION_H
+#define CTKPLUGINGENERATORMAINEXTENSION_H
 
-#include "ctkPluginGeneratorAbstractUiSection.h"
+#include "ctkPluginGeneratorAbstractUiExtension.h"
 
-#include "ui_ctkPluginGeneratorMainSection.h"
+#include "ui_ctkPluginGeneratorMainExtension.h"
 
-class ctkPluginGeneratorMainSection : public ctkPluginGeneratorAbstractUiSection
+class ctkPluginGeneratorMainExtension : public ctkPluginGeneratorAbstractUiExtension
 {
   Q_OBJECT
 
 public:
-    ctkPluginGeneratorMainSection();
+    ctkPluginGeneratorMainExtension();
 
 protected slots:
 
@@ -44,7 +44,7 @@ protected:
 
     void connectSignals();
 
-    Ui::ctkPluginGeneratorMainSection* ui;
+    Ui::ctkPluginGeneratorMainExtension* ui;
 };
 
-#endif // CTKPLUGINGENERATORMAINSECTION_H
+#endif // CTKPLUGINGENERATORMAINEXTENSION_H

+ 2 - 2
Plugins/org.commontk.plugingenerator.ui/ctkPluginGeneratorMainSection.ui

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <ui version="4.0">
- <class>ctkPluginGeneratorMainSection</class>
- <widget class="QWidget" name="ctkPluginGeneratorMainSection">
+ <class>ctkPluginGeneratorMainExtension</class>
+ <widget class="QWidget" name="ctkPluginGeneratorMainExtension">
   <property name="geometry">
    <rect>
     <x>0</x>

Plugins/org.commontk.plugingenerator.ui/ctkPluginGeneratorManifestSection.ui → Plugins/org.commontk.plugingenerator.ui/ctkPluginGeneratorManifestExtension.ui