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

Printer.h

00001 #ifndef PRINTER_H
00002 #define PRINTER_H
00003 #include <qstring.h>
00004 #include <qfile.h>
00005 #include <qfont.h>
00006 #include "Painter.h"
00007 #include <qtextstream.h>
00008 #include <qptrlist.h>
00009 #include <qbuffer.h>
00010 #define PRSTNOTSTARTED 0
00011 #define PRSTRUNNING 1
00012 #define PRSTENDED 2
00013 #define PRSTSENT 3
00014 
00015 
00016 void testPrint();
00027 class Printer:public Painter{
00028 QString fileName;
00029 QFile * file;
00030 int textAlign;
00031 //QBuffer * buffer;
00032 QString font;
00033 //int npages;
00034 int status;
00035 QString scale;
00036 int pageNumber;
00037 double fontSize;
00038 double musicFontSize;
00039 double lineWidth;
00040 QTextStream * ts;
00041 
00042 float papersizex,papersizey;
00043 QPtrList<QBuffer> pageBuffers;
00044 public:
00045 Printer(int nbpages);
00046 void print();
00047 void setBrush(Qt::BrushStyle );
00048 
00054 void setFontFamily (int);
00055 void setFont(QFont);
00056 void setFontSize(double f);
00057 void setTextAlign(int);
00061 void setFTFont(int);
00062 void setFTSize(int);
00063 
00064 
00065 void drawFTSymbol(int,float,float);
00066 void drawFTSymbolEnc(long unsigned int,float,float,int enc);
00067 void drawNoteLine(float,float,int);
00068 void drawLine(double,double,double,double);
00069 void drawRect(double,double,double,double);
00070 void drawEllipse(float,float,float,float);
00071 void setBrush(const QColor &);
00072 void begin();
00073 void end();
00074 bool isPrinter();
00075 
00076 
00077 
00078 
00079 QCoordsRect getBoundingBox (int nglyph);
00080 void setPenColor(const QColor&);
00081 void setPen(const QColor&);
00082 void setPen(Qt::PenStyle);
00083 void drawStemBar (double, double, double, double);
00084 void drawSlur(double,double,double,double,int);
00085 void drawBrace(double,double,double);
00086 void drawText(double,double,QString);
00087 float width();
00088 void newPage();
00089 
00090 void addFont(QString filename);
00091 void addResource(QString filename);
00092 void drawFontGlyph(float bx,float by,int glyph,QString font);
00093 float height();
00094 void send(char * destname);
00095 };
00096 #endif

Generated on Tue Jun 1 21:13:29 2004 for Alternate Take by doxygen 1.3.6