QWT API (中文) 7.0.1
Qt绘图库 - 中文API文档
载入中...
搜索中...
未找到
qwt_plot_abstract_barchart.h
1/******************************************************************************
2 * Qwt Widget Library
3 * Copyright (C) 1997 Josef Wilgen
4 * Copyright (C) 2002 Uwe Rathmann
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the Qwt License, Version 1.0
8 *
9 * Modified by ChenZongYan in 2024 <czy.t@163.com>
10 * Summary of major modifications (see ChangeLog.md for full history):
11 * 1. CMake build system & C++11 throughout.
12 * 2. Core panner/ zoomer refactored:
13 * - QwtPanner → QwtCachePanner (pixmap-cache version)
14 * - New real-time QwtPlotPanner derived from QwtPicker.
15 * 3. Zoomer supports multi-axis.
16 * 4. Parasite-plot framework:
17 * - QwtFigure, QwtPlotParasiteLayout, QwtPlotTransparentCanvas,
18 * - QwtPlotScaleEventDispatcher, built-in pan/zoom on axis.
19 * 5. New picker: QwtPlotSeriesDataPicker (works with date axis).
20 * 6. Raster & color-map extensions:
21 * - QwtGridRasterData (2-D table + interpolation)
22 * - QwtLinearColorMap::stopColors(), stopPos() API rename.
23 * 7. Bar-chart: expose pen/brush control.
24 * 8. Amalgamated build: single QwtPlot.h / QwtPlot.cpp pair in src-amalgamate.
25 *****************************************************************************/
26
27#ifndef QWT_PLOT_ABSTRACT_BAR_CHART_H
28#define QWT_PLOT_ABSTRACT_BAR_CHART_H
29
30#include "qwt_global.h"
31#include "qwt_plot_seriesitem.h"
32
49{
50 public:
85
86 // Constructor with title
87 explicit QwtPlotAbstractBarChart( const QwtText& title );
88 // Destructor
90
91 // Set the layout policy for bar width calculation
92 void setLayoutPolicy( LayoutPolicy );
93 // Get the layout policy
94 LayoutPolicy layoutPolicy() const;
95
96 // Set the layout hint for bar width calculation
97 void setLayoutHint( double );
98 // Get the layout hint
99 double layoutHint() const;
100
101 // Set the spacing between bars
102 void setSpacing( int );
103 // Get the spacing between bars
104 int spacing() const;
105
106 // Set the margin around the bars
107 void setMargin( int );
108 // Get the margin around the bars
109 int margin() const;
110
111 // Set the baseline value for the bars
112 void setBaseline( double );
113 // Get the baseline value
114 double baseline() const;
115
116 // Calculate canvas margin hint for layout
117 virtual void getCanvasMarginHint(
118 const QwtScaleMap& xMap, const QwtScaleMap& yMap,
119 const QRectF& canvasRect, double& left, double& top,
120 double& right, double& bottom) const override;
121
122
123 protected:
124 double sampleWidth( const QwtScaleMap& map,
125 double canvasSize, double boundingSize,
126 double value ) const;
127
128 private:
129 class PrivateData;
130 PrivateData* m_data;
131};
132
133#endif
条形图项的抽象基类
Definition qwt_plot_abstract_barchart.h:49
LayoutPolicy
Mode how to calculate the bar width
Definition qwt_plot_abstract_barchart.h:57
@ AutoAdjustSamples
The sample width is calculated by dividing the bounding rectangle by the number of samples.
Definition qwt_plot_abstract_barchart.h:65
@ ScaleSamplesToAxes
layoutHint() defines an interval in axis coordinates
Definition qwt_plot_abstract_barchart.h:70
@ ScaleSampleToCanvas
The bar width is calculated by multiplying layoutHint() with the height or width of the canvas.
Definition qwt_plot_abstract_barchart.h:78
virtual void getCanvasMarginHint(const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect, double &left, double &top, double &right, double &bottom) const
Get margin hints for the canvas
Definition qwt_plot_item.cpp:922
表示一系列样本的绘图项的基类
Definition qwt_plot_seriesitem.h:53
刻度映射
Definition qwt_scale_map.h:52
表示文本的类
Definition qwt_text.h:93