![]() |
Tulip
4.6.0
Better Visualization Through Research
|
00001 /* 00002 * 00003 * This file is part of Tulip (www.tulip-software.org) 00004 * 00005 * Authors: David Auber and the Tulip development Team 00006 * from LaBRI, University of Bordeaux 00007 * 00008 * Tulip is free software; you can redistribute it and/or modify 00009 * it under the terms of the GNU Lesser General Public License 00010 * as published by the Free Software Foundation, either version 3 00011 * of the License, or (at your option) any later version. 00012 * 00013 * Tulip is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00016 * See the GNU General Public License for more details. 00017 * 00018 */ 00019 ///@cond DOXYGEN_HIDDEN 00020 00021 00022 #ifndef SCENELAYERSMODEL_H 00023 #define SCENELAYERSMODEL_H 00024 00025 #include <tulip/tulipconf.h> 00026 #include <tulip/Observable.h> 00027 #include <tulip/TulipModel.h> 00028 00029 /** 00030 @brief Oh, you know, just a model for a GlScene entities 00031 */ 00032 namespace tlp { 00033 class GlScene; 00034 00035 class TLP_QT_SCOPE SceneLayersModel : public TulipModel, tlp::Observable { 00036 Q_OBJECT 00037 00038 tlp::GlScene* _scene; 00039 00040 QModelIndex graphCompositeIndex() const; 00041 00042 public: 00043 explicit SceneLayersModel(tlp::GlScene* scene, QObject *parent = NULL); 00044 00045 QModelIndex index(int row, int column,const QModelIndex &parent = QModelIndex()) const; 00046 QModelIndex parent(const QModelIndex &child) const; 00047 int rowCount(const QModelIndex &parent = QModelIndex()) const; 00048 int columnCount(const QModelIndex &parent = QModelIndex()) const; 00049 QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; 00050 bool setData(const QModelIndex &index, const QVariant &value, int role); 00051 Qt::ItemFlags flags(const QModelIndex &index) const; 00052 QVariant headerData(int section, Qt::Orientation orientation, int role) const; 00053 00054 void treatEvent(const tlp::Event &); 00055 00056 signals: 00057 void drawNeeded(tlp::GlScene*); 00058 }; 00059 } 00060 00061 #endif // SCENELAYERSMODEL_H 00062 ///@endcond