18#ifndef HURRICANE_CELL_PRINTER_H
19#define HURRICANE_CELL_PRINTER_H
35#include "hurricane/Commons.h"
36#include "hurricane/Name.h"
37#include "hurricane/viewer/CellWidget.h"
51 static std::string getUserName ();
52 static std::string getTime (
const char* format );
53 static QString getUnitQString ();
54 static QString dbuToPrinterString (
DbU::Unit unit );
59 inline const CellWidget* getCellWidget ()
const;
61 inline void setMode (
int mode );
62 inline void setFitOnAbutmentBox (
bool );
64 inline bool fitOnAbutmentBox ()
const;
65 inline int resolution ()
const;
66 inline int frameMargin ()
const;
67 inline int cartoucheWidth ()
const;
68 inline int cartoucheHeight ()
const;
69 inline int titleHeight ()
const;
70 void pageDecorate ( QPainter& );
71 void toPdf ( QPrinter* ,
bool imageOnly=
false );
72 virtual std::string _getString ()
const;
74 int _scalePixels (
int pixels );
79 PaletteWidget* _palette;
93 bool _fitOnAbutmentBox;
98 inline CellWidget* CellPrinter::getCellWidget () {
return _cellWidget; }
99 inline const CellWidget* CellPrinter::getCellWidget ()
const {
return _cellWidget; }
101 inline void CellPrinter::setFitOnAbutmentBox (
bool state ) { _fitOnAbutmentBox = state; }
103 inline bool CellPrinter::fitOnAbutmentBox ()
const {
return _fitOnAbutmentBox; }
104 inline int CellPrinter::frameMargin ()
const {
return _frameMargin*_mode; }
105 inline int CellPrinter::cartoucheWidth ()
const {
return _cartoucheWidth*_mode; }
106 inline int CellPrinter::cartoucheHeight ()
const {
return _cartoucheHeight*_mode; }
107 inline int CellPrinter::titleHeight ()
const {
return _titleHeight*_mode; }
Widget to generate PDF file.
Definition CellPrinter.h:47
void setMode(int mode)
Definition CellPrinter.h:100
void setScreenCellWidget(CellWidget *)
CellPrinter(QWidget *parent=NULL)
void toPdf(QPrinter *, bool imageOnly=false)