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

tdeui

Signals | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | List of all members
KDatePicker Class Reference

#include <kdatepicker.h>

Inherits TQFrame.

Signals

void dateChanged (TQDate)
 
void dateSelected (TQDate)
 
void dateEntered (TQDate)
 
void tableClicked ()
 

Public Member Functions

 KDatePicker (TQWidget *parent=0, TQDate=TQDate::currentDate(), const char *name=0)
 
 KDatePicker (TQWidget *parent, TQDate, const char *name, WFlags f)
 
 KDatePicker (TQWidget *parent, const char *name)
 
virtual ~KDatePicker ()
 
TQSize sizeHint () const
 
bool setDate (const TQDate &)
 
const TQDate & getDate () const TDE_DEPRECATED
 
const TQDate & date () const
 
void setEnabled (bool)
 
KDateTable * dateTable () const
 
void setFontSize (int)
 
int fontSize () const
 
void setCloseButton (bool enable)
 
bool hasCloseButton () const
 

Protected Slots

void dateChangedSlot (TQDate)
 
void tableClickedSlot ()
 
void monthForwardClicked ()
 
void monthBackwardClicked ()
 
void yearForwardClicked ()
 
void yearBackwardClicked ()
 
void selectWeekClicked ()
 
void selectMonthClicked ()
 
void selectYearClicked ()
 
void lineEnterPressed ()
 
void todayButtonClicked ()
 
void weekSelected (int)
 

Protected Member Functions

virtual bool eventFilter (TQObject *o, TQEvent *e)
 
virtual void resizeEvent (TQResizeEvent *)
 
virtual void virtual_hook (int id, void *data)
 

Protected Attributes

TQToolButton * yearForward
 
TQToolButton * yearBackward
 
TQToolButton * monthForward
 
TQToolButton * monthBackward
 
TQToolButton * selectMonth
 
TQToolButton * selectYear
 
TQLineEdit * line
 
KDateValidator * val
 
KDateTable * table
 
TQSize maxMonthRect
 

Detailed Description

A date selection widget.

Provides a widget for calendar date input.

Different from the
previous versions, it now emits two types of signals, either

dateSelected() or dateEntered() (see documentation for both signals).

A line edit has been added in the newer versions to allow the user to select a date directly by entering numbers like 19990101 or 990101.

KDE Date Widget
@version $Id$
@author Tim Gilman, Mirko Boehm

Definition at line 51 of file kdatepicker.h.

Constructor & Destructor Documentation

◆ KDatePicker() [1/3]

KDatePicker::KDatePicker ( TQWidget *  parent = 0,
TQDate  dt = TQDate::currentDate(),
const char *  name = 0 
)

The usual constructor.

The given date will be displayed initially.

Definition at line 99 of file kdatepicker.cpp.

◆ KDatePicker() [2/3]

KDatePicker::KDatePicker ( TQWidget *  parent,
TQDate  dt,
const char *  name,
WFlags  f 
)

The usual constructor.

The given date will be displayed initially.

Since
3.1

Definition at line 105 of file kdatepicker.cpp.

◆ KDatePicker() [3/3]

KDatePicker::KDatePicker ( TQWidget *  parent,
const char *  name 
)

Standard qt widget constructor.

The initial date will be the current date.

Since
3.1

Definition at line 111 of file kdatepicker.cpp.

◆ ~KDatePicker()

KDatePicker::~KDatePicker ( )
virtual

The destructor.

Definition at line 215 of file kdatepicker.cpp.

Member Function Documentation

◆ date()

const TQDate & KDatePicker::date ( ) const
Returns
the selected date.

Definition at line 280 of file kdatepicker.cpp.

◆ dateChanged

void KDatePicker::dateChanged ( TQDate  )
signal

This signal is emitted each time the selected date is changed.

Usually, this does not mean that the date has been entered, since the date also changes, for example, when another month is selected.

See also
dateSelected

◆ dateChangedSlot

void KDatePicker::dateChangedSlot ( TQDate  date)
protectedslot

Definition at line 246 of file kdatepicker.cpp.

◆ dateEntered

void KDatePicker::dateEntered ( TQDate  )
signal

This signal is emitted when enter is pressed and a VALID date has been entered before into the line edit.

Connect to both dateEntered() and dateSelected() to receive all events where the user really enters a date.

◆ dateSelected

void KDatePicker::dateSelected ( TQDate  )
signal

This signal is emitted each time a day has been selected by clicking on the table (hitting a day in the current month).

It has the same meaning as dateSelected() in older versions of KDatePicker.

◆ dateTable()

KDateTable * KDatePicker::dateTable ( ) const
inline
Returns
the KDateTable widget child of this KDatePicker widget.
Since
3.2

Definition at line 124 of file kdatepicker.h.

◆ eventFilter()

bool KDatePicker::eventFilter ( TQObject *  o,
TQEvent *  e 
)
protectedvirtual

to catch move keyEvents when TQLineEdit has keyFocus

Definition at line 221 of file kdatepicker.cpp.

◆ fontSize()

int KDatePicker::fontSize ( ) const
inline

Returns the font size of the widget elements.

Definition at line 133 of file kdatepicker.h.

◆ getDate()

const TQDate & KDatePicker::getDate ( ) const

Returns the selected date.

Deprecated:

Definition at line 274 of file kdatepicker.cpp.

◆ hasCloseButton()

