checkperiodfunc.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #ifndef __CHECKPERIODWIDGET_H__
  2. #define __CHECKPERIODWIDGET_H__
  3. #include "GlobalVariable.h"
  4. #include <QList>
  5. /**
  6. * 这里是一些非成员函数
  7. *
  8. */
  9. /* 检查时间是否相等,前后冲突 */
  10. // bool checkStartEndTime(const OnePlan_t& plan);
  11. /**
  12. * @brief 周查重函数
  13. *
  14. * @param planList 需要查重的列表
  15. * @param plan 目标计划
  16. * @param isExcludeSelf 是否排除自身
  17. * @return true
  18. * @return false
  19. */
  20. bool isWeekPlanDuplicate(const QList<OnePlan_t>& planList, const OnePlan_t& plan, bool isExcludeSelf = false);
  21. /**
  22. * @brief 日期查重函数
  23. *
  24. * @param planList
  25. * @param plan
  26. * @param isExcludeSelf
  27. * @return true
  28. * @return false
  29. */
  30. bool isDatePlanDuplicate(const QList<OnePlan_t>& planList, const OnePlan_t& plan, bool isExcludeSelf = false);
  31. /* 周时间1大于周时间2 */
  32. bool weekTimeIsGerater(const eWeekType& week1, const QTime& time1,
  33. const eWeekType& week2, const QTime& time2);
  34. /* 日期1大于日期2 */
  35. bool dateTimeIsGerater(const QDate& date1, const QTime& time1,
  36. const QDate& date2, const QTime& time2);
  37. #endif // __CHECKPERIODWIDGET_H__