.TH "QwtPlotAbstractBarChart" 3 "Wed Jan 2 2019" "Version 6.1.4" "Qwt User's Guide" \" -*- nroff -*- .ad l .nh .SH NAME QwtPlotAbstractBarChart \- Abstract base class for bar chart items\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBQwtPlotSeriesItem\fP\&. .PP Inherited by \fBQwtPlotBarChart\fP, and \fBQwtPlotMultiBarChart\fP\&. .SS "Public Types" .in +1c .ti -1c .RI "enum \fBLayoutPolicy\fP { \fBAutoAdjustSamples\fP, \fBScaleSamplesToAxes\fP, \fBScaleSampleToCanvas\fP, \fBFixedSampleSize\fP }" .br .RI "Mode how to calculate the bar width\&. " .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBQwtPlotAbstractBarChart\fP (const \fBQwtText\fP &\fBtitle\fP)" .br .ti -1c .RI "virtual \fB~QwtPlotAbstractBarChart\fP ()" .br .RI "Destructor\&. " .ti -1c .RI "void \fBsetLayoutPolicy\fP (\fBLayoutPolicy\fP)" .br .ti -1c .RI "\fBLayoutPolicy\fP \fBlayoutPolicy\fP () const" .br .ti -1c .RI "void \fBsetLayoutHint\fP (double)" .br .ti -1c .RI "double \fBlayoutHint\fP () const" .br .ti -1c .RI "void \fBsetSpacing\fP (int)" .br .RI "Set the spacing\&. " .ti -1c .RI "int \fBspacing\fP () const" .br .ti -1c .RI "void \fBsetMargin\fP (int)" .br .RI "Set the margin\&. " .ti -1c .RI "int \fBmargin\fP () const" .br .ti -1c .RI "void \fBsetBaseline\fP (double)" .br .RI "Set the baseline\&. " .ti -1c .RI "double \fBbaseline\fP () const" .br .ti -1c .RI "virtual void \fBgetCanvasMarginHint\fP (const \fBQwtScaleMap\fP &xMap, const \fBQwtScaleMap\fP &yMap, const QRectF &canvasRect, double &left, double &top, double &right, double &bottom) const" .br .RI "Calculate a hint for the canvas margin\&. " .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "double \fBsampleWidth\fP (const \fBQwtScaleMap\fP &map, double canvasSize, double boundingSize, double value) const" .br .in -1c .SH "Detailed Description" .PP Abstract base class for bar chart items\&. In opposite to almost all other plot items bar charts can't be displayed inside of their bounding rectangle and need a special API how to calculate the width of the bars and how they affect the layout of the attached plot\&. .SH "Member Enumeration Documentation" .PP .SS "enum \fBQwtPlotAbstractBarChart::LayoutPolicy\fP" .PP Mode how to calculate the bar width\&. \fBsetLayoutPolicy()\fP, \fBsetLayoutHint()\fP, barWidthHint() .PP \fBEnumerator\fP .in +1c .TP \fB\fIAutoAdjustSamples \fP\fP The sample width is calculated by dividing the bounding rectangle by the number of samples\&. The \fBlayoutHint()\fP is used as a minimum width in paint device coordinates\&. .PP \fBSee also:\fP .RS 4 boundingRectangle() .RE .PP .TP \fB\fIScaleSamplesToAxes \fP\fP \fBlayoutHint()\fP defines an interval in axis coordinates .TP \fB\fIScaleSampleToCanvas \fP\fP The bar width is calculated by multiplying \fBlayoutHint()\fP with the height or width of the canvas\&. .PP \fBSee also:\fP .RS 4 boundingRectangle() .RE .PP .TP \fB\fIFixedSampleSize \fP\fP \fBlayoutHint()\fP defines a fixed width in paint device coordinates\&. .SH "Constructor & Destructor Documentation" .PP .SS "QwtPlotAbstractBarChart::QwtPlotAbstractBarChart (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 "double QwtPlotAbstractBarChart::baseline () const" .PP \fBReturns:\fP .RS 4 Value for the origin of the bar chart .RE .PP \fBSee also:\fP .RS 4 \fBsetBaseline()\fP, \fBQwtPlotSeriesItem::orientation()\fP .RE .PP .SS "void QwtPlotAbstractBarChart::getCanvasMarginHint (const \fBQwtScaleMap\fP & xMap, const \fBQwtScaleMap\fP & yMap, const QRectF & canvasRect, double & left, double & top, double & right, double & bottom) const\fC [virtual]\fP" .PP Calculate a hint for the canvas margin\&. Bar charts need to reserve some space for displaying the bars for the first and the last sample\&. The hint is calculated from the \fBlayoutHint()\fP depending on the \fBlayoutPolicy()\fP\&. .PP The margins are in target device coordinates ( pixels on screen ) .PP \fBParameters:\fP .RS 4 \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 in painter coordinates .br \fIleft\fP Returns the left margin .br \fItop\fP Returns the top margin .br \fIright\fP Returns the right margin .br \fIbottom\fP Returns the bottom margin .RE .PP \fBReturns:\fP .RS 4 Margin .RE .PP \fBSee also:\fP .RS 4 \fBlayoutPolicy()\fP, \fBlayoutHint()\fP, \fBQwtPlotItem::Margins\fP \fBQwtPlot::getCanvasMarginsHint()\fP, \fBQwtPlot::updateCanvasMargins()\fP .RE .PP .PP Reimplemented from \fBQwtPlotItem\fP\&. .SS "double QwtPlotAbstractBarChart::layoutHint () const" The combination of \fBlayoutPolicy()\fP and \fBlayoutHint()\fP define how the width of the bars is calculated .PP \fBReturns:\fP .RS 4 Layout policy of the chart item .RE .PP \fBSee also:\fP .RS 4 \fBLayoutPolicy\fP, \fBsetLayoutHint()\fP, \fBlayoutPolicy()\fP .RE .PP .SS "\fBQwtPlotAbstractBarChart::LayoutPolicy\fP QwtPlotAbstractBarChart::layoutPolicy () const" The combination of \fBlayoutPolicy()\fP and \fBlayoutHint()\fP define how the width of the bars is calculated .PP \fBReturns:\fP .RS 4 Layout policy of the chart item .RE .PP \fBSee also:\fP .RS 4 \fBsetLayoutPolicy()\fP, \fBlayoutHint()\fP .RE .PP .SS "int QwtPlotAbstractBarChart::margin () const" .PP \fBReturns:\fP .RS 4 Margin between the outmost bars and the contentsRect() of the canvas\&. .RE .PP \fBSee also:\fP .RS 4 \fBsetMargin()\fP, \fBspacing()\fP .RE .PP .SS "double QwtPlotAbstractBarChart::sampleWidth (const \fBQwtScaleMap\fP & map, double canvasSize, double boundingSize, double value) const\fC [protected]\fP" Calculate the width for a sample in paint device coordinates .PP \fBParameters:\fP .RS 4 \fImap\fP Scale map for the corresponding scale .br \fIcanvasSize\fP Size of the canvas in paint device coordinates .br \fIboundingSize\fP Bounding size of the chart in plot coordinates ( used in AutoAdjustSamples mode ) .br \fIvalue\fP Value of the sample .RE .PP \fBReturns:\fP .RS 4 Sample width .RE .PP \fBSee also:\fP .RS 4 \fBlayoutPolicy()\fP, \fBlayoutHint()\fP .RE .PP .SS "void QwtPlotAbstractBarChart::setBaseline (double value)" .PP Set the baseline\&. The baseline is the origin for the chart\&. Each bar is painted from the baseline in the direction of the sample value\&. In case of a horizontal \fBorientation()\fP the baseline is interpreted as x - otherwise as y - value\&. .PP The default value for the baseline is 0\&. .PP \fBParameters:\fP .RS 4 \fIvalue\fP Value for the baseline .RE .PP \fBSee also:\fP .RS 4 \fBbaseline()\fP, \fBQwtPlotSeriesItem::orientation()\fP .RE .PP .SS "void QwtPlotAbstractBarChart::setLayoutHint (double hint)" The combination of \fBlayoutPolicy()\fP and \fBlayoutHint()\fP define how the width of the bars is calculated .PP \fBParameters:\fP .RS 4 \fIhint\fP Layout hint .RE .PP \fBSee also:\fP .RS 4 \fBLayoutPolicy\fP, \fBlayoutPolicy()\fP, \fBlayoutHint()\fP .RE .PP .SS "void QwtPlotAbstractBarChart::setLayoutPolicy (\fBLayoutPolicy\fP policy)" The combination of \fBlayoutPolicy()\fP and \fBlayoutHint()\fP define how the width of the bars is calculated .PP \fBParameters:\fP .RS 4 \fIpolicy\fP Layout policy .RE .PP \fBSee also:\fP .RS 4 \fBlayoutPolicy()\fP, \fBlayoutHint()\fP .RE .PP .SS "void QwtPlotAbstractBarChart::setMargin (int margin)" .PP Set the margin\&. The margin is the distance between the outmost bars and the contentsRect() of the canvas\&. The default setting is 5 pixels\&. .PP \fBParameters:\fP .RS 4 \fImargin\fP Margin .RE .PP \fBSee also:\fP .RS 4 \fBspacing()\fP, \fBmargin()\fP .RE .PP .SS "void QwtPlotAbstractBarChart::setSpacing (int spacing)" .PP Set the spacing\&. The spacing is the distance between 2 samples ( bars for \fBQwtPlotBarChart\fP or a group of bars for \fBQwtPlotMultiBarChart\fP ) in paint device coordinates\&. .PP \fBSee also:\fP .RS 4 \fBspacing()\fP .RE .PP .SS "int QwtPlotAbstractBarChart::spacing () const" .PP \fBReturns:\fP .RS 4 Spacing between 2 samples ( bars or groups of bars ) .RE .PP \fBSee also:\fP .RS 4 \fBsetSpacing()\fP, \fBmargin()\fP .RE .PP .SH "Author" .PP Generated automatically by Doxygen for Qwt User's Guide from the source code\&.