From c8f566be158710079216f2b0bfb07d62cbd69953 Mon Sep 17 00:00:00 2001 From: Daedale Date: Tue, 5 Dec 2023 22:28:13 +0800 Subject: [PATCH 1/2] add location model --- src/domain/entity/user.h | 12 ---- src/domain/model/location_model.cpp | 89 +++++++++++++++++++++++++++++ src/domain/model/location_model.h | 48 ++++++++++++++++ src/include/types.h | 8 +-- src/infrastructure/dto/location.h | 43 ++++++++++++++ 5 files changed, 181 insertions(+), 19 deletions(-) delete mode 100644 src/domain/entity/user.h create mode 100644 src/domain/model/location_model.cpp create mode 100644 src/domain/model/location_model.h create mode 100644 src/infrastructure/dto/location.h diff --git a/src/domain/entity/user.h b/src/domain/entity/user.h deleted file mode 100644 index 9063161f..00000000 --- a/src/domain/entity/user.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef USER_H -#define USER_H - -#include - -struct User { - QString userId; - QString wechatId; - QString email; -}; - -#endif // USER_H diff --git a/src/domain/model/location_model.cpp b/src/domain/model/location_model.cpp new file mode 100644 index 00000000..6c45ded0 --- /dev/null +++ b/src/domain/model/location_model.cpp @@ -0,0 +1,89 @@ +#include "location_model.h" + +decltype(std::bind(std::declval(), + std::placeholders::_1)) DTO_Location::functor = + std::bind(&DTO_Location::count, std::placeholders::_1); + +int LocationModel::rowCount(const QModelIndex& parent) const { + // For list models only the root node (an invalid parent) should return the list's size. For all + // other (valid) parents, rowCount() should return 0 so that it does not become a tree model. + if (parent.isValid()) + return 0; + + return m_data.count(); +} + +QVariant LocationModel::data(const QModelIndex& index, int role) const { + if (!index.isValid()) + return QVariant(); + + int num = index.row(); + const auto& element = m_data.at(num); + + if (!num) + switch (role) { + case Role::Id: + return element.id; + case Role::Title: + return element.name; + case Role::Expanded: + return element.expanded; + case Role::Depth: + return element.depth; + default: + break; + } + + return QVariant(); +} + +void LocationModel::click(const QModelIndex& index) { + if (!index.isValid()) + return; + + int num = index.row(); + const DTO_Location& element = m_data.at(num); + + if (!num) { + setProperty("selected", element.id); + if (!element.expanded) { + beginInsertRows(index.parent(), index.row() + 1, + index.row() + 1 + element.count_children()); + element.expand(); + endInsertRows(); + } + } +} + +QHash LocationModel::roleNames() const { + static QHash roles; + if (roles.isEmpty()) { + roles.insert(Id, "id"); + roles.insert(Title, "title"); + roles.insert(Expanded, "expanded"); + roles.insert(Depth, "depth"); + } + return roles; +} + +void LocationModel::resetModel(DTO_Location&& model) { + QMetaObject::invokeMethod( + this, + [&]() { + beginResetModel(); + m_data = std::move(model); + endResetModel(); + }, + Qt::BlockingQueuedConnection); +} + +LocationModel* LocationModel::create(QQmlEngine* qmlEngine, QJSEngine* jsEngine) { + auto pInstance = getInstance(); + QJSEngine::setObjectOwnership(pInstance, QQmlEngine::CppOwnership); + return pInstance; +} + +LocationModel* LocationModel::getInstance() { + static LocationModel instance; + return &instance; +} diff --git a/src/domain/model/location_model.h b/src/domain/model/location_model.h new file mode 100644 index 00000000..7c6f54fa --- /dev/null +++ b/src/domain/model/location_model.h @@ -0,0 +1,48 @@ +#ifndef LOCATION_MODEL_H +#define LOCATION_MODEL_H + +#include +#include + +#include + +class LocationModel : public QAbstractListModel { + Q_OBJECT + QML_SINGLETON + QML_NAMED_ELEMENT(LocationModel) + + Q_PROPERTY(LocationID selected MEMBER selected NOTIFY selectedChanged) + +public: + enum Role { + Id = Qt::UserRole + 1, + Title, + Expanded, + Depth, + }; + + int rowCount(const QModelIndex& parent = QModelIndex()) const override; + + QVariant data(const QModelIndex& index, int role) const override; + + QHash roleNames() const override; + + void resetModel(DTO_Location&& model); + + Q_INVOKABLE void click(const QModelIndex& index); + +signals: + void selectedChanged(); + +private: + LocationModel() = default; + + DTO_Location m_data; + LocationID selected = -1; + +public: + static LocationModel* create(QQmlEngine* qmlEngine, QJSEngine* jsEngine); + static LocationModel* getInstance(); +}; + +#endif // LOCATION_MODEL_H diff --git a/src/include/types.h b/src/include/types.h index d825a32c..c140a9a6 100644 --- a/src/include/types.h +++ b/src/include/types.h @@ -3,10 +3,10 @@ #include #include -#include using UserID = QString; using EventoID = int; +using LocationID = int; using Image = QString; using Tag = QString; @@ -37,12 +37,6 @@ struct Department { bool subscribed = false; }; -struct Location { - int id; - QString locationName; - int parentId; -}; - struct FeedbackNum { EventoID eventId; QString title; diff --git a/src/infrastructure/dto/location.h b/src/infrastructure/dto/location.h new file mode 100644 index 00000000..5f9e22b3 --- /dev/null +++ b/src/infrastructure/dto/location.h @@ -0,0 +1,43 @@ +#ifndef DTO_LOCATION_H +#define DTO_LOCATION_H + +#include + +#include "types.h" + +struct DTO_Location { + LocationID id = -1; + mutable bool expanded = false; + uint8_t depth = 0; + QString name; + std::vector children; + + static decltype(std::bind(std::declval(), + std::placeholders::_1)) functor; + + int count_children() const { + return std::transform_reduce(children.cbegin(), children.cend(), 0, std::plus{}, functor); + } + + int count() const { + return expanded ? 1 + count_children() : 1; + } + + inline void expand() const { + expanded = true; + } + + const DTO_Location& at(int& index) const { + if (!index) + return *this; + for (const auto& i : children) { + auto count = i.count(); + if (count == index) + return i; + else if (count > index) + return i.at(--index); + } + } +}; + +#endif // DTO_LOCATION_H From 95f4c907784c319e13a15fd31da6a4698e6363a8 Mon Sep 17 00:00:00 2001 From: Daedale Date: Wed, 6 Dec 2023 20:54:49 +0800 Subject: [PATCH 2/2] location model finished --- libs/Qt-Based-JsonDeserialiser | 2 +- qml/page/T_DepartmentEvents.qml | 6 +- qml/page/T_EventoEdit.qml | 148 ++++++------------ src/controller/information_service.cpp | 21 +-- src/controller/information_service.h | 9 -- src/controller/ui/evento_edit.cpp | 5 +- src/controller/ui/evento_edit.h | 4 - src/domain/model/location_model.cpp | 37 ++--- src/domain/model/location_model.h | 4 +- src/infrastructure/helper/evento_helper.h | 4 +- .../network/EventoNetworkClient.cpp | 28 ++-- .../network/EventoNetworkClient.h | 20 +-- 12 files changed, 118 insertions(+), 170 deletions(-) diff --git a/libs/Qt-Based-JsonDeserialiser b/libs/Qt-Based-JsonDeserialiser index a1d7e42a..be9a95da 160000 --- a/libs/Qt-Based-JsonDeserialiser +++ b/libs/Qt-Based-JsonDeserialiser @@ -1 +1 @@ -Subproject commit a1d7e42ade1ff727f42ac8bf4499f28688aca704 +Subproject commit be9a95da52a7479a293c92b4aef20758304715c2 diff --git a/qml/page/T_DepartmentEvents.qml b/qml/page/T_DepartmentEvents.qml index e497ff12..bc4ca6a9 100644 --- a/qml/page/T_DepartmentEvents.qml +++ b/qml/page/T_DepartmentEvents.qml @@ -14,7 +14,7 @@ FluScrollablePage { function loadDepartmentPage() { statusMode = FluStatusViewType.Loading - if (UserHelper.permission == 1) + if (UserHelper.permission === 1) DepartmentEventsController.loadDepartments() else DepartmentEventsController.loadDepartmentsWithSubscriptionInfo() @@ -86,7 +86,7 @@ FluScrollablePage { FluTextButton { id: subscribeButton - visible: UserHelper.permission != 1 + visible: UserHelper.permission !== 1 Layout.alignment: Qt.AlignRight checked: true state: "noSub" @@ -141,7 +141,7 @@ FluScrollablePage { anchors.fill: parent onClicked: { departmentId = id - if (UserHelper.permission != 1) { + if (UserHelper.permission !== 1) { if (subscribed) { subscribeButton.checked = true subscribeButton.state = "noSub" diff --git a/qml/page/T_EventoEdit.qml b/qml/page/T_EventoEdit.qml index 2070f25f..fd3c9eab 100644 --- a/qml/page/T_EventoEdit.qml +++ b/qml/page/T_EventoEdit.qml @@ -5,49 +5,19 @@ import QtQuick.Window import FluentUI import SAST_Evento import "../window" -import "../page" FluScrollablePage { id: page launchMode: FluPageType.SingleTask - property var locationArr: [] - property var departmentArr: [] - - function parseJSON(data) { - var result = [] - if (Array.isArray(data)) { - for (var i = 0; i < data.length; i++) { - var item = data[i] - var key = item.key - var name = item.label - var isLeaf = false - var children = [] - - if (item.children && Array.isArray(item.children)) - children = parseJSON(item.children) - else - isLeaf = true - - result.push(tree_view_location.createItem(name, isLeaf, - children, { - "id": key - })) - } - } else { - result.push(tree_view_location.createItem(data.name, true, [], { - "id": data.key - })) - } - return result - } function loadEditInfo() { statusMode = FluStatusViewType.Loading EventoEditController.loadEditInfo() } - signal listReady - + Component.onCompleted: { + loadEditInfo() + } onErrorClicked: { loadEditInfo() } @@ -57,17 +27,6 @@ FluScrollablePage { Connections { target: EventoEditController function onLoadEditSuccessEvent() { - departmentArr = [] - var json = JSON.parse(EventoEditController.departmentJson) - for (var ii = 0; ii < json.length; ++ii) { - departmentArr.push(tree_view_department.createItem( - json[ii].departmentName, true, [], { - "id": json[ii].id - })) - } - json = JSON.parse(EventoEditController.locationJson) - locationArr = parseJSON(json[0].children) - listReady() statusMode = FluStatusViewType.Success } } @@ -80,15 +39,28 @@ FluScrollablePage { } } + Connections { + target: EventoEditController + function onCreateSuccessEvent() { + statusMode = FluStatusViewType.Success + showSuccess("操作成功") + returnPage() + } + } + + Connections { + target: EventoEditController + function onCreateErrorEvent(message) { + statusMode = FluStatusViewType.Success + showError(message, 4000) + } + } + Item { id: item_all Layout.fillWidth: true implicitHeight: 650 + textbox_description.implicitHeight - Component.onCompleted: { - loadEditInfo() - } - FluArea { id: area1 width: parent.width @@ -97,6 +69,7 @@ FluScrollablePage { top: parent.top } } + FluArea { id: area2 width: parent.width @@ -106,6 +79,7 @@ FluScrollablePage { topMargin: 10 } } + FluArea { id: area3 width: parent.width @@ -145,6 +119,7 @@ FluScrollablePage { leftMargin: 20 } } + FluTextBox { id: textbox_title implicitWidth: 600 @@ -167,6 +142,7 @@ FluScrollablePage { font.pixelSize: 20 font.bold: true } + FluTextBox { id: textbox_tag implicitWidth: 600 @@ -188,6 +164,7 @@ FluScrollablePage { topMargin: 15 } } + FluText { id: text_start2 text: "开始" @@ -197,6 +174,7 @@ FluScrollablePage { top: item_event_time.top } } + FluCalendarPicker { id: clender_picker_event_start width: 220 @@ -207,6 +185,7 @@ FluScrollablePage { top: item_event_time.top } } + FluTimePicker { id: time_picker_event_start hourFormat: FluTimePickerType.HH @@ -218,6 +197,7 @@ FluScrollablePage { top: item_event_time.top } } + FluText { id: text_end2 text: "结束" @@ -228,6 +208,7 @@ FluScrollablePage { topMargin: 15 } } + FluCalendarPicker { id: clender_picker_event_end width: 220 @@ -238,6 +219,7 @@ FluScrollablePage { top: text_end2.top } } + FluTimePicker { id: time_picker_event_end hourFormat: FluTimePickerType.HH @@ -260,6 +242,7 @@ FluScrollablePage { topMargin: 15 } } + FluText { id: text_start1 text: "开始" @@ -269,6 +252,7 @@ FluScrollablePage { top: item_register_time.top } } + FluCalendarPicker { id: clender_picker_register_start width: 220 @@ -280,6 +264,7 @@ FluScrollablePage { top: item_register_time.top } } + FluTimePicker { id: time_picker_register_start hourFormat: FluTimePickerType.HH @@ -291,6 +276,7 @@ FluScrollablePage { top: item_register_time.top } } + FluText { id: text_end1 text: "结束" @@ -301,6 +287,7 @@ FluScrollablePage { topMargin: 15 } } + FluCalendarPicker { id: clender_picker_register_end width: 220 @@ -311,6 +298,7 @@ FluScrollablePage { top: text_end1.top } } + FluTimePicker { id: time_picker_register_end hourFormat: FluTimePickerType.HH @@ -342,23 +330,17 @@ FluScrollablePage { top: item_location.top left: textbox_title.left } - FluTreeView { - id: tree_view_location - property int locationId: 0 - width: 200 - height: 200 - selectionMode: FluTreeViewType.Single - Connections { - target: page - function onListReady() { - tree_view_location.updateData(locationArr) - } + ListView { + id: location_view + anchors.fill: parent + model: LocationModel + + delegate: FluText { + text: title } - onItemClicked: item => { - locationId = item.data.id - } } } + FluText { id: item_department text: "部门" @@ -380,16 +362,12 @@ FluScrollablePage { left: item_department.right leftMargin: 60 } - FluTreeView { - id: tree_view_department - width: 200 - height: 200 - selectionMode: FluTreeViewType.Multiple - Connections { - target: page - function onListReady() { - tree_view_department.updateData(departmentArr) - } + ListView { + anchors.fill: parent + model: DepartmentModel + + delegate: FluText { + text: title } } } @@ -405,6 +383,7 @@ FluScrollablePage { topMargin: 40 } } + FluComboBox { id: combo_box_type width: 200 @@ -427,6 +406,7 @@ FluScrollablePage { topMargin: 15 } } + FluMultilineTextBox { id: textbox_description width: 600 @@ -439,8 +419,6 @@ FluScrollablePage { } // deprecated - - /* Item { visible: false @@ -579,29 +557,7 @@ FluScrollablePage { } } - T_Calendar { - id: control - } - function returnPage() { - control.reload() MainWindow.window.pushPage("qrc:/qml/page/T_Calendar.qml") } - - Connections { - target: EventoEditController - function onCreateSuccessEvent() { - statusMode = FluStatusViewType.Success - showSuccess("操作成功") - returnPage() - } - } - - Connections { - target: EventoEditController - function onCreateErrorEvent(message) { - statusMode = FluStatusViewType.Success - showError(message, 4000) - } - } } diff --git a/src/controller/information_service.cpp b/src/controller/information_service.cpp index b3241f69..d2122682 100644 --- a/src/controller/information_service.cpp +++ b/src/controller/information_service.cpp @@ -2,6 +2,7 @@ #include "department_events.h" #include "department_model.h" #include "evento_edit.h" +#include "location_model.h" #include "repository.h" #include "type_model.h" @@ -12,33 +13,23 @@ void InformationService::load_EditInfo() { EventoEditController::getInstance()->onLoadEditFailure(result.message()); return false; } - auto typeList = result.take(); - TypeModel::getInstance()->resetModel(std::move(typeList)); + TypeModel::getInstance()->resetModel(result.take()); return true; }), - getRepo()->getLocationList().then([this](EventoResult result) { + getRepo()->getLocationList().then([this](EventoResult> result) { if (!result) { EventoEditController::getInstance()->onLoadEditFailure(result.message()); return false; } - auto locationList = result.take(); - if (locationList.isEmpty()) - locationList = "[]"; - { - std::lock_guard lock(mutex); - EventoEditController::getInstance()->setProperty("locationJson", locationList); - locationJson = std::move(locationList); - } + LocationModel::getInstance()->resetModel(result.take()); return true; }), getRepo()->getDepartmentList().then([this](EventoResult> result) { if (!result) { - DepartmentEventsController::getInstance()->onLoadDepartmentsFailure( - result.message()); + EventoEditController::getInstance()->onLoadEditFailure(result.message()); return false; } - auto departmentList = result.take(); - DepartmentModel::getInstance()->resetModel(std::move(departmentList)); + DepartmentModel::getInstance()->resetModel(result.take()); DepartmentEventsController::getInstance()->onLoadDepartmentsFinished(); return true; })}; diff --git a/src/controller/information_service.h b/src/controller/information_service.h index d3440841..4aa8532a 100644 --- a/src/controller/information_service.h +++ b/src/controller/information_service.h @@ -1,16 +1,7 @@ #ifndef INFORMATIONSERVICE_H #define INFORMATIONSERVICE_H -#include -#include - class InformationService { - std::shared_mutex mutex; - - QString departmentJson; - QString locationJson; - QString subscribedDepartmentJson; - private: InformationService() = default; diff --git a/src/controller/ui/evento_edit.cpp b/src/controller/ui/evento_edit.cpp index 68522bbb..d2b82dff 100644 --- a/src/controller/ui/evento_edit.cpp +++ b/src/controller/ui/evento_edit.cpp @@ -43,8 +43,7 @@ void EventoEditController::update(const DTO_Evento& event) { } void EventoEditController::loadEditInfo() { - if (property("isEditMode").toBool()) - update( - EventoService::getInstance().edit(EventoHelper::getInstance()->property("id").toInt())); + if (m_isEditMode) + update(EventoService::getInstance().edit(EventoHelper::getInstance()->m_id)); preload(); } diff --git a/src/controller/ui/evento_edit.h b/src/controller/ui/evento_edit.h index 8552163b..acc4ea34 100644 --- a/src/controller/ui/evento_edit.h +++ b/src/controller/ui/evento_edit.h @@ -10,7 +10,6 @@ class EventoEditController : public QObject { QML_NAMED_ELEMENT(EventoEditController) QML_SINGLETON - Q_PROPERTY(QString locationJson MEMBER m_locationJson NOTIFY locationJsonChanged) Q_PROPERTY(int index MEMBER m_index NOTIFY typeIdChanged) Q_PROPERTY(bool isEditMode MEMBER m_isEditMode NOTIFY isEditModeChanged) Q_PROPERTY(QString eventStart MEMBER m_eventStart NOTIFY eventStartChanged) @@ -27,7 +26,6 @@ class EventoEditController : public QObject { const QString& tag); private: - QString m_locationJson; bool m_isEditMode; // true: 编辑模式 false: 创建模式 // 编辑模式属性 int m_index; @@ -45,8 +43,6 @@ class EventoEditController : public QObject { void createSuccessEvent(); void createErrorEvent(QString message); - void departmentJsonChanged(); - void locationJsonChanged(); void typeIdChanged(); void isEditModeChanged(); void eventStartChanged(); diff --git a/src/domain/model/location_model.cpp b/src/domain/model/location_model.cpp index 6c45ded0..cd184d61 100644 --- a/src/domain/model/location_model.cpp +++ b/src/domain/model/location_model.cpp @@ -10,7 +10,8 @@ int LocationModel::rowCount(const QModelIndex& parent) const { if (parent.isValid()) return 0; - return m_data.count(); + return std::transform_reduce(m_data.cbegin(), m_data.cend(), 0, std::plus{}, + DTO_Location::functor); } QVariant LocationModel::data(const QModelIndex& index, int role) const { @@ -18,22 +19,22 @@ QVariant LocationModel::data(const QModelIndex& index, int role) const { return QVariant(); int num = index.row(); - const auto& element = m_data.at(num); - - if (!num) - switch (role) { - case Role::Id: - return element.id; - case Role::Title: - return element.name; - case Role::Expanded: - return element.expanded; - case Role::Depth: - return element.depth; - default: - break; - } - + for (const auto& i : m_data) { + const auto& element = m_data.at(num); + if (!num) + switch (role) { + case Role::Id: + return element.id; + case Role::Title: + return element.name; + case Role::Expanded: + return element.expanded; + case Role::Depth: + return element.depth; + default: + break; + } + } return QVariant(); } @@ -66,7 +67,7 @@ QHash LocationModel::roleNames() const { return roles; } -void LocationModel::resetModel(DTO_Location&& model) { +void LocationModel::resetModel(std::vector&& model) { QMetaObject::invokeMethod( this, [&]() { diff --git a/src/domain/model/location_model.h b/src/domain/model/location_model.h index 7c6f54fa..1b8f7c8c 100644 --- a/src/domain/model/location_model.h +++ b/src/domain/model/location_model.h @@ -27,7 +27,7 @@ class LocationModel : public QAbstractListModel { QHash roleNames() const override; - void resetModel(DTO_Location&& model); + void resetModel(std::vector&& model); Q_INVOKABLE void click(const QModelIndex& index); @@ -37,7 +37,7 @@ class LocationModel : public QAbstractListModel { private: LocationModel() = default; - DTO_Location m_data; + std::vector m_data; LocationID selected = -1; public: diff --git a/src/infrastructure/helper/evento_helper.h b/src/infrastructure/helper/evento_helper.h index b0859957..d400015c 100644 --- a/src/infrastructure/helper/evento_helper.h +++ b/src/infrastructure/helper/evento_helper.h @@ -30,7 +30,7 @@ class EventoHelper : public QObject { private: EventoHelper() = default; - std::atomic m_id; + int m_id = -1; QString m_title; int m_state; QString m_eventTime; @@ -52,6 +52,8 @@ class EventoHelper : public QObject { void typeChanged(); void tagChanged(); void descriptionChanged(); + + friend class EventoEditController; }; #endif // EVENTOHELPER_H diff --git a/src/infrastructure/network/EventoNetworkClient.cpp b/src/infrastructure/network/EventoNetworkClient.cpp index 75a331ae..e2ec0fe9 100644 --- a/src/infrastructure/network/EventoNetworkClient.cpp +++ b/src/infrastructure/network/EventoNetworkClient.cpp @@ -748,16 +748,26 @@ EventoFuture>> EventoNetworkClient::getTypeL }); } -EventoFuture> EventoNetworkClient::getLocationList() { +register_object_member(DTO_Location, "key", id); +register_object_member(DTO_Location, "label", name); +register_object_member(DTO_Location, "children", children); +declare_object(DTO_Location, object_member(DTO_Location, id), object_member(DTO_Location, name), + optional_object_member(DTO_Location, children)); + +EventoFuture>> EventoNetworkClient::getLocationList() { auto url = endpoint(QStringLiteral("/admin/locations")); - return this->get(url).then([](EventoResult result) -> EventoResult { - if (result) { - return QString::fromUtf8( - QJsonDocument(result.take().toArray()).toJson(QJsonDocument::Compact)); - } else { - return {result.code(), result.message()}; - } - }); + return this->get(url).then( + [](EventoResult result) -> EventoResult> { + if (result) { + auto rootValue = result.take(); + std::vector result; + declare_top_deserialiser(result, deserialiser); + deserialiser.assign(rootValue); + return result; + } else { + return {result.code(), result.message()}; + } + }); } EventoFuture>> EventoNetworkClient::getDepartmentList() { diff --git a/src/infrastructure/network/EventoNetworkClient.h b/src/infrastructure/network/EventoNetworkClient.h index 8b4ea9fd..0f947c79 100644 --- a/src/infrastructure/network/EventoNetworkClient.h +++ b/src/infrastructure/network/EventoNetworkClient.h @@ -9,13 +9,14 @@ #include #include -#include "dto/evento.h" -#include "dto/feedback.h" -#include "dto/feedback_summary.h" -#include "dto/permission.h" -#include "dto/slide.h" -#include "dto/user.h" -#include "dto/user_brief.h" +#include +#include +#include +#include +#include +#include +#include +#include #include "future.h" #include "result.h" @@ -57,7 +58,7 @@ class EventoNetworkClient { EventoFuture> getAdminPermission(); EventoFuture> getManagerPermission(EventoID event); EventoFuture> getPermittedEvent(); - EventoFuture> getEventPermission(EventoID event); + [[maybe_unused]] EventoFuture> getEventPermission(EventoID event); EventoFuture> getUserInfo(const UserID& id); EventoFuture> getUserParticipate(EventoID event); @@ -72,11 +73,12 @@ class EventoNetworkClient { EventoFuture>> getEventListAfterTime(QDate time); EventoFuture> getEventById(EventoID event); + // othersFetch EventoFuture>> getSlideList(); EventoFuture>> getEventSlideList(EventoID id); EventoFuture>> getHomeSlideList(int size); EventoFuture>> getTypeList(); - EventoFuture> getLocationList(); + EventoFuture>> getLocationList(); EventoFuture>> getDepartmentList(); EventoFuture>> getDepartmentListWithSubscriptionInfo(); EventoFuture> getQRCode(EventoID eventId);