Computer Assisted Medical Intervention Tool Kit version 6.0
 
Loading...
Searching...
No Matches
CamiTKExtensionEditor Class Reference

Editor of CamiTK extension file. More...

#include <CamiTKExtensionEditor.h>

+ Inheritance diagram for CamiTKExtensionEditor:
+ Collaboration diagram for CamiTKExtensionEditor:

Public Slots

void closeClicked ()
 called when the user clicks on "Close" or use the close button in the window manager title bar
 
void dataModelUpdated ()
 called when the CamiTK extension model was updated in the GUI (shows a "*" in the title bar)
 
void initializeClicked ()
 called when the user clicks on "Initialize/Update"
 
void registerClicked ()
 called when the user clicks on "Register/Unregister"
 
void saveClicked ()
 called when the user clicks on "Save"
 
void showMessage (const QString &message, int durationMilliseconds=2000, bool warning=false)
 show a message for the given time (can be a warning that is shown in red)
 

Signals

void extensionGeneratorPresenterClosed ()
 sent when the window is being closed
 

Public Member Functions

 CamiTKExtensionEditor (const QString &camitkFilePath, const QString &newExtensionName=QString(), const QString &language=QString(), const QString &cppGenerationType=QString(), QWidget *parent=nullptr)
 Constructor.
 
virtual ~CamiTKExtensionEditor ()
 Destructor.
 

Protected Member Functions

void closeEvent (QCloseEvent *event) override
 called when the widget is being closed
 

Detailed Description

Editor of CamiTK extension file.

This class uses

  • a CamiTKExtensionModelPresenter widget to let the user edit a CamiTK extension file
  • a ExtensionBuilderPresenter widget to check the code generation, configure and build phases
  • a save button to let the user save the CamiTK extension file
  • a initialize/update button to generate, configure and build the source code from the CamiTK extension file (thanks to the ExtensionBuilderPresenter)
  • a register/unregister button to register a valid CamiTK extension file in the application (thanks to the corresponding DevStudio actions)
  • a status bar to show various message similary to an application status bar
  • all the logic to link things in the right order and make sure the user does save its changes before closing the widget or generating/configuring/building the source code.

Constructor & Destructor Documentation

◆ CamiTKExtensionEditor()

CamiTKExtensionEditor::CamiTKExtensionEditor ( const QString &  camitkFilePath,
const QString &  newExtensionName = QString(),
const QString &  language = QString(),
const QString &  cppGenerationType = QString(),
QWidget *  parent = nullptr 
)

Constructor.

Parameters
camitkFilePathpath to the CamiTK extension file to edit (can be empty for a new extension)
newExtensionNamethe extension name ("action", "component", or "viewer"), needed for creating of a new extension
languagethe programming language for the extension
cppGenerationTypefor C++ language, extension can be either generated as Standard or Hotplug extension

References closeClicked(), dataModelUpdated(), CamiTKExtensionModelPresenter::dataModelUpdated(), initializeClicked(), registerClicked(), saveClicked(), showMessage(), and CamiTKExtensionModelPresenter::showMessage().

+ Here is the call graph for this function:

◆ ~CamiTKExtensionEditor()

CamiTKExtensionEditor::~CamiTKExtensionEditor ( )
virtual

Destructor.

Member Function Documentation

◆ closeClicked

void CamiTKExtensionEditor::closeClicked ( )
slot

called when the user clicks on "Close" or use the close button in the window manager title bar

References showMessage().

Referenced by CamiTKExtensionEditor().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ closeEvent()

void CamiTKExtensionEditor::closeEvent ( QCloseEvent *  event)
overrideprotected

called when the widget is being closed

References extensionGeneratorPresenterClosed(), and saveClicked().

+ Here is the call graph for this function:

◆ dataModelUpdated

void CamiTKExtensionEditor::dataModelUpdated ( )
slot

called when the CamiTK extension model was updated in the GUI (shows a "*" in the title bar)

Referenced by CamiTKExtensionEditor().

+ Here is the caller graph for this function:

◆ extensionGeneratorPresenterClosed

void CamiTKExtensionEditor::extensionGeneratorPresenterClosed ( )
signal

sent when the window is being closed

Referenced by closeEvent().

+ Here is the caller graph for this function:

◆ initializeClicked

void CamiTKExtensionEditor::initializeClicked ( )
slot

called when the user clicks on "Initialize/Update"

References ExtensionBuilderPresenter::allStagesFinished(), ExtensionBuilder::Check_System, ExtensionBuilderPresenter::cMakeProjectManagerPresenterClosed(), ExtensionBuilder::Generate_Source_Files, saveClicked(), and showMessage().

Referenced by CamiTKExtensionEditor().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ registerClicked

void CamiTKExtensionEditor::registerClicked ( )
slot

called when the user clicks on "Register/Unregister"

References camitk::Application::getAction(), camitk::Action::setParameterValue(), showMessage(), and camitk::Action::trigger().

Referenced by CamiTKExtensionEditor().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveClicked

void CamiTKExtensionEditor::saveClicked ( )
slot

called when the user clicks on "Save"

References CAMITK_WARNING, CamiTKExtensionModelPresenter::getExtensionName(), camitk::Application::getLastUsedDirectory(), saveClicked(), CamiTKExtensionModelPresenter::saveExtensionFile(), camitk::Application::setLastUsedDirectory(), and showMessage().

Referenced by CamiTKExtensionEditor(), closeEvent(), initializeClicked(), and saveClicked().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showMessage

void CamiTKExtensionEditor::showMessage ( const QString &  message,
int  durationMilliseconds = 2000,
bool  warning = false 
)
slot

show a message for the given time (can be a warning that is shown in red)

Referenced by CamiTKExtensionEditor(), closeClicked(), initializeClicked(), registerClicked(), and saveClicked().

+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: