1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- #ifndef ADDPERIODDIALOG_H
- #define ADDPERIODDIALOG_H
- #include "DataBase/entities.h"
- #include "DialogBase.h"
- #include "GlobalVariable.h"
- #include <QList>
- namespace Ui {
- class AddPeriodWidget;
- }
- class AddPeriodDialog : public DialogBase
- {
- Q_OBJECT
- public:
- explicit AddPeriodDialog(ePeriodType type, QWidget *parent = nullptr);
- ~AddPeriodDialog();
- /* 获取计划 */
- OnePlan_t getPlan() const { return m_plan; }
- /* 设置已有的计划列表 */
- void setPlanList(const QList<OnePlan_t>& planList) { m_planList = planList; }
- private:
- /* 设置QSS */
- void setQSS();
- /* 更新计划 */
- void updatePlan();
- /* 重载点击OK按钮之后的操作 */
- bool isOKClicked() override;
- private:
- Ui::AddPeriodWidget *ui;
- ePeriodType m_type; /* 周期类型 */
- OnePlan_t m_plan;
- QList<OnePlan_t> m_planList; /* 已有的计划列表 */
- };
- #endif // ADDPERIODDIALOG_H
|