kspread

KSpread::ValueParser Class Reference

#include <valueparser.h>

List of all members.


Detailed Description

The ValueParser parses a text input from the user, generating Value in the desired format.

Definition at line 40 of file valueparser.h.


Public Member Functions

 ValueParser (KLocale *locale)
KLocale * locale ()
void parse (const QString &str, Cell *cell)
Value parse (const QString &str)
Value tryParseBool (const QString &str, bool *ok=0)
Value tryParseNumber (const QString &str, bool *ok=0)
Value tryParseDate (const QString &str, bool *ok=0)
Value tryParseTime (const QString &str, bool *ok=0)

Protected Member Functions

bool tryParseBool (const QString &str, Cell *cell)
bool tryParseNumber (const QString &str, Cell *cell)
bool tryParseDate (const QString &str, Cell *cell)
bool tryParseTime (const QString &str, Cell *cell)
QDateTime readTime (const QString &intstr, bool withSeconds, bool *ok, bool &duration)
double readNumber (const QString &_str, bool *ok, bool *isInt)
int readInt (const QString &str, uint &pos)

Protected Attributes

KLocale * parserLocale
FormatType fmtType

Constructor & Destructor Documentation

ValueParser::ValueParser KLocale *  locale  ) 
 

constructor

Definition at line 30 of file valueparser.cc.


Member Function Documentation

Value ValueParser::parse const QString &  str  ) 
 

try to parse given text, don't set any cell attributes though

Definition at line 88 of file valueparser.cc.

void ValueParser::parse const QString &  str,
Cell cell
 

try to parse the text in a given cell and set value accordingly

Definition at line 39 of file valueparser.cc.

int ValueParser::readInt const QString &  str,
uint &  pos
[protected]
 

a helper function to read integers

Parameters:
str 
pos the position to start at. It will be updated when we parse it.
Returns:
the integer read in the string, or -1 if no string

Definition at line 616 of file valueparser.cc.

double ValueParser::readNumber const QString &  _str,
bool *  ok,
bool *  isInt
[protected]
 

a helper function to read numbers and distinguish integers and FPs

Definition at line 202 of file valueparser.cc.

QDateTime ValueParser::readTime const QString &  intstr,
bool  withSeconds,
bool *  ok,
bool &  duration
[protected]
 

converts a string to a date/time value

Definition at line 475 of file valueparser.cc.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys