瀏覽代碼

Removed obsolete ctkXNATBrowser application.

Sascha Zelzer 11 年之前
父節點
當前提交
2b0556a212

+ 0 - 39
Applications/ctkXNATBrowser/CMakeLists.txt

@@ -1,39 +0,0 @@
-project(ctkXNATBrowser)
-
-#
-# See CTK/CMake/ctkMacroBuildApp.cmake for details
-#
-
-set(KIT_SRCS
-  ctkXNATBrowserMain.cpp
-  ctkXNATBrowserMainWindow.cpp
-)
-
-# Headers that should run through moc
-set(KIT_MOC_SRCS
-  ctkXNATBrowserMainWindow.h
-)
-
-# UI files
-set(KIT_UI_FORMS
-  ctkXNATBrowserMainWindow.ui
-)
-
-# Resources
-set(KIT_resources
-)
-
-# Target libraries - See CMake/ctkFunctionGetTargetLibraries.cmake
-# The following macro will read the target libraries from the file 'target_libraries.cmake'
-ctkFunctionGetTargetLibraries(KIT_target_libraries)
-
-ctkMacroBuildApp(
-  NAME ${PROJECT_NAME}
-  SRCS ${KIT_SRCS}
-  MOC_SRCS ${KIT_MOC_SRCS}
-  UI_FORMS ${KIT_UI_FORMS}
-  TARGET_LIBRARIES ${KIT_target_libraries}
-  RESOURCES ${KIT_resources}
-  )
-
-target_link_libraries(${PROJECT_NAME} ${QT_LIBRARIES})

+ 0 - 37
Applications/ctkXNATBrowser/ctkXNATBrowserMain.cpp

@@ -1,37 +0,0 @@
-/*=============================================================================
-
-  Library: CTK
-
-  Copyright (c) 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.
-
-=============================================================================*/
-
-// Qt includes
-#include <QApplication>
-
-#include "ctkXNATBrowserMainWindow.h"
-
-int main(int argc, char** argv)
-{
-  QApplication myApp(argc, argv);
-  myApp.setOrganizationName("CommonTK");
-  myApp.setApplicationName("XNATBrowser");
-
-  ctkXNATBrowserMainWindow mainWindow;
-  mainWindow.show();
-
-  return myApp.exec();
-}

+ 0 - 106
Applications/ctkXNATBrowser/ctkXNATBrowserMainWindow.cpp

