knotes

knoteprinter.h
00001 #ifndef KNOTEPRINTER_H
00002 #define KNOTEPRINTER_H
00003 
00004 #include <tqfont.h>
00005 #include <tqpalette.h>
00006 #include <tqstring.h>
00007 
00008 class TQMimeSourceFactory;
00009 class TQStyleSheet;
00010 template <class T> class TQValueList;
00011 class KPrinter;
00012 
00013 namespace KCal {
00014     class Journal;
00015 }
00016 
00017 class KNotePrinter {
00018 public:
00019 
00020     KNotePrinter();
00021 
00022     void printNote( const TQString& name,
00023                     const TQString& content ) const;
00024 
00025     void printNotes( const TQValueList<KCal::Journal*>& journals ) const;
00026 
00027     void setFont( const TQFont& font );
00028     TQFont font() const;
00029 
00030     void setColorGroup( const TQColorGroup& colorGroup );
00031     TQColorGroup colorGroup() const;
00032 
00033     void setStyleSheet( TQStyleSheet* styleSheet );
00034     TQStyleSheet* styleSheet() const;
00035 
00036     void setContext( const TQString& context );
00037     TQString context() const;
00038 
00039     void setMimeSourceFactory( TQMimeSourceFactory* factory );
00040     TQMimeSourceFactory* mimeSourceFactory() const;
00041 
00042 private:
00043     void doPrint( KPrinter& printer, TQPainter& painter,
00044                   const TQString& content ) const;
00045 
00046     TQColorGroup m_colorGroup;
00047     TQFont m_font;
00048     TQStyleSheet* m_styleSheet;
00049     TQMimeSourceFactory* m_mimeSourceFactory;
00050     TQString m_context;
00051 };
00052 
00053 #endif // KNOTEPRINTER