equal
deleted
inserted
replaced
18 #include "videocollectionviewutils.h" |
18 #include "videocollectionviewutils.h" |
19 #include "videocollectionviewutilsdata.h" |
19 #include "videocollectionviewutilsdata.h" |
20 |
20 |
21 int VideoCollectionViewUtilsData::mLastError = 0; |
21 int VideoCollectionViewUtilsData::mLastError = 0; |
22 bool VideoCollectionViewUtilsData::mLoadSortingValuesFails = false; |
22 bool VideoCollectionViewUtilsData::mLoadSortingValuesFails = false; |
|
23 bool VideoCollectionViewUtilsData::mIsServiceValue = false; |
23 int VideoCollectionViewUtilsData::mVideoSortRole = -1; |
24 int VideoCollectionViewUtilsData::mVideoSortRole = -1; |
24 int VideoCollectionViewUtilsData::mCollectionSortRole = -1; |
25 int VideoCollectionViewUtilsData::mCollectionSortRole = -1; |
25 Qt::SortOrder VideoCollectionViewUtilsData::mVideoSortOrder = Qt::AscendingOrder; |
26 Qt::SortOrder VideoCollectionViewUtilsData::mVideoSortOrder = Qt::AscendingOrder; |
26 Qt::SortOrder VideoCollectionViewUtilsData::mCollectionSortOrder = Qt::AscendingOrder; |
27 Qt::SortOrder VideoCollectionViewUtilsData::mCollectionSortOrder = Qt::AscendingOrder; |
27 QString VideoCollectionViewUtilsData::mIconString = ""; |
28 QString VideoCollectionViewUtilsData::mIconString = ""; |
38 static VideoCollectionViewUtils _popupInstance; |
39 static VideoCollectionViewUtils _popupInstance; |
39 return _popupInstance; |
40 return _popupInstance; |
40 } |
41 } |
41 |
42 |
42 VideoCollectionViewUtils::VideoCollectionViewUtils(): |
43 VideoCollectionViewUtils::VideoCollectionViewUtils(): |
|
44 mIsService(false), |
43 mVideosSortRole(-1), |
45 mVideosSortRole(-1), |
44 mCollectionsSortRole(-1), |
46 mCollectionsSortRole(-1), |
45 mVideosSortOrder(Qt::AscendingOrder), |
47 mVideosSortOrder(Qt::AscendingOrder), |
46 mCollectionsSortOrder(Qt::AscendingOrder) |
48 mCollectionsSortOrder(Qt::AscendingOrder) |
47 { |
49 { |
157 id = VideoCollectionViewUtilsData::mActivityCollectionId; |
159 id = VideoCollectionViewUtilsData::mActivityCollectionId; |
158 name = VideoCollectionViewUtilsData::mActivityCollectionName; |
160 name = VideoCollectionViewUtilsData::mActivityCollectionName; |
159 } |
161 } |
160 |
162 |
161 |
163 |
162 void VideoCollectionViewUtils::sortModel(VideoSortFilterProxyModel *model, |
164 void VideoCollectionViewUtils::sortModel(VideoProxyModelGeneric *model, |
163 bool async, VideoCollectionCommon::TCollectionLevels target) |
165 bool async, VideoCollectionCommon::TCollectionLevels target) |
164 { |
166 { |
165 Q_UNUSED(model); |
167 Q_UNUSED(model); |
166 Q_UNUSED(async); |
168 Q_UNUSED(async); |
167 Q_UNUSED(target); |
169 Q_UNUSED(target); |
171 void VideoCollectionViewUtils::showStatusMsgSlot(int statusCode, QVariant &additional) |
173 void VideoCollectionViewUtils::showStatusMsgSlot(int statusCode, QVariant &additional) |
172 { |
174 { |
173 VideoCollectionViewUtilsData::mLastStatusAdditional = additional; |
175 VideoCollectionViewUtilsData::mLastStatusAdditional = additional; |
174 VideoCollectionViewUtilsData::mLastError = statusCode; |
176 VideoCollectionViewUtilsData::mLastError = statusCode; |
175 } |
177 } |
|
178 |
|
179 void VideoCollectionViewUtils::setIsService() |
|
180 { |
|
181 mIsService = VideoCollectionViewUtilsData::mIsServiceValue; |
|
182 } |
|
183 |
|
184 bool VideoCollectionViewUtils::isService() |
|
185 { |
|
186 return mIsService; |
|
187 } |