Computer Assited Medical Intervention Tool Kit  version 4.0
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-2016 Univ. Grenoble Alpes, 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 
141 
144 
146  QColor bgColor;
147 
149  Ui::LoadsEditor ui;
150 };
151 
152 #endif
void createDCLoads(std::vector< camitk::Component *> *)
create a new load using this DC as targets
Definition: LoadsEditor.cpp:116
void reset()
when the user clic on reset, reset the loads (using load manager loads)
Definition: LoadsEditor.cpp:703
void applyToClicked()
when user clicked on the applyTo button
Definition: LoadsEditor.cpp:551
void deleteLoad()
when user click to delete current load
Definition: LoadsEditor.cpp:360
void apply()
when the user clic on apply
Definition: LoadsEditor.cpp:714
void zChanged()
when user changed the direction z
Definition: LoadsEditor.cpp:586
void unitChanged()
when user changed the current unit
Definition: LoadsEditor.cpp:600
~LoadsEditor()
Destructor.
Definition: LoadsEditor.cpp:68
Load * createNewLoad()
create a new load by asking the user for the load type.
Definition: LoadsEditor.cpp:272
void editLoad()
let user play with a current load
Definition: LoadsEditor.cpp:387
void updateND()
update the null displacement display
Definition: LoadsEditor.cpp:466
void loadTableItemClicked(QTableWidgetItem *)
when the user click on the load list
Definition: LoadsEditor.cpp:375
void applyToReturnPressed()
when user pressed return in the applyTo line edit
Definition: LoadsEditor.cpp:517
void newValueEvent()
when user wants to add a new value event
Definition: LoadsEditor.cpp:639
void init()
initialize everything
Definition: LoadsEditor.cpp:85
This class makes it possible to manage a list of "Load".
Definition: Loads.h:71
This class manages the applied all loads (see LML), deformation add-on, atom data monitoring and atom...
Definition: LoadsManager.h:69
Load * editedLoad
the currently edited load
Definition: LoadsEditor.h:143
void newLoad()
when user click to add a new load
Definition: LoadsEditor.cpp:346
void nullDisplacementClicked()
when user toggle null displacement
Definition: LoadsEditor.cpp:479
Ui::LoadsEditor ui
the ui dialog designed in qtdesigner
Definition: LoadsEditor.h:149
void reject()
when the user clic on cancel
Definition: LoadsEditor.cpp:708
LoadsManager * myLM
my load manager
Definition: LoadsEditor.h:137
void updateLoadsTable()
refresh load list display
Definition: LoadsEditor.cpp:195
virtual void show()
overloaded so that it can update the load list
Definition: LoadsEditor.cpp:76
void updateLoads()
copy the loads from the manager to a local list
Definition: LoadsEditor.cpp:159
Class that describes a load to be used in the simulation.
Definition: Load.h:53
Loads * loads
local copy of the loads
Definition: LoadsEditor.h:140
void applyToTextChanged(const QString &)
when user has typed some text in the applyTo line edit
Definition: LoadsEditor.cpp:510
void valueEventTableItemClicked(QTableWidgetItem *)
when user double clic on a value event
Definition: LoadsEditor.cpp:679
void yChanged()
when user changed the direction y
Definition: LoadsEditor.cpp:572
QColor bgColor
the initial bg color
Definition: LoadsEditor.h:146
A clean dialog to edit (add, modify, delete), loads and their parameters, directly from Core...
Definition: LoadsEditor.h:40
LoadsEditor(LoadsManager *myLoadsManager, QWidget *parent=0)
default constructor
Definition: LoadsEditor.cpp:50
void xChanged()
when user changed the direction x
Definition: LoadsEditor.cpp:558
void updateValueEventTable()
refresh the value event display
Definition: LoadsEditor.cpp:252
void deleteValueEvent()
when user wants to delete current value event
Definition: LoadsEditor.cpp:654