1 //******************************************************************************
2 // Copyright (c) 2005-2013 by Jan Van hijfte
3 //
4 // See the included file COPYING.TXT for details about the copyright.
5 //
6 // This program is distributed in the hope that it will be useful,
7 // but WITHOUT ANY WARRANTY; without even the implied warranty of
8 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9 //******************************************************************************
10
11
12 #include "qcalendarwidget_c.h"
13
QCalendarWidget_Create(QWidgetH parent)14 QCalendarWidgetH QCalendarWidget_Create(QWidgetH parent)
15 {
16 return (QCalendarWidgetH) new QCalendarWidget((QWidget*)parent);
17 }
18
QCalendarWidget_Destroy(QCalendarWidgetH handle)19 void QCalendarWidget_Destroy(QCalendarWidgetH handle)
20 {
21 delete (QCalendarWidget *)handle;
22 }
23
QCalendarWidget_sizeHint(QCalendarWidgetH handle,PSize retval)24 void QCalendarWidget_sizeHint(QCalendarWidgetH handle, PSize retval)
25 {
26 *(QSize *)retval = ((QCalendarWidget *)handle)->sizeHint();
27 }
28
QCalendarWidget_minimumSizeHint(QCalendarWidgetH handle,PSize retval)29 void QCalendarWidget_minimumSizeHint(QCalendarWidgetH handle, PSize retval)
30 {
31 *(QSize *)retval = ((QCalendarWidget *)handle)->minimumSizeHint();
32 }
33
QCalendarWidget_selectedDate(QCalendarWidgetH handle,QDateH retval)34 void QCalendarWidget_selectedDate(QCalendarWidgetH handle, QDateH retval)
35 {
36 *(QDate *)retval = ((QCalendarWidget *)handle)->selectedDate();
37 }
38
QCalendarWidget_yearShown(QCalendarWidgetH handle)39 int QCalendarWidget_yearShown(QCalendarWidgetH handle)
40 {
41 return (int) ((QCalendarWidget *)handle)->yearShown();
42 }
43
QCalendarWidget_monthShown(QCalendarWidgetH handle)44 int QCalendarWidget_monthShown(QCalendarWidgetH handle)
45 {
46 return (int) ((QCalendarWidget *)handle)->monthShown();
47 }
48
QCalendarWidget_minimumDate(QCalendarWidgetH handle,QDateH retval)49 void QCalendarWidget_minimumDate(QCalendarWidgetH handle, QDateH retval)
50 {
51 *(QDate *)retval = ((QCalendarWidget *)handle)->minimumDate();
52 }
53
QCalendarWidget_setMinimumDate(QCalendarWidgetH handle,const QDateH date)54 void QCalendarWidget_setMinimumDate(QCalendarWidgetH handle, const QDateH date)
55 {
56 ((QCalendarWidget *)handle)->setMinimumDate(*(const QDate*)date);
57 }
58
QCalendarWidget_maximumDate(QCalendarWidgetH handle,QDateH retval)59 void QCalendarWidget_maximumDate(QCalendarWidgetH handle, QDateH retval)
60 {
61 *(QDate *)retval = ((QCalendarWidget *)handle)->maximumDate();
62 }
63
QCalendarWidget_setMaximumDate(QCalendarWidgetH handle,const QDateH date)64 void QCalendarWidget_setMaximumDate(QCalendarWidgetH handle, const QDateH date)
65 {
66 ((QCalendarWidget *)handle)->setMaximumDate(*(const QDate*)date);
67 }
68
QCalendarWidget_firstDayOfWeek(QCalendarWidgetH handle)69 Qt::DayOfWeek QCalendarWidget_firstDayOfWeek(QCalendarWidgetH handle)
70 {
71 return (Qt::DayOfWeek) ((QCalendarWidget *)handle)->firstDayOfWeek();
72 }
73
QCalendarWidget_setFirstDayOfWeek(QCalendarWidgetH handle,Qt::DayOfWeek dayOfWeek)74 void QCalendarWidget_setFirstDayOfWeek(QCalendarWidgetH handle, Qt::DayOfWeek dayOfWeek)
75 {
76 ((QCalendarWidget *)handle)->setFirstDayOfWeek(dayOfWeek);
77 }
78
QCalendarWidget_isNavigationBarVisible(QCalendarWidgetH handle)79 bool QCalendarWidget_isNavigationBarVisible(QCalendarWidgetH handle)
80 {
81 return (bool) ((QCalendarWidget *)handle)->isNavigationBarVisible();
82 }
83
QCalendarWidget_isGridVisible(QCalendarWidgetH handle)84 bool QCalendarWidget_isGridVisible(QCalendarWidgetH handle)
85 {
86 return (bool) ((QCalendarWidget *)handle)->isGridVisible();
87 }
88
QCalendarWidget_selectionMode(QCalendarWidgetH handle)89 QCalendarWidget::SelectionMode QCalendarWidget_selectionMode(QCalendarWidgetH handle)
90 {
91 return (QCalendarWidget::SelectionMode) ((QCalendarWidget *)handle)->selectionMode();
92 }
93
QCalendarWidget_setSelectionMode(QCalendarWidgetH handle,QCalendarWidget::SelectionMode mode)94 void QCalendarWidget_setSelectionMode(QCalendarWidgetH handle, QCalendarWidget::SelectionMode mode)
95 {
96 ((QCalendarWidget *)handle)->setSelectionMode(mode);
97 }
98
QCalendarWidget_horizontalHeaderFormat(QCalendarWidgetH handle)99 QCalendarWidget::HorizontalHeaderFormat QCalendarWidget_horizontalHeaderFormat(QCalendarWidgetH handle)
100 {
101 return (QCalendarWidget::HorizontalHeaderFormat) ((QCalendarWidget *)handle)->horizontalHeaderFormat();
102 }
103
QCalendarWidget_setHorizontalHeaderFormat(QCalendarWidgetH handle,QCalendarWidget::HorizontalHeaderFormat format)104 void QCalendarWidget_setHorizontalHeaderFormat(QCalendarWidgetH handle, QCalendarWidget::HorizontalHeaderFormat format)
105 {
106 ((QCalendarWidget *)handle)->setHorizontalHeaderFormat(format);
107 }
108
QCalendarWidget_verticalHeaderFormat(QCalendarWidgetH handle)109 QCalendarWidget::VerticalHeaderFormat QCalendarWidget_verticalHeaderFormat(QCalendarWidgetH handle)
110 {
111 return (QCalendarWidget::VerticalHeaderFormat) ((QCalendarWidget *)handle)->verticalHeaderFormat();
112 }
113
QCalendarWidget_setVerticalHeaderFormat(QCalendarWidgetH handle,QCalendarWidget::VerticalHeaderFormat format)114 void QCalendarWidget_setVerticalHeaderFormat(QCalendarWidgetH handle, QCalendarWidget::VerticalHeaderFormat format)
115 {
116 ((QCalendarWidget *)handle)->setVerticalHeaderFormat(format);
117 }
118
QCalendarWidget_headerTextFormat(QCalendarWidgetH handle,QTextCharFormatH retval)119 void QCalendarWidget_headerTextFormat(QCalendarWidgetH handle, QTextCharFormatH retval)
120 {
121 *(QTextCharFormat *)retval = ((QCalendarWidget *)handle)->headerTextFormat();
122 }
123
QCalendarWidget_setHeaderTextFormat(QCalendarWidgetH handle,const QTextCharFormatH format)124 void QCalendarWidget_setHeaderTextFormat(QCalendarWidgetH handle, const QTextCharFormatH format)
125 {
126 ((QCalendarWidget *)handle)->setHeaderTextFormat(*(const QTextCharFormat*)format);
127 }
128
QCalendarWidget_weekdayTextFormat(QCalendarWidgetH handle,QTextCharFormatH retval,Qt::DayOfWeek dayOfWeek)129 void QCalendarWidget_weekdayTextFormat(QCalendarWidgetH handle, QTextCharFormatH retval, Qt::DayOfWeek dayOfWeek)
130 {
131 *(QTextCharFormat *)retval = ((QCalendarWidget *)handle)->weekdayTextFormat(dayOfWeek);
132 }
133
QCalendarWidget_setWeekdayTextFormat(QCalendarWidgetH handle,Qt::DayOfWeek dayOfWeek,const QTextCharFormatH format)134 void QCalendarWidget_setWeekdayTextFormat(QCalendarWidgetH handle, Qt::DayOfWeek dayOfWeek, const QTextCharFormatH format)
135 {
136 ((QCalendarWidget *)handle)->setWeekdayTextFormat(dayOfWeek, *(const QTextCharFormat*)format);
137 }
138
QCalendarWidget_dateTextFormat2(QCalendarWidgetH handle,QTextCharFormatH retval,const QDateH date)139 void QCalendarWidget_dateTextFormat2(QCalendarWidgetH handle, QTextCharFormatH retval, const QDateH date)
140 {
141 *(QTextCharFormat *)retval = ((QCalendarWidget *)handle)->dateTextFormat(*(const QDate*)date);
142 }
143
QCalendarWidget_setDateTextFormat(QCalendarWidgetH handle,const QDateH date,const QTextCharFormatH format)144 void QCalendarWidget_setDateTextFormat(QCalendarWidgetH handle, const QDateH date, const QTextCharFormatH format)
145 {
146 ((QCalendarWidget *)handle)->setDateTextFormat(*(const QDate*)date, *(const QTextCharFormat*)format);
147 }
148
QCalendarWidget_isDateEditEnabled(QCalendarWidgetH handle)149 bool QCalendarWidget_isDateEditEnabled(QCalendarWidgetH handle)
150 {
151 return (bool) ((QCalendarWidget *)handle)->isDateEditEnabled();
152 }
153
QCalendarWidget_setDateEditEnabled(QCalendarWidgetH handle,bool enable)154 void QCalendarWidget_setDateEditEnabled(QCalendarWidgetH handle, bool enable)
155 {
156 ((QCalendarWidget *)handle)->setDateEditEnabled(enable);
157 }
158
QCalendarWidget_dateEditAcceptDelay(QCalendarWidgetH handle)159 int QCalendarWidget_dateEditAcceptDelay(QCalendarWidgetH handle)
160 {
161 return (int) ((QCalendarWidget *)handle)->dateEditAcceptDelay();
162 }
163
QCalendarWidget_setDateEditAcceptDelay(QCalendarWidgetH handle,int delay)164 void QCalendarWidget_setDateEditAcceptDelay(QCalendarWidgetH handle, int delay)
165 {
166 ((QCalendarWidget *)handle)->setDateEditAcceptDelay(delay);
167 }
168
QCalendarWidget_setSelectedDate(QCalendarWidgetH handle,const QDateH date)169 void QCalendarWidget_setSelectedDate(QCalendarWidgetH handle, const QDateH date)
170 {
171 ((QCalendarWidget *)handle)->setSelectedDate(*(const QDate*)date);
172 }
173
QCalendarWidget_setDateRange(QCalendarWidgetH handle,const QDateH min,const QDateH max)174 void QCalendarWidget_setDateRange(QCalendarWidgetH handle, const QDateH min, const QDateH max)
175 {
176 ((QCalendarWidget *)handle)->setDateRange(*(const QDate*)min, *(const QDate*)max);
177 }
178
QCalendarWidget_setCurrentPage(QCalendarWidgetH handle,int year,int month)179 void QCalendarWidget_setCurrentPage(QCalendarWidgetH handle, int year, int month)
180 {
181 ((QCalendarWidget *)handle)->setCurrentPage(year, month);
182 }
183
QCalendarWidget_setGridVisible(QCalendarWidgetH handle,bool show)184 void QCalendarWidget_setGridVisible(QCalendarWidgetH handle, bool show)
185 {
186 ((QCalendarWidget *)handle)->setGridVisible(show);
187 }
188
QCalendarWidget_setNavigationBarVisible(QCalendarWidgetH handle,bool visible)189 void QCalendarWidget_setNavigationBarVisible(QCalendarWidgetH handle, bool visible)
190 {
191 ((QCalendarWidget *)handle)->setNavigationBarVisible(visible);
192 }
193
QCalendarWidget_showNextMonth(QCalendarWidgetH handle)194 void QCalendarWidget_showNextMonth(QCalendarWidgetH handle)
195 {
196 ((QCalendarWidget *)handle)->showNextMonth();
197 }
198
QCalendarWidget_showPreviousMonth(QCalendarWidgetH handle)199 void QCalendarWidget_showPreviousMonth(QCalendarWidgetH handle)
200 {
201 ((QCalendarWidget *)handle)->showPreviousMonth();
202 }
203
QCalendarWidget_showNextYear(QCalendarWidgetH handle)204 void QCalendarWidget_showNextYear(QCalendarWidgetH handle)
205 {
206 ((QCalendarWidget *)handle)->showNextYear();
207 }
208
QCalendarWidget_showPreviousYear(QCalendarWidgetH handle)209 void QCalendarWidget_showPreviousYear(QCalendarWidgetH handle)
210 {
211 ((QCalendarWidget *)handle)->showPreviousYear();
212 }
213
QCalendarWidget_showSelectedDate(QCalendarWidgetH handle)214 void QCalendarWidget_showSelectedDate(QCalendarWidgetH handle)
215 {
216 ((QCalendarWidget *)handle)->showSelectedDate();
217 }
218
QCalendarWidget_showToday(QCalendarWidgetH handle)219 void QCalendarWidget_showToday(QCalendarWidgetH handle)
220 {
221 ((QCalendarWidget *)handle)->showToday();
222 }
223
224