Refactor DateSlidePickerBox.
This commit is contained in:
@@ -8,26 +8,32 @@
|
||||
#include <QWidget>
|
||||
#include "SlidePickerBox.h"
|
||||
#include <QDate>
|
||||
|
||||
class QHBoxLayout;
|
||||
|
||||
class DateSlidePickerBox:public QWidget {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit DateSlidePickerBox(QWidget *parent = nullptr);
|
||||
QString getSelectedValue();
|
||||
QString getSelectedValue() const;
|
||||
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;
|
||||
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();
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user