1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583
|
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qcalendarwidget.cpp -->
<title>Qt 4.8: QCalendarWidget Class Reference</title>
<link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
<div class="content">
<a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
</div>
<div class="breadcrumb toolblock">
<ul>
<li class="first"><a href="index.html">Home</a></li>
<!-- Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li><a href="qtgui.html">QtGui</a></li>
<li>QCalendarWidget</li>
</ul>
</div>
</div>
<div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#public-slots">Public Slots</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#protected-functions">Protected Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QCalendarWidget Class Reference</h1>
<!-- $$$QCalendarWidget-brief -->
<p>The QCalendarWidget class provides a monthly based calendar widget allowing the user to select a date. <a href="#details">More...</a></p>
<!-- @@@QCalendarWidget -->
<pre class="cpp"> <span class="preprocessor">#include <QCalendarWidget></span></pre><p><b>Inherits: </b><a href="qwidget.html">QWidget</a>.</p>
<p>This class was introduced in Qt 4.2.</p>
<ul>
<li><a href="qcalendarwidget-members.html">List of all members, including inherited members</a></li>
<li><a href="qcalendarwidget-obsolete.html">Obsolete members</a></li>
</ul>
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#HorizontalHeaderFormat-enum">HorizontalHeaderFormat</a></b> { SingleLetterDayNames, ShortDayNames, LongDayNames, NoHorizontalHeader }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#SelectionMode-enum">SelectionMode</a></b> { NoSelection, SingleSelection }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#VerticalHeaderFormat-enum">VerticalHeaderFormat</a></b> { ISOWeekNumbers, NoVerticalHeader }</td></tr>
</table>
<a name="properties"></a>
<h2>Properties</h2>
<table class="propsummary">
<tr><td class="topAlign"><ul>
<li class="fn"><b><a href="qcalendarwidget.html#dateEditAcceptDelay-prop">dateEditAcceptDelay</a></b> : int</li>
<li class="fn"><b><a href="qcalendarwidget.html#dateEditEnabled-prop">dateEditEnabled</a></b> : bool</li>
<li class="fn"><b><a href="qcalendarwidget.html#firstDayOfWeek-prop">firstDayOfWeek</a></b> : Qt::DayOfWeek</li>
<li class="fn"><b><a href="qcalendarwidget.html#gridVisible-prop">gridVisible</a></b> : bool</li>
<li class="fn"><b><a href="qcalendarwidget.html#horizontalHeaderFormat-prop">horizontalHeaderFormat</a></b> : HorizontalHeaderFormat</li>
<li class="fn"><b><a href="qcalendarwidget.html#maximumDate-prop">maximumDate</a></b> : QDate</li>
</ul></td><td class="topAlign"><ul>
<li class="fn"><b><a href="qcalendarwidget.html#minimumDate-prop">minimumDate</a></b> : QDate</li>
<li class="fn"><b><a href="qcalendarwidget.html#navigationBarVisible-prop">navigationBarVisible</a></b> : bool</li>
<li class="fn"><b><a href="qcalendarwidget.html#selectedDate-prop">selectedDate</a></b> : QDate</li>
<li class="fn"><b><a href="qcalendarwidget.html#selectionMode-prop">selectionMode</a></b> : SelectionMode</li>
<li class="fn"><b><a href="qcalendarwidget.html#verticalHeaderFormat-prop">verticalHeaderFormat</a></b> : VerticalHeaderFormat</li>
</ul>
</td></tr>
</table>
<ul>
<li class="fn">58 properties inherited from <a href="qwidget.html#properties">QWidget</a></li>
<li class="fn">1 property inherited from <a href="qobject.html#properties">QObject</a></li>
</ul>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#QCalendarWidget">QCalendarWidget</a></b> ( QWidget * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#dtor.QCalendarWidget">~QCalendarWidget</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#dateEditAcceptDelay-prop">dateEditAcceptDelay</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QMap<QDate, QTextCharFormat> </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#dateTextFormat">dateTextFormat</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTextCharFormat </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#dateTextFormat-2">dateTextFormat</a></b> ( const QDate & <i>date</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Qt::DayOfWeek </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#firstDayOfWeek-prop">firstDayOfWeek</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTextCharFormat </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#headerTextFormat">headerTextFormat</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> HorizontalHeaderFormat </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#horizontalHeaderFormat-prop">horizontalHeaderFormat</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#dateEditEnabled-prop">isDateEditEnabled</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#gridVisible-prop">isGridVisible</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#navigationBarVisible-prop">isNavigationBarVisible</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDate </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#maximumDate-prop">maximumDate</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDate </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#minimumDate-prop">minimumDate</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#monthShown">monthShown</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDate </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#selectedDate-prop">selectedDate</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> SelectionMode </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#selectionMode-prop">selectionMode</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#dateEditAcceptDelay-prop">setDateEditAcceptDelay</a></b> ( int <i>delay</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#dateEditEnabled-prop">setDateEditEnabled</a></b> ( bool <i>enable</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#setDateTextFormat">setDateTextFormat</a></b> ( const QDate & <i>date</i>, const QTextCharFormat & <i>format</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#firstDayOfWeek-prop">setFirstDayOfWeek</a></b> ( Qt::DayOfWeek <i>dayOfWeek</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#setHeaderTextFormat">setHeaderTextFormat</a></b> ( const QTextCharFormat & <i>format</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#horizontalHeaderFormat-prop">setHorizontalHeaderFormat</a></b> ( HorizontalHeaderFormat <i>format</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#maximumDate-prop">setMaximumDate</a></b> ( const QDate & <i>date</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#minimumDate-prop">setMinimumDate</a></b> ( const QDate & <i>date</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#selectionMode-prop">setSelectionMode</a></b> ( SelectionMode <i>mode</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#verticalHeaderFormat-prop">setVerticalHeaderFormat</a></b> ( VerticalHeaderFormat <i>format</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#setWeekdayTextFormat">setWeekdayTextFormat</a></b> ( Qt::DayOfWeek <i>dayOfWeek</i>, const QTextCharFormat & <i>format</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> VerticalHeaderFormat </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#verticalHeaderFormat-prop">verticalHeaderFormat</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTextCharFormat </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#weekdayTextFormat">weekdayTextFormat</a></b> ( Qt::DayOfWeek <i>dayOfWeek</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#yearShown">yearShown</a></b> () const</td></tr>
</table>
<a name="reimplemented-public-functions"></a>
<h2>Reimplemented Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual QSize </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#minimumSizeHint">minimumSizeHint</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QSize </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#sizeHint">sizeHint</a></b> () const</td></tr>
</table>
<ul>
<li class="fn">221 public functions inherited from <a href="qwidget.html#public-functions">QWidget</a></li>
<li class="fn">29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
<li class="fn">13 public functions inherited from <a href="qpaintdevice.html#public-functions">QPaintDevice</a></li>
</ul>
<a name="public-slots"></a>
<h2>Public Slots</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#setCurrentPage">setCurrentPage</a></b> ( int <i>year</i>, int <i>month</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#setDateRange">setDateRange</a></b> ( const QDate & <i>min</i>, const QDate & <i>max</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#gridVisible-prop">setGridVisible</a></b> ( bool <i>show</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#navigationBarVisible-prop">setNavigationBarVisible</a></b> ( bool <i>visible</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#selectedDate-prop">setSelectedDate</a></b> ( const QDate & <i>date</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#showNextMonth">showNextMonth</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#showNextYear">showNextYear</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#showPreviousMonth">showPreviousMonth</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#showPreviousYear">showPreviousYear</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#showSelectedDate">showSelectedDate</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#showToday">showToday</a></b> ()</td></tr>
</table>
<ul>
<li class="fn">19 public slots inherited from <a href="qwidget.html#public-slots">QWidget</a></li>
<li class="fn">1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
</ul>
<a name="signals"></a>
<h2>Signals</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#activated">activated</a></b> ( const QDate & <i>date</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#clicked">clicked</a></b> ( const QDate & <i>date</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#currentPageChanged">currentPageChanged</a></b> ( int <i>year</i>, int <i>month</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#selectionChanged">selectionChanged</a></b> ()</td></tr>
</table>
<ul>
<li class="fn">1 signal inherited from <a href="qwidget.html#signals">QWidget</a></li>
<li class="fn">1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
</ul>
<a name="protected-functions"></a>
<h2>Protected Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#paintCell">paintCell</a></b> ( QPainter * <i>painter</i>, const QRect & <i>rect</i>, const QDate & <i>date</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#updateCell">updateCell</a></b> ( const QDate & <i>date</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#updateCells">updateCells</a></b> ()</td></tr>
</table>
<a name="reimplemented-protected-functions"></a>
<h2>Reimplemented Protected Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#event">event</a></b> ( QEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#eventFilter">eventFilter</a></b> ( QObject * <i>watched</i>, QEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#keyPressEvent">keyPressEvent</a></b> ( QKeyEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#mousePressEvent">mousePressEvent</a></b> ( QMouseEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qcalendarwidget.html#resizeEvent">resizeEvent</a></b> ( QResizeEvent * <i>event</i> )</td></tr>
</table>
<ul>
<li class="fn">37 protected functions inherited from <a href="qwidget.html#protected-functions">QWidget</a></li>
<li class="fn">8 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
<li class="fn">1 protected function inherited from <a href="qpaintdevice.html#protected-functions">QPaintDevice</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">4 static public members inherited from <a href="qwidget.html#static-public-members">QWidget</a></li>
<li class="fn">7 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
<li class="fn">1 protected slot inherited from <a href="qwidget.html#protected-slots">QWidget</a></li>
</ul>
<a name="details"></a>
<!-- $$$QCalendarWidget-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QCalendarWidget class provides a monthly based calendar widget allowing the user to select a date.</p>
<p class="centerAlign"><img src="images/cleanlooks-calendarwidget.png" alt="" /></p><p>The widget is initialized with the current month and year, but QCalendarWidget provides several public slots to change the year and month that is shown.</p>
<p>By default, today's date is selected, and the user can select a date using both mouse and keyboard. The currently selected date can be retrieved using the <a href="qcalendarwidget.html#selectedDate-prop">selectedDate</a>() function. It is possible to constrain the user selection to a given date range by setting the <a href="qcalendarwidget.html#minimumDate-prop">minimumDate</a> and <a href="qcalendarwidget.html#maximumDate-prop">maximumDate</a> properties. Alternatively, both properties can be set in one go using the <a href="qcalendarwidget.html#setDateRange">setDateRange</a>() convenience slot. Set the <a href="qcalendarwidget.html#selectionMode-prop">selectionMode</a> property to <a href="qcalendarwidget.html#SelectionMode-enum">NoSelection</a> to prohibit the user from selecting at all. Note that a date also can be selected programmatically using the <a href="qcalendarwidget.html#selectedDate-prop">setSelectedDate</a>() slot.</p>
<p>The currently displayed month and year can be retrieved using the <a href="qcalendarwidget.html#monthShown">monthShown</a>() and <a href="qcalendarwidget.html#yearShown">yearShown</a>() functions, respectively.</p>
<p>A newly created calendar widget uses abbreviated day names, and both Saturdays and Sundays are marked in red. The calendar grid is not visible. The week numbers are displayed, and the first column day is Sunday.</p>
<p>The notation of the days can be altered to a single letter abbreviations ("M" for "Monday") by setting the <a href="qcalendarwidget.html#horizontalHeaderFormat-prop">horizontalHeaderFormat</a> property to <a href="qcalendarwidget.html#HorizontalHeaderFormat-enum">QCalendarWidget::SingleLetterDayNames</a>. Setting the same property to <a href="qcalendarwidget.html#HorizontalHeaderFormat-enum">QCalendarWidget::LongDayNames</a> makes the header display the complete day names. The week numbers can be removed by setting the <a href="qcalendarwidget.html#verticalHeaderFormat-prop">verticalHeaderFormat</a> property to <a href="qcalendarwidget.html#VerticalHeaderFormat-enum">QCalendarWidget::NoVerticalHeader</a>. The calendar grid can be turned on by setting the <a href="qcalendarwidget.html#gridVisible-prop">gridVisible</a> property to true using the <a href="qcalendarwidget.html#gridVisible-prop">setGridVisible</a>() function:</p>
<table class="generic">
<tr valign="top" class="odd"><td ><p class="centerAlign"><img src="images/qcalendarwidget-grid.png" alt="" /></p></td></tr>
<tr valign="top" class="even"><td ><pre class="cpp"> <span class="type">QCalendarWidget</span> <span class="operator">*</span>calendar;
calendar<span class="operator">-</span><span class="operator">></span><a href="qcalendarwidget.html#gridVisible-prop">setGridVisible</a>(<span class="keyword">true</span>);</pre>
</td></tr>
</table>
<p>Finally, the day in the first column can be altered using the <a href="qcalendarwidget.html#firstDayOfWeek-prop">setFirstDayOfWeek</a>() function.</p>
<p>The QCalendarWidget class also provides three signals, <a href="qcalendarwidget.html#selectionChanged">selectionChanged</a>(), <a href="qcalendarwidget.html#activated">activated</a>() and <a href="qcalendarwidget.html#currentPageChanged">currentPageChanged</a>() making it possible to respond to user interaction.</p>
<p>The rendering of the headers, weekdays or single days can be largely customized by setting <a href="qtextcharformat.html">QTextCharFormat</a>'s for some special weekday, a special date or for the rendering of the headers.</p>
<p>Only a subset of the properties in <a href="qtextcharformat.html">QTextCharFormat</a> are used by the calendar widget. Currently, the foreground, background and font properties are used to determine the rendering of individual cells in the widget.</p>
</div>
<p><b>See also </b><a href="qdate.html">QDate</a>, <a href="qdateedit.html">QDateEdit</a>, and <a href="qtextcharformat.html">QTextCharFormat</a>.</p>
<!-- @@@QCalendarWidget -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$HorizontalHeaderFormat$$$NoHorizontalHeader$$$SingleLetterDayNames$$$ShortDayNames$$$LongDayNames -->
<h3 class="fn"><a name="HorizontalHeaderFormat-enum"></a>enum QCalendarWidget::<span class="name">HorizontalHeaderFormat</span></h3>
<p>This enum type defines the various formats the horizontal header can display.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QCalendarWidget::SingleLetterDayNames</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">The header displays a single letter abbreviation for day names (e.g. M for Monday).</td></tr>
<tr><td class="topAlign"><tt>QCalendarWidget::ShortDayNames</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">The header displays a short abbreviation for day names (e.g. Mon for Monday).</td></tr>
<tr><td class="topAlign"><tt>QCalendarWidget::LongDayNames</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">The header displays complete day names (e.g. Monday).</td></tr>
<tr><td class="topAlign"><tt>QCalendarWidget::NoHorizontalHeader</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">The header is hidden.</td></tr>
</table>
<p><b>See also </b><a href="qcalendarwidget.html#horizontalHeaderFormat-prop">horizontalHeaderFormat</a>() and <a href="qcalendarwidget.html#VerticalHeaderFormat-enum">VerticalHeaderFormat</a>.</p>
<!-- @@@HorizontalHeaderFormat -->
<!-- $$$SelectionMode$$$NoSelection$$$SingleSelection -->
<h3 class="fn"><a name="SelectionMode-enum"></a>enum QCalendarWidget::<span class="name">SelectionMode</span></h3>
<p>This enum describes the types of selection offered to the user for selecting dates in the calendar.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QCalendarWidget::NoSelection</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">Dates cannot be selected.</td></tr>
<tr><td class="topAlign"><tt>QCalendarWidget::SingleSelection</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">Single dates can be selected.</td></tr>
</table>
<p><b>See also </b><a href="qcalendarwidget.html#selectionMode-prop">selectionMode</a>.</p>
<!-- @@@SelectionMode -->
<!-- $$$VerticalHeaderFormat$$$NoVerticalHeader$$$ISOWeekNumbers -->
<h3 class="fn"><a name="VerticalHeaderFormat-enum"></a>enum QCalendarWidget::<span class="name">VerticalHeaderFormat</span></h3>
<p>This enum type defines the various formats the vertical header can display.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QCalendarWidget::ISOWeekNumbers</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">The header displays ISO week numbers as described by <a href="qdate.html#weekNumber">QDate::weekNumber</a>().</td></tr>
<tr><td class="topAlign"><tt>QCalendarWidget::NoVerticalHeader</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">The header is hidden.</td></tr>
</table>
<p><b>See also </b><a href="qcalendarwidget.html#verticalHeaderFormat-prop">verticalHeaderFormat</a>() and <a href="qcalendarwidget.html#HorizontalHeaderFormat-enum">HorizontalHeaderFormat</a>.</p>
<!-- @@@VerticalHeaderFormat -->
</div>
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$dateEditAcceptDelay-prop$$$dateEditAcceptDelay$$$setDateEditAcceptDelayint -->
<h3 class="fn"><a name="dateEditAcceptDelay-prop"></a><span class="name">dateEditAcceptDelay</span> : <span class="type">int</span></h3>
<p>This property holds the time an inactive date edit is shown before its contents are accepted.</p>
<p>If the calendar widget's <a href="qcalendarwidget.html#dateEditEnabled-prop">date edit is enabled</a>, this property specifies the amount of time (in millseconds) that the date edit remains open after the most recent user input. Once this time has elapsed, the date specified in the date edit is accepted and the popup is closed.</p>
<p>By default, the delay is defined to be 1500 milliseconds (1.5 seconds).</p>
<p>This property was introduced in Qt 4.3.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><span class="name"><b>dateEditAcceptDelay</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setDateEditAcceptDelay</b></span> ( int <i>delay</i> )</td></tr>
</table>
<!-- @@@dateEditAcceptDelay -->
<!-- $$$dateEditEnabled-prop$$$isDateEditEnabled$$$setDateEditEnabledbool -->
<h3 class="fn"><a name="dateEditEnabled-prop"></a><span class="name">dateEditEnabled</span> : <span class="type">bool</span></h3>
<p>This property holds whether the date edit popup is enabled.</p>
<p>If this property is enabled, pressing a non-modifier key will cause a date edit to popup if the calendar widget has focus, allowing the user to specify a date in the form specified by the current locale.</p>
<p>By default, this property is enabled.</p>
<p>The date edit is simpler in appearance than <a href="qdateedit.html">QDateEdit</a>, but allows the user to navigate between fields using the left and right cursor keys, increment and decrement individual fields using the up and down cursor keys, and enter values directly using the number keys.</p>
<p>This property was introduced in Qt 4.3.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>isDateEditEnabled</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setDateEditEnabled</b></span> ( bool <i>enable</i> )</td></tr>
</table>
<p><b>See also </b><a href="qcalendarwidget.html#dateEditAcceptDelay-prop">QCalendarWidget::dateEditAcceptDelay</a>.</p>
<!-- @@@dateEditEnabled -->
<!-- $$$firstDayOfWeek-prop$$$firstDayOfWeek$$$setFirstDayOfWeekQt::DayOfWeek -->
<h3 class="fn"><a name="firstDayOfWeek-prop"></a><span class="name">firstDayOfWeek</span> : <span class="type"><a href="qt.html#DayOfWeek-enum">Qt::DayOfWeek</a></span></h3>
<p>This property holds a value identifying the day displayed in the first column.</p>
<p>By default, the day displayed in the first column is Sunday</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> Qt::DayOfWeek </td><td class="memItemRight bottomAlign"><span class="name"><b>firstDayOfWeek</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setFirstDayOfWeek</b></span> ( Qt::DayOfWeek <i>dayOfWeek</i> )</td></tr>
</table>
<!-- @@@firstDayOfWeek -->
<!-- $$$gridVisible-prop$$$isGridVisible$$$setGridVisiblebool -->
<h3 class="fn"><a name="gridVisible-prop"></a><span class="name">gridVisible</span> : <span class="type">bool</span></h3>
<p>This property holds whether the table grid is displayed.</p>
<table class="generic">
<tr valign="top" class="odd"><td ><img src="images/qcalendarwidget-grid.png" alt="" /></td></tr>
<tr valign="top" class="even"><td ><pre class="cpp"> <span class="type"><a href="qcalendarwidget.html">QCalendarWidget</a></span> <span class="operator">*</span>calendar;
calendar<span class="operator">-</span><span class="operator">></span>setGridVisible(<span class="keyword">true</span>);</pre>
</td></tr>
</table>
<p>The default value is false.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>isGridVisible</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setGridVisible</b></span> ( bool <i>show</i> )</td></tr>
</table>
<!-- @@@gridVisible -->
<!-- $$$horizontalHeaderFormat-prop$$$horizontalHeaderFormat$$$setHorizontalHeaderFormatHorizontalHeaderFormat -->
<h3 class="fn"><a name="horizontalHeaderFormat-prop"></a><span class="name">horizontalHeaderFormat</span> : <span class="type"><a href="qcalendarwidget.html#HorizontalHeaderFormat-enum">HorizontalHeaderFormat</a></span></h3>
<p>This property holds the format of the horizontal header.</p>
<p>The default value is <a href="qcalendarwidget.html#HorizontalHeaderFormat-enum">QCalendarWidget::ShortDayNames</a>.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> HorizontalHeaderFormat </td><td class="memItemRight bottomAlign"><span class="name"><b>horizontalHeaderFormat</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setHorizontalHeaderFormat</b></span> ( HorizontalHeaderFormat <i>format</i> )</td></tr>
</table>
<!-- @@@horizontalHeaderFormat -->
<!-- $$$maximumDate-prop$$$maximumDate$$$setMaximumDateconstQDate& -->
<h3 class="fn"><a name="maximumDate-prop"></a><span class="name">maximumDate</span> : <span class="type"><a href="qdate.html">QDate</a></span></h3>
<p>This property holds the maximum date of the currently specified date range.</p>
<p>The user will not be able to select a date which is after the currently set maximum date.</p>
<table class="generic">
<tr valign="top" class="odd"><td ><p class="centerAlign"><img src="images/qcalendarwidget-maximum.png" alt="" /></p></td></tr>
<tr valign="top" class="even"><td ><pre class="cpp"> <span class="type"><a href="qcalendarwidget.html">QCalendarWidget</a></span> <span class="operator">*</span>calendar;
calendar<span class="operator">-</span><span class="operator">></span><a href="qcalendarwidget.html#gridVisible-prop">setGridVisible</a>(<span class="keyword">true</span>);
calendar<span class="operator">-</span><span class="operator">></span>setMaximumDate(<span class="type"><a href="qdate.html">QDate</a></span>(<span class="number">2006</span><span class="operator">,</span> <span class="number">7</span><span class="operator">,</span> <span class="number">3</span>));</pre>
</td></tr>
</table>
<p>By default, the maximum date is the last day the <a href="qdate.html">QDate</a> class can handle.</p>
<p>When setting a maximum date, the <a href="qcalendarwidget.html#minimumDate-prop">minimumDate</a> and <a href="qcalendarwidget.html#selectedDate-prop">selectedDate</a> properties are adjusted if the selection range becomes invalid. If the provided date is not a valid <a href="qdate.html">QDate</a> object, the setMaximumDate() function does nothing.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QDate </td><td class="memItemRight bottomAlign"><span class="name"><b>maximumDate</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setMaximumDate</b></span> ( const QDate & <i>date</i> )</td></tr>
</table>
<p><b>See also </b><a href="qcalendarwidget.html#setDateRange">setDateRange</a>().</p>
<!-- @@@maximumDate -->
<!-- $$$minimumDate-prop$$$minimumDate$$$setMinimumDateconstQDate& -->
<h3 class="fn"><a name="minimumDate-prop"></a><span class="name">minimumDate</span> : <span class="type"><a href="qdate.html">QDate</a></span></h3>
<p>This property holds the minimum date of the currently specified date range.</p>
<p>The user will not be able to select a date that is before the currently set minimum date.</p>
<table class="generic">
<tr valign="top" class="odd"><td ><p class="centerAlign"><img src="images/qcalendarwidget-minimum.png" alt="" /></p></td></tr>
<tr valign="top" class="even"><td ><pre class="cpp"> <span class="type"><a href="qcalendarwidget.html">QCalendarWidget</a></span> <span class="operator">*</span>calendar;
calendar<span class="operator">-</span><span class="operator">></span><a href="qcalendarwidget.html#gridVisible-prop">setGridVisible</a>(<span class="keyword">true</span>);
calendar<span class="operator">-</span><span class="operator">></span>setMinimumDate(<span class="type"><a href="qdate.html">QDate</a></span>(<span class="number">2006</span><span class="operator">,</span> <span class="number">6</span><span class="operator">,</span> <span class="number">19</span>));</pre>
</td></tr>
</table>
<p>By default, the minimum date is the earliest date that the <a href="qdate.html">QDate</a> class can handle.</p>
<p>When setting a minimum date, the <a href="qcalendarwidget.html#maximumDate-prop">maximumDate</a> and <a href="qcalendarwidget.html#selectedDate-prop">selectedDate</a> properties are adjusted if the selection range becomes invalid. If the provided date is not a valid <a href="qdate.html">QDate</a> object, the setMinimumDate() function does nothing.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QDate </td><td class="memItemRight bottomAlign"><span class="name"><b>minimumDate</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setMinimumDate</b></span> ( const QDate & <i>date</i> )</td></tr>
</table>
<p><b>See also </b><a href="qcalendarwidget.html#setDateRange">setDateRange</a>().</p>
<!-- @@@minimumDate -->
<!-- $$$navigationBarVisible-prop$$$isNavigationBarVisible$$$setNavigationBarVisiblebool -->
<h3 class="fn"><a name="navigationBarVisible-prop"></a><span class="name">navigationBarVisible</span> : <span class="type">bool</span></h3>
<p>This property holds whether the navigation bar is shown or not.</p>
<p>When this property is true (the default), the next month, previous month, month selection, year selection controls are shown on top.</p>
<p>When the property is set to false, these controls are hidden.</p>
<p>This property was introduced in Qt 4.3.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>isNavigationBarVisible</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setNavigationBarVisible</b></span> ( bool <i>visible</i> )</td></tr>
</table>
<!-- @@@navigationBarVisible -->
<!-- $$$selectedDate-prop$$$selectedDate$$$setSelectedDateconstQDate& -->
<h3 class="fn"><a name="selectedDate-prop"></a><span class="name">selectedDate</span> : <span class="type"><a href="qdate.html">QDate</a></span></h3>
<p>This property holds the currently selected date.</p>
<p>The selected date must be within the date range specified by the <a href="qcalendarwidget.html#minimumDate-prop">minimumDate</a> and <a href="qcalendarwidget.html#maximumDate-prop">maximumDate</a> properties. By default, the selected date is the current date.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QDate </td><td class="memItemRight bottomAlign"><span class="name"><b>selectedDate</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setSelectedDate</b></span> ( const QDate & <i>date</i> )</td></tr>
</table>
<p><b>See also </b><a href="qcalendarwidget.html#setDateRange">setDateRange</a>().</p>
<!-- @@@selectedDate -->
<!-- $$$selectionMode-prop$$$selectionMode$$$setSelectionModeSelectionMode -->
<h3 class="fn"><a name="selectionMode-prop"></a><span class="name">selectionMode</span> : <span class="type"><a href="qcalendarwidget.html#SelectionMode-enum">SelectionMode</a></span></h3>
<p>This property holds the type of selection the user can make in the calendar.</p>
<p>When this property is set to <a href="qcalendarwidget.html#SelectionMode-enum">SingleSelection</a>, the user can select a date within the minimum and maximum allowed dates, using either the mouse or the keyboard.</p>
<p>When the property is set to <a href="qcalendarwidget.html#SelectionMode-enum">NoSelection</a>, the user will be unable to select dates, but they can still be selected programmatically. Note that the date that is selected when the property is set to <a href="qcalendarwidget.html#SelectionMode-enum">NoSelection</a> will still be the selected date of the calendar.</p>
<p>The default value is <a href="qcalendarwidget.html#SelectionMode-enum">SingleSelection</a>.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> SelectionMode </td><td class="memItemRight bottomAlign"><span class="name"><b>selectionMode</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setSelectionMode</b></span> ( SelectionMode <i>mode</i> )</td></tr>
</table>
<!-- @@@selectionMode -->
<!-- $$$verticalHeaderFormat-prop$$$verticalHeaderFormat$$$setVerticalHeaderFormatVerticalHeaderFormat -->
<h3 class="fn"><a name="verticalHeaderFormat-prop"></a><span class="name">verticalHeaderFormat</span> : <span class="type"><a href="qcalendarwidget.html#VerticalHeaderFormat-enum">VerticalHeaderFormat</a></span></h3>
<p>This property holds the format of the vertical header.</p>
<p>The default value is QCalendarWidget::ISOWeekNumber.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> VerticalHeaderFormat </td><td class="memItemRight bottomAlign"><span class="name"><b>verticalHeaderFormat</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setVerticalHeaderFormat</b></span> ( VerticalHeaderFormat <i>format</i> )</td></tr>
</table>
<!-- @@@verticalHeaderFormat -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QCalendarWidget[overload1]$$$QCalendarWidgetQWidget* -->
<h3 class="fn"><a name="QCalendarWidget"></a>QCalendarWidget::<span class="name">QCalendarWidget</span> ( <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>parent</i> = 0 )</h3>
<p>Constructs a calendar widget with the given <i>parent</i>.</p>
<p>The widget is initialized with the current month and year, and the currently selected date is today.</p>
<p><b>See also </b><a href="qcalendarwidget.html#setCurrentPage">setCurrentPage</a>().</p>
<!-- @@@QCalendarWidget -->
<!-- $$$~QCalendarWidget[overload1]$$$~QCalendarWidget -->
<h3 class="fn"><a name="dtor.QCalendarWidget"></a>QCalendarWidget::<span class="name">~QCalendarWidget</span> ()</h3>
<p>Destroys the calendar widget.</p>
<!-- @@@~QCalendarWidget -->
<!-- $$$activated[overload1]$$$activatedconstQDate& -->
<h3 class="fn"><a name="activated"></a><span class="type">void</span> QCalendarWidget::<span class="name">activated</span> ( const <span class="type"><a href="qdate.html">QDate</a></span> & <i>date</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted whenever the user presses the Return or Enter key or double-clicks a <i>date</i> in the calendar widget.</p>
<!-- @@@activated -->
<!-- $$$clicked[overload1]$$$clickedconstQDate& -->
<h3 class="fn"><a name="clicked"></a><span class="type">void</span> QCalendarWidget::<span class="name">clicked</span> ( const <span class="type"><a href="qdate.html">QDate</a></span> & <i>date</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when a mouse button is clicked. The date the mouse was clicked on is specified by <i>date</i>. The signal is only emitted when clicked on a valid date, e.g., dates are not outside the <a href="qcalendarwidget.html#minimumDate-prop">minimumDate</a>() and <a href="qcalendarwidget.html#maximumDate-prop">maximumDate</a>(). If the selection mode is <a href="qcalendarwidget.html#SelectionMode-enum">NoSelection</a>, this signal will not be emitted.</p>
<!-- @@@clicked -->
<!-- $$$currentPageChanged[overload1]$$$currentPageChangedintint -->
<h3 class="fn"><a name="currentPageChanged"></a><span class="type">void</span> QCalendarWidget::<span class="name">currentPageChanged</span> ( <span class="type">int</span> <i>year</i>, <span class="type">int</span> <i>month</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when the currently shown month is changed. The new <i>year</i> and <i>month</i> are passed as parameters.</p>
<p><b>See also </b><a href="qcalendarwidget.html#setCurrentPage">setCurrentPage</a>().</p>
<!-- @@@currentPageChanged -->
<!-- $$$dateTextFormat[overload1]$$$dateTextFormat -->
<h3 class="fn"><a name="dateTextFormat"></a><span class="type"><a href="qmap.html">QMap</a></span><<span class="type"><a href="qdate.html">QDate</a></span>, <span class="type"><a href="qtextcharformat.html">QTextCharFormat</a></span>> QCalendarWidget::<span class="name">dateTextFormat</span> () const</h3>
<p>Returns a <a href="qmap.html">QMap</a> from <a href="qdate.html">QDate</a> to <a href="qtextcharformat.html">QTextCharFormat</a> showing all dates that use a special format that alters their rendering.</p>
<p><b>See also </b><a href="qcalendarwidget.html#setDateTextFormat">setDateTextFormat</a>().</p>
<!-- @@@dateTextFormat -->
<!-- $$$dateTextFormat$$$dateTextFormatconstQDate& -->
<h3 class="fn"><a name="dateTextFormat-2"></a><span class="type"><a href="qtextcharformat.html">QTextCharFormat</a></span> QCalendarWidget::<span class="name">dateTextFormat</span> ( const <span class="type"><a href="qdate.html">QDate</a></span> & <i>date</i> ) const</h3>
<p>Returns a <a href="qtextcharformat.html">QTextCharFormat</a> for <i>date</i>. The char format can be be empty if the date is not renderd specially.</p>
<!-- @@@dateTextFormat -->
<!-- $$$event[overload1]$$$eventQEvent* -->
<h3 class="fn"><a name="event"></a><span class="type">bool</span> QCalendarWidget::<span class="name">event</span> ( <span class="type"><a href="qevent.html">QEvent</a></span> * <i>event</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qobject.html#event">QObject::event</a>().</p>
<!-- @@@event -->
<!-- $$$eventFilter[overload1]$$$eventFilterQObject*QEvent* -->
<h3 class="fn"><a name="eventFilter"></a><span class="type">bool</span> QCalendarWidget::<span class="name">eventFilter</span> ( <span class="type"><a href="qobject.html">QObject</a></span> * <i>watched</i>, <span class="type"><a href="qevent.html">QEvent</a></span> * <i>event</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qobject.html#eventFilter">QObject::eventFilter</a>().</p>
<!-- @@@eventFilter -->
<!-- $$$headerTextFormat[overload1]$$$headerTextFormat -->
<h3 class="fn"><a name="headerTextFormat"></a><span class="type"><a href="qtextcharformat.html">QTextCharFormat</a></span> QCalendarWidget::<span class="name">headerTextFormat</span> () const</h3>
<p>Returns the text char format for rendering the header.</p>
<p><b>See also </b><a href="qcalendarwidget.html#setHeaderTextFormat">setHeaderTextFormat</a>().</p>
<!-- @@@headerTextFormat -->
<!-- $$$keyPressEvent[overload1]$$$keyPressEventQKeyEvent* -->
<h3 class="fn"><a name="keyPressEvent"></a><span class="type">void</span> QCalendarWidget::<span class="name">keyPressEvent</span> ( <span class="type"><a href="qkeyevent.html">QKeyEvent</a></span> * <i>event</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#keyPressEvent">QWidget::keyPressEvent</a>().</p>
<!-- @@@keyPressEvent -->
<!-- $$$minimumSizeHint[overload1]$$$minimumSizeHint -->
<h3 class="fn"><a name="minimumSizeHint"></a><span class="type"><a href="qsize.html">QSize</a></span> QCalendarWidget::<span class="name">minimumSizeHint</span> () const<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#minimumSizeHint-prop">QWidget::minimumSizeHint</a>().</p>
<!-- @@@minimumSizeHint -->
<!-- $$$monthShown[overload1]$$$monthShown -->
<h3 class="fn"><a name="monthShown"></a><span class="type">int</span> QCalendarWidget::<span class="name">monthShown</span> () const</h3>
<p>Returns the currently displayed month. Months are numbered from 1 to 12.</p>
<p><b>See also </b><a href="qcalendarwidget.html#yearShown">yearShown</a>() and <a href="qcalendarwidget.html#setCurrentPage">setCurrentPage</a>().</p>
<!-- @@@monthShown -->
<!-- $$$mousePressEvent[overload1]$$$mousePressEventQMouseEvent* -->
<h3 class="fn"><a name="mousePressEvent"></a><span class="type">void</span> QCalendarWidget::<span class="name">mousePressEvent</span> ( <span class="type"><a href="qmouseevent.html">QMouseEvent</a></span> * <i>event</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#mousePressEvent">QWidget::mousePressEvent</a>().</p>
<!-- @@@mousePressEvent -->
<!-- $$$paintCell[overload1]$$$paintCellQPainter*constQRect&constQDate& -->
<h3 class="fn"><a name="paintCell"></a><span class="type">void</span> QCalendarWidget::<span class="name">paintCell</span> ( <span class="type"><a href="qpainter.html">QPainter</a></span> * <i>painter</i>, const <span class="type"><a href="qrect.html">QRect</a></span> & <i>rect</i>, const <span class="type"><a href="qdate.html">QDate</a></span> & <i>date</i> ) const<tt> [virtual protected]</tt></h3>
<p>Paints the cell specified by the given <i>date</i>, using the given <i>painter</i> and <i>rect</i>.</p>
<!-- @@@paintCell -->
<!-- $$$resizeEvent[overload1]$$$resizeEventQResizeEvent* -->
<h3 class="fn"><a name="resizeEvent"></a><span class="type">void</span> QCalendarWidget::<span class="name">resizeEvent</span> ( <span class="type"><a href="qresizeevent.html">QResizeEvent</a></span> * <i>event</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#resizeEvent">QWidget::resizeEvent</a>().</p>
<!-- @@@resizeEvent -->
<!-- $$$selectionChanged[overload1]$$$selectionChanged -->
<h3 class="fn"><a name="selectionChanged"></a><span class="type">void</span> QCalendarWidget::<span class="name">selectionChanged</span> ()<tt> [signal]</tt></h3>
<p>This signal is emitted when the currently selected date is changed.</p>
<p>The currently selected date can be changed by the user using the mouse or keyboard, or by the programmer using <a href="qcalendarwidget.html#selectedDate-prop">setSelectedDate</a>().</p>
<p><b>See also </b><a href="qcalendarwidget.html#selectedDate-prop">selectedDate</a>().</p>
<!-- @@@selectionChanged -->
<!-- $$$setCurrentPage[overload1]$$$setCurrentPageintint -->
<h3 class="fn"><a name="setCurrentPage"></a><span class="type">void</span> QCalendarWidget::<span class="name">setCurrentPage</span> ( <span class="type">int</span> <i>year</i>, <span class="type">int</span> <i>month</i> )<tt> [slot]</tt></h3>
<p>Displays the given <i>month</i> of the given <i>year</i> without changing the selected date. Use the <a href="qcalendarwidget.html#selectedDate-prop">setSelectedDate</a>() function to alter the selected date.</p>
<p>The currently displayed month and year can be retrieved using the <a href="qcalendarwidget.html#monthShown">monthShown</a>() and <a href="qcalendarwidget.html#yearShown">yearShown</a>() functions respectively.</p>
<p><b>See also </b><a href="qcalendarwidget.html#yearShown">yearShown</a>(), <a href="qcalendarwidget.html#monthShown">monthShown</a>(), <a href="qcalendarwidget.html#showPreviousMonth">showPreviousMonth</a>(), <a href="qcalendarwidget.html#showNextMonth">showNextMonth</a>(), <a href="qcalendarwidget.html#showPreviousYear">showPreviousYear</a>(), and <a href="qcalendarwidget.html#showNextYear">showNextYear</a>().</p>
<!-- @@@setCurrentPage -->
<!-- $$$setDateRange[overload1]$$$setDateRangeconstQDate&constQDate& -->
<h3 class="fn"><a name="setDateRange"></a><span class="type">void</span> QCalendarWidget::<span class="name">setDateRange</span> ( const <span class="type"><a href="qdate.html">QDate</a></span> & <i>min</i>, const <span class="type"><a href="qdate.html">QDate</a></span> & <i>max</i> )<tt> [slot]</tt></h3>
<p>Defines a date range by setting the <a href="qcalendarwidget.html#minimumDate-prop">minimumDate</a> and <a href="qcalendarwidget.html#maximumDate-prop">maximumDate</a> properties.</p>
<p>The date range restricts the user selection, i.e. the user can only select dates within the specified date range. Note that</p>
<pre class="cpp"> <span class="type"><a href="qcalendarwidget.html">QCalendarWidget</a></span> <span class="operator">*</span>calendar;
calendar<span class="operator">-</span><span class="operator">></span>setDateRange(min<span class="operator">,</span> max);</pre>
<p>is analogous to</p>
<pre class="cpp"> <span class="type"><a href="qcalendarwidget.html">QCalendarWidget</a></span> <span class="operator">*</span>calendar;
calendar<span class="operator">-</span><span class="operator">></span><a href="qcalendarwidget.html#minimumDate-prop">setMinimumDate</a>(min);
calendar<span class="operator">-</span><span class="operator">></span><a href="qcalendarwidget.html#maximumDate-prop">setMaximumDate</a>(max);</pre>
<p>If either the <i>min</i> or <i>max</i> parameters are not valid <a href="qdate.html">QDate</a> objects, this function does nothing.</p>
<p><b>See also </b><a href="qcalendarwidget.html#minimumDate-prop">setMinimumDate</a>() and <a href="qcalendarwidget.html#maximumDate-prop">setMaximumDate</a>().</p>
<!-- @@@setDateRange -->
<!-- $$$setDateTextFormat[overload1]$$$setDateTextFormatconstQDate&constQTextCharFormat& -->
<h3 class="fn"><a name="setDateTextFormat"></a><span class="type">void</span> QCalendarWidget::<span class="name">setDateTextFormat</span> ( const <span class="type"><a href="qdate.html">QDate</a></span> & <i>date</i>, const <span class="type"><a href="qtextcharformat.html">QTextCharFormat</a></span> & <i>format</i> )</h3>
<p>Sets the format used to render the given <i>date</i> to that specified by <i>format</i>.</p>
<p>If <i>date</i> is null, all date formats are cleared.</p>
<p><b>See also </b><a href="qcalendarwidget.html#dateTextFormat">dateTextFormat</a>().</p>
<!-- @@@setDateTextFormat -->
<!-- $$$setHeaderTextFormat[overload1]$$$setHeaderTextFormatconstQTextCharFormat& -->
<h3 class="fn"><a name="setHeaderTextFormat"></a><span class="type">void</span> QCalendarWidget::<span class="name">setHeaderTextFormat</span> ( const <span class="type"><a href="qtextcharformat.html">QTextCharFormat</a></span> & <i>format</i> )</h3>
<p>Sets the text char format for rendering the header to <i>format</i>. If you also set a weekday text format, this format's foreground and background color will take precedence over the header's format. The other formatting information will still be decided by the header's format.</p>
<p><b>See also </b><a href="qcalendarwidget.html#headerTextFormat">headerTextFormat</a>().</p>
<!-- @@@setHeaderTextFormat -->
<!-- $$$setWeekdayTextFormat[overload1]$$$setWeekdayTextFormatQt::DayOfWeekconstQTextCharFormat& -->
<h3 class="fn"><a name="setWeekdayTextFormat"></a><span class="type">void</span> QCalendarWidget::<span class="name">setWeekdayTextFormat</span> ( <span class="type"><a href="qt.html#DayOfWeek-enum">Qt::DayOfWeek</a></span> <i>dayOfWeek</i>, const <span class="type"><a href="qtextcharformat.html">QTextCharFormat</a></span> & <i>format</i> )</h3>
<p>Sets the text char format for rendering of day in the week <i>dayOfWeek</i> to <i>format</i>. The format will take precedence over the header format in case of foreground and background color. Other text formatting information is taken from the headers format.</p>
<p><b>See also </b><a href="qcalendarwidget.html#weekdayTextFormat">weekdayTextFormat</a>() and <a href="qcalendarwidget.html#setHeaderTextFormat">setHeaderTextFormat</a>().</p>
<!-- @@@setWeekdayTextFormat -->
<!-- $$$showNextMonth[overload1]$$$showNextMonth -->
<h3 class="fn"><a name="showNextMonth"></a><span class="type">void</span> QCalendarWidget::<span class="name">showNextMonth</span> ()<tt> [slot]</tt></h3>
<p>Shows the next month relative to the currently displayed month. Note that the selected date is not changed.</p>
<p><b>See also </b><a href="qcalendarwidget.html#showPreviousMonth">showPreviousMonth</a>(), <a href="qcalendarwidget.html#setCurrentPage">setCurrentPage</a>(), and <a href="qcalendarwidget.html#selectedDate-prop">setSelectedDate</a>().</p>
<!-- @@@showNextMonth -->
<!-- $$$showNextYear[overload1]$$$showNextYear -->
<h3 class="fn"><a name="showNextYear"></a><span class="type">void</span> QCalendarWidget::<span class="name">showNextYear</span> ()<tt> [slot]</tt></h3>
<p>Shows the currently displayed month in the <i>next</i> year relative to the currently displayed year. Note that the selected date is not changed.</p>
<p><b>See also </b><a href="qcalendarwidget.html#showPreviousYear">showPreviousYear</a>(), <a href="qcalendarwidget.html#setCurrentPage">setCurrentPage</a>(), and <a href="qcalendarwidget.html#selectedDate-prop">setSelectedDate</a>().</p>
<!-- @@@showNextYear -->
<!-- $$$showPreviousMonth[overload1]$$$showPreviousMonth -->
<h3 class="fn"><a name="showPreviousMonth"></a><span class="type">void</span> QCalendarWidget::<span class="name">showPreviousMonth</span> ()<tt> [slot]</tt></h3>
<p>Shows the previous month relative to the currently displayed month. Note that the selected date is not changed.</p>
<p><b>See also </b><a href="qcalendarwidget.html#showNextMonth">showNextMonth</a>(), <a href="qcalendarwidget.html#setCurrentPage">setCurrentPage</a>(), and <a href="qcalendarwidget.html#selectedDate-prop">setSelectedDate</a>().</p>
<!-- @@@showPreviousMonth -->
<!-- $$$showPreviousYear[overload1]$$$showPreviousYear -->
<h3 class="fn"><a name="showPreviousYear"></a><span class="type">void</span> QCalendarWidget::<span class="name">showPreviousYear</span> ()<tt> [slot]</tt></h3>
<p>Shows the currently displayed month in the <i>previous</i> year relative to the currently displayed year. Note that the selected date is not changed.</p>
<p><b>See also </b><a href="qcalendarwidget.html#showNextYear">showNextYear</a>(), <a href="qcalendarwidget.html#setCurrentPage">setCurrentPage</a>(), and <a href="qcalendarwidget.html#selectedDate-prop">setSelectedDate</a>().</p>
<!-- @@@showPreviousYear -->
<!-- $$$showSelectedDate[overload1]$$$showSelectedDate -->
<h3 class="fn"><a name="showSelectedDate"></a><span class="type">void</span> QCalendarWidget::<span class="name">showSelectedDate</span> ()<tt> [slot]</tt></h3>
<p>Shows the month of the selected date.</p>
<p><b>See also </b><a href="qcalendarwidget.html#selectedDate-prop">selectedDate</a>() and <a href="qcalendarwidget.html#setCurrentPage">setCurrentPage</a>().</p>
<!-- @@@showSelectedDate -->
<!-- $$$showToday[overload1]$$$showToday -->
<h3 class="fn"><a name="showToday"></a><span class="type">void</span> QCalendarWidget::<span class="name">showToday</span> ()<tt> [slot]</tt></h3>
<p>Shows the month of the today's date.</p>
<p><b>See also </b><a href="qcalendarwidget.html#selectedDate-prop">selectedDate</a>() and <a href="qcalendarwidget.html#setCurrentPage">setCurrentPage</a>().</p>
<!-- @@@showToday -->
<!-- $$$sizeHint[overload1]$$$sizeHint -->
<h3 class="fn"><a name="sizeHint"></a><span class="type"><a href="qsize.html">QSize</a></span> QCalendarWidget::<span class="name">sizeHint</span> () const<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#sizeHint-prop">QWidget::sizeHint</a>().</p>
<!-- @@@sizeHint -->
<!-- $$$updateCell[overload1]$$$updateCellconstQDate& -->
<h3 class="fn"><a name="updateCell"></a><span class="type">void</span> QCalendarWidget::<span class="name">updateCell</span> ( const <span class="type"><a href="qdate.html">QDate</a></span> & <i>date</i> )<tt> [protected]</tt></h3>
<p>Updates the cell specified by the given <i>date</i> unless updates are disabled or the cell is hidden.</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also </b><a href="qcalendarwidget.html#updateCells">updateCells</a>(), <a href="qcalendarwidget.html#yearShown">yearShown</a>(), and <a href="qcalendarwidget.html#monthShown">monthShown</a>().</p>
<!-- @@@updateCell -->
<!-- $$$updateCells[overload1]$$$updateCells -->
<h3 class="fn"><a name="updateCells"></a><span class="type">void</span> QCalendarWidget::<span class="name">updateCells</span> ()<tt> [protected]</tt></h3>
<p>Updates all visible cells unless updates are disabled.</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also </b><a href="qcalendarwidget.html#updateCell">updateCell</a>().</p>
<!-- @@@updateCells -->
<!-- $$$weekdayTextFormat[overload1]$$$weekdayTextFormatQt::DayOfWeek -->
<h3 class="fn"><a name="weekdayTextFormat"></a><span class="type"><a href="qtextcharformat.html">QTextCharFormat</a></span> QCalendarWidget::<span class="name">weekdayTextFormat</span> ( <span class="type"><a href="qt.html#DayOfWeek-enum">Qt::DayOfWeek</a></span> <i>dayOfWeek</i> ) const</h3>
<p>Returns the text char format for rendering of day in the week <i>dayOfWeek</i>.</p>
<p><b>See also </b><a href="qcalendarwidget.html#setWeekdayTextFormat">setWeekdayTextFormat</a>() and <a href="qcalendarwidget.html#headerTextFormat">headerTextFormat</a>().</p>
<!-- @@@weekdayTextFormat -->
<!-- $$$yearShown[overload1]$$$yearShown -->
<h3 class="fn"><a name="yearShown"></a><span class="type">int</span> QCalendarWidget::<span class="name">yearShown</span> () const</h3>
<p>Returns the year of the currently displayed month. Months are numbered from 1 to 12.</p>
<p><b>See also </b><a href="qcalendarwidget.html#monthShown">monthShown</a>() and <a href="qcalendarwidget.html#setCurrentPage">setCurrentPage</a>().</p>
<!-- @@@yearShown -->
</div>
<div class="ft">
<span></span>
</div>
</div>
<div class="footer">
<p>
<acronym title="Copyright">©</acronym> 2012 Nokia Corporation and/or its
subsidiaries. Documentation contributions included herein are the copyrights of
their respective owners.</p>
<br />
<p>
The documentation provided herein is licensed under the terms of the
<a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation
License version 1.3</a> as published by the Free Software Foundation.</p>
<p>
Documentation sources may be obtained from <a href="http://www.qt-project.org">
www.qt-project.org</a>.</p>
<br />
<p>
Nokia, Qt and their respective logos are trademarks of Nokia Corporation
in Finland and/or other countries worldwide. All other trademarks are property
of their respective owners. <a title="Privacy Policy"
href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
</div>
</body>
</html>
|