bool KDatePicker::hasCloseButton ( ) const
Returns
true if a KDatePicker shows a close-button.
See also
setCloseButton
Since
3.1

Definition at line 542 of file kdatepicker.cpp.

◆ lineEnterPressed

void KDatePicker::lineEnterPressed ( )
protectedslot
Since
3.1

Definition at line 448 of file kdatepicker.cpp.

◆ monthBackwardClicked

void KDatePicker::monthBackwardClicked ( )
protectedslot

Definition at line 310 of file kdatepicker.cpp.

◆ monthForwardClicked

void KDatePicker::monthForwardClicked ( )
protectedslot

Definition at line 301 of file kdatepicker.cpp.

◆ resizeEvent()

void KDatePicker::resizeEvent ( TQResizeEvent *  e)
protectedvirtual

the resize event

Definition at line 240 of file kdatepicker.cpp.

◆ selectMonthClicked

void KDatePicker::selectMonthClicked ( )
protectedslot
Since
3.1

Definition at line 355 of file kdatepicker.cpp.

◆ selectWeekClicked

void KDatePicker::selectWeekClicked ( )
protectedslot
Since
3.1
Deprecated:
in 3.2

Definition at line 336 of file kdatepicker.cpp.

◆ selectYearClicked

void KDatePicker::selectYearClicked ( )
protectedslot
Since
3.1

Definition at line 380 of file kdatepicker.cpp.

◆ setCloseButton()

void KDatePicker::setCloseButton ( bool  enable)

By calling this method with enable = true, KDatePicker will show a little close-button in the upper button-row.

Clicking the close-button will cause the KDatePicker's topLevelWidget()'s close() method being called. This is mostly useful for toplevel datepickers without a window manager decoration.

See also
hasCloseButton
Since
3.1

Definition at line 519 of file kdatepicker.cpp.

◆ setDate()

bool KDatePicker::setDate ( const TQDate &  date)

Sets the date.

Returns
false and does not change anything if the date given is invalid.

Definition at line 286 of file kdatepicker.cpp.

◆ setEnabled()

void KDatePicker::setEnabled ( bool  enable)

Enables or disables the widget.

Definition at line 432 of file kdatepicker.cpp.

◆ setFontSize()

void KDatePicker::setFontSize ( int  s)

Sets the font size of the widgets elements.

Definition at line 476 of file kdatepicker.cpp.

◆ sizeHint()

TQSize KDatePicker::sizeHint ( void  ) const

The size hint for date pickers.

The size hint recommends the minimum size of the widget so that all elements may be placed without clipping. This sometimes looks ugly, so when using the size hint, try adding 28 to each of the reported numbers of pixels.

Definition at line 470 of file kdatepicker.cpp.

◆ tableClicked

void KDatePicker::tableClicked ( )
signal

This signal is emitted when the day has been selected by clicking on it in the table.

◆ tableClickedSlot

void KDatePicker::tableClickedSlot ( )
protectedslot

Definition at line 266 of file kdatepicker.cpp.

◆ todayButtonClicked

void KDatePicker::todayButtonClicked ( )
protectedslot
Since
3.2

Definition at line 464 of file kdatepicker.cpp.

◆ virtual_hook()

void KDatePicker::virtual_hook ( int  id,
void *  data 
)
protectedvirtual

Definition at line 547 of file kdatepicker.cpp.

◆ weekSelected

void KDatePicker::weekSelected ( int  week)
protectedslot
Since
3.2

Definition at line 339 of file kdatepicker.cpp.

◆ yearBackwardClicked

void KDatePicker::yearBackwardClicked ( )
protectedslot

Definition at line 328 of file kdatepicker.cpp.

◆ yearForwardClicked

void KDatePicker::yearForwardClicked ( )
protectedslot

Definition at line 319 of file kdatepicker.cpp.

Member Data Documentation

◆ line

TQLineEdit* KDatePicker::line
protected

the line edit to enter the date directly

Definition at line 172 of file kdatepicker.h.

◆ maxMonthRect

TQSize KDatePicker::maxMonthRect
protected

the size calculated during resize events

the widest month string in pixels:

Definition at line 180 of file kdatepicker.h.

◆ monthBackward

TQToolButton* KDatePicker::monthBackward
protected

the month backward button

Definition at line 166 of file kdatepicker.h.

◆ monthForward

TQToolButton* KDatePicker::monthForward
protected

the month forward button

Definition at line 164 of file kdatepicker.h.

◆ selectMonth

TQToolButton* KDatePicker::selectMonth
protected

the button for selecting the month directly

Definition at line 168 of file kdatepicker.h.

◆ selectYear

TQToolButton* KDatePicker::selectYear
protected

the button for selecting the year directly

Definition at line 170 of file kdatepicker.h.

◆ table

KDateTable* KDatePicker::table
protected

the date table

Definition at line 176 of file kdatepicker.h.

◆ val

KDateValidator* KDatePicker::val
protected

the validator for the line edit:

Definition at line 174 of file kdatepicker.h.

◆ yearBackward

TQToolButton* KDatePicker::yearBackward
protected

the year backward button

Definition at line 162 of file kdatepicker.h.

◆ yearForward

TQToolButton* KDatePicker::yearForward
protected

the year forward button

Definition at line 160 of file kdatepicker.h.


The documentation for this class was generated from the following files:
  • kdatepicker.h
  • kdatepicker.cpp

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.