Warning, /education/marble/src/bindings/python/sip/GeoDataTreeModel.sip is written in an unsupported language. File is not indexed.
0001 // Copyright 2011 Simon Edwards <simon@simonzone.com> 0002 0003 // Generated by twine2 0004 0005 // This program is free software; you can redistribute it and/or modify 0006 // it under the terms of the GNU Library General Public License as 0007 // published by the Free Software Foundation; either version 2, or 0008 // (at your option) any later version. 0009 0010 // This program is distributed in the hope that it will be useful, 0011 // but WITHOUT ANY WARRANTY; without even the implied warranty of 0012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0013 // GNU General Public License for more details 0014 0015 // You should have received a copy of the GNU Library General Public 0016 // License along with this program; if not, write to the 0017 // Free Software Foundation, Inc., 0018 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 0019 0020 namespace Marble 0021 { 0022 class GeoDataTreeModel : QAbstractItemModel 0023 { 0024 %TypeHeaderCode 0025 #include <GeoDataTreeModel.h> 0026 %End 0027 0028 public: 0029 explicit GeoDataTreeModel (QObject* parent /TransferThis/ = 0); 0030 ~GeoDataTreeModel (); 0031 virtual bool hasChildren (const QModelIndex& parent) const; 0032 int rowCount (const QModelIndex& parent = QModelIndex()) const; 0033 QVariant headerData (int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; 0034 QVariant data (const QModelIndex& index, int role) const; 0035 QModelIndex index (int row, int column, const QModelIndex& parent = QModelIndex()) const; 0036 QModelIndex index (Marble::GeoDataObject* object); 0037 QModelIndex parent (const QModelIndex& index) const; 0038 int columnCount (const QModelIndex& parent = QModelIndex()) const; 0039 Qt::ItemFlags flags (const QModelIndex& index) const; 0040 bool setData (const QModelIndex& index, const QVariant& value, int role = Qt::EditRole); 0041 void reset (); 0042 void setRootDocument (Marble::GeoDataDocument* document); 0043 Marble::GeoDataDocument* rootDocument (); 0044 int addFeature (Marble::GeoDataContainer* parent, Marble::GeoDataFeature* feature, int row = -1); 0045 bool removeFeature (Marble::GeoDataContainer* parent, int index); 0046 void updateFeature (Marble::GeoDataFeature* feature); 0047 int addDocument (Marble::GeoDataDocument* document); 0048 void removeDocument (int index); 0049 void removeDocument (Marble::GeoDataDocument* document); 0050 void update (); 0051 signals: 0052 void removed (Marble::GeoDataObject* object); 0053 void added (Marble::GeoDataObject* object); 0054 public: 0055 QItemSelectionModel* selectionModel (); 0056 int removeFeature (const Marble::GeoDataFeature* feature); 0057 }; 0058 };