Warning, file /education/marble/src/plugins/render/annotate/NodeModel.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 // SPDX-License-Identifier: LGPL-2.1-or-later 0002 // 0003 // SPDX-FileCopyrightText: 2015 Mikhail Ivchenko <ematirov@gmail.com> 0004 // 0005 0006 #ifndef NODEMODEL_H 0007 #define NODEMODEL_H 0008 0009 #include "GeoDataCoordinates.h" 0010 #include <QAbstractListModel> 0011 0012 namespace Marble 0013 { 0014 0015 class NodeModel : public QAbstractListModel 0016 { 0017 Q_OBJECT 0018 public: 0019 explicit NodeModel( QObject *parent = nullptr ); 0020 int rowCount( const QModelIndex &parent ) const override; 0021 int columnCount( const QModelIndex &parent ) const override; 0022 QVariant data( const QModelIndex &index, int role ) const override; 0023 QVariant headerData( int section, Qt::Orientation orientation, int role ) const override; 0024 void clear(); 0025 Qt::ItemFlags flags(const QModelIndex & index) const override ; 0026 public Q_SLOTS: 0027 int addNode( const GeoDataCoordinates &node ); 0028 private: 0029 QVector<GeoDataCoordinates> m_nodes; 0030 }; 0031 0032 } 0033 0034 #endif