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 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535
|
.TH "QwtPlotMultiBarChart" 3 "Wed Jan 2 2019" "Version 6.1.4" "Qwt User's Guide" \" -*- nroff -*-
.ad l
.nh
.SH NAME
QwtPlotMultiBarChart \- \fBQwtPlotMultiBarChart\fP displays a series of a samples that consist each of a set of values\&.
.SH SYNOPSIS
.br
.PP
.PP
\fC#include <qwt_plot_multi_barchart\&.h>\fP
.PP
Inherits \fBQwtPlotAbstractBarChart\fP, and \fBQwtSeriesStore< QwtSetSample >\fP\&.
.SS "Public Types"
.in +1c
.ti -1c
.RI "enum \fBChartStyle\fP { \fBGrouped\fP, \fBStacked\fP }"
.br
.RI "Chart styles\&. "
.in -1c
.SS "Public Member Functions"
.in +1c
.ti -1c
.RI "\fBQwtPlotMultiBarChart\fP (const QString &\fBtitle\fP=QString())"
.br
.ti -1c
.RI "\fBQwtPlotMultiBarChart\fP (const \fBQwtText\fP &\fBtitle\fP)"
.br
.ti -1c
.RI "virtual \fB~QwtPlotMultiBarChart\fP ()"
.br
.RI "Destructor\&. "
.ti -1c
.RI "virtual int \fBrtti\fP () const"
.br
.ti -1c
.RI "void \fBsetBarTitles\fP (const QList< \fBQwtText\fP > &)"
.br
.RI "Set the titles for the bars\&. "
.ti -1c
.RI "QList< \fBQwtText\fP > \fBbarTitles\fP () const"
.br
.ti -1c
.RI "void \fBsetSamples\fP (const QVector< \fBQwtSetSample\fP > &)"
.br
.ti -1c
.RI "void \fBsetSamples\fP (const QVector< QVector< double > > &)"
.br
.ti -1c
.RI "void \fBsetSamples\fP (\fBQwtSeriesData\fP< \fBQwtSetSample\fP > *)"
.br
.ti -1c
.RI "void \fBsetStyle\fP (\fBChartStyle\fP \fBstyle\fP)"
.br
.ti -1c
.RI "\fBChartStyle\fP \fBstyle\fP () const"
.br
.ti -1c
.RI "void \fBsetSymbol\fP (int valueIndex, \fBQwtColumnSymbol\fP *)"
.br
.RI "Add a symbol to the symbol map\&. "
.ti -1c
.RI "const \fBQwtColumnSymbol\fP * \fBsymbol\fP (int valueIndex) const"
.br
.ti -1c
.RI "void \fBresetSymbolMap\fP ()"
.br
.ti -1c
.RI "virtual void \fBdrawSeries\fP (QPainter *painter, const \fBQwtScaleMap\fP &xMap, const \fBQwtScaleMap\fP &yMap, const QRectF &canvasRect, int from, int to) const"
.br
.ti -1c
.RI "virtual QRectF \fBboundingRect\fP () const"
.br
.ti -1c
.RI "virtual QList< \fBQwtLegendData\fP > \fBlegendData\fP () const"
.br
.ti -1c
.RI "virtual \fBQwtGraphic\fP \fBlegendIcon\fP (int index, const QSizeF &) const"
.br
.in -1c
.SS "Protected Member Functions"
.in +1c
.ti -1c
.RI "\fBQwtColumnSymbol\fP * \fBsymbol\fP (int valueIndex)"
.br
.ti -1c
.RI "virtual \fBQwtColumnSymbol\fP * \fBspecialSymbol\fP (int sampleIndex, int valueIndex) const"
.br
.RI "Create a symbol for special values\&. "
.ti -1c
.RI "virtual void \fBdrawSample\fP (QPainter *painter, const \fBQwtScaleMap\fP &xMap, const \fBQwtScaleMap\fP &yMap, const QRectF &canvasRect, const \fBQwtInterval\fP &boundingInterval, int index, const \fBQwtSetSample\fP &\fBsample\fP) const"
.br
.ti -1c
.RI "virtual void \fBdrawBar\fP (QPainter *, int sampleIndex, int valueIndex, const \fBQwtColumnRect\fP &) const"
.br
.ti -1c
.RI "void \fBdrawStackedBars\fP (QPainter *painter, const \fBQwtScaleMap\fP &xMap, const \fBQwtScaleMap\fP &yMap, const QRectF &canvasRect, int index, double \fBsampleWidth\fP, const \fBQwtSetSample\fP &\fBsample\fP) const"
.br
.ti -1c
.RI "void \fBdrawGroupedBars\fP (QPainter *painter, const \fBQwtScaleMap\fP &xMap, const \fBQwtScaleMap\fP &yMap, const QRectF &canvasRect, int index, double \fBsampleWidth\fP, const \fBQwtSetSample\fP &\fBsample\fP) const"
.br
.in -1c
.SH "Detailed Description"
.PP
\fBQwtPlotMultiBarChart\fP displays a series of a samples that consist each of a set of values\&.
Each value is displayed as a bar, the bars of each set can be organized side by side or accumulated\&.
.PP
Each bar of a set is rendered by a \fBQwtColumnSymbol\fP, that is set by \fBsetSymbol()\fP\&. The bars of different sets use the same symbols\&. Exceptions are possible by overloading \fBspecialSymbol()\fP or overloading \fBdrawBar()\fP\&.
.PP
Depending on its \fBorientation()\fP the bars are displayed horizontally or vertically\&. The bars cover the interval between the \fBbaseline()\fP and the value\&.
.PP
In opposite to most other plot items, \fBQwtPlotMultiBarChart\fP returns more than one entry for the legend - one for each symbol\&.
.PP
\fBSee also:\fP
.RS 4
\fBQwtPlotBarChart\fP, \fBQwtPlotHistogram\fP \fBQwtPlotSeriesItem::orientation()\fP, \fBQwtPlotAbstractBarChart::baseline()\fP
.RE
.PP
.SH "Member Enumeration Documentation"
.PP
.SS "enum \fBQwtPlotMultiBarChart::ChartStyle\fP"
.PP
Chart styles\&. The default setting is \fBQwtPlotMultiBarChart::Grouped\fP\&.
.PP
\fBSee also:\fP
.RS 4
\fBsetStyle()\fP, \fBstyle()\fP
.RE
.PP
.PP
\fBEnumerator\fP
.in +1c
.TP
\fB\fIGrouped \fP\fP
The bars of a set are displayed side by side\&.
.TP
\fB\fIStacked \fP\fP
The bars are displayed on top of each other accumulating to a single bar\&. All values of a set need to have the same sign\&.
.SH "Constructor & Destructor Documentation"
.PP
.SS "QwtPlotMultiBarChart::QwtPlotMultiBarChart (const QString & title = \fCQString()\fP)\fC [explicit]\fP"
Constructor
.PP
\fBParameters:\fP
.RS 4
\fItitle\fP Title of the chart
.RE
.PP
.SS "QwtPlotMultiBarChart::QwtPlotMultiBarChart (const \fBQwtText\fP & title)\fC [explicit]\fP"
Constructor
.PP
\fBParameters:\fP
.RS 4
\fItitle\fP Title of the chart
.RE
.PP
.SH "Member Function Documentation"
.PP
.SS "QList< \fBQwtText\fP > QwtPlotMultiBarChart::barTitles () const"
.PP
\fBReturns:\fP
.RS 4
Bar titles
.RE
.PP
\fBSee also:\fP
.RS 4
\fBsetBarTitles()\fP, \fBlegendData()\fP
.RE
.PP
.SS "QRectF QwtPlotMultiBarChart::boundingRect () const\fC [virtual]\fP"
.PP
\fBReturns:\fP
.RS 4
Bounding rectangle of all samples\&. For an empty series the rectangle is invalid\&.
.RE
.PP
.PP
Reimplemented from \fBQwtPlotSeriesItem\fP\&.
.SS "void QwtPlotMultiBarChart::drawBar (QPainter * painter, int sampleIndex, int valueIndex, const \fBQwtColumnRect\fP & rect) const\fC [protected]\fP, \fC [virtual]\fP"
Draw a bar
.PP
\fBParameters:\fP
.RS 4
\fIpainter\fP Painter
.br
\fIsampleIndex\fP Index of the sample - might be -1 when the bar is painted for the legend
.br
\fIvalueIndex\fP Index of a value in a set
.br
\fIrect\fP Directed target rectangle for the bar
.RE
.PP
\fBSee also:\fP
.RS 4
\fBdrawSeries()\fP
.RE
.PP
.SS "void QwtPlotMultiBarChart::drawGroupedBars (QPainter * painter, const \fBQwtScaleMap\fP & xMap, const \fBQwtScaleMap\fP & yMap, const QRectF & canvasRect, int index, double sampleWidth, const \fBQwtSetSample\fP & sample) const\fC [protected]\fP"
Draw a grouped sample
.PP
\fBParameters:\fP
.RS 4
\fIpainter\fP Painter
.br
\fIxMap\fP x map
.br
\fIyMap\fP y map
.br
\fIcanvasRect\fP Contents rectangle of the canvas
.br
\fIindex\fP Index of the sample to be painted
.br
\fIsampleWidth\fP Boundng width for all bars of the smaple
.br
\fIsample\fP Sample
.RE
.PP
\fBSee also:\fP
.RS 4
\fBdrawSeries()\fP, \fBsampleWidth()\fP
.RE
.PP
.SS "void QwtPlotMultiBarChart::drawSample (QPainter * painter, const \fBQwtScaleMap\fP & xMap, const \fBQwtScaleMap\fP & yMap, const QRectF & canvasRect, const \fBQwtInterval\fP & boundingInterval, int index, const \fBQwtSetSample\fP & sample) const\fC [protected]\fP, \fC [virtual]\fP"
Draw a sample
.PP
\fBParameters:\fP
.RS 4
\fIpainter\fP Painter
.br
\fIxMap\fP x map
.br
\fIyMap\fP y map
.br
\fIcanvasRect\fP Contents rectangle of the canvas
.br
\fIboundingInterval\fP Bounding interval of sample values
.br
\fIindex\fP Index of the sample to be painted
.br
\fIsample\fP Sample value
.RE
.PP
\fBSee also:\fP
.RS 4
\fBdrawSeries()\fP
.RE
.PP
.SS "void QwtPlotMultiBarChart::drawSeries (QPainter * painter, const \fBQwtScaleMap\fP & xMap, const \fBQwtScaleMap\fP & yMap, const QRectF & canvasRect, int from, int to) const\fC [virtual]\fP"
Draw an interval of the bar chart
.PP
\fBParameters:\fP
.RS 4
\fIpainter\fP Painter
.br
\fIxMap\fP Maps x-values into pixel coordinates\&.
.br
\fIyMap\fP Maps y-values into pixel coordinates\&.
.br
\fIcanvasRect\fP Contents rectangle of the canvas
.br
\fIfrom\fP Index of the first point to be painted
.br
\fIto\fP Index of the last point to be painted\&. If to < 0 the curve will be painted to its last point\&.
.RE
.PP
\fBSee also:\fP
.RS 4
drawSymbols()
.RE
.PP
.PP
Implements \fBQwtPlotSeriesItem\fP\&.
.SS "void QwtPlotMultiBarChart::drawStackedBars (QPainter * painter, const \fBQwtScaleMap\fP & xMap, const \fBQwtScaleMap\fP & yMap, const QRectF & canvasRect, int index, double sampleWidth, const \fBQwtSetSample\fP & sample) const\fC [protected]\fP"
Draw a stacked sample
.PP
\fBParameters:\fP
.RS 4
\fIpainter\fP Painter
.br
\fIxMap\fP x map
.br
\fIyMap\fP y map
.br
\fIcanvasRect\fP Contents rectangle of the canvas
.br
\fIindex\fP Index of the sample to be painted
.br
\fIsampleWidth\fP Width of the bars
.br
\fIsample\fP Sample
.RE
.PP
\fBSee also:\fP
.RS 4
\fBdrawSeries()\fP, \fBsampleWidth()\fP
.RE
.PP
.SS "QList< \fBQwtLegendData\fP > QwtPlotMultiBarChart::legendData () const\fC [virtual]\fP"
.PP
\fBReturns:\fP
.RS 4
Information to be displayed on the legend
.RE
.PP
The chart is represented by a list of entries - one for each bar title\&. Each element contains a bar title and an icon showing its corresponding bar\&.
.PP
\fBSee also:\fP
.RS 4
\fBbarTitles()\fP, \fBlegendIcon()\fP, \fBlegendIconSize()\fP
.RE
.PP
.PP
Reimplemented from \fBQwtPlotItem\fP\&.
.SS "\fBQwtGraphic\fP QwtPlotMultiBarChart::legendIcon (int index, const QSizeF & size) const\fC [virtual]\fP"
.PP
\fBReturns:\fP
.RS 4
Icon for representing a bar on the legend
.RE
.PP
\fBParameters:\fP
.RS 4
\fIindex\fP Index of the bar
.br
\fIsize\fP Icon size
.RE
.PP
\fBReturns:\fP
.RS 4
An icon showing a bar
.RE
.PP
\fBSee also:\fP
.RS 4
\fBdrawBar()\fP, \fBlegendData()\fP
.RE
.PP
.PP
Reimplemented from \fBQwtPlotItem\fP\&.
.SS "void QwtPlotMultiBarChart::resetSymbolMap ()"
Remove all symbols from the symbol map
.SS "int QwtPlotMultiBarChart::rtti () const\fC [virtual]\fP"
.PP
\fBReturns:\fP
.RS 4
\fBQwtPlotItem::Rtti_PlotBarChart\fP
.RE
.PP
.PP
Reimplemented from \fBQwtPlotItem\fP\&.
.SS "void QwtPlotMultiBarChart::setBarTitles (const QList< \fBQwtText\fP > & titles)"
.PP
Set the titles for the bars\&. The titles are used for the legend\&.
.PP
\fBParameters:\fP
.RS 4
\fItitles\fP Bar titles
.RE
.PP
\fBSee also:\fP
.RS 4
\fBbarTitles()\fP, \fBlegendData()\fP
.RE
.PP
.SS "void QwtPlotMultiBarChart::setSamples (const QVector< \fBQwtSetSample\fP > & samples)"
Initialize data with an array of samples\&.
.PP
\fBParameters:\fP
.RS 4
\fIsamples\fP Vector of points
.RE
.PP
.SS "void QwtPlotMultiBarChart::setSamples (const QVector< QVector< double > > & samples)"
Initialize data with an array of samples\&.
.PP
\fBParameters:\fP
.RS 4
\fIsamples\fP Vector of points
.RE
.PP
.SS "void QwtPlotMultiBarChart::setSamples (\fBQwtSeriesData\fP< \fBQwtSetSample\fP > * data)"
Assign a series of samples
.PP
\fBsetSamples()\fP is just a wrapper for \fBsetData()\fP without any additional value - beside that it is easier to find for the developer\&.
.PP
\fBParameters:\fP
.RS 4
\fIdata\fP Data
.RE
.PP
\fBWarning:\fP
.RS 4
The item takes ownership of the data object, deleting it when its not used anymore\&.
.RE
.PP
.SS "void QwtPlotMultiBarChart::setStyle (\fBChartStyle\fP style)"
Set the style of the chart
.PP
\fBParameters:\fP
.RS 4
\fIstyle\fP Chart style
.RE
.PP
\fBSee also:\fP
.RS 4
\fBstyle()\fP
.RE
.PP
.SS "void QwtPlotMultiBarChart::setSymbol (int valueIndex, \fBQwtColumnSymbol\fP * symbol)"
.PP
Add a symbol to the symbol map\&. Assign a default symbol for drawing the bar representing all values with the same index in a set\&.
.PP
\fBParameters:\fP
.RS 4
\fIvalueIndex\fP Index of a value in a set
.br
\fIsymbol\fP Symbol used for drawing a bar
.RE
.PP
\fBSee also:\fP
.RS 4
\fBsymbol()\fP, \fBresetSymbolMap()\fP, \fBspecialSymbol()\fP
.RE
.PP
.SS "\fBQwtColumnSymbol\fP * QwtPlotMultiBarChart::specialSymbol (int sampleIndex, int valueIndex) const\fC [protected]\fP, \fC [virtual]\fP"
.PP
Create a symbol for special values\&. Usually the symbols for displaying a bar are set by setSymbols() and common for all sets\&. By overloading \fBspecialSymbol()\fP it is possible to create a temporary \fBsymbol()\fP for displaying a special value\&.
.PP
The symbol has to be created by new each time \fBspecialSymbol()\fP is called\&. As soon as the symbol is painted this symbol gets deleted\&.
.PP
When no symbol ( NULL ) is returned, the value will be displayed with the standard symbol that is used for all symbols with the same valueIndex\&.
.PP
\fBParameters:\fP
.RS 4
\fIsampleIndex\fP Index of the sample
.br
\fIvalueIndex\fP Index of the value in the set
.RE
.PP
\fBReturns:\fP
.RS 4
NULL, meaning that the value is not special
.RE
.PP
.SS "\fBQwtPlotMultiBarChart::ChartStyle\fP QwtPlotMultiBarChart::style () const"
.PP
\fBReturns:\fP
.RS 4
Style of the chart
.RE
.PP
\fBSee also:\fP
.RS 4
\fBsetStyle()\fP
.RE
.PP
.SS "const \fBQwtColumnSymbol\fP * QwtPlotMultiBarChart::symbol (int valueIndex) const"
Find a symbol in the symbol map
.PP
\fBParameters:\fP
.RS 4
\fIvalueIndex\fP Index of a value in a set
.RE
.PP
\fBReturns:\fP
.RS 4
The symbol, that had been set by \fBsetSymbol()\fP or NULL\&.
.RE
.PP
\fBSee also:\fP
.RS 4
\fBsetSymbol()\fP, \fBspecialSymbol()\fP, \fBdrawBar()\fP
.RE
.PP
.SS "\fBQwtColumnSymbol\fP * QwtPlotMultiBarChart::symbol (int valueIndex)\fC [protected]\fP"
Find a symbol in the symbol map
.PP
\fBParameters:\fP
.RS 4
\fIvalueIndex\fP Index of a value in a set
.RE
.PP
\fBReturns:\fP
.RS 4
The symbol, that had been set by \fBsetSymbol()\fP or NULL\&.
.RE
.PP
\fBSee also:\fP
.RS 4
\fBsetSymbol()\fP, \fBspecialSymbol()\fP, \fBdrawBar()\fP
.RE
.PP
.SH "Author"
.PP
Generated automatically by Doxygen for Qwt User's Guide from the source code\&.
|