@@ -1,106 +0,0 @@
-/*=============================================================================
-
-  Library: CTK
-
-  Copyright (c) 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 "ctkXNATBrowserMainWindow.h"
-#include "ui_ctkXNATBrowserMainWindow.h"
-
-#include "ctkXnatLoginDialog.h"
-#include "ctkXnatListModel.h"
-#include "ctkXnatSession.h"
-#include "ctkXnatDataModel.h"
-#include "ctkXnatProject.h"
-
-#include <QDebug>
-
-ctkXNATBrowserMainWindow::ctkXNATBrowserMainWindow(QWidget *parent) :
-  QMainWindow(parent),
-  ui(new Ui::ctkXNATBrowserMainWindow),
-  m_Session(0),
-  m_ProjectsModel(new ctkXnatListModel()),
-  m_SubjectsModel(new ctkXnatListModel())
-{
-  ui->setupUi(this);
-
-  ui->projectsList->setModel(m_ProjectsModel);
-  ui->subjectsList->setModel(m_SubjectsModel);
-
-  this->connect(ui->projectsList, SIGNAL(clicked(QModelIndex)), SLOT(projectSelected(QModelIndex)));
-  this->connect(ui->loginButton, SIGNAL(clicked()), SLOT(loginButtonPushed()));
-}
-
-ctkXNATBrowserMainWindow::~ctkXNATBrowserMainWindow()
-{
-  if (m_Session)
-  {
-    delete m_Session;
-  }
-  delete ui;
-
-  delete m_SubjectsModel;
-  delete m_ProjectsModel;
-}
-
-void ctkXNATBrowserMainWindow::loginButtonPushed()
-{
-  if (m_Session)
-  {
-    delete m_Session;
-    m_Session = 0;
-    ui->loginButton->setText("Login");
-    ui->loginLabel->setText("Disconnected");
-
-    m_ProjectsModel->setRootObject(0);
-    ui->projectsList->reset();
-  }
-  else
-  {
-    ctkXnatLoginDialog loginDialog(m_SessionFactory);
-    if (loginDialog.exec() == QDialog::Accepted)
-    {
-      m_Session = loginDialog.getSession();
-      if (m_Session)
-      {
-        ui->loginButton->setText("Logout");
-        ui->loginLabel->setText(QString("Connected: %1").arg(m_Session->url().toString()));
-
-        ctkXnatDataModel* dataModel = m_Session->dataModel();
-        //xnatConnection->fetch(server);
-        dataModel->fetch();
-        m_ProjectsModel->setRootObject(dataModel);
-        ui->projectsList->reset();
-      }
-    }
-  }
-}
-
-void ctkXNATBrowserMainWindow::projectSelected(const QModelIndex& index)
-{
-  qDebug() << "Project selected";
-  QVariant variant = m_ProjectsModel->data(index, Qt::UserRole);
-  if (variant.isValid())
-  {
-    ctkXnatObject* project = variant.value<ctkXnatObject*>();
-    qDebug() << "selected project id:" << project->id();
-    project->fetch();
-    m_SubjectsModel->setRootObject(project);
-    ui->subjectsList->reset();
-  }
-}

+ 0 - 61
Applications/ctkXNATBrowser/ctkXNATBrowserMainWindow.h

@@ -1,61 +0,0 @@
-/*=============================================================================
-
-  Library: CTK
-
-  Copyright (c) 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 CTKXNATBROWSERMAINWINDOW_H
-#define CTKXNATBROWSERMAINWINDOW_H
-
-#include <QMainWindow>
-
-class QModelIndex;
-
-class ctkXnatSession;
-class ctkXnatSessionFactory;
-class ctkXnatListModel;
-class ctkXnatProject;
-
-namespace Ui {
-class ctkXNATBrowserMainWindow;
-}
-
-class ctkXNATBrowserMainWindow : public QMainWindow
-{
-  Q_OBJECT
-
-public:
-  explicit ctkXNATBrowserMainWindow(QWidget *parent = 0);
-  ~ctkXNATBrowserMainWindow();
-
-private Q_SLOTS:
-
-  void loginButtonPushed();
-
-  void projectSelected(const QModelIndex& index);
-
-private:
-  Ui::ctkXNATBrowserMainWindow *ui;
-
-  ctkXnatSessionFactory* m_SessionFactory;
-  ctkXnatSession* m_Session;
-  ctkXnatListModel* m_ProjectsModel;
-  ctkXnatListModel* m_SubjectsModel;
-};
-
-#endif // CTKXNATBROWSERMAINWINDOW_H

+ 0 - 126
Applications/ctkXNATBrowser/ctkXNATBrowserMainWindow.ui

@@ -1,126 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>ctkXNATBrowserMainWindow</class>
- <widget class="QMainWindow" name="ctkXNATBrowserMainWindow">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>800</width>
-    <height>600</height>
-   </rect>
-  </property>
-  <property name="windowTitle">
-   <string>MainWindow</string>
-  </property>
-  <widget class="QWidget" name="centralwidget">
-   <layout class="QVBoxLayout" name="verticalLayout_3">
-    <item>
-     <layout class="QHBoxLayout" name="horizontalLayout_2">
-      <item>
-       <widget class="QPushButton" name="loginButton">
-        <property name="text">
-         <string>Login</string>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <widget class="QLabel" name="loginLabel">
-        <property name="sizePolicy">
-         <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
-          <horstretch>0</horstretch>
-          <verstretch>0</verstretch>
-         </sizepolicy>
-        </property>
-        <property name="text">
-         <string>Not connected</string>
-        </property>
-       </widget>
-      </item>
-     </layout>
-    </item>
-    <item>
-     <layout class="QHBoxLayout" name="horizontalLayout">
-      <item>
-       <layout class="QVBoxLayout" name="verticalLayout">
-        <item>
-         <widget class="QLabel" name="label">
-          <property name="text">
-           <string>Projects</string>
-          </property>
-         </widget>
-        </item>
-        <item>
-         <widget class="QListView" name="projectsList"/>
-        </item>
-       </layout>
-      </item>
-      <item>
-       <layout class="QVBoxLayout" name="verticalLayout_2">
-        <item>
-         <widget class="QLabel" name="label_2">
-          <property name="text">
-           <string>Subjects</string>
-          </property>
-         </widget>
-        </item>
-        <item>
-         <widget class="QListView" name="subjectsList"/>
-        </item>
-       </layout>
-      </item>
-     </layout>
-    </item>
-    <item>
-     <widget class="QGroupBox" name="detailsGroupBox">
-      <property name="title">
-       <string>Details</string>
-      </property>
-     </widget>
-    </item>
-   </layout>
-  </widget>
-  <widget class="QMenuBar" name="menubar">
-   <property name="geometry">
-    <rect>
-     <x>0</x>
-     <y>0</y>
-     <width>800</width>
-     <height>27</height>
-    </rect>
-   </property>
-   <widget class="QMenu" name="menu_File">
-    <property name="title">
-     <string>&amp;File</string>
-    </property>
-    <addaction name="action_Quit"/>
-   </widget>
-   <addaction name="menu_File"/>
-  </widget>
-  <widget class="QStatusBar" name="statusbar"/>
-  <action name="action_Quit">
-   <property name="text">
-    <string>&amp;Quit</string>
-   </property>
-  </action>
- </widget>
- <resources/>
- <connections>
-  <connection>
-   <sender>action_Quit</sender>
-   <signal>triggered()</signal>
-   <receiver>ctkXNATBrowserMainWindow</receiver>
-   <slot>close()</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>-1</x>
-     <y>-1</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>399</x>
-     <y>299</y>
-    </hint>
-   </hints>
-  </connection>
- </connections>
-</ui>

+ 0 - 9
Applications/ctkXNATBrowser/target_libraries.cmake

@@ -1,9 +0,0 @@
-#
-# See CMake/ctkFunctionGetTargetLibraries.cmake
-#
-# This file should list the libraries required to build the current CTK application.
-#
-
-set(target_libraries
-  CTKXNATWidgets
-  )

+ 0 - 4
CMakeLists.txt

@@ -597,10 +597,6 @@ if(CTK_USE_QTTESTING)
                 CTK_BUILD_EXAMPLES)
 endif()
 
-ctk_app_option(ctkXNATBrowser
-               "Build the XNAT Browser application" OFF
-               CTK_BUILD_EXAMPLES)
-
 ctk_app_option(ctkXnatTreeBrowser
                "Build the XNAT Tree Browser application" OFF
                CTK_BUILD_EXAMPLES)