45 #ifndef __WTX_CALENDARWIDGET_H___ 46 #define __WTX_CALENDARWIDGET_H___ 52 #include <Wtx/Addons/Web/Calendar/Database.h> 53 #include <Wtx/Addons/Web/Calendar/DayView.h> 54 #include <Wtx/Addons/Web/Calendar/WeekView.h> 55 #include <Wtx/Addons/Web/Calendar/MonthView.h> 56 #include <Wtx/Addons/Web/Calendar/YearView.h> 67 :
public Wt::WContainerWidget
70 :
public Wt::WContainerWidget
75 Wt::WPushButton * pbNew()
const;
76 Wt::WPushButton * pbToday()
const;
77 Wt::WPushButton * pbPrev()
const;
78 Wt::WPushButton * pbNext()
const;
79 Wt::WPushButton * pbFind()
const;
80 Wt::WComboBox * cbView()
const;
81 Wt::WPushButton * pbSett()
const;
85 Wt::WText * m_date =
nullptr;
86 Wt::WPushButton * m_pbNew =
nullptr;
87 Wt::WPushButton * m_pbToday =
nullptr;
88 Wt::WPushButton * m_pbPrev =
nullptr;
89 Wt::WPushButton * m_pbNext =
nullptr;
90 Wt::WPushButton * m_pbFind =
nullptr;
91 Wt::WComboBox * m_cbView =
nullptr;
92 Wt::WPushButton * m_pbSett =
nullptr;
96 :
public Wt::WContainerWidget
99 SideBar(
int firstDayOfWeek );
101 Wt::WCalendar * calendar()
const;
105 Wt::WCalendar * m_calendar =
nullptr;
135 const Wt::WDate & selectedDate()
const;
136 void setSelectedDate(
const Wt::WDate & date );
138 void setView(
int value );
141 ToolBar * toolBar()
const;
142 SideBar * sideBar()
const;
144 Wt::Signal<Wt::WDate> & itemNew();
145 Wt::Signal<Wt::WModelIndex> & itemClicked();
146 Wt::Signal<Wt::WModelIndex> & itemDoubleClicked();
150 std::shared_ptr<Wt::WAbstractItemModel> getModel(
const Wt::WDate & date,
const std::vector<std::string> & fieldList );
156 void selectPrevious();
159 Wt::WDate m_selectedDate;
160 Wt::WTemplate * m_templt =
nullptr;
165 Wt::WStackedWidget * m_stack =
nullptr;
166 ToolBar * m_toolBar =
nullptr;
167 SideBar * m_sideBar =
nullptr;
169 Wt::Signal<Wt::WDate> m_itemNew;
170 Wt::Signal<Wt::WModelIndex> m_itemClicked;
171 Wt::Signal<Wt::WModelIndex> m_itemDoubleClicked;
173 std::map< Wt::WDate, std::shared_ptr<Wt::WAbstractItemModel> > m_modelMaps;
184 #endif // #ifndef __WTX_CALENDARWIDGET_H___