QwtPlotRenderer.3 12.3 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504
.TH "QwtPlotRenderer" 3 "Sat Jan 26 2013" "Version 6.1-rc3" "Qwt User's Guide" \" -*- nroff -*-
.ad l
.nh
.SH NAME
QwtPlotRenderer \- 
.PP
Renderer for exporting a plot to a document, a printer or anything else, that is supported by QPainter/QPaintDevice\&.  

.SH SYNOPSIS
.br
.PP
.PP
\fC#include <qwt_plot_renderer\&.h>\fP
.PP
Inherits QObject\&.
.SS "Public Types"

.in +1c
.ti -1c
.RI "enum \fBDiscardFlag\fP { \fBDiscardNone\fP = 0x00, \fBDiscardBackground\fP = 0x01, \fBDiscardTitle\fP = 0x02, \fBDiscardLegend\fP = 0x04, \fBDiscardCanvasBackground\fP = 0x08, \fBDiscardFooter\fP = 0x10, \fBDiscardCanvasFrame\fP = 0x20 }"
.br
.RI "\fIDisard flags\&. \fP"
.ti -1c
.RI "enum \fBLayoutFlag\fP { \fBDefaultLayout\fP = 0x00, \fBFrameWithScales\fP = 0x01 }"
.br
.RI "\fILayout flags\&. \fP"
.ti -1c
.RI "typedef QFlags< \fBDiscardFlag\fP > \fBDiscardFlags\fP"
.br
.RI "\fIDisard flags\&. \fP"
.ti -1c
.RI "typedef QFlags< \fBLayoutFlag\fP > \fBLayoutFlags\fP"
.br
.RI "\fILayout flags\&. \fP"
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBQwtPlotRenderer\fP (QObject *=NULL)"
.br
.ti -1c
.RI "virtual \fB~QwtPlotRenderer\fP ()"
.br
.RI "\fIDestructor\&. \fP"
.ti -1c
.RI "void \fBsetDiscardFlag\fP (\fBDiscardFlag\fP flag, bool on=true)"
.br
.ti -1c
.RI "bool \fBtestDiscardFlag\fP (\fBDiscardFlag\fP flag) const "
.br
.ti -1c
.RI "void \fBsetDiscardFlags\fP (\fBDiscardFlags\fP flags)"
.br
.ti -1c
.RI "\fBDiscardFlags\fP \fBdiscardFlags\fP () const "
.br
.ti -1c
.RI "void \fBsetLayoutFlag\fP (\fBLayoutFlag\fP flag, bool on=true)"
.br
.ti -1c
.RI "bool \fBtestLayoutFlag\fP (\fBLayoutFlag\fP flag) const "
.br
.ti -1c
.RI "void \fBsetLayoutFlags\fP (\fBLayoutFlags\fP flags)"
.br
.ti -1c
.RI "\fBLayoutFlags\fP \fBlayoutFlags\fP () const "
.br
.ti -1c
.RI "void \fBrenderDocument\fP (\fBQwtPlot\fP *, const QString &fileName, const QSizeF &sizeMM, int resolution=85)"
.br
.ti -1c
.RI "void \fBrenderDocument\fP (\fBQwtPlot\fP *, const QString &fileName, const QString &format, const QSizeF &sizeMM, int resolution=85)"
.br
.ti -1c
.RI "void \fBrenderTo\fP (\fBQwtPlot\fP *, QPrinter &) const "
.br
.RI "\fIRender the plot to a QPrinter\&. \fP"
.ti -1c
.RI "void \fBrenderTo\fP (\fBQwtPlot\fP *, QPaintDevice &p) const "
.br
.RI "\fIRender the plot to a \fCQPaintDevice\fP\&. \fP"
.ti -1c
.RI "virtual void \fBrender\fP (\fBQwtPlot\fP *, QPainter *, const QRectF &rect) const "
.br
.ti -1c
.RI "virtual void \fBrenderTitle\fP (const \fBQwtPlot\fP *, QPainter *, const QRectF &) const "
.br
.ti -1c
.RI "virtual void \fBrenderFooter\fP (const \fBQwtPlot\fP *, QPainter *, const QRectF &) const "
.br
.ti -1c
.RI "virtual void \fBrenderScale\fP (const \fBQwtPlot\fP *, QPainter *, int axisId, int startDist, int endDist, int baseDist, const QRectF &) const "
.br
.RI "\fIPaint a scale into a given rectangle\&. Paint the scale into a given rectangle\&. \fP"
.ti -1c
.RI "virtual void \fBrenderCanvas\fP (const \fBQwtPlot\fP *, QPainter *, const QRectF &canvasRect, const \fBQwtScaleMap\fP *maps) const "
.br
.ti -1c
.RI "virtual void \fBrenderLegend\fP (const \fBQwtPlot\fP *, QPainter *, const QRectF &) const "
.br
.ti -1c
.RI "bool \fBexportTo\fP (\fBQwtPlot\fP *, const QString &documentName, const QSizeF &sizeMM=QSizeF(300, 200), int resolution=85)"
.br
.RI "\fIExecute a file dialog and render the plot to the selected file\&. \fP"
.in -1c
.SH "Detailed Description"
.PP 
Renderer for exporting a plot to a document, a printer or anything else, that is supported by QPainter/QPaintDevice\&. 
.SH "Member Enumeration Documentation"
.PP 
.SS "enum \fBQwtPlotRenderer::DiscardFlag\fP"

