Files
GUI/src/components/DateSlidePickerBox.h

41 lines
908 B
C
Raw Normal View History

//
// Created by Krad on 2022/3/24.
//
#ifndef GUI_DATESLIDEPICKERBOX_H
#define GUI_DATESLIDEPICKERBOX_H
#include <QWidget>
#include "SlidePickerBox.h"
#include <QDate>
2022-06-07 15:18:33 +08:00
class QHBoxLayout;
2022-06-07 15:18:33 +08:00
class DateSlidePickerBox:public QWidget {
Q_OBJECT
public:
explicit DateSlidePickerBox(QWidget *parent = nullptr);
2022-06-07 15:18:33 +08:00
QString getSelectedValue() const;
void setSelectedValue(const QString& val);
void resizeLabel();
2022-06-07 15:18:33 +08:00
public Q_SLOTS:
void leapYearAndFebruaryAdjust();
private:
int getYear();
2022-06-07 15:18:33 +08:00
QStringList mBigMonthList;
bool isBigMonth() const;
QHBoxLayout* mLayout;
SlidePickerBox* mHundredYearBox;
SlidePickerBox* mTenYearBox;
SlidePickerBox* mYearBox;
SlidePickerBox* mMonthBox;
SlidePickerBox* mDayBox;
void initBox(SlidePickerBox* aBox, const QStringList& aItemsValues, int width = 50);
void addSplitLabel();
};
#endif //GUI_DATESLIDEPICKERBOX_H