1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- #ifndef PROJECTMANAGER_H
- #define PROJECTMANAGER_H
- #include <QObject>
- class ProjectInfo;
- class ProjectManager : QObject
- {
- Q_OBJECT
- public:
-
-
- enum IndexType
- {
- AbilityIndex = 0b1,
- TechIndex = 0b1 << 1,
- OptimalIndex = 0b1 << 2,
- EfficiencyIndex = 0b1 << 3,
- };
- Q_ENUM(IndexType)
- static QString nameOfIndexType(IndexType t);
-
-
-
- enum EvalType
- {
- None,
- DemandEval = AbilityIndex | TechIndex,
- OptimalEval = OptimalIndex,
- EfficiencyEval = EfficiencyIndex,
- };
- Q_ENUM(EvalType)
- Q_DECLARE_FLAGS(EvalTypes, EvalType)
- static QString nameOfEvalType(EvalType t);
- static QList<IndexType> indexListOfEvalTypes(EvalTypes flags);
- static EvalTypes evalTypes(ProjectInfo proj);
- static QList<EvalType> evalTypeList(EvalTypes types);
- static QList<EvalType> evalTypeList(ProjectInfo proj);
- static QList<IndexType> indexList(ProjectInfo proj);
-
-
-
-
- static int queryProjects(QList<ProjectInfo *> *projList);
- static int queryProjects(QList<ProjectInfo *> *list, int &total, int page, int pageSize, QString name);
- static int verifyProjectInfo(ProjectInfo proj);
- static int insertProject(ProjectInfo &proj);
- static int updateProject(ProjectInfo &proj);
- static int deleteProject(int id);
- };
- #endif
|