.PP
Disard flags\&. 
.PP
\fBEnumerator\fP
.in +1c
.TP
\fB\fIDiscardNone \fP\fP
Render all components of the plot\&. 
.TP
\fB\fIDiscardBackground \fP\fP
Don't render the background of the plot\&. 
.TP
\fB\fIDiscardTitle \fP\fP
Don't render the title of the plot\&. 
.TP
\fB\fIDiscardLegend \fP\fP
Don't render the legend of the plot\&. 
.TP
\fB\fIDiscardCanvasBackground \fP\fP
Don't render the background of the canvas\&. 
.TP
\fB\fIDiscardFooter \fP\fP
Don't render the footer of the plot\&. 
.TP
\fB\fIDiscardCanvasFrame \fP\fP
Don't render the frame of the canvas
.PP
\fBNote:\fP
.RS 4
This flag has no effect when using style sheets, where the frame is part of the background 
.RE
.PP

.SS "enum \fBQwtPlotRenderer::LayoutFlag\fP"

.PP
Layout flags\&. \fBSee Also:\fP
.RS 4
\fBsetLayoutFlag()\fP, \fBtestLayoutFlag()\fP 
.RE
.PP

.PP
\fBEnumerator\fP
.in +1c
.TP
\fB\fIDefaultLayout \fP\fP
Use the default layout as on screen\&. 
.TP
\fB\fIFrameWithScales \fP\fP
Instead of the scales a box is painted around the plot canvas, where the scale ticks are aligned to\&. 
.SH "Constructor & Destructor Documentation"
.PP 
.SS "QwtPlotRenderer::QwtPlotRenderer (QObject *parent = \fCNULL\fP)\fC [explicit]\fP"
Constructor 
.PP
\fBParameters:\fP
.RS 4
\fIparent\fP Parent object 
.RE
.PP

.SH "Member Function Documentation"
.PP 
.SS "\fBQwtPlotRenderer::DiscardFlags\fP QwtPlotRenderer::discardFlags () const"
\fBReturns:\fP
.RS 4
Flags, indicating what to discard from rendering 
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBDiscardFlag\fP, \fBsetDiscardFlags()\fP, \fBsetDiscardFlag()\fP, \fBtestDiscardFlag()\fP 
.RE
.PP

.SS "bool QwtPlotRenderer::exportTo (\fBQwtPlot\fP *plot, const QString &documentName, const QSizeF &sizeMM = \fCQSizeF( 300, 200 )\fP, intresolution = \fC85\fP)"

.PP
Execute a file dialog and render the plot to the selected file\&. \fBParameters:\fP
.RS 4
\fIplot\fP Plot widget 
.br
\fIdocumentName\fP Default document name 
.br
\fIsizeMM\fP Size for the document in millimeters\&. 
.br
\fIresolution\fP Resolution in dots per Inch (dpi)
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBrenderDocument()\fP 
.RE
.PP

.SS "\fBQwtPlotRenderer::LayoutFlags\fP QwtPlotRenderer::layoutFlags () const"
\fBReturns:\fP
.RS 4
Layout flags 
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBLayoutFlag\fP, \fBsetLayoutFlags()\fP, \fBsetLayoutFlag()\fP, \fBtestLayoutFlag()\fP 
.RE
.PP

