21 #include <unity/util/DefinesPtrs.h>
23 #pragma GCC diagnostic push
24 #pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
25 #include <QtCore/QVariantMap>
26 #pragma GCC diagnostic pop
27 #include <QtCore/QString>
28 #include <QtCore/QSharedPointer>
29 #include <QtCore/QScopedPointer>
47 class QDepartmentImpl;
48 class QSearchReplyImpl;
54 typedef QList<QSharedPointer<QDepartment const>> QDepartmentList;
88 static QDepartment::UPtr
create(QString
const& department_id,
QCannedQuery const& query, QString
const& label);
150 QString
label()
const;
183 QVariantMap serialize()
const;
189 std::unique_ptr<internal::QDepartmentImpl> p;
190 friend class internal::QDepartmentImpl;
191 friend class internal::QSearchReplyImpl;
QDepartmentList subdepartments() const
Get list of sub-departments of this department.
QCannedQuery query() const
Get the canned query associated with this department.
void set_subdepartments(QDepartmentList const &departments)
Set sub-departments of this department.
QString alternate_label() const
Get the alternate label of this department.
void add_subdepartment(QDepartment::SCPtr const &department)
Add sub-department to this department.
A department with optional sub-departments.
Definition: QDepartment.h:59
void set_has_subdepartments(bool subdepartments=true)
Sets has_subdepartments flag of this department.
Definition: HttpAsyncReader.h:39
Parameters of a search query.
Definition: QCannedQuery.h:54
QString id() const
Get the identifier of this department.
bool has_subdepartments() const
Check if this department has subdepartments or has_subdepartments flag is set.
QString label() const
Get the label of this department.
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.