| 1 |
// SPDX-FileCopyrightText: 2019 - 2026 UnionTech Software Technology Co., Ltd. |
| 2 |
// |
| 3 |
// SPDX-License-Identifier: LGPL-3.0-or-later |
| 4 |
|
| 5 |
#include "test_daymonthview.h" |
| 6 |
|
| 7 |
//test_daymonthview::test_daymonthview() |
| 8 |
//{ |
| 9 |
// mDayMonthView = new CDayMonthView(); |
| 10 |
//} |
| 11 |
|
| 12 |
//test_daymonthview::~test_daymonthview() |
| 13 |
//{ |
| 14 |
// delete mDayMonthView; |
| 15 |
// mDayMonthView = nullptr; |
| 16 |
//} |
| 17 |
|
| 18 |
//QVector<QDate> dayMonthviewGetDayList() |
| 19 |
//{ |
| 20 |
// QVector<QDate> dateList {}; |
| 21 |
// QDate currentDate = QDate::currentDate(); |
| 22 |
// for (int i = 0; i < 42; i++) { |
| 23 |
// dateList.append(currentDate.addDays(i)); |
| 24 |
// } |
| 25 |
|
| 26 |
// return dateList; |
| 27 |
//} |
| 28 |
|
| 29 |
//QMap<QDate, CaHuangLiDayInfo> dayMonthViewGetHuangLiDayInfo() |
| 30 |
//{ |
| 31 |
// QMap<QDate, CaHuangLiDayInfo> huangLiDayInfo {}; |
| 32 |
// CaHuangLiDayInfo huangLiInfo1 {}; |
| 33 |
// huangLiInfo1.mGanZhiYear = "辛丑牛年"; //年干支 |
| 34 |
// huangLiInfo1.mGanZhiMonth = "庚寅月"; //月干支 |
| 35 |
// huangLiInfo1.mGanZhiDay = "辛卯日"; //日干支 |
| 36 |
// huangLiInfo1.mLunarMonthName = "正月"; //农历月名称 |
| 37 |
// huangLiInfo1.mLunarDayName = "初一"; //农历日名称 |
| 38 |
// huangLiInfo1.mLunarLeapMonth = 4; //闰月 |
| 39 |
// huangLiInfo1.mZodiac = "牛"; //生肖 |
| 40 |
// huangLiInfo1.mTerm = ""; //农历节气 |
| 41 |
// huangLiInfo1.mSolarFestival = "国庆节"; //阳历节日 |
| 42 |
// huangLiInfo1.mLunarFestival = "除夕"; //农历节日 |
| 43 |
// huangLiInfo1.mSuit = "嫁娶"; //黄历宜 |
| 44 |
// huangLiInfo1.mAvoid = "入土"; //黄历忌 |
| 45 |
|
| 46 |
// huangLiDayInfo.insert(QDate::currentDate(), huangLiInfo1); |
| 47 |
// return huangLiDayInfo; |
| 48 |
//} |
| 49 |
|
| 50 |
//QVector<bool> dayMonthViewGetLineFlag() |
| 51 |
//{ |
| 52 |
// QVector<bool> flags {}; |
| 53 |
// for (int i = 0; i < 42; i++) { |
| 54 |
// flags.append(true); |
| 55 |
// } |
| 56 |
// return flags; |
| 57 |
//} |
| 58 |
|
| 59 |
////void CDayMonthView::setShowDate(const QVector<QDate> &showDate, const QDate &selectDate, const QDate ¤tDate) |
| 60 |
//TEST_F(test_daymonthview, setShowDate) |
| 61 |
//{ |
| 62 |
// mDayMonthView->setShowDate(dayMonthviewGetDayList(), QDate::currentDate(), QDate::currentDate()); |
| 63 |
//} |
| 64 |
|
| 65 |
////void CDayMonthView::setLunarVisible(bool visible) |
| 66 |
//TEST_F(test_daymonthview, setLunarVisible) |
| 67 |
//{ |
| 68 |
// mDayMonthView->setLunarVisible(true); |
| 69 |
//} |
| 70 |
|
| 71 |
////void CDayMonthView::setTheMe(int type) |
| 72 |
//TEST_F(test_daymonthview, setTheMe) |
| 73 |
//{ |
| 74 |
// mDayMonthView->setTheMe(1); |
| 75 |
// mDayMonthView->setTheMe(2); |
| 76 |
//} |
| 77 |
|
| 78 |
////void CDayMonthView::setSearchFlag(bool flag) |
| 79 |
//TEST_F(test_daymonthview, setSearchFlag) |
| 80 |
//{ |
| 81 |
// mDayMonthView->setSearchFlag(true); |
| 82 |
//} |
| 83 |
|
| 84 |
////void CDayMonthView::setHuangLiInfo(const CaHuangLiDayInfo &huangLiInfo) |
| 85 |
//TEST_F(test_daymonthview, setHuangLiInfo) |
| 86 |
//{ |
| 87 |
// mDayMonthView->setHuangLiInfo(dayMonthViewGetHuangLiDayInfo().value(QDate::currentDate())); |
| 88 |
//} |
| 89 |
|
| 90 |
////void CDayMonthView::setHasScheduleFlag(const QVector<bool> &hasScheduleFlag) |
| 91 |
//TEST_F(test_daymonthview, setHasScheduleFlag) |
| 92 |
//{ |
| 93 |
// mDayMonthView->setHasScheduleFlag(dayMonthViewGetLineFlag()); |
| 94 |
//} |
| 95 |
|
| 96 |
////void CDayMonthView::updateDateLunarDay() |
| 97 |
//TEST_F(test_daymonthview, updateDateLunarDay) |
| 98 |
//{ |
| 99 |
// mDayMonthView->updateDateLunarDay(); |
| 100 |
//} |
| 101 |
|
| 102 |
////void CDayMonthView::changeSelectDate(const QDate &date) |
| 103 |
//TEST_F(test_daymonthview, changeSelectDate) |
| 104 |
//{ |
| 105 |
// mDayMonthView->changeSelectDate(QDate::currentDate()); |
| 106 |
//} |
| 107 |
|
| 108 |
////void CDayMonthView::slotprev() |
| 109 |
//TEST_F(test_daymonthview, slotprev) |
| 110 |
//{ |
| 111 |
// mDayMonthView->setShowDate(dayMonthviewGetDayList(), QDate::currentDate().addDays(1), QDate::currentDate().addDays(1)); |
| 112 |
// mDayMonthView->slotprev(); |
| 113 |
//} |
| 114 |
|
| 115 |
////void CDayMonthView::slotnext() |
| 116 |
//TEST_F(test_daymonthview, slotnext) |
| 117 |
//{ |
| 118 |
// mDayMonthView->setShowDate(dayMonthviewGetDayList(), QDate::currentDate().addDays(1), QDate::currentDate().addDays(1)); |
| 119 |
// mDayMonthView->slotnext(); |
| 120 |
//} |
| 121 |
|
| 122 |
////void CDayMonthView::slottoday() |
| 123 |
//TEST_F(test_daymonthview, slottoday) |
| 124 |
//{ |
| 125 |
// mDayMonthView->setShowDate(dayMonthviewGetDayList(), QDate::currentDate().addDays(1), QDate::currentDate().addDays(1)); |
| 126 |
// mDayMonthView->slottoday(); |
| 127 |
//} |