kspread Library API Documentation

KSpreadConditions Class Reference

Manages a set of conditions for a cell. More...

#include <kspread_condition.h>

Collaboration diagram for KSpreadConditions:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 KSpreadConditions (const KSpreadCell *ownerCell)
bool currentCondition (KSpreadConditional &condition)
QValueList< KSpreadConditionalconditionList () const
void setConditionList (const QValueList< KSpreadConditional > &list)
QDomElement saveConditions (QDomDocument &doc) const
void loadConditions (const QDomElement &element)
void loadOasisConditions (const QDomElement &element)
void saveOasisConditions (KoGenStyle &currentCellStyle)
KSpreadStyle * matchedStyle () const
void checkMatches ()

Detailed Description

Manages a set of conditions for a cell.

Definition at line 65 of file kspread_condition.h.


Constructor & Destructor Documentation

KSpreadConditions::KSpreadConditions const KSpreadCell ownerCell  ) 
 

Constructor.

There is no default constructor - you must use this one with the owner cell as a parameter

Definition at line 77 of file kspread_condition.cc.

References KSpreadConditions().

Referenced by KSpreadConditions().


Member Function Documentation

bool KSpreadConditions::currentCondition KSpreadConditional condition  ) 
 

Use this function to see what conditions actually apply currently.

Parameters:
condition a reference to a condition that will be set to the matching condition. If none of the conditions are true then this parameter is undefined on exit (check the return value).
Returns:
true if one of the conditions is true, false if not.

Definition at line 98 of file kspread_condition.cc.

References KSpreadCell::text(), and KSpreadCell::value().

QValueList< KSpreadConditional > KSpreadConditions::conditionList  )  const
 

Retrieve the current list of conditions we're checking.

Definition at line 233 of file kspread_condition.cc.

void KSpreadConditions::setConditionList const QValueList< KSpreadConditional > &  list  ) 
 

Replace the current list of conditions with this new one.

Definition at line 238 of file kspread_condition.cc.

QDomElement KSpreadConditions::saveConditions QDomDocument doc  )  const
 

Saves the conditions to a DOM tree structure.

Returns:
the DOM element for the conditions.

Definition at line 359 of file kspread_condition.cc.

References KSpreadConditional::colorcond, KSpreadConditional::cond, KSpreadConditional::fontcond, KSpreadConditional::strVal1, KSpreadConditional::strVal2, KSpreadConditional::styleName, KSpreadConditional::val1, and KSpreadConditional::val2.

void KSpreadConditions::loadConditions const QDomElement element  ) 
 

Takes a parsed DOM element and recreates the conditions structure out of it.

Definition at line 565 of file kspread_condition.cc.

References KSpreadConditional::colorcond, KSpreadConditional::cond, KSpreadConditional::fontcond, KSpreadCell::sheet(), KSpreadConditional::strVal1, KSpreadConditional::strVal2, KSpreadConditional::style, KSpreadConditional::styleName, KSpreadConditional::val1, and KSpreadConditional::val2.

KSpreadStyle* KSpreadConditions::matchedStyle  )  const [inline]
 

returns the style that matches first (or NULL if no condition matches)

Definition at line 118 of file kspread_condition.h.


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kspread Library Version 1.4.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Mon Feb 13 09:43:43 2006 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003