35 lines
743 B
C
35 lines
743 B
C
|
|
//
|
||
|
|
// Created by Krad on 2022/3/24.
|
||
|
|
//
|
||
|
|
|
||
|
|
#ifndef GUI_DATESLIDEPICKERBOX_H
|
||
|
|
#define GUI_DATESLIDEPICKERBOX_H
|
||
|
|
|
||
|
|
#include <QWidget>
|
||
|
|
#include "SlidePickerBox.h"
|
||
|
|
#include <QDate>
|
||
|
|
class QHBoxLayout;
|
||
|
|
class DateSlidePickerBox:public QWidget {
|
||
|
|
Q_OBJECT
|
||
|
|
public:
|
||
|
|
explicit DateSlidePickerBox(QWidget *parent = nullptr);
|
||
|
|
QString getSelectedValue();
|
||
|
|
void setSelectedValue(const QString& val);
|
||
|
|
void resizeLabel();
|
||
|
|
SlidePickerBox* myear;
|
||
|
|
SlidePickerBox* tyear;
|
||
|
|
SlidePickerBox* year;
|
||
|
|
SlidePickerBox* month;
|
||
|
|
SlidePickerBox* day;
|
||
|
|
public Q_SLOTS:
|
||
|
|
void leapYearAndFebruaryAdjust();
|
||
|
|
private:
|
||
|
|
int getYear();
|
||
|
|
QStringList bigMonth;
|
||
|
|
bool isBigMonth();
|
||
|
|
QHBoxLayout* layout;
|
||
|
|
};
|
||
|
|
|
||
|
|
|
||
|
|
#endif //GUI_DATESLIDEPICKERBOX_H
|