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>

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 CMakeProjectManagerPresenter 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 CMakeProjectManagerPresenter)
  • 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().

◆ ~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().

◆ closeEvent()

void CamiTKExtensionEditor::closeEvent ( QCloseEvent * event)
overrideprotected

called when the widget is being closed

References extensionGeneratorPresenterClosed(), and saveClicked().

◆ 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().

◆ extensionGeneratorPresenterClosed

void CamiTKExtensionEditor::extensionGeneratorPresenterClosed ( )
signal

sent when the window is being closed

Referenced by closeEvent().

◆ initializeClicked

◆ 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().

◆ saveClicked

void CamiTKExtensionEditor::saveClicked ( )
slot

◆ 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().


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