korganizer Library API Documentation

KTimeEdit 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 KTimeEdit:

QComboBox List of all members.

Public Slots

void setTime (QTime qt)
 used to set the time which is displayed to a specific value.


Signals

void timeChanged (QTime newt)
 Emitted every time the time displayed changes.


Public Member Functions

 KTimeEdit (QWidget *parent=0, QTime qt=QTime(12, 0), const char *name=0)
 constructs a new time edit.

bool hasTime ()
 Returns, if a time is selected.

QTime getTime ()
 returns the time that is currently set in the timeLineEdit.

QSizePolicy sizePolicy () const
 returns the prefered size policy of the KTimeEdit

bool inputIsValid ()
 return true if input is a valid time and false if not


Protected Slots

void activ (int)
void hilit (int)
void changedText ()

Protected Member Functions

void addTime (QTime qt)
void subTime (QTime qt)
void keyPressEvent (QKeyEvent *qke)
void validateEntry ()
void updateSelection ()

Protected Attributes

QTime mTime
bool current_display_valid

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

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

constructs a new time edit.

Definition at line 36 of file ktimeedit.cpp.

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


Member Function Documentation

bool KTimeEdit::hasTime  ) 
 

Returns, if a time is selected.

Definition at line 67 of file ktimeedit.cpp.

References QComboBox::currentText().

QTime KTimeEdit::getTime  ) 
 

returns the time that is currently set in the timeLineEdit.

Definition at line 75 of file ktimeedit.cpp.

References QComboBox::currentText().

QSizePolicy KTimeEdit::sizePolicy  )  const
 

returns the prefered size policy of the KTimeEdit

Definition at line 83 of file ktimeedit.cpp.

bool KTimeEdit::inputIsValid  ) 
 

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

Definition at line 192 of file ktimeedit.cpp.

References QComboBox::currentText(), and QTime::isValid().

void KTimeEdit::timeChanged QTime  newt  )  [signal]
 

Emitted every time the time displayed changes.

"newt" is the new time.

void KTimeEdit::setTime QTime  qt  )  [slot]
 

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

Definition at line 92 of file ktimeedit.cpp.


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sun Feb 15 11:41:11 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001