kspread
KSpread::SheetPrint Class Reference
List of all members.Detailed Description
Definition at line 38 of file kspread_sheetprint.h.
Signals | |
void | sig_updateView (Sheet *_sheet) |
Public Member Functions | |
SheetPrint (Sheet *sheet) | |
~SheetPrint () | |
QString | saveOasisSheetStyleLayout (KoGenStyles &mainStyles) |
bool | print (QPainter &painter, KPrinter *_printer) |
float | prinsheetWidth () const |
float | prinsheetWidthPts () const |
float | prinsheetHeight () const |
float | prinsheetHeightPts () const |
float | paperHeight () const |
float | paperHeightPts () const |
float | paperWidth () const |
float | paperWidthPts () const |
void | setPaperHeight (float _val) |
void | setPaperWidth (float _val) |
float | leftBorder () const |
float | leftBorderPts () const |
float | rightBorder () const |
float | rightBorderPts () const |
float | topBorder () const |
float | topBorderPts () const |
float | bottomBorder () const |
float | bottomBorderPts () const |
KoOrientation | orientation () const |
const char * | orientationString () const |
KoFormat | paperFormat () const |
QString | paperFormatString () const |
void | setPaperFormat (KoFormat _format) |
void | setPaperOrientation (KoOrientation _orient) |
KoPageLayout | paperLayout () const |
void | setPaperLayout (float _leftBorder, float _topBorder, float _rightBorder, float _bottomBoder, KoFormat _paper, KoOrientation orientation) |
void | setPaperLayout (float _leftBorder, float _topBorder, float _rightBorder, float _bottomBoder, const QString &_paper, const QString &_orientation) |
QString | headLeft (int _p, const QString &_t) const |
QString | headMid (int _p, const QString &_t) const |
QString | headRight (int _p, const QString &_t) const |
QString | footLeft (int _p, const QString &_t) const |
QString | footMid (int _p, const QString &_t) const |
QString | footRight (int _p, const QString &_t) const |
QString | headLeft () const |
QString | headMid () const |
QString | headRight () const |
QString | footLeft () const |
QString | footMid () const |
QString | footRight () const |
QRect | printRange () const |
void | setPrintRange (const QRect &_printRange) |
int | pageLimitX () const |
int | pageLimitY () const |
void | setPageLimitX (int pages) |
void | setPageLimitY (int pages) |
void | calculateZoomForPageLimitX () |
void | calculateZoomForPageLimitY () |
QPair< int, int > | printRepeatColumns () const |
void | setPrintRepeatColumns (QPair< int, int > _printRepeatColumns) |
QPair< int, int > | printRepeatRows () const |
void | setPrintRepeatRows (QPair< int, int > _printRepeatRows) |
bool | isOnNewPageX (int _column) |
void | updateNewPageX (int _column) |
bool | isOnNewPageY (int _row) |
void | updateNewPageY (int _row) |
void | updateNewPageListX (int _col) |
void | updateNewPageListY (int _row) |
void | replaceHeadFootLineMacro (QString &_text, const QString &_search, const QString &_replace) |
QString | localizeHeadFootLine (const QString &_text) |
QString | delocalizeHeadFootLine (const QString &_text) |
KoHeadFoot | headFootLine () const |
void | setHeadFootLine (const QString &_headl, const QString &_headm, const QString &_headr, const QString &_footl, const QString &_footm, const QString &_footr) |
bool | printGrid () const |
void | setPrintGrid (bool _printGrid) |
bool | printObjects () const |
void | setPrintObjects (bool _printObjects) |
bool | printCharts () const |
void | setPrintCharts (bool _printCharts) |
bool | printGraphics () const |
void | setPrintGraphics (bool _printGraphics) |
bool | printCommentIndicator () const |
void | setPrintCommentIndicator (bool _printCommentIndicator) |
bool | printFormulaIndicator () const |
void | setPrintFormulaIndicator (bool _printFormulaIndicator) |
void | updatePrintRepeatColumnsWidth () |
void | updatePrintRepeatRowsHeight () |
void | definePrintRange (Selection *selectionInfo) |
void | resetPrintRange () |
void | insertColumn (int col, int nbCol) |
void | removeColumn (int col, int nbCol) |
void | insertRow (int row, int nbRow) |
void | removeRow (int row, int nbRow) |
void | setZoom (double _zoom, bool checkPageLimit=true) |
double | zoom () const |
bool | pageNeedsPrinting (QRect &page_range) |
Member Function Documentation
float KSpread::SheetPrint::bottomBorder | ( | ) | const [inline] |
float KSpread::SheetPrint::bottomBorderPts | ( | ) | const [inline] |
void SheetPrint::calculateZoomForPageLimitX | ( | ) |
Calculates the zoom factor, so that the printout fits on pages in X direction.
Definition at line 1400 of file kspread_sheetprint.cc.
void SheetPrint::calculateZoomForPageLimitY | ( | ) |
Calculates the zoom factor, so that the printout fits on pages in Y direction.
Definition at line 1462 of file kspread_sheetprint.cc.
void SheetPrint::definePrintRange | ( | Selection * | selectionInfo | ) |
Define the print range with the current selection.
Definition at line 991 of file kspread_sheetprint.cc.
QString SheetPrint::delocalizeHeadFootLine | ( | const QString & | _text | ) |
Replaces in _text all i18n-versions of the page macros by the internal version of the macros.
Definition at line 1038 of file kspread_sheetprint.cc.
KoHeadFoot SheetPrint::headFootLine | ( | ) | const |
Returns the head and foot line of the print out.
Definition at line 1062 of file kspread_sheetprint.cc.
Updates the print range, according to the inserted columns.
Definition at line 1661 of file kspread_sheetprint.cc.
Updates the print range, according to the inserted rows.
Definition at line 1682 of file kspread_sheetprint.cc.
bool SheetPrint::isOnNewPageX | ( | int | _column | ) |
Tests whether _column is the first column of a new page.
In this case the left border of this column may be drawn highlighted to show that this is a page break.
Definition at line 690 of file kspread_sheetprint.cc.
bool SheetPrint::isOnNewPageY | ( | int | _row | ) |
Tests whether _row is the first row of a new page.
In this case the top border of this row may be drawn highlighted to show that this is a page break.
Definition at line 805 of file kspread_sheetprint.cc.
float KSpread::SheetPrint::leftBorder | ( | ) | const [inline] |
float KSpread::SheetPrint::leftBorderPts | ( | ) | const [inline] |
QString SheetPrint::localizeHeadFootLine | ( | const QString & | _text | ) |
Replaces in _text all page macros by the i18n-version of the macros.
Definition at line 1014 of file kspread_sheetprint.cc.
KoOrientation KSpread::SheetPrint::orientation | ( | ) | const [inline] |
const char * SheetPrint::orientationString | ( | ) | const |
- Returns:
- the ascii name of the paper orientation ( like Portrait, Landscape )
Definition at line 1248 of file kspread_sheetprint.cc.
int KSpread::SheetPrint::pageLimitX | ( | ) | const [inline] |
Return the page limit in X direction.
0 means no limit
Definition at line 200 of file kspread_sheetprint.h.
int KSpread::SheetPrint::pageLimitY | ( | ) | const [inline] |
Return the page limit in Y direction.
0 means no limit
Definition at line 206 of file kspread_sheetprint.h.
bool SheetPrint::pageNeedsPrinting | ( | QRect & | page_range | ) |
KoFormat KSpread::SheetPrint::paperFormat | ( | ) | const [inline] |
QString SheetPrint::paperFormatString | ( | ) | const |
- Returns:
- the ascii name of the paper format ( like A4, Letter etc. )
Definition at line 1236 of file kspread_sheetprint.cc.
float KSpread::SheetPrint::paperHeight | ( | ) | const [inline] |
float KSpread::SheetPrint::paperHeightPts | ( | ) | const [inline] |
- Returns:
- the height of the paper in zoomed points.
Definition at line 81 of file kspread_sheetprint.h.
KoPageLayout SheetPrint::paperLayout | ( | ) | const |
float KSpread::SheetPrint::paperWidth | ( | ) | const [inline] |
float KSpread::SheetPrint::paperWidthPts | ( | ) | const [inline] |
- Returns:
- the width of the paper in zoomed points.
Definition at line 89 of file kspread_sheetprint.h.
float KSpread::SheetPrint::prinsheetHeight | ( | ) | const [inline] |
- Returns:
- the prinsheet height of the paper in millimeters.
Definition at line 67 of file kspread_sheetprint.h.
float KSpread::SheetPrint::prinsheetHeightPts | ( | ) | const [inline] |
- Returns:
- the prinsheet height of the paper in zoomed points.
Definition at line 72 of file kspread_sheetprint.h.
float KSpread::SheetPrint::prinsheetWidth | ( | ) | const [inline] |
- Returns:
- the prinsheet width of the paper in millimeters.
Definition at line 57 of file kspread_sheetprint.h.
float KSpread::SheetPrint::prinsheetWidthPts | ( | ) | const [inline] |
- Returns:
- the prinsheet width of the paper in zoomed points.
Definition at line 62 of file kspread_sheetprint.h.
bool SheetPrint::print | ( | QPainter & | painter, | |
KPrinter * | _printer | |||
) |
bool KSpread::SheetPrint::printCharts | ( | ) | const [inline] |
Returns, if the charts shall be shown on printouts.
Definition at line 340 of file kspread_sheetprint.h.
bool KSpread::SheetPrint::printCommentIndicator | ( | ) | const [inline] |
Returns, if the comment rect shall be shown on printouts.
Definition at line 360 of file kspread_sheetprint.h.
bool KSpread::SheetPrint::printFormulaIndicator | ( | ) | const [inline] |
Returns, if the formula rect shall be shown on printouts.
Definition at line 370 of file kspread_sheetprint.h.
bool KSpread::SheetPrint::printGraphics | ( | ) | const [inline] |
Returns, if the graphics shall be shown on printouts.
Definition at line 350 of file kspread_sheetprint.h.
bool KSpread::SheetPrint::printGrid | ( | ) | const [inline] |
Returns, if the grid shall be shown on printouts.
Definition at line 320 of file kspread_sheetprint.h.
bool KSpread::SheetPrint::printObjects | ( | ) | const [inline] |
Returns, if the objects shall be shown on printouts.
Definition at line 330 of file kspread_sheetprint.h.
QRect KSpread::SheetPrint::printRange | ( | ) | const [inline] |
Returns the print range.
Returns ( QPoint (1, 1), QPoint(KS_colMax, KS_rowMax) ) if nothing is defined
Definition at line 189 of file kspread_sheetprint.h.
Returns the columns, which are printed on each page.
Returns QPair (0, 0) if nothing is defined
Definition at line 236 of file kspread_sheetprint.h.
Returns the rows, which are printed on each page.
Returns QPair (0, 0) if nothing is defined
Definition at line 248 of file kspread_sheetprint.h.
Updates the print range, according to the inserted columns.
Definition at line 1703 of file kspread_sheetprint.cc.
Updates the print range, according to the inserted rows.
Definition at line 1741 of file kspread_sheetprint.cc.
void SheetPrint::replaceHeadFootLineMacro | ( | QString & | _text, | |
const QString & | _search, | |||
const QString & | _replace | |||
) |
Replaces in _text all _search text parts by _replace text parts.
Included is a test to not change if _search == _replace. The arguments should not include neither the beginning "<" nor the leading ">", this is already included internally.
Definition at line 1008 of file kspread_sheetprint.cc.
void SheetPrint::resetPrintRange | ( | ) |
Reset the print range to the standard definition (whole sheet).
Definition at line 1001 of file kspread_sheetprint.cc.
float KSpread::SheetPrint::rightBorder | ( | ) | const [inline] |
float KSpread::SheetPrint::rightBorderPts | ( | ) | const [inline] |
void SheetPrint::setHeadFootLine | ( | const QString & | _headl, | |
const QString & | _headm, | |||
const QString & | _headr, | |||
const QString & | _footl, | |||
const QString & | _footm, | |||
const QString & | _footr | |||
) |
Sets the head and foot line of the print out.
Definition at line 1076 of file kspread_sheetprint.cc.
void SheetPrint::setPageLimitX | ( | int | pages | ) |
Sets the page limit in X direction.
The zoom factor will be adjusted, so that there is a maximum of
- pages pages in X direction. 0 releases the limit
Definition at line 1368 of file kspread_sheetprint.cc.
void SheetPrint::setPageLimitY | ( | int | pages | ) |
Sets the page limit in Y direction.
The zoom factor will be adjusted, so that there is a maximum of
- pages pages in X direction. 0 releases the limit
Definition at line 1384 of file kspread_sheetprint.cc.
void SheetPrint::setPaperLayout | ( | float | _leftBorder, | |
float | _topBorder, | |||
float | _rightBorder, | |||
float | _bottomBoder, | |||
const QString & | _paper, | |||
const QString & | _orientation | |||
) |
A convenience function using a QString as paper format and orientation.
Definition at line 1155 of file kspread_sheetprint.cc.
void SheetPrint::setPaperLayout | ( | float | _leftBorder, | |
float | _topBorder, | |||
float | _rightBorder, | |||
float | _bottomBoder, | |||
KoFormat | _paper, | |||
KoOrientation | orientation | |||
) |
Changes the paper layout and repaints the currently displayed Sheet.
Definition at line 1124 of file kspread_sheetprint.cc.
void SheetPrint::setPrintCharts | ( | bool | _printCharts | ) |
Sets, if the charts shall be shown on printouts.
Definition at line 1541 of file kspread_sheetprint.cc.
void SheetPrint::setPrintCommentIndicator | ( | bool | _printCommentIndicator | ) |
Sets, if the comment rect shall be shown on printouts.
Definition at line 1559 of file kspread_sheetprint.cc.
void SheetPrint::setPrintFormulaIndicator | ( | bool | _printFormulaIndicator | ) |
Sets, if the formula Rect shall be shown on printouts.
Definition at line 1568 of file kspread_sheetprint.cc.
void SheetPrint::setPrintGraphics | ( | bool | _printGraphics | ) |
Sets, if the graphics shall be shown on printouts.
Definition at line 1550 of file kspread_sheetprint.cc.
void SheetPrint::setPrintGrid | ( | bool | _printGrid | ) |
Sets, if the grid shall be shown on printouts.
Definition at line 1523 of file kspread_sheetprint.cc.
void SheetPrint::setPrintObjects | ( | bool | _printObjects | ) |
Sets, if the objects shall be shown on printouts.
Definition at line 1532 of file kspread_sheetprint.cc.
void SheetPrint::setPrintRange | ( | const QRect & | _printRange | ) |
Sets the print range.
Set it to ( QPoint (1, 1), QPoint(KS_colMax, KS_rowMax) ) to undefine it
Definition at line 1343 of file kspread_sheetprint.cc.
Sets the columns to be printed on each page.
Only the x-values of the points are used Set it to QPair (0, 0) to undefine it
Definition at line 1601 of file kspread_sheetprint.cc.
Sets the rows to be printed on each page.
Only the y-values of the points are used Set it to QPair (0, 0) to undefine it
Definition at line 1631 of file kspread_sheetprint.cc.
void SheetPrint::setZoom | ( | double | _zoom, | |
bool | checkPageLimit = true | |||
) |
Sets the zoom level of the printout to _zoom If checkPageLimit is false, then the zoom will be set, without checking that this zoom level fits to an availabl page limit.
Definition at line 1779 of file kspread_sheetprint.cc.
float KSpread::SheetPrint::topBorder | ( | ) | const [inline] |
float KSpread::SheetPrint::topBorderPts | ( | ) | const [inline] |
void SheetPrint::updateNewPageListX | ( | int | _col | ) |
Updates the new page list for columns starting at column.
- _col
Definition at line 921 of file kspread_sheetprint.cc.
void SheetPrint::updateNewPageListY | ( | int | _row | ) |
Updates the new page list for rows starting at row.
- _row
Definition at line 956 of file kspread_sheetprint.cc.
void SheetPrint::updateNewPageX | ( | int | _column | ) |
void SheetPrint::updateNewPageY | ( | int | _row | ) |
void SheetPrint::updatePrintRepeatColumnsWidth | ( | ) |
Updates m_dPrintRepeatColumnsWidth according to the new settings.
Definition at line 1576 of file kspread_sheetprint.cc.
void SheetPrint::updatePrintRepeatRowsHeight | ( | ) |
Updates m_dPrintRepeatColumnsWidth according to the new settings.
Definition at line 1588 of file kspread_sheetprint.cc.
double KSpread::SheetPrint::zoom | ( | ) | const [inline] |
Returns the zoom level of the printout as double.
Definition at line 423 of file kspread_sheetprint.h.
The documentation for this class was generated from the following files: