diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-12-04 15:46:51 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-12-04 15:46:51 +0100 |
commit | 983af5f1442ff27dc14da6fdac28f51a38184f0a (patch) | |
tree | 75bd078bcd50093778048beb9bfa5ec4a4c97ab9 /common/modelresult.cpp | |
parent | 553000673acf7297cfa4de620290ba73f3c438ac (diff) | |
download | sink-983af5f1442ff27dc14da6fdac28f51a38184f0a.tar.gz sink-983af5f1442ff27dc14da6fdac28f51a38184f0a.zip |
ModelResult header data, and support listing various types in the
dummyclient
Diffstat (limited to 'common/modelresult.cpp')
-rw-r--r-- | common/modelresult.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/common/modelresult.cpp b/common/modelresult.cpp index 4fd8d97..d2a7e88 100644 --- a/common/modelresult.cpp +++ b/common/modelresult.cpp | |||
@@ -65,6 +65,17 @@ int ModelResult<T, Ptr>::columnCount(const QModelIndex &parent) const | |||
65 | } | 65 | } |
66 | 66 | ||
67 | template<class T, class Ptr> | 67 | template<class T, class Ptr> |
68 | QVariant ModelResult<T, Ptr>::headerData(int section, Qt::Orientation orientation, int role) const | ||
69 | { | ||
70 | if (role == Qt::DisplayRole) { | ||
71 | if (section < mPropertyColumns.size()) { | ||
72 | return mPropertyColumns.at(section); | ||
73 | } | ||
74 | } | ||
75 | return QVariant(); | ||
76 | } | ||
77 | |||
78 | template<class T, class Ptr> | ||
68 | QVariant ModelResult<T, Ptr>::data(const QModelIndex &index, int role) const | 79 | QVariant ModelResult<T, Ptr>::data(const QModelIndex &index, int role) const |
69 | { | 80 | { |
70 | if (role == DomainObjectRole) { | 81 | if (role == DomainObjectRole) { |