Commit f2f601f3 authored by Emmanuel Promayon's avatar Emmanuel Promayon

FIXED medical image viewers action are now independent from the application actions

parent 73102f41
......@@ -25,7 +25,6 @@
#include "ApplicationActionExtension.h"
#include <Action.h>
#include "OpenAction.h"
#include "OpenFile.h"
#include "SelectLastInstantiatedAction.h"
......@@ -40,18 +39,9 @@
#include "ToggleConsoleAction.h"
#include "AboutAction.h"
#include "RemoveLastInstantiatedAction.h"
#include "ShowAxialViewer.h"
#include "ShowCoronalViewer.h"
#include "ShowSagittalViewer.h"
#include "Show3DViewer.h"
#include "ShowAllViewers.h"
#include "ShowArbitraryViewer.h"
#include "ChangeLanguage.h"
#include "LoggerParameters.h"
// --------------- constructor -------------------
ApplicationActionExtension::ApplicationActionExtension() : ActionExtension() {};
// --------------- init -------------------
void ApplicationActionExtension::init() {
registerNewAction(OpenAction);
......@@ -69,12 +59,5 @@ void ApplicationActionExtension::init() {
registerNewAction(AboutAction);
registerNewAction(RemoveLastInstantiatedAction);
registerNewAction(ChangeLanguage);
// -- medical image viewer manipulation
registerNewAction(ShowAxialViewer);
registerNewAction(ShowCoronalViewer);
registerNewAction(ShowSagittalViewer);
registerNewAction(Show3DViewer);
registerNewAction(ShowAllViewers);
registerNewAction(ShowArbitraryViewer);
registerNewAction(LoggerParameters);
}
......@@ -23,15 +23,10 @@
* $CAMITK_LICENCE_END$
****************************************************************************/
#ifndef APPLICATION_ACTION_EXTENSION_H
#define APPLICATION_ACTION_EXTENSION_H
#include <ActionExtension.h>
#include <QPushButton>
#include <QDialogButtonBox>
/**
* @ingroup group_sdk_actions_application
......@@ -47,7 +42,7 @@ class ApplicationActionExtension : public camitk::ActionExtension {
public:
/// the constructor (needed to initialize the icon resources)
ApplicationActionExtension();
ApplicationActionExtension() = default;
/// the destructor
virtual ~ApplicationActionExtension() = default;
......
camitk_extension(ACTION_EXTENSION
DEFINES COMPILE_APPLICATION_ACTION_API
CEP_NAME SDK
NEEDS_VIEWER_EXTENSION medicalimageviewer
DESCRIPTION "Features actions used at aplication level (these actions are mandatory for any CamiTK appliction to work)"
DESCRIPTION "Features actions used at aplication level (these actions are mandatory and required for CamiTK applications to work)"
)
if(NOT ACTION_APPLICATION)
......
camitk_extension(ACTION_EXTENSION
CEP_NAME SDK
NEEDS_VIEWER_EXTENSION medicalimageviewer
DESCRIPTION "Actions to change the visibility of the viewers embedded in the Medical Image Viewer layout"
)
# Recursively update the shiboken path variable containing the CamiTK SDK tree structure
set(SHIBOKEN_CAMITK_SDK_PATH ${SHIBOKEN_CAMITK_SDK_PATH}:${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "")
/*****************************************************************************
* $CAMITK_LICENCE_BEGIN$
*
* CamiTK - Computer Assisted Medical Intervention ToolKit
* (c) 2001-2018 Univ. Grenoble Alpes, CNRS, TIMC-IMAG UMR 5525 (GMCAO)
*
* Visit http://camitk.imag.fr for more information
*
* This file is part of CamiTK.
*
* CamiTK is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* CamiTK is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with CamiTK. If not, see <http://www.gnu.org/licenses/>.
*
* $CAMITK_LICENCE_END$
****************************************************************************/
#include "MedicalImageViewerActionExtension.h"
#include "ShowAxialViewer.h"
#include "ShowCoronalViewer.h"
#include "ShowSagittalViewer.h"
#include "Show3DViewer.h"
#include "ShowAllViewers.h"
#include "ShowArbitraryViewer.h"
// --------------- init -------------------
void MedicalImageViewerActionExtension::init() {
// -- medical image viewer manipulation
registerNewAction(ShowAxialViewer);
registerNewAction(ShowCoronalViewer);
registerNewAction(ShowSagittalViewer);
registerNewAction(Show3DViewer);
registerNewAction(ShowAllViewers);
registerNewAction(ShowArbitraryViewer);
}
/*****************************************************************************
* $CAMITK_LICENCE_BEGIN$
*
* CamiTK - Computer Assisted Medical Intervention ToolKit
* (c) 2001-2018 Univ. Grenoble Alpes, CNRS, TIMC-IMAG UMR 5525 (GMCAO)
*
* Visit http://camitk.imag.fr for more information
*
* This file is part of CamiTK.
*
* CamiTK is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* CamiTK is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with CamiTK. If not, see <http://www.gnu.org/licenses/>.
*
* $CAMITK_LICENCE_END$
****************************************************************************/
#ifndef MEDICALIMAGEVIEWER_ACTION_EXTENSION_H
#define MEDICALIMAGEVIEWER_ACTION_EXTENSION_H
#include <ActionExtension.h>
/**
* @ingroup group_sdk_actions_application
*
* @brief
* The MedicalImageViewerActionExtension class features the actions to change the visibility of the viewers embedded in the Medical Image Viewer layout
*
**/
class MedicalImageViewerActionExtension : public camitk::ActionExtension {
Q_OBJECT
Q_INTERFACES(camitk::ActionExtension)
Q_PLUGIN_METADATA(IID "fr.imag.camitk.sdk.action.medicalimagevieweractionextension")
public:
/// the constructor (needed to initialize the icon resources)
MedicalImageViewerActionExtension() = default;
/// the destructor
virtual ~MedicalImageViewerActionExtension() = default;
/// initialize all the actions
virtual void init();
/// Method that return the action extension name
virtual QString getName() {
return "Medical Image Viewer visibility actions";
};
/// Method that return the action extension descrption
virtual QString getDescription() {
return "This extension provides six actions to change the visibility of the viewers embedded in the Medical Image Viewer layout";
};
};
#endif // MEDICALIMAGEVIEWER_ACTION_EXTENSION_H
......@@ -71,7 +71,7 @@ public:
Q_INVOKABLE MedicalImageViewer(QString);
/** destructor */
~MedicalImageViewer() override;
virtual ~MedicalImageViewer() override;
/** @name Viewer inherited
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment