Computer Assited Medical Intervention Tool Kit  version 5.0
SettingsDialog.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * $CAMITK_LICENCE_BEGIN$
3  *
4  * CamiTK - Computer Assisted Medical Intervention ToolKit
5  * (c) 2001-2021 Univ. Grenoble Alpes, CNRS, Grenoble INP, TIMC, 38000 Grenoble, France
6  *
7  * Visit http://camitk.imag.fr for more information
8  *
9  * This file is part of CamiTK.
10  *
11  * CamiTK is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * CamiTK is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU Lesser General Public License version 3 for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public License
21  * version 3 along with CamiTK. If not, see <http://www.gnu.org/licenses/>.
22  *
23  * $CAMITK_LICENCE_END$
24  ****************************************************************************/
25 
26 #ifndef SETTINGS_DIALOG_H
27 #define SETTINGS_DIALOG_H
28 
29 // -- Core stuff
30 #include "CamiTKAPI.h"
31 namespace Ui {
32 class ui_Settings;
33 }
34 
35 // -- QT stuff
36 #include <QDialog>
37 #include <QMap>
38 
39 namespace camitk {
40 
41 // -- Core stuff classes
42 class ObjectController;
43 
54 class CAMITK_API SettingsDialog : public QDialog {
55  Q_OBJECT
56 
57 public:
58 
62 
64  ~SettingsDialog() override;
65 
67  void editSettings(QObject*);
68 
69 private slots:
85  virtual void on_objectList_itemSelectionChanged();
86 
87  virtual void on_resetConfigurationButton_released();
88 
89  virtual void on_addComponentExtensionButton_released();
90 
91  virtual void on_removeComponentExtensionButton_released();
92 
93  virtual void on_componentExtensionList_cellClicked(int, int);
94 
95  virtual void on_addActionExtensionButton_released();
96 
97  virtual void on_removeActionExtensionButton_released();
98 
99  virtual void on_actionExtensionList_cellClicked(int, int);
100 
101  virtual void on_addViewerExtensionButton_released();
102 
103  virtual void on_removeViewerExtensionButton_released();
104 
105  virtual void on_viewerExtensionList_cellClicked(int, int);
106 
107 private:
109  void accept() override;
110 
112  void updateComponentExtensionList();
113 
115  void updateActionExtensionList();
116 
118  void updateViewerExtensionList();
119 
122 
124  QMap<QString, QObject*> editedObjectMap;
125 
127  Ui::ui_Settings* myUI;
128 
130  QStringList userComponents;
131 
133  QStringList userActions;
134 
136  QStringList userViewers;
137 
139  void readUserExtensions();
140 
142  void writeUserExtensions();
143 };
144 }
145 
146 #endif
CAMITK_WARNING
#define CAMITK_WARNING(MSG)
Log for warning verbosity (the most common one) Will appear by default.
Definition: Log.h:266
ObjectController
Definition: objectcontroller.h:47
CamiTKAPI.h
a
#define a
camitk::ComponentExtension
This class describes what is a generic Component extension. To add a ComponentExtension to CamiTK cor...
Definition: ComponentExtension.h:83
camitk::ViewerExtension::getViewers
const ViewerList & getViewers()
get the list of viewer instances registered by this extension
Definition: ViewerExtension.cpp:190
Action.h
camitk::SettingsDialog::myUI
Ui::ui_Settings * myUI
Qt ui designed in Qt Designer.
Definition: SettingsDialog.h:127
camitk::ViewerExtension::getLocation
QString getLocation() const
get the file path (location of the .dll/.so/.dylib) of this plugin
Definition: ViewerExtension.cpp:107
camitk::ActionList
QList< Action * > ActionList
A list of Action.
Definition: CamiTKAPI.h:136
ActionExtension.h
Log.h
camitk::SettingsDialog
This class controls the settings dialog user interface.
Definition: SettingsDialog.h:54
camitk::Viewer::getName
QString getName() const
get the name of the viewer
Definition: Viewer.h:200
camitk::Action
Action class is an abstract class that enables you to build a action (generally on a component)....
Definition: Action.h:231
camitk::ViewerExtension::getName
virtual QString getName()=0
returns the viewer extension name (to be overriden in the derived class)
camitk::ObjectController
The object controller class.
Definition: ObjectController.h:185
camitk::SettingsDialog::userComponents
QStringList userComponents
the list of user component extension locations
Definition: SettingsDialog.h:130
Ui
Definition: SettingsDialog.h:31
camitk::ComponentExtension::getFileExtensions
virtual QStringList getFileExtensions() const =0
get the list of managed extensions (each file with an extension in the list can be loaded by this Com...
CAMITK_ERROR
#define CAMITK_ERROR(MSG)
Log for error verbosity (the minimum verbosity) Will always appear.
Definition: Log.h:276
camitk::SettingsDialog::objectController
ObjectController * objectController
the property editor
Definition: SettingsDialog.h:121
ComponentExtension.h
camitk::SettingsDialog::SettingsDialog
SettingsDialog()
default constructor
Definition: SettingsDialog.cpp:77
ViewerExtension.h
SetPathToTestData::apply
virtual camitk::Action::ApplyStatus apply()
apply the action select the last instantiated component
Definition: SetPathToTestData.cpp:54
ObjectController.h
camitk::SettingsDialog::userActions
QStringList userActions
the list of user action extension locations
Definition: SettingsDialog.h:133
camitk::SettingsDialog::userViewers
QStringList userViewers
the list of user action extension locations
Definition: SettingsDialog.h:136
camitk::Viewer
Viewer is an abstract class that is the base class for all viewers.
Definition: Viewer.h:180
SettingsDialog.h
camitk::ViewerList
QList< Viewer * > ViewerList
A list of Viewer.
Definition: CamiTKAPI.h:139
Viewer.h
camitk::SettingsDialog::editedObjectMap
QMap< QString, QObject * > editedObjectMap
the map to get an edited object from its name
Definition: SettingsDialog.h:124
camitk::Viewer::getIcon
virtual QPixmap getIcon()
get the viewer icon
Definition: Viewer.cpp:89
camitk::ComponentExtension::getLocation
QString getLocation() const
get the file path (location of the .dll/.so/.dylib) of this plugin
Definition: ComponentExtension.h:143
camitk::ViewerExtension
This class describes what is a generic Action extension. To add a ActionExtension to CamiTK core,...
Definition: ViewerExtension.h:108
Core.h
ExtensionManager.h
camitk::ComponentExtension::getName
virtual QString getName() const =0
Application.h
CAMITK_API
#define CAMITK_API
Definition: CamiTKAPI.h:49
camitk
Definition: Action.cpp:35