21 #include <unity/util/DefinesPtrs.h>
23 #include <QtCore/QVariantMap>
24 #include <QtCore/QString>
25 #include <QtCore/QSharedPointer>
26 #include <QtCore/QScopedPointer>
44 class QDepartmentImpl;
45 class QSearchReplyImpl;
51 typedef QList<QSharedPointer<QDepartment const>> QDepartmentList;
85 static QDepartment::UPtr
create(QString
const& department_id,
QCannedQuery const& query, QString
const& label);
147 QString
label()
const;
180 QVariantMap serialize()
const;
186 std::unique_ptr<internal::QDepartmentImpl> p;
187 friend class internal::QDepartmentImpl;
188 friend class internal::QSearchReplyImpl;
Definition: HttpAsyncReader.h:45
QString id() const
Get the identifier of this department.
Definition: QDepartment.cpp:91
QDepartmentList subdepartments() const
Get list of sub-departments of this department.
Definition: QDepartment.cpp:116
bool has_subdepartments() const
Check if this department has subdepartments or has_subdepartments flag is set.
Definition: QDepartment.cpp:111
A department with optional sub-departments.
Definition: QDepartment.h:56
QCannedQuery query() const
Get the canned query associated with this department.
Definition: QDepartment.cpp:106
Top-level namespace for all things Unity-related.
Definition: Version.h:49
Parameters of a search query.
Definition: QCannedQuery.h:51
Definition: ActionMetadata.h:31
void add_subdepartment(QDepartment::SCPtr const &department)
Add sub-department to this department.
Definition: QDepartment.cpp:81
QString alternate_label() const
Get the alternate label of this department.
Definition: QDepartment.cpp:101
static QDepartment::UPtr create(QCannedQuery const &query, QString const &label)
Create a department with the given canned query and name.
void set_alternate_label(QString const &label)
Set the alternate label (plural of the normal label) of this department.
Definition: QDepartment.cpp:86
void set_subdepartments(QDepartmentList const &departments)
Set sub-departments of this department.
Definition: QDepartment.cpp:76
void set_has_subdepartments(bool subdepartments=true)
Sets has_subdepartments flag of this department.
Definition: QDepartment.cpp:71
QString label() const
Get the label of this department.
Definition: QDepartment.cpp:96