61 #include <QLinkedList>
63 #include <QApplication>
65 #include <QMouseEvent>
67 #include <QMainWindow>
76 #define POINTS_PER_INCH 72
84 #define DEFAULT_DPI 72
89 #define QT_DEFAULT_X 842
90 #define QT_DEFAULT_Y 595
109 void MasterChangedPage();
127 virtual void drawArc(
short x,
short y,
short width,
short height,
PLFLT angle1,
PLFLT angle2,
PLFLT rotate,
bool fill );
129 virtual void drawLine(
short x1,
short y1,
short x2,
short y2 );
130 virtual void drawPolyline(
short * x,
short * y,
PLINT npts );
131 virtual void drawPolygon(
short * x,
short * y,
PLINT npts );
132 virtual void drawText(
EscText* txt );
133 virtual void setColor(
int r,
int g,
int b,
double alpha );
135 virtual void setGradient(
int x1,
int x2,
int y1,
int y2,
136 unsigned char *r,
unsigned char *g,
137 unsigned char *b,
PLFLT *alpha,
PLINT ncol1 );
138 virtual void setWidthF(
PLFLT w );
140 virtual void setSolid();
150 void drawTextInPicture( QPainter*,
const QString& );
167 #if defined ( PLD_bmpqt ) || defined ( PLD_jpgqt ) || defined ( PLD_pngqt ) || defined ( PLD_ppmqt ) || defined ( PLD_tiffqt ) || defined ( PLD_memqt )
174 virtual ~QtRasterDevice();
177 void definePlotName(
const char*
fileName,
const char* format );
179 virtual void setResolution(
double dotsPerInch )
181 setDotsPerMeterX( (
int) ( ( dotsPerInch / 25.4 ) * 1000. ) );
182 setDotsPerMeterY( (
int) ( ( dotsPerInch / 25.4 ) * 1000. ) );
185 unsigned char *memory;
193 #if defined ( PLD_svgqt ) && QT_VERSION >= 0x040300
194 #include <QSvgGenerator>
202 virtual ~QtSVGDevice();
205 void definePlotName(
const char*
fileName );
212 #if defined ( PLD_epsqt ) || defined ( PLD_pdfqt )
218 #if QT_VERSION < 0x040400
219 QtEPSDevice(
int i_iWidth = -1,
int i_iHeight = -1 );
224 virtual ~QtEPSDevice();
227 void definePlotName(
const char*
fileName,
int ifeps );
234 #if defined ( PLD_qtwidget ) || defined ( PLD_extqt )
236 typedef enum ElementType_
292 QPolygonF * Polyline;
294 QLinearGradient * LinearGradient;
295 struct ColourStruct_* ColourStruct;
296 struct TextStruct_ * TextStruct;
297 struct ArcStruct_ * ArcStruct;
320 virtual ~QtPLWidget();
328 void drawLine(
short x1,
short y1,
short x2,
short y2 );
331 void setColor(
int r,
int g,
int b,
double alpha );
334 unsigned char *r,
unsigned char *g,
335 unsigned char *b,
PLFLT *alpha,
PLINT ncol1 );
343 void resizeEvent( QResizeEvent* );
344 void paintEvent( QPaintEvent* );
345 void mouseEvent( QMouseEvent * event );
347 void getPlotParameters(
double & io_dXFact,
double & io_dYFact,
double & io_dXOffset,
double & io_dYOffset );
348 void doPlot( QPainter* p,
double x_fact,
double y_fact,
double x_offset,
double y_offset );
349 void renderText( QPainter* p,
struct TextStruct_* s,
double x_fact,
double x_offset,
double y_fact,
double y_offset );
350 void lookupButtonEvent( QMouseEvent * event );
353 void resetPensAndBrushes( QPainter* );
355 double m_dAspectRatio;
356 QPixmap * m_pixPixmap;
358 QLinkedList<BufferElement> m_listBuffer;
361 bool redrawFromLastFlush;
371 QLinkedList<BufferElement>::const_iterator start_iterator;
393 void mousePressEvent( QMouseEvent * event );
394 void mouseReleaseEvent( QMouseEvent * event );
395 void mouseMoveEvent( QMouseEvent * event );
396 void keyPressEvent( QKeyEvent* event );
397 void closeEvent( QCloseEvent* event );
403 #if defined ( PLD_extqt )
411 virtual ~QtExtWidget();
413 void captureMousePlotCoords(
PLFLT* x,
PLFLT* y );
417 void mouseMoveEvent( QMouseEvent* event );
418 void mouseReleaseEvent( QMouseEvent* event );
419 void mousePressEvent( QMouseEvent* event );
422 void paintEvent( QPaintEvent* );
427 double cursor_x, cursor_y;
447 #if defined ( plplot_pyqt4_EXPORTS )
448 #define initplplot_pyqt4 PLDLLIMPEXP_PYQT4 initplplot_pyqt4
451 #if defined ( plplot_pyqt5_EXPORTS )
452 #define initplplot_pyqt5 PLDLLIMPEXP_PYQT5 initplplot_pyqt5
virtual void drawPolygon(short *x, short *y, PLINT npts)
virtual void setColor(int r, int g, int b, double alpha)
PLDLLIMPEXP_QT_DATA(int) vectorize
virtual void drawPolyline(short *x, short *y, PLINT npts)
virtual void drawArc(short x, short y, short width, short height, PLFLT angle1, PLFLT angle2, PLFLT rotate, bool fill)
QtPLDriver * masterDevice
static const char * fileName
virtual void drawText(EscText *txt)
virtual void setBackgroundColor(int, int, int, double)
static PLStream * pls[PL_NSTREAMS]
virtual void setWidthF(PLFLT w)
virtual void setGradient(int x1, int x2, int y1, int y2, unsigned char *r, unsigned char *g, unsigned char *b, PLFLT *alpha, PLINT ncol1)
virtual void drawLine(short x1, short y1, short x2, short y2)
PLDLLIMPEXP_CXX void fill(PLINT n, const PLFLT *x, const PLFLT *y)