.SS "void QwtPlotRenderer::render (\fBQwtPlot\fP *plot, QPainter *painter, const QRectF &plotRect) const\fC [virtual]\fP"
Paint the contents of a \fBQwtPlot\fP instance into a given rectangle\&.
.PP
\fBParameters:\fP
.RS 4
\fIplot\fP Plot to be rendered 
.br
\fIpainter\fP Painter 
.br
\fIplotRect\fP Bounding rectangle
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBrenderDocument()\fP, \fBrenderTo()\fP, \fBQwtPainter::setRoundingAlignment()\fP 
.RE
.PP

.SS "void QwtPlotRenderer::renderCanvas (const \fBQwtPlot\fP *plot, QPainter *painter, const QRectF &canvasRect, const \fBQwtScaleMap\fP *map) const\fC [virtual]\fP"
Render the canvas into a given rectangle\&.
.PP
\fBParameters:\fP
.RS 4
\fIplot\fP Plot widget 
.br
\fIpainter\fP Painter 
.br
\fImap\fP Maps mapping between plot and paint device coordinates 
.br
\fIcanvasRect\fP Canvas rectangle 
.RE
.PP

.SS "void QwtPlotRenderer::renderDocument (\fBQwtPlot\fP *plot, const QString &fileName, const QSizeF &sizeMM, intresolution = \fC85\fP)"
Render a plot to a file
.PP
The format of the document will be auto-detected from the suffix of the file name\&.
.PP
\fBParameters:\fP
.RS 4
\fIplot\fP Plot widget 
.br
\fIfileName\fP Path of the file, where the document will be stored 
.br
\fIsizeMM\fP Size for the document in millimeters\&. 
.br
\fIresolution\fP Resolution in dots per Inch (dpi) 
.RE
.PP

.SS "void QwtPlotRenderer::renderDocument (\fBQwtPlot\fP *plot, const QString &fileName, const QString &format, const QSizeF &sizeMM, intresolution = \fC85\fP)"
Render a plot to a file
.PP
Supported formats are:
.PP
.IP "\(bu" 2
pdf
.br
 Portable Document Format PDF
.IP "\(bu" 2
ps
.br
 Postcript
.IP "\(bu" 2
svg
.br
 Scalable Vector Graphics SVG
.IP "\(bu" 2
all image formats supported by Qt
.br
 see QImageWriter::supportedImageFormats()
.PP
.PP
Scalable vector graphic formats like PDF or SVG are superior to raster graphics formats\&.
.PP
\fBParameters:\fP
.RS 4
\fIplot\fP Plot widget 
.br
\fIfileName\fP Path of the file, where the document will be stored 
.br
\fIformat\fP Format for the document 
.br
\fIsizeMM\fP Size for the document in millimeters\&. 
.br
\fIresolution\fP Resolution in dots per Inch (dpi)
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBrenderTo()\fP, \fBrender()\fP, \fBQwtPainter::setRoundingAlignment()\fP 
.RE
.PP

.SS "void QwtPlotRenderer::renderFooter (const \fBQwtPlot\fP *plot, QPainter *painter, const QRectF &rect) const\fC [virtual]\fP"
Render the footer into a given rectangle\&.
.PP
\fBParameters:\fP
.RS 4
\fIplot\fP Plot widget 
.br
\fIpainter\fP Painter 
.br
\fIrect\fP Bounding rectangle 
.RE
.PP

.SS "void QwtPlotRenderer::renderLegend (const \fBQwtPlot\fP *plot, QPainter *painter, const QRectF &rect) const\fC [virtual]\fP"
Render the legend into a given rectangle\&.
.PP
\fBParameters:\fP
.RS 4
\fIplot\fP Plot widget 
.br
\fIpainter\fP Painter 
.br
\fIrect\fP Bounding rectangle 
.RE
.PP

.SS "void QwtPlotRenderer::renderScale (const \fBQwtPlot\fP *plot, QPainter *painter, intaxisId, intstartDist, intendDist, intbaseDist, const QRectF &rect) const\fC [virtual]\fP"

.PP
Paint a scale into a given rectangle\&. Paint the scale into a given rectangle\&. \fBParameters:\fP
.RS 4
\fIplot\fP Plot widget 
.br
\fIpainter\fP Painter 
.br
\fIaxisId\fP Axis 
.br
\fIstartDist\fP Start border distance 
.br
\fIendDist\fP End border distance 
.br
\fIbaseDist\fP Base distance 
.br
\fIrect\fP Bounding rectangle 
.RE
.PP

