Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

OTimePicker Class Reference

A widget to quickly pick a QTime. More...

#include </home/clem/local/src/opie/noncore/unsupported/libopie/otimepicker.h>

Collaboration diagram for OTimePicker:

Collaboration graph
[legend]
List of all members.

Public Slots

void setHour (int h)
void setMinute (int m)
void setTime (const QTime &)
void setTime (int h, int m)

Signals

void timeChanged (const QTime &)

Public Member Functions

 OTimePicker (QWidget *parent=0, const char *name=0, WFlags fl=0)
QTime time () const

Private Slots

void slotHour (bool b)
void slotMinute (bool b)

Private Attributes

QValueList< OClickableLabel * > hourLst
QValueList< OClickableLabel * > minuteLst
QTime tm
Private * d

Detailed Description

A widget to quickly pick a QTime.

A class to pick time. It uses clickable labels internally to allow a quick selection of a time. A time can be selected by two clicks of a user

Version:
1.0
See also:
QWidget

QTime

Author:
Hakan Ardo, Stefan Eilers

Definition at line 23 of file otimepicker.h.


Constructor & Destructor Documentation

OTimePicker::OTimePicker QWidget *  parent = 0,
const char *  name = 0,
WFlags  fl = 0
 

Constructs the widget

Parameters:
parent The parent of the OTimePicker
name The name of the object
fl Window Flags

Definition at line 14 of file otimepicker.cpp.

References QValueList< T >::append(), hourLst, i, l, minuteLst, row, s, OClickableLabel::setToggleButton(), slotHour(), slotMinute(), and QString::sprintf().


Member Function Documentation

void OTimePicker::setHour int  h  )  [slot]
 

Method to set the hour

Definition at line 151 of file otimepicker.cpp.

References QValueList< T >::begin(), QValueList< T >::end(), hourLst, QTime::minute(), QTime::setHMS(), QString::sprintf(), and tm.

Referenced by setTime(), and Opie::Ui::OTimePicker::setTime().

void OTimePicker::setMinute int  m  )  [slot]
 

Method to set the minutes

Parameters:
m minutes

Definition at line 134 of file otimepicker.cpp.

References QValueList< T >::begin(), QValueList< T >::end(), QTime::hour(), minuteLst, QTime::setHMS(), QString::sprintf(), and tm.

Referenced by setTime(), and Opie::Ui::OTimePicker::setTime().

void OTimePicker::setTime int  h,
int  m
[slot]
 

Method to set the time. No signal gets emitted during this method call

Parameters:
h The hour
m The minute. Minutes need to set by 5 minute steps

Definition at line 122 of file otimepicker.cpp.

References setHour(), and setMinute().

void OTimePicker::setTime const QTime t  )  [slot]
 

Method to set the time. No signal gets emitted during this method call Minutes must be within 5 minutes step starting at 0 ( 0,5,10,15,20... )

Parameters:
t The time to be set

Definition at line 113 of file otimepicker.cpp.

Referenced by Opie::Ui::OTimePicker::setTime().

void OTimePicker::slotHour bool  b  )  [private, slot]
 

Definition at line 74 of file otimepicker.cpp.

References QValueList< T >::begin(), QValueList< T >::end(), hourLst, QTime::minute(), QTime::setHMS(), OClickableLabel::setOn(), timeChanged(), and tm.

Referenced by OTimePicker().

void OTimePicker::slotMinute bool  b  )  [private, slot]
 

Definition at line 91 of file otimepicker.cpp.

References QValueList< T >::begin(), QValueList< T >::end(), QTime::hour(), minuteLst, QTime::setHMS(), OClickableLabel::setOn(), timeChanged(), and tm.

Referenced by OTimePicker().

QTime OTimePicker::time void   )  const
 

This method return the current time

Returns:
the time

Definition at line 70 of file otimepicker.cpp.

References tm.

void OTimePicker::timeChanged const QTime  )  [signal]
 

gets emitted when the time got changed by the user

Referenced by slotHour(), Opie::Ui::OTimePicker::slotHour(), slotMinute(), and Opie::Ui::OTimePicker::slotMinute().


Member Data Documentation

Private* OTimePicker::d [private]
 

Definition at line 43 of file otimepicker.h.

QValueList<OClickableLabel *> OTimePicker::hourLst [private]
 

Definition at line 40 of file otimepicker.h.

Referenced by OTimePicker(), setHour(), Opie::Ui::OTimePicker::setHour(), slotHour(), and Opie::Ui::OTimePicker::slotHour().

QValueList<OClickableLabel *> OTimePicker::minuteLst [private]
 

Definition at line 41 of file otimepicker.h.

Referenced by OTimePicker(), setMinute(), Opie::Ui::OTimePicker::setMinute(), slotMinute(), and Opie::Ui::OTimePicker::slotMinute().

QTime OTimePicker::tm [private]
 

Definition at line 42 of file otimepicker.h.

Referenced by setHour(), Opie::Ui::OTimePicker::setHour(), setMinute(), Opie::Ui::OTimePicker::setMinute(), slotHour(), Opie::Ui::OTimePicker::slotHour(), slotMinute(), Opie::Ui::OTimePicker::slotMinute(), time(), and Opie::Ui::OTimePicker::time().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 17:43:42 2005 for OPIE by  doxygen 1.4.2