21 #ifndef _ENABLE_QT_EXPERIMENTAL_
22 #error You should define _ENABLE_QT_EXPERIMENTAL_ in order to use this experimental header file.
25 #include <unity/util/DefinesPtrs.h>
27 #pragma GCC diagnostic push
28 #pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
29 #include <QtCore/QVariantMap>
30 #pragma GCC diagnostic pop
31 #include <QtCore/QString>
49 class QDepartmentImpl;
50 class QSearchReplyImpl;
56 typedef QList<std::shared_ptr<QDepartment const>> QDepartmentList;
90 static QDepartment::UPtr
create(QString
const& department_id,
QCannedQuery const& query, QString
const& label);
152 QString
label()
const;
185 QVariantMap serialize()
const;
191 std::unique_ptr<internal::QDepartmentImpl> p;
192 friend class internal::QDepartmentImpl;
193 friend class internal::QSearchReplyImpl;
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:61
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:58
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