YATiSh
Yet Another TIme SHeet
Public Member Functions | Private Member Functions | Private Attributes | List of all members
yatishPDF Class Reference

Exports a PDF reflecting the current state of panel #2. More...

#include <yatishPDF.h>

Collaboration diagram for yatishPDF:
Collaboration graph
[legend]

Public Member Functions

 yatishPDF (const Settings &, const wxListCtrl *, const yatishDBsqlite &, const wxString &="yatish.pdf")
 Prints a title then calls other member functions for the body of the PDF document. More...
 
 ~yatishPDF ()
 Writes the PDF document to the file which was given to the constructor. More...
 

Private Member Functions

void Summary (const yatishDBsqlite &)
 A few pieces of information about the data to be shown by [Charts() and] Listing(). More...
 
void Charts (const wxListCtrl *)
 Draws charts from the timeslot view only (6 columns). More...
 
void Listing (const wxListCtrl *)
 Writes a table corresponding to the current state of panel #2 (Ctrl-T). More...
 
void Header ()
 Creates the header of the PDF document, according to user preferences (Ctrl-P). More...
 
void Footer ()
 PDF footer (page count). More...
 
void PieChart (double, double, double, double, const Map4pie &, const wxColour *)
 Modified from charting.cpp in the wxPdfDocument samples. More...
 
void NoMoreThan6 (Map4pie &)
 Modifies its argument map so that there is no more than six records. More...
 

Private Attributes

const Settingssttngs
 
int colmax
 
int rowmax
 
wxString whereToWrite
 

Detailed Description

Exports a PDF reflecting the current state of panel #2.

Todo:
optionally export a non-localized (English) PDF

Definition at line 20 of file yatishPDF.h.

Constructor & Destructor Documentation

◆ yatishPDF()

yatishPDF::yatishPDF ( const Settings s,
const wxListCtrl *  l,
const yatishDBsqlite m,
const wxString &  p = "yatish.pdf" 
)

Prints a title then calls other member functions for the body of the PDF document.

Parameters
[in]sapplication settings
[in]ldata currently shown on panel #2*
[in]myatish SQLite driver (master)
[in]ppath to the (future) PDF file

Definition at line 19 of file yatishPDF.cpp.

◆ ~yatishPDF()

yatishPDF::~yatishPDF ( )

Writes the PDF document to the file which was given to the constructor.

Definition at line 43 of file yatishPDF.cpp.

Member Function Documentation

◆ Charts()

void yatishPDF::Charts ( const wxListCtrl *  lst)
private

Draws charts from the timeslot view only (6 columns).

Moreover a maximum of 6 sectors will be drawn.

Definition at line 89 of file yatishPDF.cpp.

◆ Footer()

void yatishPDF::Footer ( )
private

PDF footer (page count).

Definition at line 180 of file yatishPDF.cpp.

◆ Header()

void yatishPDF::Header ( )
private

Creates the header of the PDF document, according to user preferences (Ctrl-P).

Definition at line 159 of file yatishPDF.cpp.

◆ Listing()

void yatishPDF::Listing ( const wxListCtrl *  lst)
private

Writes a table corresponding to the current state of panel #2 (Ctrl-T).

Definition at line 132 of file yatishPDF.cpp.

◆ NoMoreThan6()

void yatishPDF::NoMoreThan6 ( Map4pie map)
private

Modifies its argument map so that there is no more than six records.

Creates an others key if need be, which contains the smallest items.

Definition at line 243 of file yatishPDF.cpp.

◆ PieChart()

void yatishPDF::PieChart ( double  xPage,
double  yPage,
double  width,
double  height,
const Map4pie data,
const wxColour *  colors 
)
private

Modified from charting.cpp in the wxPdfDocument samples.

Definition at line 188 of file yatishPDF.cpp.

◆ Summary()

void yatishPDF::Summary ( const yatishDBsqlite mDB)
private

A few pieces of information about the data to be shown by [Charts() and] Listing().

Definition at line 48 of file yatishPDF.cpp.

Member Data Documentation

◆ colmax

int yatishPDF::colmax
private

Definition at line 27 of file yatishPDF.h.

◆ rowmax

int yatishPDF::rowmax
private

Definition at line 27 of file yatishPDF.h.

◆ sttngs

const Settings& yatishPDF::sttngs
private

Definition at line 26 of file yatishPDF.h.

◆ whereToWrite

wxString yatishPDF::whereToWrite
private

Definition at line 28 of file yatishPDF.h.


The documentation for this class was generated from the following files: