Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit 7dc1e940 authored by promayon's avatar promayon
Browse files

FIXED Application:save does a saveAs->apply instead of saveAs->trigger (no...

FIXED Application:save does a saveAs->apply instead of saveAs->trigger (no need to trigger because the opendialog is called in apply and there is no specific widget, an
d it is blocking for action's pipeline)
FIXED renaming pre/postProcess to pre/postProcessInPipeline
FIXED some doxygen warnings (and color to reflect code name)
FIXED remove using namespace in headers (see http://stackoverflow.com/questions/5849457/using-namespace-in-c-headers and also Item 59 in Sutter and Alexandrescu's "C++ Coding Standards: 101 Rules, Guidelines, and Best Practices")
FIXED man page for version 3.1


git-svn-id: svn+ssh://scm.forge.imag.fr/var/lib/gforge/chroot/scmrepos/svn/camitk/trunk/camitk@540 ec899d31-69d1-42ba-9299-647d76f65fb3
parent 5714e0b2
......@@ -33,9 +33,7 @@
#include <QPushButton>
#include <QDialogButtonBox>
using namespace camitk;
class ApplicationActionExtension : public ActionExtension {
class ApplicationActionExtension : public camitk::ActionExtension {
Q_OBJECT
Q_INTERFACES(camitk::ActionExtension)
......
......@@ -28,13 +28,11 @@
#include <Action.h>
using namespace camitk;
class ClearSelectionAction : public Action {
class ClearSelectionAction : public camitk::Action {
public:
/// Default Constructor
ClearSelectionAction(ActionExtension * extension);
ClearSelectionAction(camitk::ActionExtension *);
/// Default Destructor
virtual ~ClearSelectionAction();
......
......@@ -29,13 +29,11 @@
#include <Action.h>
#include <Component.h>
using namespace camitk;
class CloseAction : public Action {
class CloseAction : public camitk::Action {
public:
/// Default Constructor
CloseAction(ActionExtension * extension);
CloseAction(camitk::ActionExtension *);
/// Default Destructor
virtual ~CloseAction();
......
......@@ -29,13 +29,11 @@
#include <Action.h>
#include <Component.h>
using namespace camitk;
class CloseAllAction : public Action {
class CloseAllAction : public camitk::Action {
public:
/// Default Constructor
CloseAllAction(ActionExtension * extension);
CloseAllAction(camitk::ActionExtension *);
/// Default Destructor
virtual ~CloseAllAction();
......
......@@ -28,16 +28,14 @@
#include <Action.h>
using namespace camitk;
/** When triggered, the OpenAction display a file open dialog.
* If one or more files are choosen, the open component method of ExtensionManager is called.
*/
class OpenAction : public Action {
class OpenAction : public camitk::Action {
public:
/// Default Constructor
OpenAction(ActionExtension * extension);
OpenAction(camitk::ActionExtension *);
/// Default Destructor
virtual ~OpenAction();
......
......@@ -28,13 +28,11 @@
#include <Action.h>
using namespace camitk;
class QuitAction : public Action {
class QuitAction : public camitk::Action {
public:
/// Default Constructor
QuitAction(ActionExtension * extension);
QuitAction(camitk::ActionExtension *);
/// Default Destructor
virtual ~QuitAction();
......
......@@ -29,22 +29,24 @@
#include "RemoveLastInstanciatedAction.h"
using namespace camitk;
// --------------- constructor -------------------
RemoveLastInstanciatedAction::RemoveLastInstanciatedAction(ActionExtension *extension) : Action(extension)
{
// Setting name, description and input component
RemoveLastInstanciatedAction::RemoveLastInstanciatedAction(ActionExtension *extension) : Action(extension) {
// Setting name, description and input component
setName("Remove Last Instanciated Top Level Component");
setEmbedded(false);
setDescription("Remove the last top level component that was instanciated without saving it");
setComponent("");
// Setting classification family and tags
// Setting classification family and tags
setFamily("Application");
addTag("Delete Component");
}
// --------------- destructor -------------------
RemoveLastInstanciatedAction::~RemoveLastInstanciatedAction() { ; }
RemoveLastInstanciatedAction::~RemoveLastInstanciatedAction() {
}
// --------------- getWidget --------------
QWidget * RemoveLastInstanciatedAction::getWidget() {
......@@ -54,16 +56,19 @@ QWidget * RemoveLastInstanciatedAction::getWidget() {
// --------------- apply -------------------
Action::ApplyStatus RemoveLastInstanciatedAction::apply() {
const ComponentList &allComponent = Application::getAllComponents();
if (allComponent.size()>0) {
// Select the last instanciated component
Component *lastComponent = allComponent.last();
// select the top level component to remove
while (lastComponent->getParentComponent() != NULL)
lastComponent = lastComponent->getParentComponent();
delete lastComponent;
// calling the component destructor is suffisient, it automatically updates the application lists
Application::refresh();
return SUCCESS;
// Select the last instanciated component
Component *lastComponent = allComponent.last();
// select the top level component to remove
while (lastComponent->getParentComponent() != NULL)
lastComponent = lastComponent->getParentComponent();
delete lastComponent;
// calling the component destructor is suffisient, it automatically updates the application lists
Application::refresh();
return SUCCESS;
}
return ERROR;
}
......@@ -28,16 +28,14 @@
#include <Action.h>
using namespace camitk;
/** Remove the last top-level selected component (if several top level components were selected, the latest one is removed).
* Note that no prompt is asked to the user to save or not the component if unsaved.
*/
class RemoveLastInstanciatedAction : public Action {
class RemoveLastInstanciatedAction : public camitk::Action {
public:
/// Default Constructor
RemoveLastInstanciatedAction(ActionExtension *extension);
RemoveLastInstanciatedAction(camitk::ActionExtension *);
/// Default Destructor
virtual ~RemoveLastInstanciatedAction();
......
......@@ -29,13 +29,11 @@
#include <Action.h>
#include <Component.h>
using namespace camitk;
class SaveAction : public Action {
class SaveAction : public camitk::Action {
public:
/// Default Constructor
SaveAction(ActionExtension * extension);
SaveAction(camitk::ActionExtension *);
/// Default Destructor
virtual ~SaveAction();
......
......@@ -29,13 +29,11 @@
#include <Action.h>
#include <Component.h>
using namespace camitk;
class SaveAllAction : public Action {
class SaveAllAction : public camitk::Action {
public:
/// Default Constructor
SaveAllAction(ActionExtension * extension);
SaveAllAction(camitk::ActionExtension *);
/// Default Destructor
virtual ~SaveAllAction();
......
......@@ -29,13 +29,11 @@
#include <Action.h>
#include <Component.h>
using namespace camitk;
class SaveAsAction : public Action {
class SaveAsAction : public camitk::Action {
public:
/// Default Constructor
SaveAsAction(ActionExtension * extension);
SaveAsAction(camitk::ActionExtension *);
/// Default Destructor
virtual ~SaveAsAction();
......
......@@ -28,15 +28,14 @@
#include <Action.h>
using namespace camitk;
/// This action allows to select the last instanciated component
/// Note that only that one will be selected
class SelectLastInstanciatedAction : public Action {
/** This action allows to select the last instanciated component.
* \note only the last instanciated component will be selected
*/
class SelectLastInstanciatedAction : public camitk::Action {
public:
/// Default Constructor
SelectLastInstanciatedAction(ActionExtension * extension);
SelectLastInstanciatedAction(camitk::ActionExtension *);
/// Default Destructor
virtual ~SelectLastInstanciatedAction();
......
......@@ -27,14 +27,12 @@
#include <Action.h>
using namespace camitk;
/// set the visibility of the MedicalImageViewer in order to only show the 3D viewer
class Show3DViewer : public Action {
class Show3DViewer : public camitk::Action {
public:
/// Default Constructor
Show3DViewer(ActionExtension * extension);
Show3DViewer(camitk::ActionExtension *);
/// Default Destructor
virtual ~Show3DViewer();
......
......@@ -27,14 +27,12 @@
#include <Action.h>
using namespace camitk;
/// set the visibility of the MedicalImageViewer in order to show all viewers
class ShowAllViewers : public Action {
class ShowAllViewers : public camitk::Action {
public:
/// Default Constructor
ShowAllViewers(ActionExtension * extension);
ShowAllViewers(camitk::ActionExtension *);
/// Default Destructor
virtual ~ShowAllViewers();
......
......@@ -27,14 +27,12 @@
#include <Action.h>
using namespace camitk;
/// set the visibility of the MedicalImageViewer in order to only show the arbitrary viewer
class ShowArbitraryViewer : public Action {
class ShowArbitraryViewer : public camitk::Action {
public:
/// Default Constructor
ShowArbitraryViewer(ActionExtension * extension);
ShowArbitraryViewer(camitk::ActionExtension *);
/// Default Destructor
virtual ~ShowArbitraryViewer();
......
......@@ -27,14 +27,12 @@
#include <Action.h>
using namespace camitk;
/// set the visibility of the MedicalImageViewer in order to only show the axial viewer
class ShowAxialViewer : public Action {
class ShowAxialViewer : public camitk::Action {
public:
/// Default Constructor
ShowAxialViewer(ActionExtension * extension);
ShowAxialViewer(camitk::ActionExtension *);
/// Default Destructor
virtual ~ShowAxialViewer();
......
......@@ -27,13 +27,11 @@
#include <Action.h>
using namespace camitk;
class ShowConsoleAction : public Action {
class ShowConsoleAction : public camitk::Action {
public:
/// Default Constructor
ShowConsoleAction(ActionExtension * extension);
ShowConsoleAction(camitk::ActionExtension *);
/// Default Destructor
virtual ~ShowConsoleAction();
......
......@@ -27,14 +27,12 @@
#include <Action.h>
using namespace camitk;
/// set the visibility of the MedicalImageViewer in order to only show the coronal viewer
class ShowCoronalViewer : public Action {
class ShowCoronalViewer : public camitk::Action {
public:
/// Default Constructor
ShowCoronalViewer(ActionExtension * extension);
ShowCoronalViewer(camitk::ActionExtension *);
/// Default Destructor
virtual ~ShowCoronalViewer();
......
......@@ -27,14 +27,12 @@
#include <Action.h>
using namespace camitk;
/// set the visibility of the MedicalImageViewer in order to only show the sagittal viewer
class ShowSagittalViewer : public Action {
class ShowSagittalViewer : public camitk::Action {
public:
/// Default Constructor
ShowSagittalViewer(ActionExtension * extension);
ShowSagittalViewer(camitk::ActionExtension *);
/// Default Destructor
virtual ~ShowSagittalViewer();
......
......@@ -22,35 +22,37 @@
*
* $CAMITK_LICENCE_END$
****************************************************************************/
#ifndef ACTIONEXTENSIONEXAMPLE_H
#define ACTIONEXTENSIONEXAMPLE_H
#ifndef ARBITRARYSLICEEXTENSION_H
#define ARBITRARYSLICEEXTENSION_H
#include <ActionExtension.h>
using namespace camitk;
class ArbitrarySliceExtension : public camitk::ActionExtension {
Q_OBJECT
Q_INTERFACES(camitk::ActionExtension)
class ArbitrarySliceExtension : public ActionExtension {
Q_OBJECT
Q_INTERFACES(camitk::ActionExtension)
public:
public:
/// Constructor
ArbitrarySliceExtension() : ActionExtension() {};
/// Destructor
virtual ~ArbitrarySliceExtension() {};
/// Method returning the action extension name
virtual QString getName() {return "ArbitrarySliceExtension";};
/// Destructor
virtual ~ArbitrarySliceExtension() {};
/// Method returning the action extension name
virtual QString getName() {
return "ArbitrarySliceExtension";
};
/// Method returning the action extension descrption
virtual QString getDescription() {return "This extension gathers actions for 2D images arbitrary slice.";};
/// Method returning the action extension descrption
virtual QString getDescription() {
return "This extension gathers actions for 2D images arbitrary slice.";
};
/// initialize all the actions
/// initialize all the actions
virtual void init();
};
#endif // ACTIONEXTENSIONEXAMPLE_H
#endif // ARBITRARYSLICEEXTENSION_H
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