• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeui
 

tdeui

  • tdeui
kdatepicker.cpp
1/*
2 This file is part of the KDE libraries
3 Copyright (C) 1997 Tim D. Gilman (tdgilman@best.org)
4 (C) 1998-2001 Mirko Boehm (mirko@kde.org)
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/
20
21#include <tqlayout.h>
22#include <tqframe.h>
23#include <tqpainter.h>
24#include <tqdialog.h>
25#include <tqstyle.h>
26#include <tqtoolbutton.h>
27#include <tqcombobox.h>
28#include <tqtooltip.h>
29#include <tqfont.h>
30#include <tqvalidator.h>
31#include <tqpopupmenu.h>
32#include <tqtimer.h>
33
34#include "kdatepicker.h"
35#include <tdeglobal.h>
36#include <tdeapplication.h>
37#include <kdialog.h>
38#include <tdelocale.h>
39#include <kiconloader.h>
40#include <tdetoolbar.h>
41#include <klineedit.h>
42#include <kdebug.h>
43#include <knotifyclient.h>
44#include <kcalendarsystem.h>
45
46#include "kdatetbl.h"
47#include "kdatepicker.moc"
48
49// Week numbers are defined by ISO 8601
50// See http://www.merlyn.demon.co.uk/weekinfo.htm for details
51
52class KDatePicker::KDatePickerPrivate
53{
54public:
55 KDatePickerPrivate() : closeButton(0L), selectWeek(0L), todayButton(0), navigationLayout(0) {}
56
57 void fillWeeksCombo(const TQDate &date);
58
59 TQToolButton *closeButton;
60 TQComboBox *selectWeek;
61 TQToolButton *todayButton;
62 TQBoxLayout *navigationLayout;
63};
64
65void KDatePicker::fillWeeksCombo(const TQDate &date)
66{
67 // every year can have a different number of weeks
68 const KCalendarSystem * calendar = TDEGlobal::locale()->calendar();
69
70 // it could be that we had 53,1..52 and now 1..53 which is the same number but different
71 // so always fill with new values
72
73 d->selectWeek->clear();
74
75 // We show all week numbers for all weeks between first day of year to last day of year
76 // This of course can be a list like 53,1,2..52
77
78 TQDate day;
79 int year = calendar->year(date);
80 calendar->setYMD(day, year, 1, 1);
81 int lastMonth = calendar->monthsInYear(day);
82 TQDate lastDay, firstDayOfLastMonth;
83 calendar->setYMD(firstDayOfLastMonth, year, lastMonth, 1);
84 calendar->setYMD(lastDay, year, lastMonth, calendar->daysInMonth(firstDayOfLastMonth));
85
86 for (; day <= lastDay ; day = calendar->addDays(day, 7 /*calendar->daysOfWeek()*/) )
87 {
88 TQString week = i18n("Week %1").arg(calendar->weekNumber(day, &year));
89 if ( year != calendar->year(day) ) week += "*"; // show that this is a week from a different year
90 d->selectWeek->insertItem(week);
91
92 // make sure that the week of the lastDay is always inserted: in Chinese calendar
93 // system, this is not always the case
94 if(day < lastDay && day.daysTo(lastDay) < 7 && calendar->weekNumber(day) != calendar->weekNumber(lastDay))
95 day = lastDay.addDays(-7);
96 }
97}
98
99KDatePicker::KDatePicker(TQWidget *parent, TQDate dt, const char *name)
100 : TQFrame(parent,name)
101{
102 init( dt );
103}
104
105KDatePicker::KDatePicker(TQWidget *parent, TQDate dt, const char *name, WFlags f)
106 : TQFrame(parent,name, f)
107{
108 init( dt );
109}
110
111KDatePicker::KDatePicker( TQWidget *parent, const char *name )
112 : TQFrame(parent,name)
113{
114 init( TQDate::currentDate() );
115}
116
117void KDatePicker::init( const TQDate &dt )
118{
119 d = new KDatePickerPrivate();
120
121 TQBoxLayout * topLayout = new TQVBoxLayout(this);
122
123 d->navigationLayout = new TQHBoxLayout(topLayout);
124 d->navigationLayout->addStretch();
125 yearBackward = new TQToolButton(this);
126 yearBackward->setAutoRaise(true);
127 d->navigationLayout->addWidget(yearBackward);
128 monthBackward = new TQToolButton(this);
129 monthBackward ->setAutoRaise(true);
130 d->navigationLayout->addWidget(monthBackward);
131 d->navigationLayout->addSpacing(KDialog::spacingHint());
132
133 selectMonth = new TQToolButton(this);
134 selectMonth ->setAutoRaise(true);
135 d->navigationLayout->addWidget(selectMonth);
136 selectYear = new TQToolButton(this);
137 selectYear->setToggleButton(true);
138 selectYear->setAutoRaise(true);
139 d->navigationLayout->addWidget(selectYear);
140 d->navigationLayout->addSpacing(KDialog::spacingHint());
141
142 monthForward = new TQToolButton(this);
143 monthForward ->setAutoRaise(true);
144 d->navigationLayout->addWidget(monthForward);
145 yearForward = new TQToolButton(this);
146 yearForward ->setAutoRaise(true);
147 d->navigationLayout->addWidget(yearForward);
148 d->navigationLayout->addStretch();
149
150 line = new KLineEdit(this);
151 val = new KDateValidator(this);
152 table = new KDateTable(this);
153 fontsize = TDEGlobalSettings::generalFont().pointSize();
154 if (fontsize == -1)
155 fontsize = TQFontInfo(TDEGlobalSettings::generalFont()).pointSize();
156
157 fontsize++; // Make a little bigger
158
159 d->selectWeek = new TQComboBox(false, this); // read only week selection
160 d->todayButton = new TQToolButton(this);
161 d->todayButton->setIconSet(SmallIconSet("today"));
162
163 TQToolTip::add(yearForward, i18n("Next year"));
164 TQToolTip::add(yearBackward, i18n("Previous year"));
165 TQToolTip::add(monthForward, i18n("Next month"));
166 TQToolTip::add(monthBackward, i18n("Previous month"));
167 TQToolTip::add(d->selectWeek, i18n("Select a week"));
168 TQToolTip::add(selectMonth, i18n("Select a month"));
169 TQToolTip::add(selectYear, i18n("Select a year"));
170 TQToolTip::add(d->todayButton, i18n("Select the current day"));
171
172 // -----
173 setFontSize(fontsize);
174 line->setValidator(val);
175 line->installEventFilter( this );
176 if ( TQApplication::reverseLayout() )
177 {
178 yearForward->setIconSet(BarIconSet(TQString::fromLatin1("2leftarrow")));
179 yearBackward->setIconSet(BarIconSet(TQString::fromLatin1("2rightarrow")));
180 monthForward->setIconSet(BarIconSet(TQString::fromLatin1("1leftarrow")));
181 monthBackward->setIconSet(BarIconSet(TQString::fromLatin1("1rightarrow")));
182 }
183 else
184 {
185 yearForward->setIconSet(BarIconSet(TQString::fromLatin1("2rightarrow")));
186 yearBackward->setIconSet(BarIconSet(TQString::fromLatin1("2leftarrow")));
187 monthForward->setIconSet(BarIconSet(TQString::fromLatin1("1rightarrow")));
188 monthBackward->setIconSet(BarIconSet(TQString::fromLatin1("1leftarrow")));
189 }
190 connect(table, TQ_SIGNAL(dateChanged(TQDate)), TQ_SLOT(dateChangedSlot(TQDate)));
191 connect(table, TQ_SIGNAL(tableClicked()), TQ_SLOT(tableClickedSlot()));
192 connect(monthForward, TQ_SIGNAL(clicked()), TQ_SLOT(monthForwardClicked()));
193 connect(monthBackward, TQ_SIGNAL(clicked()), TQ_SLOT(monthBackwardClicked()));
194 connect(yearForward, TQ_SIGNAL(clicked()), TQ_SLOT(yearForwardClicked()));
195 connect(yearBackward, TQ_SIGNAL(clicked()), TQ_SLOT(yearBackwardClicked()));
196 connect(d->selectWeek, TQ_SIGNAL(activated(int)), TQ_SLOT(weekSelected(int)));
197 connect(d->todayButton, TQ_SIGNAL(clicked()), TQ_SLOT(todayButtonClicked()));
198 connect(selectMonth, TQ_SIGNAL(clicked()), TQ_SLOT(selectMonthClicked()));
199 connect(selectYear, TQ_SIGNAL(toggled(bool)), TQ_SLOT(selectYearClicked()));
200 connect(line, TQ_SIGNAL(returnPressed()), TQ_SLOT(lineEnterPressed()));
201 table->setFocus();
202
203
204 topLayout->addWidget(table);
205
206 TQBoxLayout * bottomLayout = new TQHBoxLayout(topLayout);
207 bottomLayout->addWidget(d->todayButton);
208 bottomLayout->addWidget(line);
209 bottomLayout->addWidget(d->selectWeek);
210
211 table->setDate(dt);
212 dateChangedSlot(dt); // needed because table emits changed only when newDate != oldDate
213}
214
215KDatePicker::~KDatePicker()
216{
217 delete d;
218}
219
220bool
221KDatePicker::eventFilter(TQObject *o, TQEvent *e )
222{
223 if ( e->type() == TQEvent::KeyPress ) {
224 TQKeyEvent *k = (TQKeyEvent *)e;
225
226 if ( (k->key() == TQt::Key_Prior) ||
227 (k->key() == TQt::Key_Next) ||
228 (k->key() == TQt::Key_Up) ||
229 (k->key() == TQt::Key_Down) )
230 {
231 TQApplication::sendEvent( table, e );
232 table->setFocus();
233 return true; // eat event
234 }
235 }
236 return TQFrame::eventFilter( o, e );
237}
238
239void
240KDatePicker::resizeEvent(TQResizeEvent* e)
241{
242 TQWidget::resizeEvent(e);
243}
244
245void
246KDatePicker::dateChangedSlot(TQDate date)
247{
248 kdDebug(298) << "KDatePicker::dateChangedSlot: date changed (" << date.year() << "/" << date.month() << "/" << date.day() << ")." << endl;
249
250 const KCalendarSystem * calendar = TDEGlobal::locale()->calendar();
251
252 line->setText(TDEGlobal::locale()->formatDate(date, true));
253 selectMonth->setText(calendar->monthName(date, false));
254 fillWeeksCombo(date);
255
256 // calculate the item num in the week combo box; normalize selected day so as if 1.1. is the first day of the week
257 TQDate firstDay;
258 calendar->setYMD(firstDay, calendar->year(date), 1, 1);
259 d->selectWeek->setCurrentItem((calendar->dayOfYear(date) + calendar->dayOfWeek(firstDay) - 2) / 7/*calendar->daysInWeek()*/);
260 selectYear->setText(calendar->yearString(date, false));
261
262 emit(dateChanged(date));
263}
264
265void
266KDatePicker::tableClickedSlot()
267{
268 kdDebug(298) << "KDatePicker::tableClickedSlot: table clicked." << endl;
269 emit(dateSelected(table->getDate()));
270 emit(tableClicked());
271}
272
273const TQDate&
274KDatePicker::getDate() const
275{
276 return table->getDate();
277}
278
279const TQDate &
280KDatePicker::date() const
281{
282 return table->getDate();
283}
284
285bool
286KDatePicker::setDate(const TQDate& date)
287{
288 if(date.isValid())
289 {
290 table->setDate(date); // this also emits dateChanged() which then calls our dateChangedSlot()
291 return true;
292 }
293 else
294 {
295 kdDebug(298) << "KDatePicker::setDate: refusing to set invalid date." << endl;
296 return false;
297 }
298}
299
300void
301KDatePicker::monthForwardClicked()
302{
303 TQDate temp;
304 temp = TDEGlobal::locale()->calendar()->addMonths( table->getDate(), 1 );
305
306 setDate( temp );
307}
308
309void
310KDatePicker::monthBackwardClicked()
311{
312 TQDate temp;
313 temp = TDEGlobal::locale()->calendar()->addMonths( table->getDate(), -1 );
314
315 setDate( temp );
316}
317
318void
319KDatePicker::yearForwardClicked()
320{
321 TQDate temp;
322 temp = TDEGlobal::locale()->calendar()->addYears( table->getDate(), 1 );
323
324 setDate( temp );
325}
326
327void
328KDatePicker::yearBackwardClicked()
329{
330 TQDate temp;
331 temp = TDEGlobal::locale()->calendar()->addYears( table->getDate(), -1 );
332
333 setDate( temp );
334}
335
336void KDatePicker::selectWeekClicked() {} // ### in 3.2 obsolete; kept for binary compatibility
337
338void
339KDatePicker::weekSelected(int week)
340{
341 const KCalendarSystem * calendar = TDEGlobal::locale()->calendar();
342
343 TQDate date = table->getDate();
344 int year = calendar->year(date);
345
346 calendar->setYMD(date, year, 1, 1); // first day of selected year
347
348 // calculate the first day in the selected week (day 1 is first day of week)
349 date = calendar->addDays(date, week * 7/*calendar->daysOfWeek()*/ -calendar->dayOfWeek(date) + 1);
350
351 setDate(date);
352}
353
354void
355KDatePicker::selectMonthClicked()
356{
357 // every year can have different month names (in some calendar systems)
358 const KCalendarSystem * calendar = TDEGlobal::locale()->calendar();
359 TQDate date = table->getDate();
360 int i, month, months = calendar->monthsInYear(date);
361
362 TQPopupMenu popup(selectMonth);
363
364 for (i = 1; i <= months; i++)
365 popup.insertItem(calendar->monthName(i, calendar->year(date)), i);
366
367 popup.setActiveItem(calendar->month(date) - 1);
368
369 if ( (month = popup.exec(selectMonth->mapToGlobal(TQPoint(0, 0)), calendar->month(date) - 1)) == -1 ) return; // canceled
370
371 int day = calendar->day(date);
372 // ----- construct a valid date in this month:
373 calendar->setYMD(date, calendar->year(date), month, 1);
374 date = date.addDays(TQMIN(day, calendar->daysInMonth(date)) - 1);
375 // ----- set this month
376 setDate(date);
377}
378
379void
380KDatePicker::selectYearClicked()
381{
382 const KCalendarSystem * calendar = TDEGlobal::locale()->calendar();
383
384 if (selectYear->state() == TQButton::Off)
385 {
386 return;
387 }
388
389 int year;
390 TDEPopupFrame* popup = new TDEPopupFrame(this);
391 KDateInternalYearSelector* picker = new KDateInternalYearSelector(popup);
392 // -----
393 picker->resize(picker->sizeHint());
394 picker->setYear( table->getDate().year() );
395 picker->selectAll();
396 popup->setMainWidget(picker);
397 connect(picker, TQ_SIGNAL(closeMe(int)), popup, TQ_SLOT(close(int)));
398 picker->setFocus();
399 if(popup->exec(selectYear->mapToGlobal(TQPoint(0, selectMonth->height()))))
400 {
401 TQDate date;
402 int day;
403 // -----
404 year=picker->getYear();
405 date=table->getDate();
406 day=calendar->day(date);
407 // ----- construct a valid date in this month:
408 //date.setYMD(year, date.month(), 1);
409 //date.setYMD(year, date.month(), TQMIN(day, date.daysInMonth()));
410 calendar->setYMD(date, year, calendar->month(date),
411 TQMIN(day, calendar->daysInMonth(date)));
412 // ----- set this month
413 setDate(date);
414 } else {
415 KNotifyClient::beep();
416 }
417
418 delete popup;
419 TQTimer::singleShot(0, this, TQ_SLOT(ensureSelectYearIsUp()));
420}
421
422void
423KDatePicker::ensureSelectYearIsUp()
424{
425 if (!selectYear->isDown())
426 {
427 selectYear->setOn( false );
428 }
429}
430
431void
432KDatePicker::setEnabled(bool enable)
433{
434 TQWidget *widgets[]= {
435 yearForward, yearBackward, monthForward, monthBackward,
436 selectMonth, selectYear,
437 line, table, d->selectWeek, d->todayButton };
438 const int Size=sizeof(widgets)/sizeof(widgets[0]);
439 int count;
440 // -----
441 for(count=0; count<Size; ++count)
442 {
443 widgets[count]->setEnabled(enable);
444 }
445}
446
447void
448KDatePicker::lineEnterPressed()
449{
450 TQDate temp;
451 // -----
452 if(val->date(line->text(), temp)==TQValidator::Acceptable)
453 {
454 kdDebug(298) << "KDatePicker::lineEnterPressed: valid date entered." << endl;
455 emit(dateEntered(temp));
456 setDate(temp);
457 } else {
458 KNotifyClient::beep();
459 kdDebug(298) << "KDatePicker::lineEnterPressed: invalid date entered." << endl;
460 }
461}
462
463void
464KDatePicker::todayButtonClicked()
465{
466 setDate(TQDate::currentDate());
467}
468
469TQSize
470KDatePicker::sizeHint() const
471{
472 return TQWidget::sizeHint();
473}
474
475void
476KDatePicker::setFontSize(int s)
477{
478 TQWidget *buttons[]= {
479 // yearBackward,
480 // monthBackward,
481 selectMonth,
482 selectYear,
483 // monthForward,
484 // yearForward
485 };
486 const int NoOfButtons=sizeof(buttons)/sizeof(buttons[0]);
487 int count;
488 TQFont font;
489 TQRect r;
490 // -----
491 fontsize=s;
492 for(count=0; count<NoOfButtons; ++count)
493 {
494 font=buttons[count]->font();
495 font.setPointSize(s);
496 buttons[count]->setFont(font);
497 }
498 TQFontMetrics metrics(selectMonth->fontMetrics());
499
500 for (int i = 1; ; ++i)
501 {
502 TQString str = TDEGlobal::locale()->calendar()->monthName(i,
503 TDEGlobal::locale()->calendar()->year(table->getDate()), false);
504 if (str.isNull()) break;
505 r=metrics.boundingRect(str);
506 maxMonthRect.setWidth(TQMAX(r.width(), maxMonthRect.width()));
507 maxMonthRect.setHeight(TQMAX(r.height(), maxMonthRect.height()));
508 }
509
510 TQSize metricBound = style().sizeFromContents(TQStyle::CT_ToolButton,
511 selectMonth,
512 maxMonthRect);
513 selectMonth->setMinimumSize(metricBound);
514
515 table->setFontSize(s);
516}
517
518void
519KDatePicker::setCloseButton( bool enable )
520{
521 if ( enable == (d->closeButton != 0L) )
522 return;
523
524 if ( enable ) {
525 d->closeButton = new TQToolButton( this );
526 d->closeButton->setAutoRaise(true);
527 d->navigationLayout->addSpacing(KDialog::spacingHint());
528 d->navigationLayout->addWidget(d->closeButton);
529 TQToolTip::add(d->closeButton, i18n("Close"));
530 d->closeButton->setPixmap( SmallIcon("remove") );
531 connect( d->closeButton, TQ_SIGNAL( clicked() ),
532 topLevelWidget(), TQ_SLOT( close() ) );
533 }
534 else {
535 delete d->closeButton;
536 d->closeButton = 0L;
537 }
538
539 updateGeometry();
540}
541
542bool KDatePicker::hasCloseButton() const
543{
544 return (d->closeButton);
545}
546
547void KDatePicker::virtual_hook( int /*id*/, void* /*data*/ )
548{ /*BASE::virtual_hook( id, data );*/ }
549
KCalendarSystem
KCalendarSystem::addYears
virtual TQDate addYears(const TQDate &date, int nyears) const=0
KCalendarSystem::dayOfYear
virtual int dayOfYear(const TQDate &date) const=0
KCalendarSystem::monthsInYear
virtual int monthsInYear(const TQDate &date) const=0
KCalendarSystem::dayOfWeek
virtual int dayOfWeek(const TQDate &date) const=0
KCalendarSystem::daysInMonth
virtual int daysInMonth(const TQDate &date) const=0
KCalendarSystem::weekNumber
virtual int weekNumber(const TQDate &date, int *yearNum=0) const=0
KCalendarSystem::day
virtual int day(const TQDate &date) const=0
KCalendarSystem::addDays
virtual TQDate addDays(const TQDate &date, int ndays) const=0
KCalendarSystem::month
virtual int month(const TQDate &date) const=0
KCalendarSystem::yearString
virtual TQString yearString(const TQDate &pDate, bool bShort) const
KCalendarSystem::monthName
virtual TQString monthName(int month, int year, bool shortName=false) const=0
KCalendarSystem::setYMD
virtual bool setYMD(TQDate &date, int y, int m, int d) const=0
KCalendarSystem::year
virtual int year(const TQDate &date) const=0
KCalendarSystem::addMonths
virtual TQDate addMonths(const TQDate &date, int nmonths) const=0
KDateInternalYearSelector
Year selection widget.
Definition: kdatetbl.h:141
KDatePicker::sizeHint
TQSize sizeHint() const
The size hint for date pickers.
Definition: kdatepicker.cpp:470
KDatePicker::setEnabled
void setEnabled(bool)
Enables or disables the widget.
Definition: kdatepicker.cpp:432
KDatePicker::setDate
bool setDate(const TQDate &)
Sets the date.
Definition: kdatepicker.cpp:286
KDatePicker::selectWeekClicked
void selectWeekClicked()
Definition: kdatepicker.cpp:336
KDatePicker::todayButtonClicked
void todayButtonClicked()
Definition: kdatepicker.cpp:464
KDatePicker::~KDatePicker
virtual ~KDatePicker()
The destructor.
Definition: kdatepicker.cpp:215
KDatePicker::maxMonthRect
TQSize maxMonthRect
the size calculated during resize events
Definition: kdatepicker.h:180
KDatePicker::line
TQLineEdit * line
the line edit to enter the date directly
Definition: kdatepicker.h:172
KDatePicker::dateChanged
void dateChanged(TQDate)
This signal is emitted each time the selected date is changed.
KDatePicker::dateSelected
void dateSelected(TQDate)
This signal is emitted each time a day has been selected by clicking on the table (hitting a day in t...
KDatePicker::hasCloseButton
bool hasCloseButton() const
Definition: kdatepicker.cpp:542
KDatePicker::setFontSize
void setFontSize(int)
Sets the font size of the widgets elements.
Definition: kdatepicker.cpp:476
KDatePicker::resizeEvent
virtual void resizeEvent(TQResizeEvent *)
the resize event
Definition: kdatepicker.cpp:240
KDatePicker::yearBackward
TQToolButton * yearBackward
the year backward button
Definition: kdatepicker.h:162
KDatePicker::eventFilter
virtual bool eventFilter(TQObject *o, TQEvent *e)
to catch move keyEvents when TQLineEdit has keyFocus
Definition: kdatepicker.cpp:221
KDatePicker::val
KDateValidator * val
the validator for the line edit:
Definition: kdatepicker.h:174
KDatePicker::getDate
const TQDate & getDate() const TDE_DEPRECATED
Returns the selected date.
Definition: kdatepicker.cpp:274
KDatePicker::lineEnterPressed
void lineEnterPressed()
Definition: kdatepicker.cpp:448
KDatePicker::selectMonth
TQToolButton * selectMonth
the button for selecting the month directly
Definition: kdatepicker.h:168
KDatePicker::weekSelected
void weekSelected(int)
Definition: kdatepicker.cpp:339
KDatePicker::setCloseButton
void setCloseButton(bool enable)
By calling this method with enable = true, KDatePicker will show a little close-button in the upper b...
Definition: kdatepicker.cpp:519
KDatePicker::selectMonthClicked
void selectMonthClicked()
Definition: kdatepicker.cpp:355
KDatePicker::selectYear
TQToolButton * selectYear
the button for selecting the year directly
Definition: kdatepicker.h:170
KDatePicker::dateEntered
void dateEntered(TQDate)
This signal is emitted when enter is pressed and a VALID date has been entered before into the line e...
KDatePicker::KDatePicker
KDatePicker(TQWidget *parent=0, TQDate=TQDate::currentDate(), const char *name=0)
The usual constructor.
Definition: kdatepicker.cpp:99
KDatePicker::date
const TQDate & date() const
Definition: kdatepicker.cpp:280
KDatePicker::table
KDateTable * table
the date table
Definition: kdatepicker.h:176
KDatePicker::selectYearClicked
void selectYearClicked()
Definition: kdatepicker.cpp:380
KDatePicker::monthBackward
TQToolButton * monthBackward
the month backward button
Definition: kdatepicker.h:166
KDatePicker::yearForward
TQToolButton * yearForward
the year forward button
Definition: kdatepicker.h:160
KDatePicker::tableClicked
void tableClicked()
This signal is emitted when the day has been selected by clicking on it in the table.
KDatePicker::monthForward
TQToolButton * monthForward
the month forward button
Definition: kdatepicker.h:164
KDateTable
Date selection table.
Definition: kdatetbl.h:264
KDateTable::setFontSize
void setFontSize(int size)
Set the font size of the date table.
Definition: kdatetbl.cpp:424
KDateTable::setDate
bool setDate(const TQDate &)
Select and display this date.
Definition: kdatetbl.cpp:510
KDateValidator
Validates user-entered dates.
Definition: kdatetbl.h:242
KDialog::spacingHint
static int spacingHint()
Return the number of pixels you shall use between widgets inside a dialog according to the KDE standa...
Definition: kdialog.cpp:110
KLineEdit
An enhanced TQLineEdit widget for inputting text.
Definition: klineedit.h:146
TDEGlobalSettings::generalFont
static TQFont generalFont()
TDEGlobal::locale
static TDELocale * locale()
TDELocale::calendar
const KCalendarSystem * calendar() const
TDEPopupFrame
Frame with popup menu behavior.
Definition: kdatetbl.h:167
TDEPopupFrame::exec
int exec(TQPoint p)
Execute the popup window.
Definition: kdatetbl.cpp:1006
TDEPopupFrame::setMainWidget
void setMainWidget(TQWidget *m)
Set the main widget.
Definition: kdatetbl.cpp:962
endl
kndbgstream & endl(kndbgstream &s)
kdDebug
kdbgstream kdDebug(int area=0)
KNotifyClient::beep
void beep(const TQString &reason=TQString::null)
tdelocale.h

tdeui

Skip menu "tdeui"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdeui

Skip menu "tdeui"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeui by doxygen 1.9.4
This website is maintained by Timothy Pearson.