~ubuntu-branches/ubuntu/saucy/merkaartor/saucy

« back to all changes in this revision

Viewing changes to TagModel.h

  • Committer: Bazaar Package Importer
  • Author(s): Bernd Zeimetz
  • Date: 2009-09-13 00:52:12 UTC
  • mto: (1.2.7 upstream) (0.1.3 upstream) (3.1.7 sid)
  • mto: This revision was merged to the branch mainline in revision 10.
  • Revision ID: james.westby@ubuntu.com-20090913005212-pjecal8zxm07x0fj
ImportĀ upstreamĀ versionĀ 0.14+svnfixes~20090912

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
 
 
10
 
class MainWindow;
11
 
class MapFeature;
12
 
 
13
 
class TagModel : public QAbstractTableModel
14
 
{
15
 
Q_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 QList<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
 
                QList<MapFeature*> theFeatures;
33
 
                QList<std::pair<QString, QString> > Tags;
34
 
};
35
 
 
36
 
#endif
37
 
 
38