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