Computer Assited Medical Intervention Tool Kit  version 5.0
camitk::SettingsDialog Class Reference

This class controls the settings dialog user interface. More...

#include <SettingsDialog.h>

+ Inheritance diagram for camitk::SettingsDialog:
+ Collaboration diagram for camitk::SettingsDialog:

Public Member Functions

void editSettings (QObject *)
 add a new property editor in a tab for the new object (it automatically connect the object "saveSettings" slot if exists to the dialog apply button) More...
 
 SettingsDialog ()
 default constructor More...
 
 ~SettingsDialog () override
 destructor More...
 

Private Slots

virtual void on_actionExtensionList_cellClicked (int, int)
 
virtual void on_addActionExtensionButton_released ()
 
virtual void on_addComponentExtensionButton_released ()
 
virtual void on_addViewerExtensionButton_released ()
 
virtual void on_componentExtensionList_cellClicked (int, int)
 
virtual void on_objectList_itemSelectionChanged ()
 naming convention is QMetaObject's auto-connection. More...
 
virtual void on_removeActionExtensionButton_released ()
 
virtual void on_removeComponentExtensionButton_released ()
 
virtual void on_removeViewerExtensionButton_released ()
 
virtual void on_resetConfigurationButton_released ()
 
virtual void on_viewerExtensionList_cellClicked (int, int)
 

Private Member Functions

void accept () override
 if the user says it is ok and validate the settings dialog, this update the settings More...
 
void readUserExtensions ()
 get the current value of the settings More...
 
void updateActionExtensionList ()
 update the action plugin list More...
 
void updateComponentExtensionList ()
 update the component extension list More...
 
void updateViewerExtensionList ()
 update the action plugin list More...
 
void writeUserExtensions ()
 write the current value of the settings More...
 

Private Attributes

QMap< QString, QObject * > editedObjectMap
 the map to get an edited object from its name More...
 
Ui::ui_Settings * myUI
 Qt ui designed in Qt Designer. More...
 
ObjectControllerobjectController
 the property editor More...
 
QStringList userActions
 the list of user action extension locations More...
 
QStringList userComponents
 the list of user component extension locations More...
 
QStringList userViewers
 the list of user action extension locations More...
 

Detailed Description

This class controls the settings dialog user interface.

to add a settings for a given class, either add a tab widgets (e.g. for plugin tabs) or add a new ObjectController tab using editSettings(QObject*).

Constructor & Destructor Documentation

◆ SettingsDialog()

camitk::SettingsDialog::SettingsDialog ( )

default constructor

◆ ~SettingsDialog()

camitk::SettingsDialog::~SettingsDialog ( )
override

destructor

Member Function Documentation

◆ accept()

void camitk::SettingsDialog::accept ( )
overrideprivate

if the user says it is ok and validate the settings dialog, this update the settings

◆ editSettings()

void camitk::SettingsDialog::editSettings ( QObject *  qObj)

add a new property editor in a tab for the new object (it automatically connect the object "saveSettings" slot if exists to the dialog apply button)

References camitk::ComponentExtension::getFileExtensions(), camitk::ComponentExtension::getLocation(), and camitk::ComponentExtension::getName().

Referenced by ImpMainWindow::editSettings().

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

◆ on_actionExtensionList_cellClicked

void camitk::SettingsDialog::on_actionExtensionList_cellClicked ( int  row,
int  column 
)
privatevirtualslot

◆ on_addActionExtensionButton_released

void camitk::SettingsDialog::on_addActionExtensionButton_released ( )
privatevirtualslot

◆ on_addComponentExtensionButton_released

void camitk::SettingsDialog::on_addComponentExtensionButton_released ( )
privatevirtualslot

◆ on_addViewerExtensionButton_released

void camitk::SettingsDialog::on_addViewerExtensionButton_released ( )
privatevirtualslot

◆ on_componentExtensionList_cellClicked

void camitk::SettingsDialog::on_componentExtensionList_cellClicked ( int  row,
int  column 
)
privatevirtualslot

◆ on_objectList_itemSelectionChanged

void camitk::SettingsDialog::on_objectList_itemSelectionChanged ( )
privatevirtualslot

naming convention is QMetaObject's auto-connection.

name of slots allows for automatic connection (and say good bye to all your connect(...)! )

e.g. : on_colorButton_released() is a slot that will automatically be connected. just using this naming convention means that the following line will automatically be called:

connect(colorButton, SIGNAL(released()), this, SLOT(on_colorButton_released()));

Isn't it great?!

Note
it should be the only places in this application were the naming convention is "deviant"

◆ on_removeActionExtensionButton_released

void camitk::SettingsDialog::on_removeActionExtensionButton_released ( )
privatevirtualslot

◆ on_removeComponentExtensionButton_released

void camitk::SettingsDialog::on_removeComponentExtensionButton_released ( )
privatevirtualslot

◆ on_removeViewerExtensionButton_released

void camitk::SettingsDialog::on_removeViewerExtensionButton_released ( )
privatevirtualslot

◆ on_resetConfigurationButton_released

void camitk::SettingsDialog::on_resetConfigurationButton_released ( )
privatevirtualslot

References CAMITK_WARNING.

◆ on_viewerExtensionList_cellClicked

void camitk::SettingsDialog::on_viewerExtensionList_cellClicked ( int  row,
int  column 
)
privatevirtualslot

◆ readUserExtensions()

void camitk::SettingsDialog::readUserExtensions ( )
private

get the current value of the settings

◆ updateActionExtensionList()

void camitk::SettingsDialog::updateActionExtensionList ( )
private

update the action plugin list

◆ updateComponentExtensionList()

void camitk::SettingsDialog::updateComponentExtensionList ( )
private

update the component extension list

References camitk::ComponentExtension::getLocation(), and camitk::ComponentExtension::getName().

+ Here is the call graph for this function:

◆ updateViewerExtensionList()

void camitk::SettingsDialog::updateViewerExtensionList ( )
private

update the action plugin list

◆ writeUserExtensions()

void camitk::SettingsDialog::writeUserExtensions ( )
private

write the current value of the settings

Member Data Documentation

◆ editedObjectMap

QMap<QString, QObject*> camitk::SettingsDialog::editedObjectMap
private

the map to get an edited object from its name

◆ myUI

Ui::ui_Settings* camitk::SettingsDialog::myUI
private

Qt ui designed in Qt Designer.

◆ objectController

ObjectController* camitk::SettingsDialog::objectController
private

the property editor

◆ userActions

QStringList camitk::SettingsDialog::userActions
private

the list of user action extension locations

◆ userComponents

QStringList camitk::SettingsDialog::userComponents
private

the list of user component extension locations

◆ userViewers

QStringList camitk::SettingsDialog::userViewers
private

the list of user action extension locations


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