Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

qlabpdf.h

00001 #ifndef QLABPDF_H
00002 #define QLABPDF_H
00003 
00004 #include <qobject.h>
00005 #include <qvariant.h>
00006 
00007 typedef struct {
00008         double top ;
00009         double left ;
00010         double bottom ;
00011         double right ;
00012 } ReportMargins ;
00013 
00014 class Q_EXPORT QlabPdf : public QObject
00015 {
00016         Q_OBJECT ;
00017 
00018         Q_ENUMS( Orientation ) ;
00019         Q_ENUMS( PaperSize ) ;
00020         Q_ENUMS( ReportMetrics ) ;
00021         Q_ENUMS( ReportResolver ) ;
00022 
00023 public :
00028         enum Orientation { Portrait,            
00029                                            Landscape            
00030                                          } ;
00037         enum PaperSize { A0, A1, A2, A3, A4, A5, A6, B5, Letter, Legal, Ledger } ;
00042         enum ReportMetrics { Dot,                       
00043                                                  DotTenth;              
00044                                                  Millimeter,    
00045                                                  Centimeter,    
00046                                                  InchTenth,             
00047                                                  Inch                   
00048                                            } ;
00056         enum ReportResolver { TopLeft,          
00057                                                   BottomLeft    
00058                                                 } ;
00059 
00060         QlabPdf( const QString & title, Orientation orient = Portrait, PaperSize paper = A4,
00061                          ReportMetrics metrics = Millimeter, ReportResolver resolve = TopLeft,
00062                          QObject * parent = 0, char * name = 0 ) ;
00063         ~QlabPdf() ;
00064 
00065         QString closeDocument() ;
00066 
00067 public slots :
00068         double scale() const ;
00069         void setScale( const double newScale ) ;
00070         QString title() const ;
00071         void setTitle( const QString & title ) ;
00072         QStringList fonts() const ;
00073         void setFonts( const QStringList & fonts ) ;
00074         bool addFont( const QFont & font ) ;
00075         QString author() const ;
00076         void setAuthor( const QString & author ) ;
00077         QString subject() const ;
00078         void setSubject( const QString & subject ) ;
00079 
00080 
00081 signals :
00082 
00083 protected :
00084 
00085 protected slots :
00086         void startReport() ;
00087 
00088 private :
00089         bool setScale() ;                               
00090         Orientation orientation ;               
00091         PaperSize paperSize ;                   
00092         ReportMetrics reportMetrics ;   
00093         ReportResolver resolver ;               
00095         QString reportTitle ;                   
00096         QString reportAuthor ;                  
00097         QString reportSubject ;                 
00098         uint pageNo ;                                   
00099         double scale ;                                  
00100         QStringList availFonts ;                
00101         ReportMargins reportMargins ;   
00103 } ;
00104 
00105 #endif // QLABPDF_H

 

L.A.B. Project © 2001-2004 LAB Project & DJ Anubis