diff --git a/Plugins/PluginList.cmake b/Plugins/PluginList.cmake index e0f3b475c6..3d0c52eb4a 100644 --- a/Plugins/PluginList.cmake +++ b/Plugins/PluginList.cmake @@ -1,44 +1,44 @@ # Plug-ins must be ordered according to their dependencies set(MITK_EXT_PLUGINS org.mitk.core.services:ON org.mitk.gui.common:ON org.mitk.planarfigure:ON org.mitk.core.ext:OFF org.mitk.core.jobs:OFF org.mitk.diffusionimaging:OFF org.mitk.gui.qt.application:ON org.mitk.gui.qt.coreapplication:OFF org.mitk.gui.qt.ext:OFF org.mitk.gui.qt.extapplication:OFF org.mitk.gui.qt.common:ON org.mitk.gui.qt.stdmultiwidgeteditor:ON org.mitk.gui.qt.common.legacy:OFF - org.mitk.gui.qt.cli:OFF + org.mitk.gui.qt.cmdlinemodules:OFF org.mitk.gui.qt.diffusionimagingapp:OFF org.mitk.gui.qt.datamanager:ON org.mitk.gui.qt.basicimageprocessing:OFF org.mitk.gui.qt.dicom:OFF org.mitk.gui.qt.diffusionimaging:OFF org.mitk.gui.qt.dtiatlasapp:OFF org.mitk.gui.qt.examples:OFF org.mitk.gui.qt.examplesopencv:OFF org.mitk.gui.qt.igtexamples:OFF org.mitk.gui.qt.igttracking:OFF org.mitk.gui.qt.imagecropper:OFF org.mitk.gui.qt.imagenavigator:ON org.mitk.gui.qt.materialeditor:OFF org.mitk.gui.qt.measurementtoolbox:OFF org.mitk.gui.qt.meshdecimation:OFF org.mitk.gui.qt.moviemaker:OFF org.mitk.gui.qt.pointsetinteraction:OFF org.mitk.gui.qt.python.console:OFF org.mitk.gui.qt.registration:OFF org.mitk.gui.qt.segmentation:OFF org.mitk.gui.qt.toftutorial:OFF org.mitk.gui.qt.tofutil:OFF org.mitk.gui.qt.ugvisualization:OFF org.mitk.gui.qt.ultrasound:OFF org.mitk.gui.qt.volumevisualization:OFF ) diff --git a/Plugins/org.mitk.gui.qt.cli/plugin.xml b/Plugins/org.mitk.gui.qt.cli/plugin.xml deleted file mode 100644 index 2960fef46e..0000000000 --- a/Plugins/org.mitk.gui.qt.cli/plugin.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - diff --git a/Plugins/org.mitk.gui.qt.cli/CMakeLists.txt b/Plugins/org.mitk.gui.qt.cmdlinemodules/CMakeLists.txt similarity index 81% rename from Plugins/org.mitk.gui.qt.cli/CMakeLists.txt rename to Plugins/org.mitk.gui.qt.cmdlinemodules/CMakeLists.txt index a6ba14fe29..a530249316 100644 --- a/Plugins/org.mitk.gui.qt.cli/CMakeLists.txt +++ b/Plugins/org.mitk.gui.qt.cmdlinemodules/CMakeLists.txt @@ -1,10 +1,10 @@ -project(org_mitk_gui_qt_cli) +project(org_mitk_gui_qt_cmdlinemodules) set(QT_USE_QTUITOOLS 1) include(${QT_USE_FILE}) MACRO_CREATE_MITK_CTK_PLUGIN( EXPORT_DIRECTIVE CLI_EXPORT EXPORTED_INCLUDE_SUFFIXES src MODULE_DEPENDENCIES CTK QmitkExt ) diff --git a/Plugins/org.mitk.gui.qt.cli/documentation/UserManual/CLIF3D.png b/Plugins/org.mitk.gui.qt.cmdlinemodules/documentation/UserManual/CLIF3D.png similarity index 100% rename from Plugins/org.mitk.gui.qt.cli/documentation/UserManual/CLIF3D.png rename to Plugins/org.mitk.gui.qt.cmdlinemodules/documentation/UserManual/CLIF3D.png diff --git a/Plugins/org.mitk.gui.qt.cli/documentation/UserManual/CLIIcon.png b/Plugins/org.mitk.gui.qt.cmdlinemodules/documentation/UserManual/CLIIcon.png similarity index 100% rename from Plugins/org.mitk.gui.qt.cli/documentation/UserManual/CLIIcon.png rename to Plugins/org.mitk.gui.qt.cmdlinemodules/documentation/UserManual/CLIIcon.png diff --git a/Plugins/org.mitk.gui.qt.cli/documentation/UserManual/CLIInitial.png b/Plugins/org.mitk.gui.qt.cmdlinemodules/documentation/UserManual/CLIInitial.png similarity index 100% rename from Plugins/org.mitk.gui.qt.cli/documentation/UserManual/CLIInitial.png rename to Plugins/org.mitk.gui.qt.cmdlinemodules/documentation/UserManual/CLIInitial.png diff --git a/Plugins/org.mitk.gui.qt.cli/documentation/UserManual/CLINiftyReg.png b/Plugins/org.mitk.gui.qt.cmdlinemodules/documentation/UserManual/CLINiftyReg.png similarity index 100% rename from Plugins/org.mitk.gui.qt.cli/documentation/UserManual/CLINiftyReg.png rename to Plugins/org.mitk.gui.qt.cmdlinemodules/documentation/UserManual/CLINiftyReg.png diff --git a/Plugins/org.mitk.gui.qt.cli/documentation/UserManual/CLINiftyRegRunning2.png b/Plugins/org.mitk.gui.qt.cmdlinemodules/documentation/UserManual/CLINiftyRegRunning2.png similarity index 100% rename from Plugins/org.mitk.gui.qt.cli/documentation/UserManual/CLINiftyRegRunning2.png rename to Plugins/org.mitk.gui.qt.cmdlinemodules/documentation/UserManual/CLINiftyRegRunning2.png diff --git a/Plugins/org.mitk.gui.qt.cli/documentation/UserManual/CLIPreferences.png b/Plugins/org.mitk.gui.qt.cmdlinemodules/documentation/UserManual/CLIPreferences.png similarity index 100% rename from Plugins/org.mitk.gui.qt.cli/documentation/UserManual/CLIPreferences.png rename to Plugins/org.mitk.gui.qt.cmdlinemodules/documentation/UserManual/CLIPreferences.png diff --git a/Plugins/org.mitk.gui.qt.cli/documentation/UserManual/CLIPreferencesAdditionalDirectories.png b/Plugins/org.mitk.gui.qt.cmdlinemodules/documentation/UserManual/CLIPreferencesAdditionalDirectories.png similarity index 100% rename from Plugins/org.mitk.gui.qt.cli/documentation/UserManual/CLIPreferencesAdditionalDirectories.png rename to Plugins/org.mitk.gui.qt.cmdlinemodules/documentation/UserManual/CLIPreferencesAdditionalDirectories.png diff --git a/Plugins/org.mitk.gui.qt.cli/documentation/UserManual/CLIPreferencesAdditionalModules.png b/Plugins/org.mitk.gui.qt.cmdlinemodules/documentation/UserManual/CLIPreferencesAdditionalModules.png similarity index 100% rename from Plugins/org.mitk.gui.qt.cli/documentation/UserManual/CLIPreferencesAdditionalModules.png rename to Plugins/org.mitk.gui.qt.cmdlinemodules/documentation/UserManual/CLIPreferencesAdditionalModules.png diff --git a/Plugins/org.mitk.gui.qt.cli/documentation/UserManual/CLIWithPrograms.png b/Plugins/org.mitk.gui.qt.cmdlinemodules/documentation/UserManual/CLIWithPrograms.png similarity index 100% rename from Plugins/org.mitk.gui.qt.cli/documentation/UserManual/CLIWithPrograms.png rename to Plugins/org.mitk.gui.qt.cmdlinemodules/documentation/UserManual/CLIWithPrograms.png diff --git a/Plugins/org.mitk.gui.qt.cli/documentation/UserManual/Manual.dox b/Plugins/org.mitk.gui.qt.cmdlinemodules/documentation/UserManual/Manual.dox similarity index 95% rename from Plugins/org.mitk.gui.qt.cli/documentation/UserManual/Manual.dox rename to Plugins/org.mitk.gui.qt.cmdlinemodules/documentation/UserManual/Manual.dox index c4748f0fe8..fcafc47d4d 100644 --- a/Plugins/org.mitk.gui.qt.cli/documentation/UserManual/Manual.dox +++ b/Plugins/org.mitk.gui.qt.cmdlinemodules/documentation/UserManual/Manual.dox @@ -1,170 +1,170 @@ /** -\bundlemainpage{org.mitk.gui.qt.cli} The Command Line Interface (CLI) View +\bundlemainpage{org.mitk.gui.qt.cmdlinemodules} The Command Line Modules View -\image html CLIIcon.png "Icon of CLI" +\image html CLIIcon.png "Icon of the Command Line Modules View" \li \ref CLIIntroduction \li \ref CLIPreferences \li \ref CLIUsage \li \ref CLITechnicalNotes \section CLIPrefix Contribution This plugin was developed at the Centre For Medical Image Computing (CMIC), part of University College London (UCL) and contributed back to the MITK community with thanks. \section CLIIntroduction Introduction This view provides the facility to run third party command line programs, and load the data back into the DataManager for immediate visualisation. All that is required is that the command line application can be called with an argument of --xml and respond with a valid XML description of the necessary parameters. This view can then generate a Graphical User Interface (GUI) dynamically from the XML to enable the user to interact with the command line application. This provides an easy to use, and potentially very flexible way to integrate almost any third party, medical imaging, command line application. As a high level introduction, this view performs the following steps: \li The view searches for available programs to run, and for each valid module, stores the XML document describing the interface, and populates a searchable list of available programs. \li When a program is selected, the GUI is generated. \li The user can then set the necessary parameters and run the program. \li Multiple programs can be launched simultaneously, and where available on the host platform, the user can pause, resume or cancel running jobs and see console output for each job. As a consequence of the very flexible nature of this plugin, these instructions can only describe how to launch command line modules in a general sense. The examples shown have been constructed by downloading the latest version of the NiftyReg package, available here, and described further here. NiftyReg provides valid XML descriptors to enable the integration of the NiftyReg affine (RegAladin) and and non-rigid (RegF3D) image registration algorithms, as well as utility programs to resample an image, and calculate a Jacobian image. These same XML descriptors work within Slicer and MITK based applications. \section CLIPreferences Preferences -The first time that the CLI View is launched, it is advisable to set the user preferences for the view. Please refer +The first time that the Command Line Modules View is launched, it is advisable to set the user preferences for the view. Please refer to Figure 1. -\image html CLIPreferences.png "Figure 1. The CLI Preferences Page" +\image html CLIPreferences.png "Figure 1. The Command Line Modules Preferences Page" Each of these preferences is now explained in some detail. \li show debug output: If checked will output more messages to the console for debugging purposes. \li XML validation mode: The user may select a different mode for XML validation. If this is changed, the application will need to be restarted. There are 3 modes available. If the user selects "strict" mode, the XML schema produced by the command line application must exactly conform to this definition. For "none", there will be no validation. For "weak" validation, the application will report errors, but try to carry on and load as many modules as possible. The XML validation errors are available as tool-tips on the tab widget when the module is launched. Many third party modules included with Slicer currently have incorrect XML, and so the "weak" or "none" mode may assist in loading them. By default the "strict" mode is chosen so that only valid modules are loaded. \li max concurrent processes: Sets the maximum number of concurrent jobs that can be run via this interface. The default is 4. When the maximum number is reached, the green "Run" button is disabled until a job finishes. The next four preferences are to control where the view will search for valid command line programs. By default these are off as the searching process can take a long time and slow down the startup time of the GUI. The options provided are: \li scan home directory: Scan the users home directory. Most useful on unix systems where users can install their own software. \li scan current directory: This is the current working directory. Most useful on unix systems where users launch the application from the console. \li scan installation directory: This is the directory where the actual application is stored. \li scan CTK_MODULE_LOAD_PATH: If the environment variable CTK_MODULE_LOAD_PATH points to a valid directory, this will also be scanned. In addition, for the first 3 of these options, the sub-directory "cli-modules" will also be scanned if it exists. In most cases, the user will leave these options unchecked, as the user can also specify custom directories, and even cherry-pick specific command line programs to load. Figure 2 shows a selection box that enables the user to specify custom directories to scan, and Figure 3. shows a selection box that enables the user to select specific modules. \image html CLIPreferencesAdditionalDirectories.png "Figure 2. The User can specify specific directories to scan". \image html CLIPreferencesAdditionalModules.png "Figure 3. The User can specify specific command line programs to load". These directory and file selection boxes enable directories or files to be added, removed and updated in a similar fashion. The user must make sure that the list of files selected in the "additional modules" section are not already contained within the directories specified in the "additional module directories" section. In addition, the preferences page provides: \li temporary directory: Images stored in the DataManager are first written to a temporary folder as Nifti images before being passed to each command line program. This temporary directory will default to a platform specific temporary folder, but the user may select their preferred choice of temporary workspace. \section CLIUsage Usage When the view is launched, a simple interface is presented, as shown in Figure 4. \image html CLIInitial.png "Figure 4. The initial interface, with no command line programs available." In this example, all the above check-box preferences were off, and the "additional module directories" was empty, and the "additional modules" list was empty so no command line applications were found. The "Search" box displays zero entries, and there is nothing to search. If the available search paths contain programs that are compatible (i.e. runnable) with this view, the name of the programs are displayed in the "Search" box in a nested menu, shown in Figure 5. \image html CLIWithPrograms.png "Figure 5. When valid paths are set, and programs are discovered, the menu is recalculated to show available programs." When a program is selected, the relevant interface is displayed, by default as collapsed group boxes to save space. Each section can be individually expanded if necessary to see the parameters. \image html CLINiftyReg.png "Figure 6. An example program, showing parameters for NiftyReg's program RegAladin." In this example, the parameters are displayed for NiftyReg produced at UCL, and more specifically for the affine registration program called RegAladin. The interface can contain a wide variety of controls. If a parameter for a command line program is an input image, then the widget displayed is linked to the DataManager, so that as new images are loaded, the correct image can be easily selected from the combo box. At this stage, multiple tabs can be opened, with one tab for each command line program. Figure 7 shows 2 tabs, for the RegAladin and RegF3D programs. \image html CLIF3D.png "Figure 7. Multiple tabs can be opened, one for each command line program." The main view provides some simple controls: \li Green arrow: Launch (run) the command line executable of the currently selected tab. \li Yellow undo arrow: Resets the GUI controls of the currently selected tab to default values, if and only if the original XML specified a default value. At this stage, nothing has been launched. When the user hits the green arrow button, a job is launched. Each running job is shown as a new progress reporting widget under the main tabbed widget, as shown in Figure 8. \image html CLINiftyRegRunning2.png "Figure 8. Multiple programs can be run, each with individual controls and console output." The controls for each running job are: \li Blue pause button: If supported on the host platform, this button will be enabled and can be toggled off (pause) or on (resume). \li Red square: If supported on the host platform, this button will kill the command line program. \li Black cross: Will remove the progress reporting widget from the GUI. When the user hits the green arrow in the main view: \li The currently selected tab is designated the "current" job, and contains the "current" set of parameters. \li A new progress reporting widget is created. \li The current parameters are copied to the progress reporting widget. In Figure 8. a parameters section is visible, and by default is collapsed, as they are simply for referring back to. \li All the output for the command line program is shown in the console widget, with a separate console for each job. \li Each new progress reporting widget is simply stacked vertically (newest is top-most), and it is up to the user to delete them when they are finished. It is easy to run multiple jobs. The green button simply launches the job corresponding to the current tab repeatedly. It is up to the user to make sure that any output file names are changed between successive invocations of the same command line module to avoid overwritting output data. In addition, each set of parameters contains an "About" section containing details of the contributors, the licence and acknowledgements and also a "Help" section containing a description and a link to any on-line documentation. These documentation features are provided by the developers of the third party plugin, and not by the host program. If information is missing, the user must contact the third party developers. \section CLITechnicalNotes Technical Notes -From a technical perspective, the Command Line Interface (CLI) View is a simple view, harnessing the power of the CTK +From a technical perspective, the Command Line Modules View is a simple view, harnessing the power of the CTK command line modules framework. For technical information see: \li The doxygen generated manual page. \li The wiki page. and obviously the CTK code base. */ diff --git a/Plugins/org.mitk.gui.qt.cli/documentation/doxygen/modules.dox b/Plugins/org.mitk.gui.qt.cmdlinemodules/documentation/doxygen/modules.dox similarity index 68% rename from Plugins/org.mitk.gui.qt.cli/documentation/doxygen/modules.dox rename to Plugins/org.mitk.gui.qt.cmdlinemodules/documentation/doxygen/modules.dox index f738796960..aa310ca947 100644 --- a/Plugins/org.mitk.gui.qt.cli/documentation/doxygen/modules.dox +++ b/Plugins/org.mitk.gui.qt.cmdlinemodules/documentation/doxygen/modules.dox @@ -1,18 +1,18 @@ /** - \defgroup org_mitk_gui_qt_cli org.mitk.gui.qt.cli + \defgroup org_mitk_gui_qt_cmdlinemodules org.mitk.gui.qt.cmdlinemodules \ingroup MITKPlugins \brief This plugin, provided by University College London (UCL), written by Matt Clarkson (m.clarkson@ucl.ac.uk) uses the CTK (http://www.commontk.org) Command Line Modules library to run command line programs as an external process. */ /** - \defgroup org_mitk_gui_qt_cli_internal Internal - \ingroup org_mitk_gui_qt_cli + \defgroup org_mitk_gui_qt_cmdlinemodules_internal Internal + \ingroup org_mitk_gui_qt_cmdlinemodules - \brief This subcategory includes the internal classes of the org.mitk.gui.qt.cli plugin. Other + \brief This subcategory includes the internal classes of the org.mitk.gui.qt.cmdlinemodules plugin. Other plugins must not rely on these classes. They contain implementation details and their interface may change at any time. We mean it. */ diff --git a/Plugins/org.mitk.gui.qt.cli/files.cmake b/Plugins/org.mitk.gui.qt.cmdlinemodules/files.cmake similarity index 94% rename from Plugins/org.mitk.gui.qt.cli/files.cmake rename to Plugins/org.mitk.gui.qt.cmdlinemodules/files.cmake index 30935b9fc2..edc784b62b 100644 --- a/Plugins/org.mitk.gui.qt.cli/files.cmake +++ b/Plugins/org.mitk.gui.qt.cmdlinemodules/files.cmake @@ -1,66 +1,66 @@ set(SRC_CPP_FILES QmitkCmdLineModuleMenuComboBox.cpp ) set(INTERNAL_CPP_FILES QmitkDataStorageComboBoxWithSelectNone.cpp QmitkDirectoryListWidget.cpp QmitkFileListWidget.cpp QmitkCmdLineModuleGui.cpp QmitkCmdLineModuleFactoryGui.cpp QmitkUiLoader.cpp - org_mitk_gui_qt_cli_Activator.cpp + org_mitk_gui_qt_cmdlinemodules_Activator.cpp CommandLineModulesViewConstants.cpp CommandLineModulesViewControls.cpp CommandLineModulesPreferencesPage.cpp CommandLineModulesView.cpp QmitkCmdLineModuleProgressWidget.cpp ) set(UI_FILES src/internal/QmitkPathListWidget.ui src/internal/CommandLineModulesViewControls.ui src/internal/QmitkCmdLineModuleProgressWidget.ui ) set(MOC_H_FILES src/QmitkCmdLineModuleMenuComboBox.h src/internal/QmitkDataStorageComboBoxWithSelectNone.h src/internal/QmitkDirectoryListWidget.h src/internal/QmitkFileListWidget.h src/internal/QmitkCmdLineModuleGui.h src/internal/QmitkUiLoader.h - src/internal/org_mitk_gui_qt_cli_Activator.h + src/internal/org_mitk_gui_qt_cmdlinemodules_Activator.h src/internal/CommandLineModulesViewControls.h src/internal/CommandLineModulesPreferencesPage.h src/internal/CommandLineModulesView.h src/internal/QmitkCmdLineModuleProgressWidget.h ) # list of resource files which can be used by the plug-in # system without loading the plug-ins shared library, # for example the icon used in the menu and tabs for the # plug-in views in the workbench set(CACHED_RESOURCE_FILES resources/icon.xpm resources/run.png resources/stop.png plugin.xml ) # list of Qt .qrc files which contain additional resources # specific to this plugin set(QRC_FILES resources/CommandLineModulesResources.qrc ) set(CPP_FILES ) foreach(file ${SRC_CPP_FILES}) set(CPP_FILES ${CPP_FILES} src/${file}) endforeach(file ${SRC_CPP_FILES}) foreach(file ${INTERNAL_CPP_FILES}) set(CPP_FILES ${CPP_FILES} src/internal/${file}) endforeach(file ${INTERNAL_CPP_FILES}) diff --git a/Plugins/org.mitk.gui.qt.cli/manifest_headers.cmake b/Plugins/org.mitk.gui.qt.cmdlinemodules/manifest_headers.cmake similarity index 82% rename from Plugins/org.mitk.gui.qt.cli/manifest_headers.cmake rename to Plugins/org.mitk.gui.qt.cmdlinemodules/manifest_headers.cmake index 7e78c50b34..8ed170d027 100644 --- a/Plugins/org.mitk.gui.qt.cli/manifest_headers.cmake +++ b/Plugins/org.mitk.gui.qt.cmdlinemodules/manifest_headers.cmake @@ -1,5 +1,5 @@ -set(Plugin-Name "CLI") +set(Plugin-Name "Command Line Modules") set(Plugin-Version "0.1") set(Plugin-Vendor "CMIC, Centre For Medical Image Computing, UCL.") set(Plugin-ContactAddress "http://cmic.cs.ucl.ac.uk/") set(Require-Plugin org.mitk.gui.qt.common) diff --git a/Plugins/org.mitk.gui.qt.cmdlinemodules/plugin.xml b/Plugins/org.mitk.gui.qt.cmdlinemodules/plugin.xml new file mode 100644 index 0000000000..6fc85ae9dd --- /dev/null +++ b/Plugins/org.mitk.gui.qt.cmdlinemodules/plugin.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + diff --git a/Plugins/org.mitk.gui.qt.cli/resources/CommandLineModulesResources.qrc b/Plugins/org.mitk.gui.qt.cmdlinemodules/resources/CommandLineModulesResources.qrc similarity index 100% rename from Plugins/org.mitk.gui.qt.cli/resources/CommandLineModulesResources.qrc rename to Plugins/org.mitk.gui.qt.cmdlinemodules/resources/CommandLineModulesResources.qrc diff --git a/Plugins/org.mitk.gui.qt.cli/resources/icon.png b/Plugins/org.mitk.gui.qt.cmdlinemodules/resources/icon.png similarity index 100% rename from Plugins/org.mitk.gui.qt.cli/resources/icon.png rename to Plugins/org.mitk.gui.qt.cmdlinemodules/resources/icon.png diff --git a/Plugins/org.mitk.gui.qt.cli/resources/icon.xpm b/Plugins/org.mitk.gui.qt.cmdlinemodules/resources/icon.xpm similarity index 100% rename from Plugins/org.mitk.gui.qt.cli/resources/icon.xpm rename to Plugins/org.mitk.gui.qt.cmdlinemodules/resources/icon.xpm diff --git a/Plugins/org.mitk.gui.qt.cli/resources/pause.png b/Plugins/org.mitk.gui.qt.cmdlinemodules/resources/pause.png similarity index 100% rename from Plugins/org.mitk.gui.qt.cli/resources/pause.png rename to Plugins/org.mitk.gui.qt.cmdlinemodules/resources/pause.png diff --git a/Plugins/org.mitk.gui.qt.cli/resources/run.png b/Plugins/org.mitk.gui.qt.cmdlinemodules/resources/run.png similarity index 100% rename from Plugins/org.mitk.gui.qt.cli/resources/run.png rename to Plugins/org.mitk.gui.qt.cmdlinemodules/resources/run.png diff --git a/Plugins/org.mitk.gui.qt.cli/resources/stop.png b/Plugins/org.mitk.gui.qt.cmdlinemodules/resources/stop.png similarity index 100% rename from Plugins/org.mitk.gui.qt.cli/resources/stop.png rename to Plugins/org.mitk.gui.qt.cmdlinemodules/resources/stop.png diff --git a/Plugins/org.mitk.gui.qt.cli/resources/undo.png b/Plugins/org.mitk.gui.qt.cmdlinemodules/resources/undo.png similarity index 100% rename from Plugins/org.mitk.gui.qt.cli/resources/undo.png rename to Plugins/org.mitk.gui.qt.cmdlinemodules/resources/undo.png diff --git a/Plugins/org.mitk.gui.qt.cli/src/QmitkCmdLineModuleMenuComboBox.cpp b/Plugins/org.mitk.gui.qt.cmdlinemodules/src/QmitkCmdLineModuleMenuComboBox.cpp similarity index 100% rename from Plugins/org.mitk.gui.qt.cli/src/QmitkCmdLineModuleMenuComboBox.cpp rename to Plugins/org.mitk.gui.qt.cmdlinemodules/src/QmitkCmdLineModuleMenuComboBox.cpp diff --git a/Plugins/org.mitk.gui.qt.cli/src/QmitkCmdLineModuleMenuComboBox.h b/Plugins/org.mitk.gui.qt.cmdlinemodules/src/QmitkCmdLineModuleMenuComboBox.h similarity index 94% rename from Plugins/org.mitk.gui.qt.cli/src/QmitkCmdLineModuleMenuComboBox.h rename to Plugins/org.mitk.gui.qt.cmdlinemodules/src/QmitkCmdLineModuleMenuComboBox.h index 8cd6546950..9c95a27023 100644 --- a/Plugins/org.mitk.gui.qt.cli/src/QmitkCmdLineModuleMenuComboBox.h +++ b/Plugins/org.mitk.gui.qt.cmdlinemodules/src/QmitkCmdLineModuleMenuComboBox.h @@ -1,67 +1,67 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) University College London (UCL). All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef QMITKCMDLINEMODULEMENUCOMBOBOX_H #define QMITKCMDLINEMODULEMENUCOMBOBOX_H #include #include #include #include #include /** * \class QmitkCmdLineModuleMenuComboBox * \brief Subclass of ctkMenuComboBox to listen to ctkCmdLineModuleManager * moduleRegistered and moduleUnregistered signals, and update the menu accordingly. - * \ingroup org_mitk_gui_qt_cli_internal + * \ingroup org_mitk_gui_qt_cmdlinemodules_internal * \sa ctkMenuComboBox */ class QmitkCmdLineModuleMenuComboBox : public ctkMenuComboBox { Q_OBJECT public: QmitkCmdLineModuleMenuComboBox(QWidget* parent = 0); virtual ~QmitkCmdLineModuleMenuComboBox(); /** * \brief Inject the module manager, so that this widget can * still easily be used via widget promotion in Qt Designer, * as it will maintain the default constructor. */ void SetManager(ctkCmdLineModuleManager* manager); /** * \brief Returns the ctkCmdLineModuleManager. */ ctkCmdLineModuleManager* GetManager() const; private slots: void OnModuleRegistered(const ctkCmdLineModuleReference&); void OnModuleUnRegistered(const ctkCmdLineModuleReference&); private: void RebuildMenu(); void AddName(QList< QHash* >& listOfHashMaps, const int& depth, const QString& name, QMenu* menu); ctkCmdLineModuleManager* m_ModuleManager; }; -#endif QMITKCMDLINEMODULEMENUCOMBOBOX_H +#endif // QMITKCMDLINEMODULEMENUCOMBOBOX_H diff --git a/Plugins/org.mitk.gui.qt.cli/src/internal/CommandLineModulesPreferencesPage.cpp b/Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/CommandLineModulesPreferencesPage.cpp similarity index 100% rename from Plugins/org.mitk.gui.qt.cli/src/internal/CommandLineModulesPreferencesPage.cpp rename to Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/CommandLineModulesPreferencesPage.cpp diff --git a/Plugins/org.mitk.gui.qt.cli/src/internal/CommandLineModulesPreferencesPage.h b/Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/CommandLineModulesPreferencesPage.h similarity index 96% rename from Plugins/org.mitk.gui.qt.cli/src/internal/CommandLineModulesPreferencesPage.h rename to Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/CommandLineModulesPreferencesPage.h index f8f5fc2af2..de1b9e13fe 100644 --- a/Plugins/org.mitk.gui.qt.cli/src/internal/CommandLineModulesPreferencesPage.h +++ b/Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/CommandLineModulesPreferencesPage.h @@ -1,103 +1,103 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) University College London (UCL). All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef COMMANDLINEMODULESPREFERENCESPAGE_H #define COMMANDLINEMODULESPREFERENCESPAGE_H #include "berryIQtPreferencePage.h" #include "berryIPreferences.h" -#include +#include class QWidget; class QCheckBox; class QComboBox; class QSpinBox; class QmitkDirectoryListWidget; class QmitkFileListWidget; class ctkDirectoryButton; /** * \class CommandLineModulesPreferencesPage * \brief Preference page for CommandLineModulesView * \author Matt Clarkson (m.clarkson@ucl.ac.uk) - * \ingroup org_mitk_gui_qt_cli_internal + * \ingroup org_mitk_gui_qt_cmdlinemodules_internal */ class CommandLineModulesPreferencesPage : public QObject, public berry::IQtPreferencePage { Q_OBJECT Q_INTERFACES(berry::IPreferencePage) public: CommandLineModulesPreferencesPage(); ~CommandLineModulesPreferencesPage(); /** * \brief Called by framework to initialise this preference page, but currently does nothing. * \param workbench The workbench. */ void Init(berry::IWorkbench::Pointer workbench); /** * \brief Called by framework to create the GUI, and connect signals and slots. * \param widget The Qt widget that acts as parent to all GUI components, as this class itself is not derived from QWidget. */ void CreateQtControl(QWidget* widget); /** * \brief Required by framework to get hold of the GUI. * \return QWidget* the top most QWidget for the GUI. */ QWidget* GetQtControl() const; /** * \see IPreferencePage::PerformOk */ virtual bool PerformOk(); /** * \see IPreferencePage::PerformCancel */ virtual void PerformCancel(); /** * \see IPreferencePage::Update */ virtual void Update(); public slots: protected: QWidget *m_MainControl; QCheckBox *m_DebugOutput; ctkDirectoryButton *m_OutputDirectory; ctkDirectoryButton *m_TemporaryDirectory; QmitkDirectoryListWidget *m_ModulesDirectories; QmitkFileListWidget *m_ModulesFiles; QCheckBox *m_LoadFromHomeDir; QCheckBox *m_LoadFromCurrentDir; QCheckBox *m_LoadFromApplicationDir; QCheckBox *m_LoadFromAutoLoadPathDir; QComboBox *m_ValidationMode; QSpinBox *m_MaximumNumberProcesses; berry::IPreferences::Pointer m_CLIPreferencesNode; private: std::string ConvertToStdString(const QStringList& list); }; #endif // COMMANDLINEMODULESPREFERENCESPAGE_H diff --git a/Plugins/org.mitk.gui.qt.cli/src/internal/CommandLineModulesView.cpp b/Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/CommandLineModulesView.cpp similarity index 100% rename from Plugins/org.mitk.gui.qt.cli/src/internal/CommandLineModulesView.cpp rename to Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/CommandLineModulesView.cpp diff --git a/Plugins/org.mitk.gui.qt.cli/src/internal/CommandLineModulesView.h b/Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/CommandLineModulesView.h similarity index 99% rename from Plugins/org.mitk.gui.qt.cli/src/internal/CommandLineModulesView.h rename to Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/CommandLineModulesView.h index ee9e4d055b..840b93da27 100644 --- a/Plugins/org.mitk.gui.qt.cli/src/internal/CommandLineModulesView.h +++ b/Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/CommandLineModulesView.h @@ -1,226 +1,226 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) University College London (UCL). All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef CommandLineModulesView_h #define CommandLineModulesView_h #include #include #include #include #include #include #include class ctkCmdLineModuleBackendLocalProcess; class ctkCmdLineModuleDirectoryWatcher; class CommandLineModulesViewControls; class QmitkCmdLineModuleProgressWidget; class QAction; class QVBoxLayout; namespace berry { class IBerryPreferences; } /*! * \class CommandLineModulesView * \brief Provides basic GUI interface to the CTK command line modules. * \author Matt Clarkson (m.clarkson@ucl.ac.uk) - * \ingroup org_mitk_gui_qt_cli_internal + * \ingroup org_mitk_gui_qt_cmdlinemodules_internal * \sa QmitkAbstractView */ class CommandLineModulesView : public QmitkAbstractView { // this is needed for all Qt objects that should have a Qt meta-object // (everything that derives from QObject and wants to have signal/slots) Q_OBJECT public: CommandLineModulesView(); virtual ~CommandLineModulesView(); /** * \brief Main method, called by framework to create the GUI at the right time. * \param parent The parent QWidget, as this class itself is not a QWidget subclass. */ virtual void CreateQtPartControl(QWidget *parent); /** * \brief Called by the framework to indicate that the preferences have changed. * \param prefs not used, as we call RetrievePreferenceValues(). */ void OnPreferencesChanged(const berry::IBerryPreferences* prefs); protected Q_SLOTS: /** * \brief Called when the ctkMenuComboBox has the menu selection changed, * and causes the corresponding GUI to be displayed. */ void OnActionChanged(QAction*); /** * \brief Slot that is called when the restore defaults button is pressed, * to reset the current GUI form to the default values, if the XML specifies defaults. */ void OnRestoreButtonPressed(); /** * \brief Slot that is called when the Run button is pressed to run the current module. */ void OnRunButtonPressed(); protected: /** * \brief Called by framework to set the focus on the right widget * when this view has focus, so currently, thats the ctkMenuCombo box. */ virtual void SetFocus(); private slots: /** * \brief Called when the user clicks to close a tab, and removes the front end from m_ListOfModules */ void OnTabCloseRequested(int tabNumber); /** * \brief Called from QmitkCmdLineModuleProgressWidget to indicate a job has started. */ void OnJobStarted(); /** * \brief Called from QmitkCmdLineModuleProgressWidget to indicate a job has finished. */ void OnJobFinished(); private: /** * \brief Called on startup and by OnPreferencesChanged to load all * preferences except the temporary folder into member variables. */ void RetrieveAndStorePreferenceValues(); /** * \brief Called on startup and by OnPreferencesChanged to load the temporary folder * preference into member variable m_TemporaryDirectoryName. */ void RetrieveAndStoreTemporaryDirectoryPreferenceValues(); /** * \brief Called on startup and by OnPreferencesChanged to set the validation mode, but will require a restart. */ void RetrieveAndStoreValidationMode(); /** * \brief Called to get hold of the actual preferences node. */ berry::IBerryPreferences::Pointer RetrievePreferences(); /** * \brief Search all modules for the one matching the given identifier. * \param fullName The "fullName" is the . from the XML. * \return ctkCmdLineModuleReference the reference corresponding to the fullName, or an invalid reference if non found. */ ctkCmdLineModuleReference GetReferenceByFullName(QString fullName); /** * \brief Raises a message box asking the user to select a module first. */ void AskUserToSelectAModule() const; /** * \brief Enables or Disables the Run Button. */ void UpdateRunButtonEnabledStatus(); /** * \brief The GUI controls contain a reset and run button, and a QWidget container, and the GUI component * for each command line module is added to the QWidget dynamically at run time. */ CommandLineModulesViewControls *m_Controls; /** * \brief We store the parent, passed in via CommandLineModulesView::CreateQtPartControl, * as this class itself is not a QWidget. */ QWidget *m_Parent; /** * \brief We keep a local layout, and arrange a display of QmitkCmdLineModuleProgressWidget, * where each QmitkCmdLineModuleProgressWidget represents a single running job. */ QVBoxLayout *m_Layout; /** * \brief The manager is responsible for loading and instantiating command line modules. */ ctkCmdLineModuleManager *m_ModuleManager; /** * \brief We are using a back-end that runs locally installed command line programs. */ ctkCmdLineModuleBackendLocalProcess *m_ModuleBackend; /** * \brief The ctkCmdLineModuleDirectoryWatcher maintains the list of directories * we are using to load modules, to provide automatic updates. */ ctkCmdLineModuleDirectoryWatcher *m_DirectoryWatcher; /** * \brief We store a temporary folder name, accessible via user preferences. */ QString m_TemporaryDirectoryName; /** * \brief We store an output folder name, accessible via user preferences for when * the file specified in a default output path is not within a writable directory. */ QString m_OutputDirectoryName; /** * \brief We store the validation mode, accessisble via user preferences. */ ctkCmdLineModuleManager::ValidationMode m_ValidationMode; /** * \brief We store the maximum number of concurrent processes, and disable the run button accordingly. */ int m_MaximumConcurrentProcesses; /** * \brief Counts the number of currently running processes. */ int m_CurrentlyRunningProcesses; /** * \brief Member variable, taken from preference page. */ bool m_DebugOutput; /** * \brief We keep a list of front ends to match the m_TabWidget. */ QList<ctkCmdLineModuleFrontend*> m_ListOfModules; }; #endif // CommandLineModulesView_h diff --git a/Plugins/org.mitk.gui.qt.cli/src/internal/CommandLineModulesViewConstants.cpp b/Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/CommandLineModulesViewConstants.cpp similarity index 98% rename from Plugins/org.mitk.gui.qt.cli/src/internal/CommandLineModulesViewConstants.cpp rename to Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/CommandLineModulesViewConstants.cpp index 9fd1c89b34..7bcf55e827 100644 --- a/Plugins/org.mitk.gui.qt.cli/src/internal/CommandLineModulesViewConstants.cpp +++ b/Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/CommandLineModulesViewConstants.cpp @@ -1,29 +1,29 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) University College London (UCL). All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #include "CommandLineModulesViewConstants.h" -const std::string CommandLineModulesViewConstants::VIEW_ID = "org.mitk.gui.qt.cli"; +const std::string CommandLineModulesViewConstants::VIEW_ID = "org.mitk.gui.qt.cmdlinemodules"; const std::string CommandLineModulesViewConstants::TEMPORARY_DIRECTORY_NODE_NAME = "temporary directory"; const std::string CommandLineModulesViewConstants::OUTPUT_DIRECTORY_NODE_NAME = "output directory"; const std::string CommandLineModulesViewConstants::MODULE_DIRECTORIES_NODE_NAME = "module directories"; const std::string CommandLineModulesViewConstants::MODULE_FILES_NODE_NAME = "module files"; const std::string CommandLineModulesViewConstants::DEBUG_OUTPUT_NODE_NAME = "debug output"; const std::string CommandLineModulesViewConstants::LOAD_FROM_APPLICATION_DIR = "load from application dir"; const std::string CommandLineModulesViewConstants::LOAD_FROM_HOME_DIR = "load from home dir"; const std::string CommandLineModulesViewConstants::LOAD_FROM_CURRENT_DIR = "load from current dir"; const std::string CommandLineModulesViewConstants::LOAD_FROM_AUTO_LOAD_DIR = "load from auto-load dir"; const std::string CommandLineModulesViewConstants::XML_VALIDATION_MODE = "xml validation mode"; const std::string CommandLineModulesViewConstants::MAX_CONCURRENT = "max concurrent processes"; diff --git a/Plugins/org.mitk.gui.qt.cli/src/internal/CommandLineModulesViewConstants.h b/Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/CommandLineModulesViewConstants.h similarity index 95% rename from Plugins/org.mitk.gui.qt.cli/src/internal/CommandLineModulesViewConstants.h rename to Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/CommandLineModulesViewConstants.h index d7ccec6969..0f414a91be 100644 --- a/Plugins/org.mitk.gui.qt.cli/src/internal/CommandLineModulesViewConstants.h +++ b/Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/CommandLineModulesViewConstants.h @@ -1,96 +1,96 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) University College London (UCL). All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef CommandLineModulesViewConstants_h #define CommandLineModulesViewConstants_h #include <QString> #include <string> /** * \class CommandLineModulesViewConstants * \brief Structure to define a namespace for constants used privately within this view. * \author Matt Clarkson (m.clarkson@ucl.ac.uk) - * \ingroup org_mitk_gui_qt_cli_internal + * \ingroup org_mitk_gui_qt_cmdlinemodules_internal */ struct CommandLineModulesViewConstants { /** * \brief The name of the preferences node containing the temporary directory. */ static const std::string TEMPORARY_DIRECTORY_NODE_NAME; /** * \brief The name of the preferences node containing the output directory. */ static const std::string OUTPUT_DIRECTORY_NODE_NAME; /** * \brief The name of the preferences node containing the list of directories to scan. */ static const std::string MODULE_DIRECTORIES_NODE_NAME; /** * \brief The name of the preferences node containing the additional files to add to the module list. */ static const std::string MODULE_FILES_NODE_NAME; /** * \brief The name of the preferences node containing whether we are producing debug output. */ static const std::string DEBUG_OUTPUT_NODE_NAME; /** * \brief The name of the preferences node containing a boolean describing whether * we are loading modules from the application directory. */ static const std::string LOAD_FROM_APPLICATION_DIR; /** * \brief The name of the preferences node containing a boolean describing whether * we are loading modules from the users home directory. */ static const std::string LOAD_FROM_HOME_DIR; /** * \brief The name of the preferences node containing a boolean describing whether * we are loading modules from the applications current working directory. */ static const std::string LOAD_FROM_CURRENT_DIR; /** * \brief The name of the preferences node containing a boolean describing whether * we are loading modules from the directory specified in CTK_MODULE_LOAD_PATH. */ static const std::string LOAD_FROM_AUTO_LOAD_DIR; /** * \brief The name of the preferences node containing the validation mode. */ static const std::string XML_VALIDATION_MODE; /** * \brief The name of the preferences node containing the maximum number of concurrent processes. */ static const std::string MAX_CONCURRENT; /** - * \brief The View ID = org.mitk.gui.qt.cli, and should match that in plugin.xml. + * \brief The View ID = org.mitk.gui.qt.cmdlinemodules, and should match that in plugin.xml. */ static const std::string VIEW_ID; }; #endif // CommandLineModulesViewConstants_h diff --git a/Plugins/org.mitk.gui.qt.cli/src/internal/CommandLineModulesViewControls.cpp b/Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/CommandLineModulesViewControls.cpp similarity index 100% rename from Plugins/org.mitk.gui.qt.cli/src/internal/CommandLineModulesViewControls.cpp rename to Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/CommandLineModulesViewControls.cpp diff --git a/Plugins/org.mitk.gui.qt.cli/src/internal/CommandLineModulesViewControls.h b/Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/CommandLineModulesViewControls.h similarity index 95% rename from Plugins/org.mitk.gui.qt.cli/src/internal/CommandLineModulesViewControls.h rename to Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/CommandLineModulesViewControls.h index 052fe45ff8..46238d6ea2 100644 --- a/Plugins/org.mitk.gui.qt.cli/src/internal/CommandLineModulesViewControls.h +++ b/Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/CommandLineModulesViewControls.h @@ -1,46 +1,46 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) University College London (UCL). All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef CommandLineModulesViewControls_h #define CommandLineModulesViewControls_h #include "ui_CommandLineModulesViewControls.h" class QHBoxLayout; /** * \class CommandLineModulesViewControls * \brief Class derived from Ui_CommandLineModulesViewControls to provide access to GUI widgets. * \author Matt Clarkson (m.clarkson@ucl.ac.uk) - * \ingroup org_mitk_gui_qt_cli_internal + * \ingroup org_mitk_gui_qt_cmdlinemodules_internal */ class CommandLineModulesViewControls : public QWidget, public Ui_CommandLineModulesViewControls { // this is needed for all Qt objects that should have a MOC object (everything that derives from QObject) Q_OBJECT public: CommandLineModulesViewControls(QWidget *parent = 0); virtual ~CommandLineModulesViewControls(); protected: private: }; #endif // CommandLineModulesViewControls_h diff --git a/Plugins/org.mitk.gui.qt.cli/src/internal/CommandLineModulesViewControls.ui b/Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/CommandLineModulesViewControls.ui similarity index 100% rename from Plugins/org.mitk.gui.qt.cli/src/internal/CommandLineModulesViewControls.ui rename to Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/CommandLineModulesViewControls.ui diff --git a/Plugins/org.mitk.gui.qt.cli/src/internal/QmitkCmdLineModuleFactoryGui.cpp b/Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/QmitkCmdLineModuleFactoryGui.cpp similarity index 100% rename from Plugins/org.mitk.gui.qt.cli/src/internal/QmitkCmdLineModuleFactoryGui.cpp rename to Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/QmitkCmdLineModuleFactoryGui.cpp diff --git a/Plugins/org.mitk.gui.qt.cli/src/internal/QmitkCmdLineModuleFactoryGui.h b/Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/QmitkCmdLineModuleFactoryGui.h similarity index 96% rename from Plugins/org.mitk.gui.qt.cli/src/internal/QmitkCmdLineModuleFactoryGui.h rename to Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/QmitkCmdLineModuleFactoryGui.h index 6345c8a187..f6e1f9d43b 100644 --- a/Plugins/org.mitk.gui.qt.cli/src/internal/QmitkCmdLineModuleFactoryGui.h +++ b/Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/QmitkCmdLineModuleFactoryGui.h @@ -1,54 +1,54 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) University College London (UCL). All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef QmitkCmdLineModuleFactoryGui_h #define QmitkCmdLineModuleFactoryGui_h #include <ctkCmdLineModuleFrontendFactoryQtGui.h> #include <ctkCmdLineModuleReference.h> namespace mitk { class DataStorage; } class QmitkCmdLineModuleFactoryGuiPrivate; /** * \class QmitkCmdLineModuleFactoryGui * \brief Derived from ctkCmdLineModuleFactory to instantiate QmitkCmdLineModuleGui front ends. * \author Matt Clarkson (m.clarkson@ucl.ac.uk) - * \ingroup org_mitk_gui_qt_cli_internal + * \ingroup org_mitk_gui_qt_cmdlinemodules_internal * \sa QmitkCmdLineModuleGui * \sa ctkCmdLineModuleFrontendFactoryQtGui */ class QmitkCmdLineModuleFactoryGui : public ctkCmdLineModuleFrontendFactoryQtGui { public: QmitkCmdLineModuleFactoryGui(const mitk::DataStorage* dataStorage); virtual ~QmitkCmdLineModuleFactoryGui(); /** * \brief Simply creates QmitkCmdLineModuleGui which is an MITK specific Qt front end. */ ctkCmdLineModuleFrontendQtGui* create(const ctkCmdLineModuleReference& moduleRef); private: QScopedPointer<QmitkCmdLineModuleFactoryGuiPrivate> d; }; #endif // QmitkCmdLineModuleFactoryGui_h diff --git a/Plugins/org.mitk.gui.qt.cli/src/internal/QmitkCmdLineModuleGui.cpp b/Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/QmitkCmdLineModuleGui.cpp similarity index 100% rename from Plugins/org.mitk.gui.qt.cli/src/internal/QmitkCmdLineModuleGui.cpp rename to Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/QmitkCmdLineModuleGui.cpp diff --git a/Plugins/org.mitk.gui.qt.cli/src/internal/QmitkCmdLineModuleGui.h b/Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/QmitkCmdLineModuleGui.h similarity index 98% rename from Plugins/org.mitk.gui.qt.cli/src/internal/QmitkCmdLineModuleGui.h rename to Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/QmitkCmdLineModuleGui.h index eddc50ad54..adea0c6bf4 100644 --- a/Plugins/org.mitk.gui.qt.cli/src/internal/QmitkCmdLineModuleGui.h +++ b/Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/QmitkCmdLineModuleGui.h @@ -1,117 +1,117 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) University College London (UCL). All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef QmitkCmdLineModuleGui_h #define QmitkCmdLineModuleGui_h #include <QBuffer> #include <QUiLoader> #include <ctkCmdLineModuleReference.h> #include <ctkCmdLineModuleFrontendQtGui.h> namespace mitk { class DataStorage; } class QmitkCmdLineModuleGuiPrivate; class QWidget; /** * \class QmitkCmdLineModuleGui * \brief Derived from ctkCmdLineModuleQtGui to implement an MITK specific command line module, * that has access to the mitk::DataStorage, and also instantiates QmitkDataStorageComboBox * for any "imageInputWidget" type, and also provides QmitkDataStorageComboBox.xsl to override * the standard CTK xslt transformation. * \author Matt Clarkson (m.clarkson@ucl.ac.uk) - * \ingroup org_mitk_gui_qt_cli_internal + * \ingroup org_mitk_gui_qt_cmdlinemodules_internal * \sa QmitkCmdLineModuleFactoryGui * \sa ctkCmdLineModuleFrontendQtGui */ class QmitkCmdLineModuleGui : public ctkCmdLineModuleFrontendQtGui { Q_OBJECT public: QmitkCmdLineModuleGui(const mitk::DataStorage* dataStorage, const ctkCmdLineModuleReference& moduleRef); virtual ~QmitkCmdLineModuleGui(); /** * \brief Returns the top level widget containing the whole GUI, and * should be used in preference to ctkCmdLineModuleFrontend::guiHandle. */ QWidget* getGui(); /** * \brief Copies the visible parameters from another QmitkCmdLineModuleGui; * \param another a QmitkCmdLineModuleGui frontend. */ void copyParameters(QmitkCmdLineModuleGui& another); /** * \brief A custom method to enable access to a mitk::DataNode::Pointer for input images. * \param parameter The name of the parameter as specified in XML. * \param role The role, \see ctkCmdLineModuleFrontend. * \return QVariant * * If role==UserRole and the parameter specified by parameter name is an * input image, will return a mitk::DataNode::Pointer wrapped in a QVariant. * * If role==UserRole and the parameter specified is not an input image, * returns an Empty QVariant. * * For any other scenario, calls base class. * * \sa ctkCmdLineModuleFrontend::value */ virtual QVariant value(const QString ¶meter, int role) const; /** * \brief A custom method to enable the setting of mitk::DataNode::Pointer for input images. * \param parameter The name of the parameter as specified in XML. * \param value QVariant containing a mitk::DataNode::Pointer * \param role The role, \see ctkCmdLineModuleFrontend. * * If role==UserRole and the parameter specified by parameter name is an * input image, will set the value for that parameter. * * * For any other scenario, calls base class. * * \sa ctkCmdLineModuleFrontend::setValue */ virtual void setValue(const QString& parameter, const QVariant& value, int role = DisplayRole); protected: /** * \brief Virtual getter. * \see ctkCmdLineModuleFrontendQtGui::uiLoader() */ virtual QUiLoader* uiLoader() const; /** * \brief Virtual getter. * \see ctkCmdLineModuleFrontendQtGui::xslTransform() */ virtual ctkCmdLineModuleXslTransform* xslTransform() const; private: QScopedPointer<QmitkCmdLineModuleGuiPrivate> d; }; // end class #endif // QmitkCmdLineModuleGui_h diff --git a/Plugins/org.mitk.gui.qt.cli/src/internal/QmitkCmdLineModuleProgressWidget.cpp b/Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/QmitkCmdLineModuleProgressWidget.cpp similarity index 100% rename from Plugins/org.mitk.gui.qt.cli/src/internal/QmitkCmdLineModuleProgressWidget.cpp rename to Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/QmitkCmdLineModuleProgressWidget.cpp diff --git a/Plugins/org.mitk.gui.qt.cli/src/internal/QmitkCmdLineModuleProgressWidget.h b/Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/QmitkCmdLineModuleProgressWidget.h similarity index 99% rename from Plugins/org.mitk.gui.qt.cli/src/internal/QmitkCmdLineModuleProgressWidget.h rename to Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/QmitkCmdLineModuleProgressWidget.h index 30c7f1668f..12fe69bf92 100644 --- a/Plugins/org.mitk.gui.qt.cli/src/internal/QmitkCmdLineModuleProgressWidget.h +++ b/Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/QmitkCmdLineModuleProgressWidget.h @@ -1,220 +1,220 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) University College London (UCL). All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef QMITKCMDLINEMODULEPROGRESSWIDGET_H #define QMITKCMDLINEMODULEPROGRESSWIDGET_H #include <QWidget> #include <QTimer> class QVBoxLayout; class QmitkCmdLineModuleGui; class ctkCmdLineModuleManager; class ctkCmdLineModuleFutureWatcher; namespace Ui { class QmitkCmdLineModuleProgressWidget; } namespace mitk { class DataStorage; } /** * \class QmitkCmdLineModuleProgressWidget * \brief Based on ctkCmdLineModuleExplorerProgressWidget, implements a progress widget * with console output, and space for storing the GUI widgets. * \author Matt Clarkson (m.clarkson@ucl.ac.uk) - * \ingroup org_mitk_gui_qt_cli_internal + * \ingroup org_mitk_gui_qt_cmdlinemodules_internal * \sa ctkCmdLineModuleExplorerProgressWidget */ class QmitkCmdLineModuleProgressWidget : public QWidget { Q_OBJECT public: QmitkCmdLineModuleProgressWidget(QWidget *parent = 0); virtual ~QmitkCmdLineModuleProgressWidget(); /** * \brief Sets the manager on this object, and must be called immediately * after construction, before using the widget. */ void SetManager(ctkCmdLineModuleManager* manager); /** * \brief Sets the DataStorage on this object, and must be called immediately * after construction, before using the widget. */ void SetDataStorage(mitk::DataStorage* dataStorage); /** * \brief Sets the Temporary Directory on this widget, and must be called * immediately after construction, before using the widget. */ void SetTemporaryDirectory(const QString& directoryName); /** * \brief Sets the Output Directory on this widget, and must be called * immediately after construction, before using the widget. */ void SetOutputDirectory(const QString& directoryName); /** * \brief Tells this widget, which module frontend it is running * \param frontEnd our QmitkCmdLineModuleGui class derived from ctkCmdLineModuleFrontend */ void SetFrontend(QmitkCmdLineModuleGui* frontEnd); /** * \brief Runs the module that this widget is currently referring to. */ void Run(); Q_SIGNALS: // These signals so that container classes such as CommandLineModuleView // can keep track of how many modules are running simultaneously. void started(); // emmitted when the module is started. void finished(); // emmitted when the module is completely finished. private Q_SLOTS: void OnCheckModulePaused(); void OnPauseButtonToggled(bool toggled); void OnRemoveButtonClicked(); void OnModuleStarted(); void OnModuleCanceled(); void OnModuleFinished(); void OnModuleResumed(); void OnModuleProgressRangeChanged(int progressMin, int progressMax); void OnModuleProgressTextChanged(const QString& progressText); void OnModuleProgressValueChanged(int progressValue); void OnOutputDataReady(); void OnErrorDataReady(); private: /** * \brief Simply returns true if this widget is considered as having been started. */ bool IsStarted() const; /** * \brief Used to write output to the console widget, and also to qDebug(). */ void PublishMessage(const QString& message); /** * \brief Used to write output to the console widget, and also to qDebug(). */ void PublishByteArray(const QByteArray& array); /** * \brief Destroys any images listed in m_TemporaryFileNames. */ void ClearUpTemporaryFiles(); /** * \brief Loads any data listed in m_OutputDataToLoad into the m_DataStorage. */ void LoadOutputData(); /** * \brief Utility method to look up the title from the description. */ QString GetTitle(); /** * \brief Returns <category>.<title>, derived from the ctkCmdLineModuleReference and * hence from the ctkCmdLineModuleDescription. */ QString GetFullName() const; /** * \brief This must be injected before the Widget is used. */ ctkCmdLineModuleManager *m_ModuleManager; /** * \brief This must be injected before the Widget is used. */ mitk::DataStorage *m_DataStorage; /** * \brief This must be injected before the Widget is used. */ QString m_TemporaryDirectoryName; /** * \brief This must be injected before the Widget is used. */ QString m_OutputDirectoryName; /** * \brief We instantiate the main widgets from this .ui file. */ Ui::QmitkCmdLineModuleProgressWidget *m_UI; /** * \brief The m_ParametersGroupBox needs a layout. */ QVBoxLayout *m_Layout; /** * \brief The QmitkCmdLineModuleGui is created by the QmitkCmdLineModuleFactoryGui outside * of this class and injected into this class before being run. */ QmitkCmdLineModuleGui *m_ModuleFrontEnd; /** * \brief Main object to keep track of a running command line module. */ ctkCmdLineModuleFutureWatcher *m_FutureWatcher; /** * \brief Due to Qt bug 12152, we use a timer to correctly check for a paused module. */ QTimer m_PollPauseTimer; /** * \brief We store a list of temporary file names that are saved to disk before * launching a command line app, and then must be cleared up when the command line * app successfully finishes. */ QStringList m_TemporaryFileNames; /** * \brief We store a list of output images, so that on successful completion of * the command line module, we automatically load the output data into the mitk::DataStorage. */ QStringList m_OutputDataToLoad; /** * \brief We track how many times the OnOutputDataReady is called. */ int m_OutputCount; /** * \brief We track how many times the OnErrorDataReady is called. */ int m_ErrorCount; }; #endif // QMITKCMDLINEMODULEPROGRESSWIDGET_H diff --git a/Plugins/org.mitk.gui.qt.cli/src/internal/QmitkCmdLineModuleProgressWidget.ui b/Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/QmitkCmdLineModuleProgressWidget.ui similarity index 100% rename from Plugins/org.mitk.gui.qt.cli/src/internal/QmitkCmdLineModuleProgressWidget.ui rename to Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/QmitkCmdLineModuleProgressWidget.ui diff --git a/Plugins/org.mitk.gui.qt.cli/src/internal/QmitkDataStorageComboBoxWithSelectNone.cpp b/Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/QmitkDataStorageComboBoxWithSelectNone.cpp similarity index 100% rename from Plugins/org.mitk.gui.qt.cli/src/internal/QmitkDataStorageComboBoxWithSelectNone.cpp rename to Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/QmitkDataStorageComboBoxWithSelectNone.cpp diff --git a/Plugins/org.mitk.gui.qt.cli/src/internal/QmitkDataStorageComboBoxWithSelectNone.h b/Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/QmitkDataStorageComboBoxWithSelectNone.h similarity index 94% rename from Plugins/org.mitk.gui.qt.cli/src/internal/QmitkDataStorageComboBoxWithSelectNone.h rename to Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/QmitkDataStorageComboBoxWithSelectNone.h index 1b30456bc8..0e9f9fcccf 100644 --- a/Plugins/org.mitk.gui.qt.cli/src/internal/QmitkDataStorageComboBoxWithSelectNone.h +++ b/Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/QmitkDataStorageComboBoxWithSelectNone.h @@ -1,146 +1,142 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) University College London (UCL). All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef QmitkDataStorageComboBoxWithSelectNone_h #define QmitkDataStorageComboBoxWithSelectNone_h #include <QmitkExports.h> #include "QmitkDataStorageComboBox.h" #include "QmitkCustomVariants.h" #include "mitkDataNode.h" /** * \class QmitkDataStorageComboBoxWithSelectNone * \brief Displays all or a subset (defined by a predicate) of nodes of the Data Storage, * and additionally, index 0 is always "please select", indicating no selection, and will * hence always return a NULL mitk::DataNode* if asked for the node at index 0. * - * In addition, to support the integration of CTK command line modules, the methods - * currentValue() and setCurrentValue() are provided. See also the .xsl file - * in org.mitk.gui.qt.cli/resources/QmitkDataStorageComboBox.xsl. - * * \author Matt Clarkson (m.clarkson@ucl.ac.uk) - * \ingroup org_mitk_gui_qt_cli_internal + * \ingroup org_mitk_gui_qt_cmdlinemodules_internal * \sa QmitkDataStorageComboBox */ class QmitkDataStorageComboBoxWithSelectNone : public QmitkDataStorageComboBox { Q_OBJECT Q_PROPERTY(mitk::DataNode::Pointer SelectedNode READ GetSelectedNode WRITE SetSelectedNode) Q_PROPERTY(QString currentValue READ currentValue WRITE setCurrentValue) public: /** * \brief Calls base class constructor. * \see QmitkDataStorageComboBox */ QmitkDataStorageComboBoxWithSelectNone(QWidget* parent = 0, bool autoSelectNewNodes=false); /** * \brief Calls base class constructor. * \see QmitkDataStorageComboBox */ QmitkDataStorageComboBoxWithSelectNone( mitk::DataStorage* _DataStorage, const mitk::NodePredicateBase* predicate, QWidget* parent = 0, bool autoSelectNewNodes=false); /** * \brief Nothing to do. * \see QmitkDataStorageComboBox */ ~QmitkDataStorageComboBoxWithSelectNone(); /** * \brief Stores the string that will be present on index 0, currently equal to "please select". */ static const QString ZERO_ENTRY_STRING; /** * \brief Searches for a given node, returning the index if found. * \param dataNode an mitk::DataNode, can be NULL. * \return int -1 if not found, and compared to base class, will add 1 onto the retrieved index. */ virtual int Find( const mitk::DataNode* dataNode ) const; /** * \brief Retrieves the node at a given index, where if index is zero, will always return NULL. * \param index An integer between 0 and n = number of nodes. * \return mitk::DataNode::Pointer NULL or a data node pointer. */ virtual mitk::DataNode::Pointer GetNode(int index) const; /** * \brief Returns the selected DataNode or NULL if there is none, or the current index is zero. */ virtual mitk::DataNode::Pointer GetSelectedNode() const; /** * \brief Sets the combo box to the index that contains the specified node, or 0 if the node cannot be found. */ virtual void SetSelectedNode(const mitk::DataNode::Pointer& node); /** * \brief Removes a node from the ComboBox at a specified index (if the index exists). * Gets called when a DataStorage Remove Event was thrown. */ virtual void RemoveNode(int index); /** * \brief Set a DataNode in the ComboBox at the specified index (if the index exists). * Internally the method just calls InsertNode(unsigned int) */ virtual void SetNode(int index, const mitk::DataNode* dataNode); /** * \brief Get the current file path. */ virtual QString currentValue() const; /** * \brief Set the current file path. */ virtual void setCurrentValue(const QString& path); protected: /** * \brief Checks if the given index is within range. */ bool HasIndex(unsigned int index) const; /** * \brief Inserts a new node at the given index, unless index is 0, which is silently ignored. */ virtual void InsertNode(int index, const mitk::DataNode* dataNode); /** * \brief Reset function whenever datastorage or predicate changes. */ virtual void Reset(); private: /** * \brief This should store the current file path of the current image. * * * The reason is so that we can store and retrieve a temporary file name. */ QString m_CurrentPath; }; #endif // QmitkDataStorageComboBoxWithSelectNone_h diff --git a/Plugins/org.mitk.gui.qt.cli/src/internal/QmitkDirectoryListWidget.cpp b/Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/QmitkDirectoryListWidget.cpp similarity index 100% rename from Plugins/org.mitk.gui.qt.cli/src/internal/QmitkDirectoryListWidget.cpp rename to Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/QmitkDirectoryListWidget.cpp diff --git a/Plugins/org.mitk.gui.qt.cli/src/internal/QmitkDirectoryListWidget.h b/Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/QmitkDirectoryListWidget.h similarity index 96% rename from Plugins/org.mitk.gui.qt.cli/src/internal/QmitkDirectoryListWidget.h rename to Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/QmitkDirectoryListWidget.h index 3e9ca3532e..4abeacba46 100644 --- a/Plugins/org.mitk.gui.qt.cli/src/internal/QmitkDirectoryListWidget.h +++ b/Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/QmitkDirectoryListWidget.h @@ -1,58 +1,58 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) University College London (UCL). All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef QMITKDIRECTORYLISTWIDGET_H #define QMITKDIRECTORYLISTWIDGET_H #include "ui_QmitkPathListWidget.h" #include <QWidget> /** * \class QmitkDirectoryListWidget * \brief Widget to contain a ctkPathListWidget and a ctkPathListButtonsWidget * and provide simple directory access for readable, executable directories. * \author Matt Clarkson (m.clarkson@ucl.ac.uk) - * \ingroup org_mitk_gui_qt_cli_internal + * \ingroup org_mitk_gui_qt_cmdlinemodules_internal */ class QmitkDirectoryListWidget : public QWidget, public Ui::QmitkPathListWidget { Q_OBJECT public: QmitkDirectoryListWidget(QWidget* parent=0); /** * \brief Get all directory entries. * \param absolutePath If <code>true</code>, resolve all entries to absolute paths. * \return A list of all directory entries. */ QStringList directories(bool absolutePath = false) const; /** * \brief Sets the list of directory entries. * \param paths The new path list. */ void setDirectories(const QStringList& paths); Q_SIGNALS: void pathsChanged(const QStringList&, const QStringList&); private Q_SLOTS: void OnPathsChanged(const QStringList&, const QStringList&); }; #endif // QMITKDIRECTORYLISTWIDGET_H diff --git a/Plugins/org.mitk.gui.qt.cli/src/internal/QmitkFileListWidget.cpp b/Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/QmitkFileListWidget.cpp similarity index 100% rename from Plugins/org.mitk.gui.qt.cli/src/internal/QmitkFileListWidget.cpp rename to Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/QmitkFileListWidget.cpp diff --git a/Plugins/org.mitk.gui.qt.cli/src/internal/QmitkFileListWidget.h b/Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/QmitkFileListWidget.h similarity index 96% rename from Plugins/org.mitk.gui.qt.cli/src/internal/QmitkFileListWidget.h rename to Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/QmitkFileListWidget.h index cc03e948d1..7339cb8a95 100644 --- a/Plugins/org.mitk.gui.qt.cli/src/internal/QmitkFileListWidget.h +++ b/Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/QmitkFileListWidget.h @@ -1,58 +1,58 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) University College London (UCL). All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef QMITKFILELISTWIDGET_H #define QMITKFILELISTWIDGET_H #include "ui_QmitkPathListWidget.h" #include <QWidget> /** * \class QmitkFileListWidget * \brief Widget to contain a ctkPathListWidget and a ctkPathListButtonsWidget * and provide simple file access for readable, executable files. * \author Matt Clarkson (m.clarkson@ucl.ac.uk) - * \ingroup org_mitk_gui_qt_cli_internal + * \ingroup org_mitk_gui_qt_cmdlinemodules_internal */ class QmitkFileListWidget : public QWidget, public Ui::QmitkPathListWidget { Q_OBJECT public: QmitkFileListWidget(QWidget* parent=0); /** * \brief Get all file entries. * \param absolutePath If <code>true</code>, resolve all entries to absolute paths. * \return A list of all file entries. */ QStringList files(bool absolutePath = false) const; /** * \brief Sets the list of file entries. * \param paths The new path list. */ void setFiles(const QStringList& paths); Q_SIGNALS: void pathsChanged(const QStringList&, const QStringList&); private Q_SLOTS: void OnPathsChanged(const QStringList&, const QStringList&); }; #endif // QMITKDIRECTORYLISTWIDGET_H diff --git a/Plugins/org.mitk.gui.qt.cli/src/internal/QmitkPathListWidget.ui b/Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/QmitkPathListWidget.ui similarity index 100% rename from Plugins/org.mitk.gui.qt.cli/src/internal/QmitkPathListWidget.ui rename to Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/QmitkPathListWidget.ui diff --git a/Plugins/org.mitk.gui.qt.cli/src/internal/QmitkUiLoader.cpp b/Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/QmitkUiLoader.cpp similarity index 100% rename from Plugins/org.mitk.gui.qt.cli/src/internal/QmitkUiLoader.cpp rename to Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/QmitkUiLoader.cpp diff --git a/Plugins/org.mitk.gui.qt.cli/src/internal/QmitkUiLoader.h b/Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/QmitkUiLoader.h similarity index 97% rename from Plugins/org.mitk.gui.qt.cli/src/internal/QmitkUiLoader.h rename to Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/QmitkUiLoader.h index e4b67fe5b1..cdde39f8ef 100644 --- a/Plugins/org.mitk.gui.qt.cli/src/internal/QmitkUiLoader.h +++ b/Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/QmitkUiLoader.h @@ -1,59 +1,59 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) University College London (UCL). All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef QmitkUiLoader_h #define QmitkUiLoader_h #include <ctkCmdLineModuleQtUiLoader.h> #include <QStringList> #include "mitkDataStorage.h" /** * \class QmitkUiLoader * \brief Derived from ctkCmdLineModuleQtGuiLoader to enable us to instantiate widgets from Qmitk at runtime, * and currently we instatiate QmitkDataStorageComboBoxWithSelectNone, used for image input widgets. * \author Matt Clarkson (m.clarkson@ucl.ac.uk) - * \ingroup org_mitk_gui_qt_cli_internal + * \ingroup org_mitk_gui_qt_cmdlinemodules_internal * \sa ctkCmdLineModuleQtUiLoader */ class QmitkUiLoader : public ctkCmdLineModuleQtUiLoader { Q_OBJECT public: QmitkUiLoader(const mitk::DataStorage* dataStorage, QObject *parent=0); virtual ~QmitkUiLoader(); /** * \brief Returns the list of available widgets in ctkCmdLineModuleQtGuiLoader and also QmitkDataStorageComboBoxWithSelectNone. * \see ctkCmdLineModuleQtGuiLoader::availableWidgets() */ QStringList availableWidgets () const; /** * \brief If className is QmitkDataStorageComboBox, instantiates QmitkDataStorageComboBoxWithSelectNone and * otherwise delegates to base class. * \see ctkCmdLineModuleQtGuiLoader::createWidget() */ virtual QWidget* createWidget(const QString & className, QWidget * parent = 0, const QString & name = QString() ); private: const mitk::DataStorage* m_DataStorage; }; // end class #endif // QmitkUiLoader_h diff --git a/Plugins/org.mitk.gui.qt.cli/src/internal/org_mitk_gui_qt_cli_Activator.cpp b/Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/org_mitk_gui_qt_cmdlinemodules_Activator.cpp similarity index 70% rename from Plugins/org.mitk.gui.qt.cli/src/internal/org_mitk_gui_qt_cli_Activator.cpp rename to Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/org_mitk_gui_qt_cmdlinemodules_Activator.cpp index ef2c4318e5..82cca91141 100644 --- a/Plugins/org.mitk.gui.qt.cli/src/internal/org_mitk_gui_qt_cli_Activator.cpp +++ b/Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/org_mitk_gui_qt_cmdlinemodules_Activator.cpp @@ -1,39 +1,39 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) University College London (UCL). All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ -#include "org_mitk_gui_qt_cli_Activator.h" +#include "org_mitk_gui_qt_cmdlinemodules_Activator.h" #include <QtPlugin> #include "CommandLineModulesView.h" #include "CommandLineModulesPreferencesPage.h" namespace mitk { -void org_mitk_gui_qt_cli_Activator::start(ctkPluginContext* context) +void org_mitk_gui_qt_cmdlinemodules_Activator::start(ctkPluginContext* context) { BERRY_REGISTER_EXTENSION_CLASS(CommandLineModulesView, context) BERRY_REGISTER_EXTENSION_CLASS(CommandLineModulesPreferencesPage, context) } -void org_mitk_gui_qt_cli_Activator::stop(ctkPluginContext* context) +void org_mitk_gui_qt_cmdlinemodules_Activator::stop(ctkPluginContext* context) { Q_UNUSED(context) } } -Q_EXPORT_PLUGIN2(org_mitk_gui_qt_cli, mitk::org_mitk_gui_qt_cli_Activator) +Q_EXPORT_PLUGIN2(org_mitk_gui_qt_cmdlinemodules, mitk::org_mitk_gui_qt_cmdlinemodules_Activator) diff --git a/Plugins/org.mitk.gui.qt.cli/src/internal/org_mitk_gui_qt_cli_Activator.h b/Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/org_mitk_gui_qt_cmdlinemodules_Activator.h similarity index 69% rename from Plugins/org.mitk.gui.qt.cli/src/internal/org_mitk_gui_qt_cli_Activator.h rename to Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/org_mitk_gui_qt_cmdlinemodules_Activator.h index e7aa6f64f1..fc5db1913c 100644 --- a/Plugins/org.mitk.gui.qt.cli/src/internal/org_mitk_gui_qt_cli_Activator.h +++ b/Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/org_mitk_gui_qt_cmdlinemodules_Activator.h @@ -1,45 +1,45 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) University College London (UCL). All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ -#ifndef org_mitk_gui_qt_cli_Activator_h -#define org_mitk_gui_qt_cli_Activator_h +#ifndef org_mitk_gui_qt_cmdlinemodules_Activator_h +#define org_mitk_gui_qt_cmdlinemodules_Activator_h #include <ctkPluginActivator.h> namespace mitk { /** - * \class org_mitk_gui_qt_cli_Activator + * \class org_mitk_gui_qt_cmdlinemodules_Activator * \brief Blueberry plugin activator for CommandLineModulesView. * \author Matt Clarkson (m.clarkson@ucl.ac.uk) - * \ingroup org_mitk_gui_qt_cli_internal + * \ingroup org_mitk_gui_qt_cmdlinemodules_internal */ -class org_mitk_gui_qt_cli_Activator : +class org_mitk_gui_qt_cmdlinemodules_Activator : public QObject, public ctkPluginActivator { Q_OBJECT Q_INTERFACES(ctkPluginActivator) public: void start(ctkPluginContext* context); void stop(ctkPluginContext* context); -}; // org_mitk_gui_qt_cli_Activator +}; // org_mitk_gui_qt_cmdlinemodules_Activator } -#endif // org_mitk_gui_qt_cli_Activator_h +#endif // org_mitk_gui_qt_cmdlinemodules_Activator_h