]> SALOME platform Git repositories - modules/hexablock.git/blob - src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentModel.hxx
Salome HOME
044459fed4a0d7dce1d01556a3a87c1f30e2189b
[modules/hexablock.git] / src / HEXABLOCKGUI / HEXABLOCKGUI_DocumentModel.hxx
1 // Copyright (C) 2009-2013  CEA/DEN, EDF R&D
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 #ifndef _HEXABLOCKGUI_DOCUMENTMODEL_HXX_
21 #define _HEXABLOCKGUI_DOCUMENTMODEL_HXX_
22
23
24 #include <QTemporaryFile>
25 #include <QStandardItemModel>
26 #include <QSortFilterProxyModel>
27
28 #include "HEXABLOCKGUI_DocumentItem.hxx"
29 #include "HexDocument.hxx"
30 #include "HexNewShape.hxx"
31 #include "Hex.hxx"
32
33
34 namespace HEXABLOCK
35 {
36   namespace GUI
37   {
38     class HexaExport DocumentModel : public QStandardItemModel
39     {
40       Q_OBJECT
41     public:
42
43       struct GeomObj
44       {
45           QString shapeName;  //main shape name
46           QString shapeEntry; //main shape entry
47           QString name;
48           QString subId;      // sub-shape id (if it's a sub shape)
49           QString brep;
50           double  start;
51           double  end;
52       };
53
54       typedef HEXA_NS::EnumGroup Group;
55       typedef HEXA_NS::KindLaw   KindLaw;
56
57       typedef QList<GeomObj> GeomObjList;
58
59       DocumentModel( HEXA_NS::Document* doc, const QString& entry, QObject * parent = 0 );
60       DocumentModel( int rows, int columns, QObject * parent = 0 );
61
62       virtual ~DocumentModel();
63
64
65       void setName(const QString& name);
66       QString getName();
67       HEXA_NS::Document* getHexaDocument() const { return _hexaDocument; }
68       void load( const QString& xmlFileName );
69       void load(); //Loads the current document
70       void save( const QString& xmlFileName );
71       void updateData();
72       void updateGeomTree();
73       void refresh(); //refresh data
74       bool isEmpty() const;
75
76       double getLength(const QModelIndex& iEdge);
77       double getRadius(const QModelIndex& iEdge);
78       double getAngle(const QModelIndex& iEdge);
79
80       void clearAll();
81       void clearData();
82 //      void clearBuilder();
83       void clearGeometry();
84       void clearAssociation();
85       void clearGroups();
86       void clearMesh();
87
88       void fillData();
89 //      void fillBuilder();
90       void fillGeometry();
91       void fillAssociation();
92       void fillGroups();
93       void fillMesh();
94
95       virtual Qt::ItemFlags flags(const QModelIndex &index) const;
96
97
98       void allowEdition();
99       void disallowEdition();
100
101       void allowDataSelectionOnly();
102       void allowVertexSelectionOnly();
103       void allowEdgeSelectionOnly();
104       void allowQuadSelectionOnly();
105       void allowHexaSelectionOnly();
106
107       void allowVectorSelectionOnly();
108       void allowCylinderSelectionOnly();
109       void allowPipeSelectionOnly();
110       void allowElementsSelectionOnly();
111       void allowCrossElementsSelectionOnly();
112
113       void allowLawSelectionOnly();
114
115       Hex::Hex* getHexaRoot() { return Hex::Hex::getInstance(); }
116
117       HEXA_NS::EltBase* getHexaPtr(const QModelIndex& iElt);
118       template<typename T>
119       T getHexaPtr(QModelIndex iElt)
120       {
121         if (iElt.isValid())
122           return iElt.data( HEXA_DATA_ROLE ).value< T >();
123
124         return NULL;
125       }
126
127       int getNbrElt(HEXA_NS::EnumElt eltType);
128       int getNbrUsedElt(HEXA_NS::EnumElt eltType);
129       int getNbrUnusedElt(HEXA_NS::EnumElt eltType);
130
131       QModelIndex addElementsToTree(HEXA_NS::Elements* helts, QStandardItem* tree);
132
133       //associate a shape to the current document
134       bool addShape(TopoDS_Shape& forme, QString& shapeName, bool publish=true);
135
136       //returns the geom obj id in the document using its entry
137       QString getGeomObjName(QString& studyEntry) const {
138           return docShapesName.contains(studyEntry) ? docShapesName[studyEntry] : QString();
139       }
140
141       //returns the geom obj entry in the document using its id
142       QString getGeomObjEntry(QString& shapeName) const {
143           return docShapesEntry.contains(shapeName) ? docShapesEntry[shapeName] : QString();
144       }
145
146       //returns the document's shapes entries
147       QList<QString> getShapesEntries() const { return docShapesName.uniqueKeys(); }
148
149       //returns the associated geom object to the data index
150       HEXA_NS::SubShape* getGeomPtr(QString& id) const
151       {
152           if (!shapeById.contains(id))
153               return NULL;
154           return shapeById[id];
155       }
156
157       QModelIndex getGeomModelIndex(QString& id) const;
158
159       void setGeomObjName(QString& studyEntry, QString& shapeName) {docShapesName[studyEntry] = shapeName;}
160       void setGeomObjEntry(QString& shapeName, QString& studyEntry) {docShapesEntry[shapeName] = studyEntry;}
161
162       void setName( const QModelIndex& iElt, const QString& name );
163       bool clearEltAssociations( const QModelIndex& iElt );
164       HEXA_NS::Hexa* getQuadHexa(HEXA_NS::Quad* quad);
165
166       //  ************  BUILD HEXABLOCK MODEL (OBSOLETE)************
167       QModelIndex addVertex( double x, double y, double z );
168
169       //
170       QModelIndex addEdgeVertices (const QModelIndex &i_v0, const QModelIndex &i_v1 );
171       QModelIndex addEdgeVector( const QModelIndex &i_v, const QModelIndex &i_vec );
172
173       //
174       QModelIndex addQuadVertices( const QModelIndex &i_v0, const QModelIndex &i_v1,
175           const QModelIndex &i_v2, const QModelIndex &i_v3 );
176       QModelIndex addQuadEdges( const QModelIndex &i_e0, const QModelIndex &i_e1,
177           const QModelIndex &i_e2, const QModelIndex &i_e3 );
178
179       //
180       QModelIndex addHexaVertices( const QModelIndex &i_v0, const QModelIndex &i_v1,
181           const QModelIndex &i_v2, const QModelIndex &i_v3,
182           const QModelIndex &i_v4, const QModelIndex &i_v5,
183           const QModelIndex &i_v6, const QModelIndex &i_v7 );
184       QModelIndex addHexaQuad( const QModelIndex &i_q0, const QModelIndex &i_q1, const QModelIndex &i_q2, const QModelIndex &i_q3, const QModelIndex &i_q4, const QModelIndex &i_q5 );
185
186       QModelIndex addHexaQuads( const QModelIndexList &i_quads ); //NEW HEXA3
187
188
189       //
190       QModelIndex addVector( double dx, double dy, double dz );
191       QModelIndex addVectorVertices( const QModelIndex &i_v0, const QModelIndex &i_v1 );
192
193       //
194 //      QModelIndex addCylinder( const QModelIndex &iv, const QModelIndex &ivec, double r,  double h );
195 //
196 //      //
197 //      QModelIndex addPipe( const QModelIndex &iv, const QModelIndex &ivec, double ri, double re, double h );
198
199
200
201       // ===================== NEW =================================
202
203       // ===== CARTESIAN GRID
204
205       QModelIndex makeCartesianTop(int nx, int ny, int nz);
206       QModelIndex makeCartesianUni(const QModelIndex& icenter, const QModelIndex& ibase, const QModelIndex& ivec,
207                                    const QModelIndex& iaxis, double lx, double ly, double lz, int nx, int ny, int nz);
208       QModelIndex makeCartesian(const QModelIndex& icenter, const QModelIndex& ibase, const QModelIndex& ivec,
209                                 const QModelIndex& iaxis, vector<double>& radius, vector<double>& angles, vector<double>& heights);
210
211       // ====== SPHERE
212
213       QModelIndex makeSphereTop (int nr, int na, int nh);
214
215       QModelIndex makeSphereUni (QModelIndex& icenter,
216                                  QModelIndex& ivec_x, QModelIndex& ivec_z,
217                                  double rtrou, double rext, double ang,
218                                  QModelIndex& ivplan,
219                                  int nr, int na, int nh);
220
221       QModelIndex makeSphere    (QModelIndex& icenter,
222                                  QModelIndex& ivec_x, QModelIndex& ivec_z,
223                                  vector<double>& tray, vector<double>& tang, vector<double>& thaut);
224
225       // ====== SPHERICAL
226
227       QModelIndex makeSphericalTop (int nbre, int crit);
228
229       QModelIndex makeSphericalUni (QModelIndex& icenter,
230                                     QModelIndex& ivec_x, QModelIndex& ivec_z,
231                                     double rayon,
232                                     int nbre, int crit);
233
234       QModelIndex makeSpherical    (QModelIndex& icenter,
235                                     QModelIndex& ivec_x, QModelIndex& ivec_z,
236                                     vector<double>& rayon,
237                                     int crit);
238
239       // =========== RIND
240       QModelIndex makeRindTop (int nr, int na, int nh);
241
242       QModelIndex makeRindUni (QModelIndex& icenter,
243                                QModelIndex& ivec_x, QModelIndex& ivec_z,
244                                double raytrou, double rint, double rext, double ang,
245                                QModelIndex& ivplan,
246                                int nr, int na, int nh);
247
248       QModelIndex makeRind   (QModelIndex& icenter,
249                               QModelIndex& ivec_x, QModelIndex& ivec_z,
250                               vector<double>& tray, vector<double>& tang, vector<double>& thaut);
251
252       // ======== Cylinder
253       QModelIndex makeCylinderTop(int nr, int na, int nh);
254
255       QModelIndex makeCylinderUni(QModelIndex& iorig, QModelIndex& ivecx, QModelIndex& ivecz,
256                                    double rint, double rext, double angle, double haut,
257                                    int nr, int na, int nh);
258
259       QModelIndex makeCylinder   (QModelIndex& iorig, QModelIndex& ivecx, QModelIndex& ivecz,
260                                   vector<double>& tray, vector<double>& tang, vector<double>& thaut);
261
262       // ======== Cylinders
263       QModelIndex makeCylinders  (QModelIndex& iorig1, QModelIndex& ivecz1,  double r1, double h1,
264                                   QModelIndex& iorig2, QModelIndex& ivecz2, double r2, double h2);
265
266       // =========== PIPE
267       QModelIndex makePipeTop (int nr, int na, int nh);
268
269       QModelIndex makePipeUni (QModelIndex& iorig, QModelIndex& ivecx, QModelIndex& ivecz,
270                                double rint, double rext, double angle, double haut,
271                                int nr, int na, int nh);
272
273       QModelIndex makePipe    (QModelIndex& iorig, QModelIndex& ivecx, QModelIndex& ivecz,
274                                vector<double>& tray, vector<double>& tang, vector<double>& thaut);
275
276       // ======== Pipes
277       QModelIndex makePipes  (QModelIndex& iorig1, QModelIndex& ivecz1, double rint1, double rex1, double h1,
278                               QModelIndex& iorig2, QModelIndex& ivecz2, double rint2, double rex2, double h2);
279
280       // ======== Join Quads
281       QModelIndex joinQuadUni(QModelIndex& istart, QModelIndex& idest, QModelIndex& iv1, QModelIndex& iv2,
282                               QModelIndex& iv3, QModelIndex& iv4, int nb);
283
284       QModelIndex joinQuad   (QModelIndex&  istart, QModelIndex& idest, QModelIndex& iva1, QModelIndex& ivb1,
285                               QModelIndex& iva2, QModelIndex& ivb2, vector<double>& tlen);
286
287       QModelIndex joinQuadsUni (QModelIndexList& istarts, QModelIndex& idest, QModelIndex& iv1, QModelIndex& iv2,
288                                 QModelIndex& iv3, QModelIndex& iv4, int nb);
289
290       QModelIndex joinQuads    (QModelIndexList& istarts, QModelIndex& idest, QModelIndex& iva1, QModelIndex& ivb1,
291                                 QModelIndex& iva2, QModelIndex& ivb2, vector<double>& tlen);
292
293       // ======== Quad Revolution
294       QModelIndex revolutionQuadUni(QModelIndex& istart, QModelIndex& icenter, QModelIndex& iaxis,
295                                     double angle, int nbre);
296
297       QModelIndex revolutionQuad(QModelIndex& istart, QModelIndex& icenter, QModelIndex& iaxis,
298                                  vector<double>& angles);
299
300       QModelIndex revolutionQuadsUni(QModelIndexList& istarts, QModelIndex& icenter, QModelIndex& iaxis,
301                                      double angle, int nbre);
302
303       QModelIndex revolutionQuads(QModelIndexList& istarts, QModelIndex& icenter, QModelIndex& iaxis,
304                                   vector<double>& angles);
305
306       // ==== PrismQuad or ExtrudeQuad
307       QModelIndex extrudeQuadTop (QModelIndex& istart, int nbre);
308       QModelIndex extrudeQuadUni (QModelIndex& istart, QModelIndex& dv, double len, int nbre);
309       QModelIndex extrudeQuad    (QModelIndex& istart, QModelIndex& dv, vector<double>& tlen);
310
311       QModelIndex extrudeQuadsTop (QModelIndexList& istarts, int nbre);
312       QModelIndex extrudeQuadsUni (QModelIndexList& istarts, QModelIndex& axis, double len, int nbre);
313       QModelIndex extrudeQuads    (QModelIndexList& istarts, QModelIndex& iaxis, vector<double>& tlen);
314
315       // ==== Cut Edge
316       QModelIndex cutUni     (QModelIndex& iEdge, int nbre);
317       QModelIndex cut        (QModelIndex& iEdge, vector<double>& tlen);
318
319       // ============================== END NEW ================================
320
321       // ************  EDIT HEXABLOCK MODEL ************
322
323       bool updateVertex( const QModelIndex& vertex, double x, double y, double z );
324
325       //
326       bool removeHexa( const QModelIndex& hexa );
327       bool removeConnectedHexa( const QModelIndex& hexa );
328
329       bool mergeVertices( const QModelIndex& va, const QModelIndex& vb );
330       bool mergeEdges( const QModelIndex& ea, const QModelIndex& eb,
331           const QModelIndex& v0, const QModelIndex& v1 );
332       bool mergeQuads( const QModelIndex& qa, const QModelIndex& qb,
333           const QModelIndex& v0, const QModelIndex& v1,
334           const QModelIndex& v2, const QModelIndex& v3 );
335
336       //
337       QModelIndex disconnectVertex( const QModelIndex& h, const QModelIndex& v );
338       QModelIndex disconnectEdge( const QModelIndex& h, const QModelIndex& e );
339       QModelIndex disconnectQuad( const QModelIndex& h, const QModelIndex& q );
340       QModelIndex disconnectEdges( const QModelIndexList& h, const QModelIndexList& e );
341
342       //
343       QModelIndex makeTranslation( const QModelIndex& elts, const QModelIndex& vec );
344       QModelIndex makeScale( const QModelIndex& elts, const QModelIndex& v, double k );
345
346       //
347       QModelIndex makeRotation( const QModelIndex& elts, const QModelIndex& v, const QModelIndex& vec, double angle );
348
349       //
350       QModelIndex makeSymmetryPoint( const QModelIndex& elts, const QModelIndex& v );
351       QModelIndex makeSymmetryLine( const QModelIndex& elts, const QModelIndex& v, const QModelIndex& vec );
352       QModelIndex makeSymmetryPlane( const QModelIndex& elts, const QModelIndex& v, const QModelIndex& vec );
353
354       //
355       bool performTranslation( const QModelIndex& elts, const QModelIndex& vec );
356
357       //
358       bool performScale( const QModelIndex& elts, const QModelIndex& v, double k );
359
360       //
361       bool performRotation( const QModelIndex& elts, const QModelIndex& v, const QModelIndex& vec, double angle );
362
363       //
364       bool performSymmetryPoint( const QModelIndex& elts, const QModelIndex& v );
365       bool performSymmetryLine( const QModelIndex& elts, const QModelIndex& v, const QModelIndex& vec );
366       bool performSymmetryPlane( const QModelIndex& elts, const QModelIndex& v, const QModelIndex& vec );
367
368       QModelIndex replace( const QModelIndexList& quadsPattern,
369                            const QModelIndex& ip1, const QModelIndex& ic1,
370                            const QModelIndex& ip2, const QModelIndex& ic2,
371                            const QModelIndex& ip3, const QModelIndex& ic3 ); //NEW HEXA3
372
373       QModelIndex replace( const QModelIndexList& iquads_source, const QModelIndexList& iquads_dest,
374                            const QModelIndex& ip1_source, const QModelIndex& ic1_dest,
375                            const QModelIndex& ip2_source, const QModelIndex& ic2_dest,
376                            const QModelIndex& ip3_source, const QModelIndex& ic3_dest );
377
378
379       // ************  ASSOCIATION ************
380       bool setVertexAssociation( const QModelIndex& iVertex, double x, double y, double z);
381       bool setVertexAssociation(const QModelIndex& iVertex, const QModelIndex& iGeomVertex);
382       bool addEdgeAssociation(const QModelIndex& iEdge, const QModelIndex& iGeomEdge, double start, double end);
383       bool addQuadAssociation (const QModelIndex& iQuad, const QModelIndex& iGeomFace);
384
385       QMultiMap< QString, int >     getAssocShapesIds(const QModelIndex& dataIndex);
386       QModelIndex     getVertexAssociation(const QModelIndex& iVertex);
387       QModelIndexList getEdgeAssociations(const QModelIndex& iEdge);
388       QModelIndexList getQuadAssociations(const QModelIndex& iQuad);
389
390      //---------- perimees -------------
391       bool associateOpenedLine( const QModelIndexList& edges,
392           const GeomObjList&     assocs,
393           double pstart,
394           double pend );
395
396       bool associateClosedLine( const QModelIndex& vertex,
397           const QModelIndexList& edges,
398           const GeomObjList&     assocs,
399           double pstart,
400           bool   inv = false );
401       //-------------
402
403       bool associateOpenedLine( const QModelIndexList& edges,
404               HEXA_NS::NewShapes shapes,
405               HEXA_NS::IntVector subIds,
406               double pstart,
407               double pend );
408
409       bool associateClosedLine( const QModelIndex& vertex,
410               const QModelIndexList& edges,
411               HEXA_NS::NewShapes shapes,
412               HEXA_NS::IntVector subIds,
413               double pstart,
414               bool   inv = false );
415
416       void clearAssociation(HEXA_NS::EnumElt& eltType);
417
418
419       // ************  GROUPS  ************
420       //
421       QModelIndex addGroup( const QString& name, Group kind );
422
423       //
424       bool removeGroup( const QModelIndex& grp );
425
426       //
427       QModelIndexList getGroupElements( const QModelIndex& iGroup, Group& kind) const;
428
429       // 7.4 Boite: éditer un groupe
430       void setGroupName( const QModelIndex& grp, const QString& name );
431       bool addGroupElement( const QModelIndex& grp, const QModelIndex& elt );
432       bool removeGroupElement( const QModelIndex& grp, int nro ); //CS_TODO
433       bool clearGroupElement( const QModelIndex& grp );
434
435
436       // ************  LAWS  ************
437       //
438       QModelIndex addLaw( const QString& name, int nbnodes );
439       bool setLaw( const QModelIndex& ilaw, int nbnodes, double coeff, KindLaw type );
440       bool  removeLaw( const QModelIndex& law );
441       bool setPropagation( const QModelIndex& iPropagation, const QModelIndex& iLaw, bool way );
442       QModelIndexList getPropagation( const QModelIndex& iPropagation ) const;
443
444       // tools
445       HEXA_NS::Document* documentImpl();
446       QString            documentEntry();
447
448       signals:
449       void patternDataChanged();
450       void nameChanged(const QString& name);
451
452     private:
453       QTemporaryFile    *_hexaFile;
454       HEXA_NS::Document *_hexaDocument;
455       QString            _entry;
456
457       //geom
458       QMap<QString, QString> docShapesEntry;
459       QMap<QString, QString> docShapesName;
460       QMap<QString, HEXA_NS::SubShape*> shapeById;
461
462       QMap<QString, QString> _assocName; // clé: id; valeur: nom
463       bool              _disallowEdition;
464
465       //data
466       QStandardItem     *_vertexDirItem;
467       QStandardItem     *_edgeDirItem;
468       QStandardItem     *_quadDirItem;
469       QStandardItem     *_hexaDirItem;
470
471       //builder
472       QStandardItem     *_vectorDirItem;
473       QStandardItem     *_elementsDirItem;
474       QStandardItem     *_crossElementsDirItem;
475
476       //geometry
477       QStandardItem     *_explicitShapesDirItem;
478       QStandardItem     *_implicitShapesDirItem;
479       QStandardItem     *_cloudOfPointsDirItem;
480
481       //association
482       // CS_TODO
483
484       // groups
485       QStandardItem     *_groupDirItem;
486
487       // law
488       QStandardItem     *_lawDirItem;
489       QStandardItem     *_propagationDirItem;
490
491       Qt::ItemFlags     _vertexItemFlags;
492       Qt::ItemFlags     _edgeItemFlags;
493       Qt::ItemFlags     _quadItemFlags;
494       Qt::ItemFlags     _hexaItemFlags;
495
496       Qt::ItemFlags     _vectorItemFlags;
497       Qt::ItemFlags     _elementsItemFlags;
498       Qt::ItemFlags     _crossElementsItemFlags;
499
500       Qt::ItemFlags     _groupItemFlags;
501       Qt::ItemFlags     _lawItemFlags;
502       Qt::ItemFlags     _propagationItemFlags;
503     };
504
505
506     class  PatternDataModel : public QSortFilterProxyModel
507     {
508     public:
509       PatternDataModel( QObject * parent = 0 );
510       virtual ~PatternDataModel();
511
512       virtual Qt::ItemFlags flags(const QModelIndex &index) const;
513       virtual QVariant headerData ( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const;
514
515       QStandardItem * itemFromIndex ( const QModelIndex & index ) const;
516
517       HEXA_NS::Document* documentImpl();
518       QString            documentEntry();
519     };
520
521
522 //    class  PatternBuilderModel : public QSortFilterProxyModel
523 //    {
524 //    public:
525 //      PatternBuilderModel( QObject * parent = 0 );
526 //      virtual ~PatternBuilderModel();
527 //
528 //      virtual Qt::ItemFlags flags(const QModelIndex &index) const;
529 //      virtual QVariant headerData ( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const;
530 //      QStandardItem * itemFromIndex ( const QModelIndex & index ) const;
531 //    };
532
533     class PatternGeomModel : public QSortFilterProxyModel
534     {
535     public:
536         PatternGeomModel( QObject* parent = 0);
537         virtual ~PatternGeomModel();
538
539         virtual Qt::ItemFlags flags(const QModelIndex &index) const;
540         virtual QVariant headerData ( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const;
541
542         QStandardItem * itemFromIndex ( const QModelIndex & index ) const;
543     };
544
545
546     class  AssociationsModel : public QSortFilterProxyModel
547     {
548     public:
549       AssociationsModel( QObject * parent = 0 );
550       virtual ~AssociationsModel();
551
552       virtual Qt::ItemFlags flags(const QModelIndex &index) const;
553       virtual QVariant headerData ( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const;
554       QStandardItem * itemFromIndex ( const QModelIndex & index ) const;
555     };
556
557
558     class  GroupsModel : public QSortFilterProxyModel
559     {
560     public:
561       GroupsModel( QObject * parent = 0 );
562       virtual ~GroupsModel();
563
564       virtual Qt::ItemFlags flags(const QModelIndex &index) const;
565       virtual QVariant headerData ( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const;
566       QStandardItem * itemFromIndex ( const QModelIndex & index ) const;
567
568       QModelIndexList getGroupElements( const QModelIndex& iGroup, DocumentModel::Group& kind ) const;
569     };
570
571
572     class  MeshModel : public QSortFilterProxyModel
573     {
574     public:
575       MeshModel( QObject * parent = 0 );
576       virtual ~MeshModel();
577
578       virtual Qt::ItemFlags flags(const QModelIndex &index) const;
579       virtual QVariant headerData ( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const;
580       QStandardItem * itemFromIndex ( const QModelIndex & index ) const;
581
582
583       QModelIndexList getPropagation( const QModelIndex& iPropagation ) const;
584     }; 
585
586   }
587 }
588
589 #endif