Computer Assited Medical Intervention Tool Kit
version 4.1
|
This class controls the settings dialog user interface. More...
#include <SettingsDialog.h>
Inherits QDialog.
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_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_resetConfigurationButton_released () |
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 | 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... | |
ObjectController * | objectController |
the property editor More... | |
QStringList | userActions |
the list of user action extension locations More... | |
QStringList | userComponents |
the list of user component extension locations More... | |
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*).
camitk::SettingsDialog::SettingsDialog | ( | ) |
default constructor
References camitk::ObjectController::BUTTON, myUI, objectController, readUserExtensions(), updateActionExtensionList(), and updateComponentExtensionList().
|
override |
destructor
References myUI, and objectController.
|
overrideprivate |
if the user says it is ok and validate the settings dialog, this update the settings
References camitk::ObjectController::apply(), camitk::ObjectController::isModified(), and objectController.
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 editedObjectMap, myUI, objectController, and camitk::ObjectController::setObject().
Referenced by ImpMainWindow::editSettings().
|
privatevirtualslot |
References camitk::Application::getAction(), myUI, and userActions.
|
privatevirtualslot |
|
privatevirtualslot |
|
privatevirtualslot |
|
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:
Isn't it great?!
References camitk::ObjectController::apply(), editedObjectMap, camitk::ObjectController::isModified(), myUI, objectController, and camitk::ObjectController::setObject().
|
privatevirtualslot |
|
privatevirtualslot |
|
privatevirtualslot |
References CAMITK_WARNING, and camitk::Application::getSettings().
|
private |
get the current value of the settings
References camitk::Application::getSettings(), userActions, and userComponents.
Referenced by SettingsDialog().
|
private |
update the action plugin list
References camitk::ExtensionManager::getActionExtensionsList(), camitk::ActionExtension::getActions(), camitk::Application::getActions(), camitk::Action::getComponent(), camitk::ActionExtension::getLocation(), camitk::Action::getName(), myUI, and userActions.
Referenced by on_addActionExtensionButton_released(), on_removeActionExtensionButton_released(), and SettingsDialog().
|
private |
update the component extension list
References camitk::ExtensionManager::getComponentExtensionsList(), camitk::ExtensionManager::getDataDirectoryComponentsList(), camitk::ComponentExtension::getFileExtensions(), camitk::ComponentExtension::getLocation(), camitk::ComponentExtension::getName(), myUI, and userComponents.
Referenced by on_addComponentExtensionButton_released(), on_removeComponentExtensionButton_released(), and SettingsDialog().
|
private |
write the current value of the settings
References camitk::Application::getSettings(), userActions, and userComponents.
Referenced by on_addActionExtensionButton_released(), on_addComponentExtensionButton_released(), on_removeActionExtensionButton_released(), and on_removeComponentExtensionButton_released().
|
private |
the map to get an edited object from its name
Referenced by editSettings(), and on_objectList_itemSelectionChanged().
|
private |
Qt ui designed in Qt Designer.
Referenced by editSettings(), on_actionExtensionList_cellClicked(), on_componentExtensionList_cellClicked(), on_objectList_itemSelectionChanged(), on_removeActionExtensionButton_released(), on_removeComponentExtensionButton_released(), SettingsDialog(), updateActionExtensionList(), updateComponentExtensionList(), and ~SettingsDialog().
|
private |
the property editor
Referenced by accept(), editSettings(), on_objectList_itemSelectionChanged(), SettingsDialog(), and ~SettingsDialog().
|
private |
the list of user action extension locations
Referenced by on_actionExtensionList_cellClicked(), on_addActionExtensionButton_released(), on_removeActionExtensionButton_released(), readUserExtensions(), updateActionExtensionList(), and writeUserExtensions().
|
private |
the list of user component extension locations
Referenced by on_addComponentExtensionButton_released(), on_componentExtensionList_cellClicked(), on_removeComponentExtensionButton_released(), readUserExtensions(), updateComponentExtensionList(), and writeUserExtensions().