12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- #ifndef __CHECKPERIODWIDGET_H__
- #define __CHECKPERIODWIDGET_H__
- #include "GlobalVariable.h"
- #include <QList>
- /**
- * 这里是一些非成员函数
- *
- */
- /* 检查时间是否相等,前后冲突 */
- // bool checkStartEndTime(const OnePlan_t& plan);
- /**
- * @brief 周查重函数
- *
- * @param planList 需要查重的列表
- * @param plan 目标计划
- * @param isExcludeSelf 是否排除自身
- * @return true
- * @return false
- */
- bool isWeekPlanDuplicate(const QList<OnePlan_t>& planList, const OnePlan_t& plan);
- /* 查重函数重载,排除一个计划 */
- bool isWeekPlanDuplicate(const QList<OnePlan_t>& planList, const OnePlan_t& plan, const OnePlan_t& excludePlan);
- /**
- * @brief 日期查重函数
- *
- * @param planList
- * @param plan
- * @param isExcludeSelf
- * @return true
- * @return false
- */
- bool isDatePlanDuplicate(const QList<OnePlan_t>& planList, const OnePlan_t& plan);
- /* 日期查重,重载版,排除一个日期计划 */
- bool isDatePlanDuplicate(const QList<OnePlan_t>& planList, const OnePlan_t& plan, const OnePlan_t& excludePlan);
- /* 周时间1大于周时间2 */
- bool weekTimeIsGerater(const eWeekType& week1, const QTime& time1,
- const eWeekType& week2, const QTime& time2);
- /* 日期1大于日期2 */
- bool dateTimeIsGerater(const QDate& date1, const QTime& time1,
- const QDate& date2, const QTime& time2);
- #endif // __CHECKPERIODWIDGET_H__
|