filters
Swinder::Format Class Reference
#include <format.h>
Detailed Description
Defines format of cell.Class Format defines possible formatting for use in cells or ranges. Basically, Format might consist of one or more "pieces". Each piece specifies only one type of formatting, e.g whether the text should be shown in bold or not, which borders should the cells/ranges have, and so on.
A complex formatting can be decomposed into different pieces. For example, formatting like "Font is Arial 10 pt, background color is blue, " formula is hidden" could be a combination of three simple formatting pieces as: (1) font is "Arial 10pt", (2) background pattern is 100%, blue and (3) cell is protected, formula is hidden. This also means that one format might be applied to another format. An example of this is "Font is Helvetica" format and "Left border, 1pt, blue" format will yields something like "Font is Helvetica, with left border of blue 1pt". Use Format::apply to do such format merging.
Definition at line 641 of file kspread/excel/sidewinder/format.h.
Public Types | |
enum | { Left, Center, Right } |
enum | { Top, Middle, Bottom } |
Public Member Functions | |
Format () | |
~Format () | |
Format (const Format &f) | |
Format & | operator= (const Format &f) |
Format & | assign (const Format &f) |
bool | isNull () const |
FormatFont & | font () const |
void | setFont (const FormatFont &font) |
FormatAlignment & | alignment () const |
void | setAlignment (const FormatAlignment &alignment) |
FormatBorders & | borders () const |
void | setBorders (const FormatBorders &border) |
FormatBackground & | background () const |
void | setBackground (const FormatBackground &) |
const UString & | valueFormat () const |
void | setValueFormat (const UString &valueFormat) |
Format & | apply (const Format &f) |
bool | operator== (const Format &f) const |
bool | operator!= (const Format &f) const |
Constructor & Destructor Documentation
Format::Format | ( | ) |
Format::~Format | ( | ) |
Format::Format | ( | const Format & | f | ) |
Member Function Documentation
bool Format::isNull | ( | ) | const |
FormatFont & Format::font | ( | ) | const |
Returns a constant reference to the formatting information of this format.
Definition at line 632 of file format.cpp.
void Format::setFont | ( | const FormatFont & | font | ) |
FormatAlignment & Format::alignment | ( | ) | const |
Returns a constant reference to the alignment information of this format.
Definition at line 642 of file format.cpp.
void Format::setAlignment | ( | const FormatAlignment & | alignment | ) |
FormatBorders & Format::borders | ( | ) | const |
Returns a reference to the borders information of this format.
Definition at line 652 of file format.cpp.
void Format::setBorders | ( | const FormatBorders & | border | ) |
FormatBackground & Format::background | ( | ) | const |
Returns a reference to the background information of this format.
Definition at line 662 of file format.cpp.
void Format::setBackground | ( | const FormatBackground & | ) |
const UString & Format::valueFormat | ( | ) | const |
Returns the formatting string to display the value of this format.
Definition at line 672 of file format.cpp.
void Format::setValueFormat | ( | const UString & | valueFormat | ) |
Sets the new formatting string to display the value of this format.
Definition at line 677 of file format.cpp.
Applies another format to this format.
Basically this will merge the formatting information of f into the current format. For example, if current format is "Bold, Italic" and f is "Left border", the current format would become "Bold, Italic, left border".
If parts of the formatting information in f are already specified in the current format, then it will override the current format. For example, if current format is "Bold, right-aligned" and f is "Italic", the result is "Italic, right-aligned".
Definition at line 683 of file format.cpp.
bool Format::operator== | ( | const Format & | f | ) | const |
Returns true if this format is equal to f; otherwise returns false.
Definition at line 699 of file format.cpp.
bool Format::operator!= | ( | const Format & | f | ) | const |
Returns true if this format is not equal to f; otherwise returns false.
Definition at line 709 of file format.cpp.
The documentation for this class was generated from the following files: