Computer Assited Medical Intervention Tool Kit
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
LoadsEditor.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 LOADEDITOR_H
27 #define LOADEDITOR_H
28 
29 #include "ui_LoadsEditor.h"
30 #include <Component.h>
31 
32 class LoadsManager;
33 class Loads;
34 class Load;
35 
40 class LoadsEditor : public QDialog {
41 Q_OBJECT
42 public:
44  LoadsEditor(LoadsManager * myLoadsManager, QWidget* parent = 0);
45 
47  LoadsEditor(std::vector <camitk::Component *> selectedDC, LoadsManager * myLoadsManager, QWidget* parent = 0);
48 
50  ~LoadsEditor();
51 
53  virtual void show();
54 
56  void updateLoads();
57 
58 public slots :
59 
61  void newLoad();
62 
64  void deleteLoad();
65 
67  void loadTableItemClicked(QTableWidgetItem *);
68 
70  void applyToTextChanged(const QString&);
71 
73  void applyToReturnPressed();
74 
76  void applyToClicked();
77 
80 
82  void xChanged();
83 
85  void yChanged();
86 
88  void zChanged();
89 
91  void unitChanged();
92 
94  void newValueEvent();
95 
97  void deleteValueEvent();
98 
100  void valueEventTableItemClicked(QTableWidgetItem *);
101 
103  void reset();
104 
106  void reject();
107 
109  void apply();
110 
111 private :
112 
114  void init();
115 
117  void updateLoadsTable();
118 
120  void updateValueEventTable();
121 
123  void createDCLoads(std::vector<camitk::Component *> *);
124 
128  Load* createNewLoad();
129 
131  void editLoad();
132 
134  void updateND();
135 
138 
140  Loads *loads;
141 
143  Load * editedLoad;
144 
146  QColor bgColor;
147 
149  Ui::LoadsEditor ui;
150 };
151 
152 #endif