.SS "void QwtPlotRenderer::renderTitle (const \fBQwtPlot\fP *plot, QPainter *painter, const QRectF &rect) const\fC [virtual]\fP"
Render the title into a given rectangle\&.
.PP
\fBParameters:\fP
.RS 4
\fIplot\fP Plot widget 
.br
\fIpainter\fP Painter 
.br
\fIrect\fP Bounding rectangle 
.RE
.PP

.SS "void QwtPlotRenderer::renderTo (\fBQwtPlot\fP *plot, QPrinter &printer) const"

.PP
Render the plot to a QPrinter\&. This function renders the contents of a \fBQwtPlot\fP instance to \fCQPaintDevice\fP object\&. The size is derived from the printer metrics\&.
.PP
\fBParameters:\fP
.RS 4
\fIplot\fP Plot to be rendered 
.br
\fIprinter\fP Printer to paint on
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBrenderDocument()\fP, \fBrender()\fP, \fBQwtPainter::setRoundingAlignment()\fP 
.RE
.PP

.SS "void QwtPlotRenderer::renderTo (\fBQwtPlot\fP *plot, QPaintDevice &paintDevice) const"

.PP
Render the plot to a \fCQPaintDevice\fP\&. This function renders the contents of a \fBQwtPlot\fP instance to \fCQPaintDevice\fP object\&. The target rectangle is derived from its device metrics\&.
.PP
\fBParameters:\fP
.RS 4
\fIplot\fP Plot to be rendered 
.br
\fIpaintDevice\fP device to paint on, f\&.e a QImage
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBrenderDocument()\fP, \fBrender()\fP, \fBQwtPainter::setRoundingAlignment()\fP 
.RE
.PP

.SS "void QwtPlotRenderer::setDiscardFlag (\fBDiscardFlag\fPflag, boolon = \fCtrue\fP)"
Change a flag, indicating what to discard from rendering
.PP
\fBParameters:\fP
.RS 4
\fIflag\fP Flag to change 
.br
\fIon\fP On/Off
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBDiscardFlag\fP, \fBtestDiscardFlag()\fP, \fBsetDiscardFlags()\fP, \fBdiscardFlags()\fP 
.RE
.PP

.SS "void QwtPlotRenderer::setDiscardFlags (\fBDiscardFlags\fPflags)"
Set the flags, indicating what to discard from rendering
.PP
\fBParameters:\fP
.RS 4
\fIflags\fP Flags 
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBDiscardFlag\fP, \fBsetDiscardFlag()\fP, \fBtestDiscardFlag()\fP, \fBdiscardFlags()\fP 
.RE
.PP

.SS "void QwtPlotRenderer::setLayoutFlag (\fBLayoutFlag\fPflag, boolon = \fCtrue\fP)"
Change a layout flag
.PP
\fBParameters:\fP
.RS 4
\fIflag\fP Flag to change 
.br
\fIon\fP On/Off
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBLayoutFlag\fP, \fBtestLayoutFlag()\fP, \fBsetLayoutFlags()\fP, \fBlayoutFlags()\fP 
.RE
.PP

.SS "void QwtPlotRenderer::setLayoutFlags (\fBLayoutFlags\fPflags)"
Set the layout flags
.PP
\fBParameters:\fP
.RS 4
\fIflags\fP Flags 
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBLayoutFlag\fP, \fBsetLayoutFlag()\fP, \fBtestLayoutFlag()\fP, \fBlayoutFlags()\fP 
.RE
.PP

.SS "bool QwtPlotRenderer::testDiscardFlag (\fBDiscardFlag\fPflag) const"
Check if a flag is set\&.
.PP
\fBParameters:\fP
.RS 4
\fIflag\fP Flag to be tested 
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBDiscardFlag\fP, \fBsetDiscardFlag()\fP, \fBsetDiscardFlags()\fP, \fBdiscardFlags()\fP 
.RE
.PP

.SS "bool QwtPlotRenderer::testLayoutFlag (\fBLayoutFlag\fPflag) const"
Check if a flag is set\&.
.PP
\fBParameters:\fP
.RS 4
\fIflag\fP Flag to be tested 
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBLayoutFlag\fP, \fBsetLayoutFlag()\fP, \fBsetLayoutFlags()\fP, \fBlayoutFlags()\fP 
.RE
.PP


.SH "Author"
.PP 
Generated automatically by Doxygen for Qwt User's Guide from the source code\&.