67 lines
1.4 KiB
C++
67 lines
1.4 KiB
C++
#ifndef DATEREPLACEEDITOR_H
|
|
#define DATEREPLACEEDITOR_H
|
|
|
|
#include <QWidget>
|
|
#include <QStringList>
|
|
#include <QList>
|
|
|
|
#include "ViewModels.h"
|
|
|
|
class QLineEdit;
|
|
|
|
namespace Ui {
|
|
class DateReplaceEditor;
|
|
}
|
|
|
|
class DateReplaceEditor : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit DateReplaceEditor(QWidget *parent = nullptr);
|
|
~DateReplaceEditor();
|
|
|
|
DateItemModel dateModel();
|
|
void setDateModel(const DateItemModel& model);
|
|
|
|
void init();
|
|
void initReplaceValue();
|
|
void initShowLineEdit();
|
|
|
|
void loadMonthShow();
|
|
void loadDataShow();
|
|
void loadWeekShow();
|
|
void loadYearShow();
|
|
void loadDayShow();
|
|
void loadHourShow();
|
|
|
|
void getMonthValue();
|
|
void getYearValue();
|
|
void getHourValue();
|
|
void getWeekValue();
|
|
void getDayValue();
|
|
|
|
private slots:
|
|
void on_cb_replaceType_currentIndexChanged(int index);
|
|
void on_btnUP_clicked();
|
|
void on_btnDown_clicked();
|
|
void on_btnPreSetValue_clicked();
|
|
void onLineEditReplaceChanged(int i, QString txt);
|
|
|
|
private:
|
|
void applyStyleSheet();
|
|
|
|
Ui::DateReplaceEditor *ui;
|
|
|
|
int currPage = 0;
|
|
QStringList monthList;
|
|
QStringList dataList;
|
|
QStringList weekList;
|
|
QStringList yearList;
|
|
QList<int> yearInitList;
|
|
QStringList dayList;
|
|
QStringList hourList;
|
|
};
|
|
|
|
#endif // DATEREPLACEEDITOR_H
|