X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHEXABLOCKGUI%2FHEXABLOCKGUI_DocumentSelectionModel.hxx;h=525119bdb60b632806050022c702752feaefb5e8;hb=f3d5693095483a5028dc812cee8697096159690b;hp=bb6d13b08e30eb9c2cce88701b2ba95133b4401a;hpb=624082b6806f6695a1e2f31ba595534e464f0f91;p=modules%2Fhexablock.git diff --git a/src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentSelectionModel.hxx b/src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentSelectionModel.hxx index bb6d13b..525119b 100755 --- a/src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentSelectionModel.hxx +++ b/src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentSelectionModel.hxx @@ -1,9 +1,9 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D +// Copyright (C) 2009-2014 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -23,12 +23,14 @@ #include "HEXABLOCKGUI_Export.hxx" #include -#include +//#include -#include +//#include #include -#include "klinkitemselectionmodel.hxx" +//#include "klinkitemselectionmodel.hxx" + +#include "HEXABLOCKGUI_DocumentModel.hxx" class OCCViewer_ViewWindow; @@ -51,12 +53,16 @@ namespace HEXABLOCK QModelIndex indexBy( int role, const QVariant& var ); QModelIndex indexOf( const QString& anIOEntry, int role ); QModelIndexList indexListOf( const QString& anEntry, int role ); + DocumentModel* getDocModel() const; + void showEltInfo(QModelIndex& elt); virtual void geomSelectionChanged( const Handle(SALOME_InteractiveObject)& anIObject ) {} virtual void vtkSelectionChanged( const Handle(SALOME_InteractiveObject)& anIObject ) {} void clearHighlightedItems() { currentHighlightedItems.clear(); } + void setInfoMode(bool isOn) { infoMode = isOn; } + protected slots: virtual void onCurrentChanged( const QModelIndex & current, @@ -69,21 +75,21 @@ namespace HEXABLOCK protected: QModelIndexList getSelectionFromModel(const Handle(SALOME_InteractiveObject)& anIObject); - QModelIndexList currentHighlightedItems; + static bool infoMode; }; - class PatternBuilderSelectionModel: public KLinkItemSelectionModel - { - public: - PatternBuilderSelectionModel( QAbstractItemModel *model, - QItemSelectionModel *proxySelector, QObject *parent = 0 ): - KLinkItemSelectionModel( model, proxySelector, parent ) - { - } - }; - - class PatternDataSelectionModel : public SelectionModel +// class PatternBuilderSelectionModel: public KLinkItemSelectionModel +// { +// public: +// PatternBuilderSelectionModel( QAbstractItemModel *model, +// QItemSelectionModel *proxySelector, QObject *parent = 0 ): +// KLinkItemSelectionModel( model, proxySelector, parent ) +// { +// } +// }; + + class HEXABLOCK_EXPORT PatternDataSelectionModel : public SelectionModel { Q_OBJECT @@ -107,7 +113,7 @@ namespace HEXABLOCK }; - class PatternGeomSelectionModel : public SelectionModel + class HEXABLOCK_EXPORT PatternGeomSelectionModel : public SelectionModel { Q_OBJECT @@ -128,7 +134,7 @@ namespace HEXABLOCK }; - class GroupsSelectionModel : public SelectionModel + class HEXABLOCK_EXPORT GroupsSelectionModel : public SelectionModel { Q_OBJECT @@ -143,7 +149,7 @@ namespace HEXABLOCK }; - class MeshSelectionModel : public SelectionModel + class HEXABLOCK_EXPORT MeshSelectionModel : public SelectionModel { Q_OBJECT