61 #include <QLinkedList> 63 #include <QApplication> 65 #include <QMouseEvent> 67 #include <QMainWindow> 70 #include <QPainterPath> 77 #define POINTS_PER_INCH 72 85 #define DEFAULT_DPI 72 90 #define QT_DEFAULT_X 842 91 #define QT_DEFAULT_Y 595 110 void MasterChangedPage();
128 virtual void drawArc(
short x,
short y,
short width,
short height,
PLFLT angle1,
PLFLT angle2,
PLFLT rotate,
bool fill );
130 virtual void drawLine(
short x1,
short y1,
short x2,
short y2 );
131 virtual void drawPolyline(
short * x,
short * y,
PLINT npts );
132 virtual void drawPolygon(
short * x,
short * y,
PLINT npts );
133 virtual void drawText(
EscText* txt );
134 virtual void setColor(
int r,
int g,
int b,
double alpha );
136 virtual void setGradient(
int x1,
int x2,
int y1,
int y2,
137 unsigned char *r,
unsigned char *g,
138 unsigned char *b,
PLFLT *alpha,
PLINT ncol1 );
139 virtual void setWidthF(
PLFLT w );
141 virtual void setSolid();
151 void drawTextInPicture( QPainter*,
const QString& );
168 #if defined ( PLD_bmpqt ) || defined ( PLD_jpgqt ) || defined ( PLD_pngqt ) || defined ( PLD_ppmqt ) || defined ( PLD_tiffqt ) || defined ( PLD_memqt ) 175 virtual ~QtRasterDevice();
178 void definePlotName(
const char*
fileName,
const char* format );
180 virtual void setResolution(
double dotsPerInch )
182 setDotsPerMeterX( (
int) ( ( dotsPerInch / 25.4 ) * 1000. ) );
183 setDotsPerMeterY( (
int) ( ( dotsPerInch / 25.4 ) * 1000. ) );
186 unsigned char *memory;
194 #if defined ( PLD_svgqt ) && QT_VERSION >= 0x040300 195 #include <QSvgGenerator> 203 virtual ~QtSVGDevice();
206 void definePlotName(
const char*
fileName );
213 #if defined ( PLD_epsqt ) || defined ( PLD_pdfqt ) 219 #if QT_VERSION < 0x040400 220 QtEPSDevice(
int i_iWidth = -1,
int i_iHeight = -1 );
225 virtual ~QtEPSDevice();
228 void definePlotName(
const char*
fileName,
int ifeps );
235 #if defined ( PLD_qtwidget ) || defined ( PLD_extqt ) 237 typedef enum ElementType_
293 QPolygonF * Polyline;
295 QLinearGradient * LinearGradient;
296 struct ColourStruct_* ColourStruct;
297 struct TextStruct_ * TextStruct;
298 struct ArcStruct_ * ArcStruct;
321 virtual ~QtPLWidget();
329 void drawLine(
short x1,
short y1,
short x2,
short y2 );
332 void setColor(
int r,
int g,
int b,
double alpha );
335 unsigned char *r,
unsigned char *g,
336 unsigned char *b,
PLFLT *alpha,
PLINT ncol1 );
344 void resizeEvent( QResizeEvent* );
345 void paintEvent( QPaintEvent* );
346 void mouseEvent( QMouseEvent * event );
348 void getPlotParameters(
double & io_dXFact,
double & io_dYFact,
double & io_dXOffset,
double & io_dYOffset );
349 void doPlot( QPainter* p,
double x_fact,
double y_fact,
double x_offset,
double y_offset );
350 void renderText( QPainter* p,
struct TextStruct_* s,
double x_fact,
double x_offset,
double y_fact,
double y_offset );
351 void lookupButtonEvent( QMouseEvent * event );
354 void resetPensAndBrushes( QPainter* );
356 double m_dAspectRatio;
357 QPixmap * m_pixPixmap;
359 QLinkedList<BufferElement> m_listBuffer;
362 bool redrawFromLastFlush;
372 QLinkedList<BufferElement>::const_iterator start_iterator;
394 void mousePressEvent( QMouseEvent * event );
395 void mouseReleaseEvent( QMouseEvent * event );
396 void mouseMoveEvent( QMouseEvent * event );
397 void keyPressEvent( QKeyEvent* event );
398 void closeEvent( QCloseEvent* event );
404 #if defined ( PLD_extqt ) 412 virtual ~QtExtWidget();
414 void captureMousePlotCoords(
PLFLT* x,
PLFLT* y );
418 void mouseMoveEvent( QMouseEvent* event );
419 void mouseReleaseEvent( QMouseEvent* event );
420 void mousePressEvent( QMouseEvent* event );
423 void paintEvent( QPaintEvent* );
428 double cursor_x, cursor_y;
448 #if defined ( plplot_pyqt4_EXPORTS ) 449 #define initplplot_pyqt4 PLDLLIMPEXP_PYQT4 initplplot_pyqt4 452 #if defined ( plplot_pyqt5_EXPORTS ) 453 #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)