28 lines
838 B
C
28 lines
838 B
C
|
#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
|