PNPkurs-PIbd-31-Alekseev-I-S/service/projectlogic.h

28 lines
838 B
C
Raw Normal View History

2025-01-15 22:57:00 +04:00
#ifndef PROJECTLOGIC_H
#define PROJECTLOGIC_H
#include "types.h"
#include "filterparams.h"
class ProjectLogic
{
public:
ProjectLogic();
QList<Project> findDevicesByAllParameters(
const QMap<int, Project> &projects,
int entityId,
int currentEntity,
QString searchText,
const FilterParams &filterParams,
const QString &sortOrder
);
private:
QMap<int, Project> filterByEntity(const QMap<int, Project> &projects, int entityId, int currentEntity);
QMap<int, Project> searchDevices(const QMap<int, Project> &projects, const QString &searchText);
QMap<int, Project> applyFilters(const QMap<int, Project> &projects, const FilterParams &filterParams);
QList<Project> sortDevices(QMap<int, Project> &devices, const QString &sortOrder);
};
#endif // PROJECTLOGIC_H