17#ifndef UNITY_SHELL_SCOPES_RESULTSMODELINTERFACE_H
18#define UNITY_SHELL_SCOPES_RESULTSMODELINTERFACE_H
20#include <unity/SymbolExport.h>
22#include <QAbstractListModel>
78 virtual QString categoryId()
const = 0;
79 virtual int count()
const = 0;
81 virtual void setCategoryId(QString
const&
id) = 0;
82 QHash<int, QByteArray> roleNames()
const override
84 QHash<int, QByteArray> roles;
85 roles[RoleUri] =
"uri";
86 roles[RoleCategoryId] =
"categoryId";
87 roles[RoleDndUri] =
"dndUri";
88 roles[RoleQuickPreviewData] =
"quickPreviewData";
89 roles[RoleResult] =
"result";
90 roles[RoleTitle] =
"title";
91 roles[RoleArt] =
"art";
92 roles[RoleSubtitle] =
"subtitle";
93 roles[RoleMascot] =
"mascot";
94 roles[RoleEmblem] =
"emblem";
95 roles[RoleSummary] =
"summary";
96 roles[RoleAttributes] =
"attributes";
97 roles[RoleBackground] =
"background";
98 roles[RoleOverlayColor] =
"overlayColor";
99 roles[RoleSocialActions] =
"socialActions";
107 void categoryIdChanged();
A model of scope results for a particular category.
Definition ResultsModelInterface.h:35
int count
Number of items in the model.
Definition ResultsModelInterface.h:46
QString categoryId
Id of associated category.
Definition ResultsModelInterface.h:41
Roles
The Roles supported by this model.
Definition ResultsModelInterface.h:57
@ RoleQuickPreviewData
Data for UI quick previewing. In case of audio should contain uri and duration.
Definition ResultsModelInterface.h:72
@ RoleSocialActions
Data for social actions (in-card actions such as "+1").
Definition ResultsModelInterface.h:73
Top-level namespace for all things Unity-related.
Definition Version.h:38