Computer Assited Medical Intervention Tool Kit  version 3.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
MeshDataModel.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 MESH_DATA_MODEL_H
27 #define MESH_DATA_MODEL_H
28 
29 #include <QAbstractTableModel>
30 
31 namespace camitk {
32 
33 class MeshComponent;
34 
39 class MeshDataModel : public QAbstractTableModel {
40 
41  Q_OBJECT
42 
43 public :
44 
48  MeshDataModel ( MeshComponent* meshComp );
49 
53  int rowCount ( const QModelIndex &parent = QModelIndex() ) const ;
54 
58  int columnCount ( const QModelIndex &parent = QModelIndex() ) const;
59 
63  QVariant data ( const QModelIndex &index, int role = Qt::DisplayRole ) const;
64 
68  QVariant headerData ( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const;
69 
73  void refresh();
74 
75 private :
76 
78 
79 };
80 
81 }
82 
83 #endif
MeshComponent * meshComponent
Definition: MeshDataModel.h:77
Qt model for mesh data.
Definition: MeshDataModel.h:39
Definition: Action.cpp:40
Basic component to manage any kind of mesh.
Definition: MeshComponent.h:48
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
Header data.
Definition: MeshDataModel.cpp:111
void refresh()
Refresh the model.
Definition: MeshDataModel.cpp:133
int rowCount(const QModelIndex &parent=QModelIndex()) const
Number of data arrays.
Definition: MeshDataModel.cpp:39
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
Model data.
Definition: MeshDataModel.cpp:50
MeshDataModel(MeshComponent *meshComp)
Constructor.
Definition: MeshDataModel.cpp:34
int columnCount(const QModelIndex &parent=QModelIndex()) const
Number of data arrays columns.
Definition: MeshDataModel.cpp:46