equal
deleted
inserted
replaced
22 |
22 |
23 QMap<int, QVariant> VideoListDataModelData::mData; |
23 QMap<int, QVariant> VideoListDataModelData::mData; |
24 QModelIndex VideoListDataModelData::mLastIndex; |
24 QModelIndex VideoListDataModelData::mLastIndex; |
25 int VideoListDataModelData::mDataAccessCount = 0; |
25 int VideoListDataModelData::mDataAccessCount = 0; |
26 int VideoListDataModelData::mRowCount = 0; |
26 int VideoListDataModelData::mRowCount = 0; |
|
27 int VideoListDataModelData::mRowCountDecrement = 0; |
27 |
28 |
28 VideoListDataModel::VideoListDataModel(QObject *parent) : |
29 VideoListDataModel::VideoListDataModel(QObject *parent) : |
29 QAbstractItemModel(parent), |
30 QAbstractItemModel(parent), |
30 d_ptr(0), |
31 d_ptr(0), |
31 mCollectionClient(0), |
32 mCollectionClient(0), |
101 |
102 |
102 int VideoListDataModel::rowCount(const QModelIndex &parent ) const |
103 int VideoListDataModel::rowCount(const QModelIndex &parent ) const |
103 { |
104 { |
104 Q_UNUSED(parent); |
105 Q_UNUSED(parent); |
105 |
106 |
106 return VideoListDataModelData::mRowCount; |
107 uint count = VideoListDataModelData::mRowCount - VideoListDataModelData::mRowCountDecrement; |
|
108 if(VideoListDataModelData::mRowCountDecrement > 0) |
|
109 { |
|
110 VideoListDataModelData::mRowCountDecrement--; |
|
111 } |
|
112 return count; |
107 } |
113 } |
108 |
114 |
109 QMap<int, QVariant> VideoListDataModel::itemData(const QModelIndex &index) const |
115 QMap<int, QVariant> VideoListDataModel::itemData(const QModelIndex &index) const |
110 { |
116 { |
111 QMap<int, QVariant> itemData; |
117 QMap<int, QVariant> itemData; |
133 |
139 |
134 // not stubbed |
140 // not stubbed |
135 return QString(); |
141 return QString(); |
136 } |
142 } |
137 |
143 |
138 QStringList VideoListDataModel::prepareLengthStrings(int index) const |
144 QString VideoListDataModel::prepareShortLengthString(int index) const |
139 { |
145 { |
140 Q_UNUSED(index); |
146 Q_UNUSED(index); |
141 |
147 |
142 // not stubbed |
148 // not stubbed |
143 return QStringList(); |
149 return QString(); |
144 } |
150 } |
145 |
151 |
146 QVariant VideoListDataModel::data(const QModelIndex &index, int role) const |
152 QVariant VideoListDataModel::data(const QModelIndex &index, int role) const |
147 { |
153 { |
148 QVariant returnValue = QVariant(); |
154 QVariant returnValue = QVariant(); |