Computer Assited Medical Intervention Tool Kit  version 3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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-2013 UJF-Grenoble 1, CNRS, TIMC-IMAG UMR 5525 (GMCAO)
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 
51 class CAMITK_API SettingsDialog : public QDialog {
52  Q_OBJECT
53 
54 public:
55 
59 
61  ~SettingsDialog();
62 
64  void editSettings(QObject *);
65 
66 private slots:
82  virtual void on_objectList_itemSelectionChanged();
83 
84  virtual void on_resetConfigurationButton_released();
85 
86  virtual void on_addComponentExtensionButton_released();
87 
88  virtual void on_removeComponentExtensionButton_released();
89 
90  virtual void on_componentExtensionList_cellClicked(int, int);
91 
92  virtual void on_addActionExtensionButton_released();
93 
94  virtual void on_removeActionExtensionButton_released();
95 
96  virtual void on_actionExtensionList_cellClicked(int, int);
97 
98 private:
100  void accept();
101 
103  void updateComponentExtensionList();
104 
106  void updateActionExtensionList();
107 
110 
112  QMap<QString, QObject*> editedObjectMap;
113 
115  Ui::ui_Settings *myUI;
116 
118  QStringList userComponents;
119 
121  QStringList userActions;
122 
124  void readUserExtensions();
125 
127  void writeUserExtensions();
128 };
129 }
130 
131 #endif