Просмотр исходного кода

Connect button for XML validation

Matt Clarkson лет назад: 11
Родитель
Сommit
a450aa20e2

+ 42 - 1
Applications/ctkCommandLineModuleExplorer/ctkCmdLineModuleExplorerMainWindow.cpp

@@ -49,7 +49,7 @@
 #include <QCloseEvent>
 #include <QFileDialog>
 
-
+//-----------------------------------------------------------------------------
 ctkCLModuleExplorerMainWindow::ctkCLModuleExplorerMainWindow(QWidget *parent) :
   QMainWindow(parent),
   ui(new Ui::ctkCmdLineModuleExplorerMainWindow),
@@ -104,6 +104,7 @@ ctkCLModuleExplorerMainWindow::ctkCLModuleExplorerMainWindow(QWidget *parent) :
   connect(ui->progressListWidget, SIGNAL(progressWidgetClicked(ctkCmdLineModuleFrontend*)), tabList.data(), SLOT(setActiveTab(ctkCmdLineModuleFrontend*)));
 
   connect(ui->ClearButton, SIGNAL(clicked()), ui->progressListWidget, SLOT(clearList()));
+  connect(ui->m_CheckXMLButton, SIGNAL(pressed()), this, SLOT(checkXMLPressed()));
 
   // Listen to future events for the currently active tab
 
@@ -137,6 +138,8 @@ ctkCLModuleExplorerMainWindow::ctkCLModuleExplorerMainWindow(QWidget *parent) :
   future.waitForFinished();
 }
 
+
+//-----------------------------------------------------------------------------
 ctkCLModuleExplorerMainWindow::~ctkCLModuleExplorerMainWindow()
 {
   qDeleteAll(moduleBackends);
@@ -149,11 +152,15 @@ ctkCLModuleExplorerMainWindow::~ctkCLModuleExplorerMainWindow()
   }
 }
 
+
+//-----------------------------------------------------------------------------
 void ctkCLModuleExplorerMainWindow::addModule(const QUrl &location)
 {
   moduleManager.registerModule(location);
 }
 
+
+//-----------------------------------------------------------------------------
 void ctkCLModuleExplorerMainWindow::closeEvent(QCloseEvent *event)
 {
   QList<ctkCmdLineModuleFrontend*> runningFrontends;
@@ -198,6 +205,8 @@ void ctkCLModuleExplorerMainWindow::closeEvent(QCloseEvent *event)
   event->accept();
 }
 
+
+//-----------------------------------------------------------------------------
 void ctkCLModuleExplorerMainWindow::on_actionRun_triggered()
 {
   ctkCmdLineModuleFrontend* moduleFrontend = this->tabList->activeTab();
@@ -218,16 +227,22 @@ void ctkCLModuleExplorerMainWindow::on_actionRun_triggered()
   this->currentFutureWatcher.setFuture(future);
 }
 
+
+//-----------------------------------------------------------------------------
 void ctkCLModuleExplorerMainWindow::on_actionPause_toggled(bool toggled)
 {
   this->currentFutureWatcher.setPaused(toggled);
 }
 
+
+//-----------------------------------------------------------------------------
 void ctkCLModuleExplorerMainWindow::on_actionCancel_triggered()
 {
   this->currentFutureWatcher.cancel();
 }
 
+
+//-----------------------------------------------------------------------------
 void ctkCLModuleExplorerMainWindow::on_actionOptions_triggered()
 {
   if (settingsDialog == NULL)
@@ -244,6 +259,8 @@ void ctkCLModuleExplorerMainWindow::on_actionOptions_triggered()
   settingsDialog->exec();
 }
 
+
+//-----------------------------------------------------------------------------
 void ctkCLModuleExplorerMainWindow::on_actionLoad_triggered()
 {
   QStringList fileNames = QFileDialog::getOpenFileNames(this, tr("Load modules..."));
@@ -257,26 +274,36 @@ void ctkCLModuleExplorerMainWindow::on_actionLoad_triggered()
                                                               this->moduleManager.validationMode());
 }
 
+
+//-----------------------------------------------------------------------------
 void ctkCLModuleExplorerMainWindow::on_actionQuit_triggered()
 {
   this->close();
 }
 
+
+//-----------------------------------------------------------------------------
 void ctkCLModuleExplorerMainWindow::on_actionReset_triggered()
 {
   this->tabList->activeTab()->resetValues();
 }
 
+
+//-----------------------------------------------------------------------------
 void ctkCLModuleExplorerMainWindow::on_actionClear_Cache_triggered()
 {
   moduleManager.clearCache();
 }
 
+
+//-----------------------------------------------------------------------------
 void ctkCLModuleExplorerMainWindow::on_actionReload_Modules_triggered()
 {
   moduleManager.reloadModules();
 }
 
+
+//-----------------------------------------------------------------------------
 void ctkCLModuleExplorerMainWindow::checkModulePaused()
 {
   if (this->currentFutureWatcher.future().isPaused())
@@ -295,11 +322,15 @@ void ctkCLModuleExplorerMainWindow::checkModulePaused()
   }
 }
 
+
+//-----------------------------------------------------------------------------
 void ctkCLModuleExplorerMainWindow::currentModuleResumed()
 {
   ui->actionPause->setChecked(false);
 }
 
+
+//-----------------------------------------------------------------------------
 void ctkCLModuleExplorerMainWindow::currentModuleCanceled()
 {
   ctkCmdLineModuleFrontend* frontend = this->tabList->activeTab();
@@ -316,6 +347,8 @@ void ctkCLModuleExplorerMainWindow::currentModuleCanceled()
   }
 }
 
+
+//-----------------------------------------------------------------------------
 void ctkCLModuleExplorerMainWindow::currentModuleFinished()
 {
   ctkCmdLineModuleFrontend* frontend = this->tabList->activeTab();
@@ -332,6 +365,14 @@ void ctkCLModuleExplorerMainWindow::currentModuleFinished()
   }
 }
 
+
+//-----------------------------------------------------------------------------
+void ctkCLModuleExplorerMainWindow::checkXMLPressed()
+{
+}
+
+
+//-----------------------------------------------------------------------------
 void ctkCLModuleExplorerMainWindow::moduleTabActivated(ctkCmdLineModuleFrontend *module)
 {
   if (module == NULL)

+ 2 - 1
Applications/ctkCommandLineModuleExplorer/ctkCmdLineModuleExplorerMainWindow.h

@@ -77,7 +77,8 @@ protected Q_SLOTS:
   void currentModuleFinished();
 
   void moduleTabActivated(ctkCmdLineModuleFrontend* module);
-  
+  void checkXMLPressed();
+
 private:
 
   QScopedPointer<Ui::ctkCmdLineModuleExplorerMainWindow> ui;

+ 1 - 1
Applications/ctkCommandLineModuleExplorer/ctkCmdLineModuleExplorerMainWindow.ui

@@ -317,7 +317,7 @@
         </spacer>
        </item>
        <item>
-        <widget class="QPushButton" name="pushButton">
+        <widget class="QPushButton" name="m_CheckXMLButton">
          <property name="text">
           <string>Check</string>
          </property>