KGantt::PrintingContext

Search for usage in LXR

KGantt::PrintingContext Class Reference

#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
 
PrintingContextoperator= (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

Definition at line 27 of file kganttprintingcontext.h.

Member Enumeration Documentation

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

KGantt::PrintingContext::PrintingContext ( )

Create a default context

Definition at line 22 of file kganttprintingcontext.cpp.

KGantt::PrintingContext::PrintingContext ( const PrintingContext other)

Copy the other context into this

Definition at line 30 of file kganttprintingcontext.cpp.

KGantt::PrintingContext::~PrintingContext ( )

Destroy this context

Definition at line 41 of file kganttprintingcontext.cpp.

Member Function Documentation

qreal KGantt::PrintingContext::bottom ( ) const
Returns
bottom position in the diagram to end printing

Definition at line 116 of file kganttprintingcontext.cpp.

bool KGantt::PrintingContext::drawColumnLabels ( ) const
Returns
if the the column labels shall be printed

Definition at line 76 of file kganttprintingcontext.cpp.

bool KGantt::PrintingContext::drawRowLabels ( ) const
Returns
if the the row labels shall be printed

Definition at line 66 of file kganttprintingcontext.cpp.

PrintingContext::Fitting KGantt::PrintingContext::fitting ( ) const
Returns
print scaling

Definition at line 56 of file kganttprintingcontext.cpp.

qreal KGantt::PrintingContext::left ( ) const
Returns
position in the diagram to start printing

Definition at line 86 of file kganttprintingcontext.cpp.

PrintingContext & KGantt::PrintingContext::operator= ( const PrintingContext other)

Copy the other context into this

Definition at line 35 of file kganttprintingcontext.cpp.

qreal KGantt::PrintingContext::right ( ) const
Returns
position in the diagram to end printing

Definition at line 106 of file kganttprintingcontext.cpp.

QRectF KGantt::PrintingContext::sceneRect ( ) const
Returns
scene rect

Definition at line 46 of file kganttprintingcontext.cpp.

void KGantt::PrintingContext::setBottom ( qreal  bottom)

Set bottom position to end printing to right

Definition at line 121 of file kganttprintingcontext.cpp.

void KGantt::PrintingContext::setDrawColumnLabels ( bool  state)

Set if the column labels shall be printed to state.

Definition at line 81 of file kganttprintingcontext.cpp.

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.

void KGantt::PrintingContext::setFitting ( const Fitting value)

Set print scaling to value

Definition at line 61 of file kganttprintingcontext.cpp.

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.

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.

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.

void KGantt::PrintingContext::setTop ( qreal  top)

Set the top position to start printing to top

Definition at line 101 of file kganttprintingcontext.cpp.

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:
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Nov 29 2021 22:32:47 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.