My Project
unity::shell::scopes::CategoriesInterface Class Referenceabstract

A list of categories for a particular search. More...

#include <unity/shell/scopes/CategoriesInterface.h>

Inheritance diagram for unity::shell::scopes::CategoriesInterface:
Collaboration diagram for unity::shell::scopes::CategoriesInterface:

Public Types

enum  Roles {
  RoleCategoryId, RoleName, RoleIcon, RoleRawRendererTemplate,
  RoleRenderer, RoleComponents, RoleHeaderLink, RoleResults,
  RoleCount
}
 The roles supported by this model.
 

Public Member Functions

virtual Q_INVOKABLE bool overrideCategoryJson (QString const &categoryId, QString const &json)=0
 Override definition of a category by passing a custom JSON string. More...
 
virtual Q_INVOKABLE void addSpecialCategory (QString const &categoryId, QString const &name, QString const &icon, QString const &rawTemplate, QObject *countObject)=0
 Allows the shell to define a special category that isn't provided by the scope. More...
 

Detailed Description

A list of categories for a particular search.

This model exposes all categories and their properties (including the results model itself) associated with a particular search.

Member Function Documentation

virtual Q_INVOKABLE void unity::shell::scopes::CategoriesInterface::addSpecialCategory ( QString const &  categoryId,
QString const &  name,
QString const &  icon,
QString const &  rawTemplate,
QObject *  countObject 
)
pure virtual

Allows the shell to define a special category that isn't provided by the scope.

Allows the shell to use specialized renderers for certain categories. The plugin implementation should prepend the category before any others provided by the scope.

virtual Q_INVOKABLE bool unity::shell::scopes::CategoriesInterface::overrideCategoryJson ( QString const &  categoryId,
QString const &  json 
)
pure virtual

Override definition of a category by passing a custom JSON string.

A method that helps with scope development, where the renderer definition can be overridden from within the shell.


The documentation for this class was generated from the following file: