Computer Assited Medical Intervention Tool Kit  version 3.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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-2014 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 
141 
144 
146  QColor bgColor;
147 
149  Ui::LoadsEditor ui;
150 };
151 
152 #endif
void reset()
when the user clic on reset, reset the loads (using load manager loads)
void applyToClicked()
when user clicked on the applyTo button
void deleteLoad()
when user click to delete current load
void apply()
when the user clic on apply
void zChanged()
when user changed the direction z
void unitChanged()
when user changed the current unit
~LoadsEditor()
Destructor.
void editLoad()
let user play with a current load
void updateND()
update the null displacement display
void loadTableItemClicked(QTableWidgetItem *)
when the user click on the load list
void applyToReturnPressed()
when user pressed return in the applyTo line edit
void newValueEvent()
when user wants to add a new value event
void init()
initialize everything
This class makes it possible to manage a list of "Load".
Definition: Loads.h:70
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
void nullDisplacementClicked()
when user toggle null displacement
void createDCLoads(std::vector< camitk::Component * > *)
create a new load using this DC as targets
Ui::LoadsEditor ui
the ui dialog designed in qtdesigner
Definition: LoadsEditor.h:149
void reject()
when the user clic on cancel
LoadsManager * myLM
my load manager
Definition: LoadsEditor.h:137
Load * createNewLoad()
create a new load by asking the user for the load type.
void updateLoadsTable()
refresh load list display
virtual void show()
overloaded so that it can update the load list
void updateLoads()
copy the loads from the manager to a local list
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
void valueEventTableItemClicked(QTableWidgetItem *)
when user double clic on a value event
void yChanged()
when user changed the direction y
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
void xChanged()
when user changed the direction x
void updateValueEventTable()
refresh the value event display
void deleteValueEvent()
when user wants to delete current value event