#include <PdfTable.h>
|
| PdfSimpleTableModel () |
|
| PdfSimpleTableModel (int nCols, int nRows) |
|
void | SetFont (PdfFont *pFont) |
|
void | SetAlignment (EPdfAlignment eAlignment) |
|
void | SetAlignment (EPdfVerticalAlignment eAlignment) |
|
void | SetBackgroundColor (const PdfColor &rColor) |
|
void | SetForegroundColor (const PdfColor &rColor) |
|
void | SetBackgroundEnabled (bool bEnable) |
|
void | SetWordWrapEnabled (bool bEnable) |
|
void | SetBorderEnabled (bool bEnable) |
|
void | SetBorderWidth (double dWidth) |
|
void | SetText (int col, int row, const PdfString &rsString) |
|
virtual PdfString | GetText (int col, int row) const |
|
virtual EPdfAlignment | GetAlignment (int col, int row) const |
|
virtual EPdfVerticalAlignment | GetVerticalAlignment (int col, int row) const |
|
virtual PdfFont * | GetFont (int col, int row) const |
|
virtual bool | HasBackgroundColor (int col, int row) const |
|
virtual PdfColor | GetBackgroundColor (int col, int row) const |
|
virtual PdfColor | GetForegroundColor (int col, int row) const |
|
virtual bool | HasWordWrap (int col, int row) const |
|
virtual bool | HasBorders () const |
|
virtual double | GetBorderWidth () const |
|
virtual PdfColor | GetBorderColor (int col, int row) const |
|
virtual bool | HasImage (int col, int row) const |
|
virtual PdfImage * | GetImage (int col, int row) const |
|
An implementation of a simple PdfTableModel.
◆ PdfSimpleTableModel() [1/2]
PoDoFo::PdfSimpleTableModel::PdfSimpleTableModel |
( |
| ) |
|
Creates an empty PdfSimpleTableModel that does not contain any data.
Using this model will result in drawing an empty table!
◆ PdfSimpleTableModel() [2/2]
PoDoFo::PdfSimpleTableModel::PdfSimpleTableModel |
( |
int |
nCols, |
|
|
int |
nRows |
|
) |
| |
Creates an empty PdfSimpleTableModel that does not contain any data.
Using this model will result in drawing an empty table!
- Parameters
-
nCols | number of columns of the data in this table model (must match the PdfTable object) |
nRows | number of rows of the data in this table model (must match the PdfTable object) |
You can set the tables data using SetText.
- See also
- SetText
◆ GetAlignment()
EPdfAlignment PoDoFo::PdfSimpleTableModel::GetAlignment |
( |
int |
col, |
|
|
int |
row |
|
) |
| const |
|
inlinevirtual |
- Parameters
-
col | the column of the table cell |
row | the row of the table cell |
- Returns
- the horizontal alignment of the contents in the cell
Implements PoDoFo::PdfTableModel.
◆ GetBackgroundColor()
PdfColor PoDoFo::PdfSimpleTableModel::GetBackgroundColor |
( |
int |
col, |
|
|
int |
row |
|
) |
| const |
|
inlinevirtual |
- Parameters
-
col | the column of the table cell |
row | the row of the table cell |
- Returns
- the background color of the specified cell
Implements PoDoFo::PdfTableModel.
◆ GetBorderColor()
PdfColor PoDoFo::PdfSimpleTableModel::GetBorderColor |
( |
int |
col, |
|
|
int |
row |
|
) |
| const |
|
inlinevirtual |
- Parameters
-
col | the column of the table cell |
row | the row of the table cell |
- Returns
- the border color
Implements PoDoFo::PdfTableModel.
◆ GetBorderWidth()
double PoDoFo::PdfSimpleTableModel::GetBorderWidth |
( |
| ) |
const |
|
inlinevirtual |
◆ GetFont()
PdfFont * PoDoFo::PdfSimpleTableModel::GetFont |
( |
int |
col, |
|
|
int |
row |
|
) |
| const |
|
inlinevirtual |
- Parameters
-
col | the column of the table cell |
row | the row of the table cell |
- Returns
- the font of this table cell or NULL to use the default font
Implements PoDoFo::PdfTableModel.
◆ GetForegroundColor()
PdfColor PoDoFo::PdfSimpleTableModel::GetForegroundColor |
( |
int |
col, |
|
|
int |
row |
|
) |
| const |
|
inlinevirtual |
- Parameters
-
col | the column of the table cell |
row | the row of the table cell |
- Returns
- the foreground (text) color of the specified cell
Implements PoDoFo::PdfTableModel.
◆ GetImage()
PdfImage * PoDoFo::PdfSimpleTableModel::GetImage |
( |
int |
col, |
|
|
int |
row |
|
) |
| const |
|
inlinevirtual |
- Parameters
-
col | the column of the table cell |
row | the row of the table cell |
- Returns
- the image for the specified cell or NULL if the cell has no image
Implements PoDoFo::PdfTableModel.
◆ GetText()
PdfString PoDoFo::PdfSimpleTableModel::GetText |
( |
int |
col, |
|
|
int |
row |
|
) |
| const |
|
inlinevirtual |
- Parameters
-
col | the column of the table cell |
row | the row of the table cell |
- Returns
- the contents string of this table cell
Implements PoDoFo::PdfTableModel.
◆ GetVerticalAlignment()
- Parameters
-
col | the column of the table cell |
row | the row of the table cell |
- Returns
- the vertical alignment of the contents in the cell
Implements PoDoFo::PdfTableModel.
◆ HasBackgroundColor()
bool PoDoFo::PdfSimpleTableModel::HasBackgroundColor |
( |
int |
col, |
|
|
int |
row |
|
) |
| const |
|
inlinevirtual |
- Parameters
-
col | the column of the table cell |
row | the row of the table cell |
- Returns
- true if this cell has a background color
Implements PoDoFo::PdfTableModel.
◆ HasBorders()
bool PoDoFo::PdfSimpleTableModel::HasBorders |
( |
| ) |
const |
|
inlinevirtual |
- Returns
- true if the table should have a border around all cells.
-
false if no cell border should be visible
Cell borders are always drawn using the current PdfPainter settings.
Implements PoDoFo::PdfTableModel.
◆ HasImage()
bool PoDoFo::PdfSimpleTableModel::HasImage |
( |
int |
col, |
|
|
int |
row |
|
) |
| const |
|
inlinevirtual |
- Parameters
-
col | the column of the table cell |
row | the row of the table cell |
- Returns
- true if the table cell contains an image
Implements PoDoFo::PdfTableModel.
◆ HasWordWrap()
bool PoDoFo::PdfSimpleTableModel::HasWordWrap |
( |
int |
col, |
|
|
int |
row |
|
) |
| const |
|
inlinevirtual |
- Parameters
-
col | the column of the table cell |
row | the row of the table cell |
- Returns
- true if the specified cell should use wordwrapping
Implements PoDoFo::PdfTableModel.
◆ SetAlignment() [1/2]
void PoDoFo::PdfSimpleTableModel::SetAlignment |
( |
EPdfAlignment |
eAlignment | ) |
|
|
inline |
Set the horizontal alignment of the contents in all table cells
- Parameters
-
eAlignment | the horizontal alignment of text in a table cell |
◆ SetAlignment() [2/2]
Set the vertical alignment of the contents in all table cells
- Parameters
-
eAlignment | the vertiical alignment of text in a table cell |
◆ SetBackgroundColor()
void PoDoFo::PdfSimpleTableModel::SetBackgroundColor |
( |
const PdfColor & |
rColor | ) |
|
|
inline |
Set the background color of the table cells
- Parameters
-
rColor | the background color |
◆ SetBackgroundEnabled()
void PoDoFo::PdfSimpleTableModel::SetBackgroundEnabled |
( |
bool |
bEnable | ) |
|
|
inline |
Sets wether all cells have a background color or not
- Parameters
-
bEnable | if true all cells have a background color |
◆ SetBorderEnabled()
void PoDoFo::PdfSimpleTableModel::SetBorderEnabled |
( |
bool |
bEnable | ) |
|
|
inline |
Sets wether all cells have a border or not.
- Parameters
-
bEnable | if true a border will be drawn using the current PdfPainter settings |
◆ SetBorderWidth()
void PoDoFo::PdfSimpleTableModel::SetBorderWidth |
( |
double |
dWidth | ) |
|
|
inline |
Sets the stroke width of the border around the table.
- Parameters
-
dWidth | the stroke width of the border |
◆ SetFont()
void PoDoFo::PdfSimpleTableModel::SetFont |
( |
PdfFont * |
pFont | ) |
|
|
inline |
Set the font that will be used to draw all table contents.
- Parameters
-
pFont | the font for the table contents |
◆ SetForegroundColor()
void PoDoFo::PdfSimpleTableModel::SetForegroundColor |
( |
const PdfColor & |
rColor | ) |
|
|
inline |
Set the foreground color of the table cells
- Parameters
-
rColor | the foreground color |
◆ SetText()
void PoDoFo::PdfSimpleTableModel::SetText |
( |
int |
col, |
|
|
int |
row, |
|
|
const PdfString & |
rsString |
|
) |
| |
|
inline |
Sets the contents of a specific cell
- Parameters
-
col | the column of the table cell |
row | the row of the table cell |
rsString | the contents of this cell |
◆ SetWordWrapEnabled()
void PoDoFo::PdfSimpleTableModel::SetWordWrapEnabled |
( |
bool |
bEnable | ) |
|
|
inline |
Sets wether all cells have wordwrapping or not
- Parameters
-
bEnable | if true all cells have wordwrapping |