72 lines
1.2 KiB
C++
72 lines
1.2 KiB
C++
#ifndef FORMCALENDARVIEW_H
|
|
#define FORMCALENDARVIEW_H
|
|
|
|
#include <QWidget>
|
|
|
|
#include "sdayview.h"
|
|
|
|
namespace Ui {
|
|
class FormCalendarView;
|
|
}
|
|
|
|
class FormCalendarView : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit FormCalendarView(QWidget *parent = nullptr);
|
|
~FormCalendarView();
|
|
|
|
virtual void resizeEvent(QResizeEvent *event);
|
|
|
|
void SetCalendar(int nYear, int nMonth);
|
|
|
|
void SetToday();
|
|
void SetLast3Days();
|
|
void SetLastWeek();
|
|
void SetLast2Weeks();
|
|
void SetLast3Weeks();
|
|
void SetLastMonth();
|
|
void SetLast2Month();
|
|
void SetLast6Months();
|
|
void SetLastYear();
|
|
|
|
void UpdateDayState();
|
|
|
|
void ClearDayState();
|
|
|
|
void SetModeChangeStart();
|
|
void SetModeChangeEnd();
|
|
|
|
|
|
|
|
public slots:
|
|
void Clicked(int nIndexRow, int nIndexColumn);
|
|
|
|
signals:
|
|
void SetSearchDateUpdate(int nTypeSearchDuration);
|
|
void ExecuteClickDate();
|
|
|
|
protected:
|
|
int m_nMode;
|
|
SDayView*** m_pViewDays;
|
|
|
|
public:
|
|
static QDate m_DateStart;
|
|
static QDate m_DateEnd;
|
|
|
|
static QDate GetDateStart();
|
|
static QDate GetDateEnd();
|
|
|
|
static void SetDateStart(QDate date);
|
|
static void SetDateEnd(QDate date);
|
|
|
|
static int GetTypeSearchDuration();
|
|
|
|
|
|
private:
|
|
Ui::FormCalendarView *ui;
|
|
};
|
|
|
|
#endif // FORMCALENDARVIEW_H
|