KGantt::PrintingContext
#include <KGanttPrintingContext>
Public Types | |
enum | Fitting { NoFitting = 1 , FitSinglePage = 2 , FitPageHeight = 4 } |
Public Member Functions | |
PrintingContext () | |
PrintingContext (const PrintingContext &other) | |
~PrintingContext () | |
qreal | bottom () const |
bool | drawColumnLabels () const |
bool | drawRowLabels () const |
Fitting | fitting () const |
qreal | left () const |
PrintingContext & | operator= (const PrintingContext &other) |
qreal | right () const |
QRectF | sceneRect () const |
void | setBottom (qreal bottom) |
void | setDrawColumnLabels (bool state) |
void | setDrawRowLabels (bool state) |
void | setFitting (const Fitting &value) |
void | setLeft (qreal left) |
void | setRight (qreal right) |
void | setSceneRect (const QRectF &rect) |
void | setTop (qreal top) |
qreal | top () const |
Detailed Description
The PrintingContext class provides options for printing the gantt chart.
- Since
- 2.8.0
Member Enumeration Documentation
◆ Fitting
Enumerator | |
---|---|
NoFitting | No scaling, print as many pages as needed. |
FitSinglePage | Scale diagram to fit on a single page. |
FitPageHeight | Scale diagram height to fit one page. |
Definition at line 43 of file kganttprintingcontext.h.
Constructor & Destructor Documentation
◆ PrintingContext() [1/2]
KGantt::PrintingContext::PrintingContext | ( | ) |
Create a default context
Definition at line 22 of file kganttprintingcontext.cpp.
◆ PrintingContext() [2/2]
KGantt::PrintingContext::PrintingContext | ( | const PrintingContext & | other | ) |
Copy the other context into this
Definition at line 30 of file kganttprintingcontext.cpp.
◆ ~PrintingContext()
KGantt::PrintingContext::~PrintingContext | ( | ) |
Destroy this context
Definition at line 41 of file kganttprintingcontext.cpp.
Member Function Documentation
◆ bottom()
qreal KGantt::PrintingContext::bottom | ( | ) | const |
- Returns
- bottom position in the diagram to end printing
Definition at line 116 of file kganttprintingcontext.cpp.
◆ drawColumnLabels()
bool KGantt::PrintingContext::drawColumnLabels | ( | ) | const |
- Returns
- if the the column labels shall be printed
Definition at line 76 of file kganttprintingcontext.cpp.
◆ drawRowLabels()
bool KGantt::PrintingContext::drawRowLabels | ( | ) | const |
- Returns
- if the the row labels shall be printed
Definition at line 66 of file kganttprintingcontext.cpp.
◆ fitting()
PrintingContext::Fitting KGantt::PrintingContext::fitting | ( | ) | const |
- Returns
- print scaling
Definition at line 56 of file kganttprintingcontext.cpp.
◆ left()
qreal KGantt::PrintingContext::left | ( | ) | const |
- Returns
- position in the diagram to start printing
Definition at line 86 of file kganttprintingcontext.cpp.
◆ operator=()
PrintingContext & KGantt::PrintingContext::operator= | ( | const PrintingContext & | other | ) |
Copy the other context into this
Definition at line 35 of file kganttprintingcontext.cpp.
◆ right()
qreal KGantt::PrintingContext::right | ( | ) | const |
- Returns
- position in the diagram to end printing
Definition at line 106 of file kganttprintingcontext.cpp.
◆ sceneRect()
QRectF KGantt::PrintingContext::sceneRect | ( | ) | const |
- Returns
- scene rect
Definition at line 46 of file kganttprintingcontext.cpp.
◆ setBottom()
void KGantt::PrintingContext::setBottom | ( | qreal | bottom | ) |
Set bottom position to end printing to right
Definition at line 121 of file kganttprintingcontext.cpp.
◆ setDrawColumnLabels()
void KGantt::PrintingContext::setDrawColumnLabels | ( | bool | state | ) |
Set if the column labels shall be printed to state
.
Definition at line 81 of file kganttprintingcontext.cpp.
◆ setDrawRowLabels()
void KGantt::PrintingContext::setDrawRowLabels | ( | bool | state | ) |
Set if the row labels shall be printed to state
The row labels are printed to the left of the chart.
Definition at line 71 of file kganttprintingcontext.cpp.
◆ setFitting()
void KGantt::PrintingContext::setFitting | ( | const Fitting & | value | ) |
Set print scaling to value
Definition at line 61 of file kganttprintingcontext.cpp.
◆ setLeft()
void KGantt::PrintingContext::setLeft | ( | qreal | left | ) |
Set left position to start printing to left
The default is 0.0, meaning the left of the chart.
To print a certain range of a chart with a DateTimeGrid, use qreal DateTimeGrid::mapFromDateTime( const QDateTime& dt) const to figure out the values for left
.
Definition at line 91 of file kganttprintingcontext.cpp.
◆ setRight()
void KGantt::PrintingContext::setRight | ( | qreal | right | ) |
Set right position to right printing to right
The default is 0.0, meaning the right of the chart.
To print a certain range of a chart with a DateTimeGrid, use qreal DateTimeGrid::mapFromDateTime( const QDateTime& dt) const to figure out the values for right
.
Definition at line 111 of file kganttprintingcontext.cpp.
◆ setSceneRect()
void KGantt::PrintingContext::setSceneRect | ( | const QRectF & | rect | ) |
Set sceneRect to rect Setting a null() rect means the whole diagram (default).
Definition at line 51 of file kganttprintingcontext.cpp.
◆ setTop()
void KGantt::PrintingContext::setTop | ( | qreal | top | ) |
Set the top position to start printing to top
Definition at line 101 of file kganttprintingcontext.cpp.
◆ top()
qreal KGantt::PrintingContext::top | ( | ) | const |
- Returns
- top position in the diagram to start printing
Definition at line 96 of file kganttprintingcontext.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 8 2024 11:50:55 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.