#ifndef SDAYVIEW_H
#define SDAYVIEW_H

#include <QObject>
#include <QWidget>
#include <QDate>

class SDayView : public QWidget
{
    Q_OBJECT
public:
    explicit SDayView(QWidget *parent = nullptr);
    virtual ~SDayView();

    virtual void paintEvent(QPaintEvent *event);

    void SetRowColumn(int nRow, int nColumn);

    int GetIndexRow();

    int GetIndexColumn();

    void SetDate(QDate nDate);
    void SetDate(QDate nDate, bool bCurrentMonth);
    QDate GetDate();

    void ClearDate();

    int GetYear();
    int GetMonth();
    int GetDay();

    void Select();
    void Unselect();

    bool IsSelected();

    virtual void mousePressEvent(QMouseEvent *event);
    virtual void mouseReleaseEvent(QMouseEvent *event);
    virtual void resizeEvent(QResizeEvent *event);

signals:
    void Clicked(int nIndexRow, int nIndexColumn);

protected:
    bool m_bSelected;
    int m_nIndexRow;
    int m_nIndexColumn;
    bool m_bCurrentMonth;

    QDate m_Date;
    int m_nDay;

signals:

};

#endif // SDAYVIEW_H
