korganizer Library API Documentation

KOTimeEdit Class Reference

This is a class that provides an easy, user friendly way to edit times. Provides a way to edit times in a user-friendly manner. More...

#include <ktimeedit.h>

Inheritance diagram for KOTimeEdit:

QComboBox List of all members.

Public Slots

void setTime (QTime qt)

Signals

void timeChanged (QTime newt)

Public Methods

 KOTimeEdit (QWidget *parent=0, QTime qt=QTime(12, 0), const char *name=0)
virtual ~KOTimeEdit ()
bool hasTime () const
QTime getTime () const
QSizePolicy sizePolicy () const
bool inputIsValid () const

Protected Slots

void active (int)
void hilit (int)
void changedText ()

Protected Methods

virtual void keyPressEvent (QKeyEvent *qke)
void addTime (QTime qt)
void subTime (QTime qt)
void updateText ()

Detailed Description

This is a class that provides an easy, user friendly way to edit times. Provides a way to edit times in a user-friendly manner.

up/down/ increase or decrease time, respectively.

Author:
Preston Brown, Ian Dawes

Definition at line 41 of file ktimeedit.h.


Constructor & Destructor Documentation

KOTimeEdit::KOTimeEdit QWidget   parent = 0,
QTime    qt = QTime(12, 0),
const char *    name = 0
 

constructs a new time edit.

Definition at line 104 of file ktimeedit.cpp.

References QComboBox::activated(), QTime::addSecs(), QComboBox::highlighted(), QComboBox::insertItem(), QTime::isNull(), QComboBox::setInsertionPolicy(), QComboBox::setValidator(), and QComboBox::textChanged().


Member Function Documentation

bool KOTimeEdit::hasTime   const
 

Returns, if a time is selected.

Can not return false anymore....

Definition at line 136 of file ktimeedit.cpp.

References QComboBox::currentText().

QTime KOTimeEdit::getTime   const
 

returns the time that is currently set in the timeLineEdit.

Definition at line 145 of file ktimeedit.cpp.

References QComboBox::currentText(), QTime::setHMS(), and QTime::toString().

QSizePolicy KOTimeEdit::sizePolicy   const
 

returns the preferred size policy of the KOTimeEdit.

Definition at line 164 of file ktimeedit.cpp.

bool KOTimeEdit::inputIsValid   const
 

return true if input is a valid time and false if not.

Definition at line 272 of file ktimeedit.cpp.

References QComboBox::currentText(), QComboBox::lineEdit(), and QComboBox::validator().

void KOTimeEdit::timeChanged QTime    newt [signal]
 

Emitted every time the time displayed changes.

"newt" is the new time.

void KOTimeEdit::setTime QTime    qt [slot]
 

used to set the time which is displayed to a specific value.

Definition at line 173 of file ktimeedit.cpp.

References QTime::toString().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for korganizer Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat May 1 11:38:32 2004 by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2003