summaryrefslogtreecommitdiffstats
path: root/karm/print.h
blob: 60347f405fe99425a1fb27c57c8f7430486bafd3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef KARM_PRINT_H
#define KARM_PRINT_H

#undef Color // X11 headers
#undef GrayScale // X11 headers
#include <kprinter.h>

class TQPainter;
class TQString;

class Task;
class TaskView;

/**
 * Provide printing capabilities.
 */

class MyPrinter : public KPrinter
{
  public:
    MyPrinter( const TaskView *taskView );
    void print();
    void printLine( TQString total, TQString session, TQString name, TQPainter &,
                    int );
    void printTask( Task *task, TQPainter &, int level );  
    int calculateReqNameWidth( Task *task, TQFontMetrics &metrics,
                               int level);
  
  private:
    const TaskView *_taskView;

    int xMargin, yMargin;
    int yoff;
    int timeWidth;
    int sessionTimeWidth;
    int nameFieldWidth;
    int lineHeight;
    int pageHeight;  
};

#endif // KARM_PRINT_H