libopie API Documentation

OTimePicker Class Reference

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

#include <otimepicker.h>

Inheritance diagram for OTimePicker:

Inheritance graph
[legend]
Collaboration diagram for OTimePicker:

Collaboration graph
[legend]
List of all members.

Public Slots

void setHour (int h)
 Method to set the hour.

void setMinute (int m)
 Method to set the minutes.

void setTime (const QTime &)
 Method to set the time.

void setTime (int h, int m)
 Method to set the time.


Signals

void timeChanged (const QTime &)
 gets emitted when the time got changed by the user


Public Member Functions

 OTimePicker (QWidget *parent=0, const char *name=0, WFlags fl=0)
 Constructs the widget.

QTime time () const
 This method return the current time.


Detailed Description

A class to pick time. A widget to quickly pick a QTime.

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 17 of file otimepicker.cpp.

References QBoxLayout::addWidget(), QValueList< OClickableLabel * >::append(), QObject::connect(), QWidget::QWidget(), QLabel::setAlignment(), QLabel::setText(), OClickableLabel::setToggleButton(), and QString::sprintf().


Member Function Documentation

void OTimePicker::setHour int  h  )  [slot]
 

Method to set the hour.

Definition at line 154 of file otimepicker.cpp.

References QValueList< OClickableLabel * >::begin(), QValueList< OClickableLabel * >::end(), QTime::minute(), QTime::setHMS(), and QString::sprintf().

Referenced by setTime().

void OTimePicker::setMinute int  m  )  [slot]
 

Method to set the minutes.

Parameters:
m minutes

Definition at line 137 of file otimepicker.cpp.

References QValueList< OClickableLabel * >::begin(), QValueList< OClickableLabel * >::end(), QTime::hour(), QTime::setHMS(), and QString::sprintf().

Referenced by setTime().

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 116 of file otimepicker.cpp.

References QTime::hour(), and QTime::minute().

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 125 of file otimepicker.cpp.

References setHour(), and setMinute().

QTime OTimePicker::time  )  const
 

This method return the current time.

Returns:
the time

Definition at line 73 of file otimepicker.cpp.

void OTimePicker::timeChanged const QTime  )  [signal]
 

gets emitted when the time got changed by the user


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for OPIE Version 1.1.
Documentation copyright © 1997-2003 the KDE developers. 2003 OPIE developers
Generated on Tue Feb 10 20:25:05 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001