source: subversion/applications/editors/merkaartor/TagModel.h @ 13989

Last change on this file since 13989 was 9845, checked in by Chris Browet, 12 years ago

FIX: remove svn:executable bit

  • Property svn:eol-style set to native
File size: 1.0 KB
Line 
1#ifndef MERKAARTOR_TAGMODEL_H_
2#define MERKAARTOR_TAGMODEL_H_
3
4#include <QtCore/QAbstractTableModel>
5#include <QtCore/QString>
6
7#include <utility>
8#include <vector>
9
10class MainWindow;
11class MapFeature;
12
13class TagModel : public QAbstractTableModel
14{
15Q_OBJECT
16        public:
17                TagModel(MainWindow* aMain);
18                ~TagModel();
19
20                inline static const QString newKeyText(void)
21                { return tr("Edit this to add..."); }
22
23                void setFeature(const std::vector<MapFeature*> Features);
24                int rowCount(const QModelIndex &parent = QModelIndex()) const;
25                int columnCount(const QModelIndex &parent = QModelIndex()) const;
26                QVariant data(const QModelIndex &index, int role) const;
27                QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
28                Qt::ItemFlags flags(const QModelIndex &index) const;
29                bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
30        private:
31                MainWindow* Main;
32                std::vector<MapFeature*> theFeatures;
33                std::vector<std::pair<QString, QString> > Tags;
34};
35
36#endif
37
38
Note: See TracBrowser for help on using the repository browser.