@@ -6,6 +6,20 | |||
|
6 | 6 | #include <QGraphicsSceneResizeEvent> |
|
7 | 7 | #include <QDebug> |
|
8 | 8 | |
|
9 | QTCOMMERCIALCHART_BEGIN_NAMESPACE | |
|
10 | ||
|
11 | /*! | |
|
12 | \enum QChart::ChartTheme | |
|
13 | ||
|
14 | This enum describes the theme used by the chart. | |
|
15 | ||
|
16 | \value ChartThemeDefault | |
|
17 | \value ChartThemeVanilla | |
|
18 | \value ChartThemeIcy | |
|
19 | \value ChartThemeGrayscale | |
|
20 | \value ChartThemeScientific | |
|
21 | */ | |
|
22 | ||
|
9 | 23 | /*! |
|
10 | 24 | \class QChart |
|
11 | 25 | \brief QtCommercial chart API. |
@@ -17,8 +31,6 | |||
|
17 | 31 | \sa QChartView |
|
18 | 32 | */ |
|
19 | 33 | |
|
20 | QTCOMMERCIALCHART_BEGIN_NAMESPACE | |
|
21 | ||
|
22 | 34 | /*! |
|
23 | 35 | Constructs a chart object which is a child of parent. |
|
24 | 36 | */ |
@@ -38,7 +50,7 QChart::~QChart() | |||
|
38 | 50 | } |
|
39 | 51 | |
|
40 | 52 | /*! |
|
41 | Adds the series and optional y axis onto the chart and takes the ownership of the objects. | |
|
53 | Adds the \a series and optional y axis onto the chart and takes the ownership of the objects. | |
|
42 | 54 | If auto scaling is enabled, re-scales the axes the series is bound to (both the x axis and |
|
43 | 55 | the y axis). |
|
44 | 56 | */ |
@@ -83,7 +95,7 void QChart::setChartBackgroundPen(const QPen& pen) | |||
|
83 | 95 | } |
|
84 | 96 | |
|
85 | 97 | /*! |
|
86 | Sets the title description text that is rendered above the chart. | |
|
98 | Sets the chart \a title. The description text that is rendered above the chart. | |
|
87 | 99 | */ |
|
88 | 100 | void QChart::setChartTitle(const QString& title) |
|
89 | 101 | { |
@@ -92,7 +104,7 void QChart::setChartTitle(const QString& title) | |||
|
92 | 104 | } |
|
93 | 105 | |
|
94 | 106 | /*! |
|
95 | Sets the font that is used for rendering the description text that is rendered above the chart. | |
|
107 | Sets the \a font that is used for rendering the description text that is rendered above the chart. | |
|
96 | 108 | */ |
|
97 | 109 | void QChart::setChartTitleFont(const QFont& font) |
|
98 | 110 | { |
@@ -117,21 +129,37 void QChart::createChartTitleItem() | |||
|
117 | 129 | } |
|
118 | 130 | } |
|
119 | 131 | |
|
132 | /*! | |
|
133 | Returns the chart margin, which is the distance between the widget edge and the part of the chart where the actual data can be displayed. | |
|
134 | \sa setMargin() | |
|
135 | */ | |
|
120 | 136 | int QChart::margin() const |
|
121 | 137 | { |
|
122 | 138 | return m_presenter->margin(); |
|
123 | 139 | } |
|
124 | 140 | |
|
141 | /*! | |
|
142 | Sets the chart \a margin, which is the distance between the widget edge and the part of the chart where the actual data can be displayed. | |
|
143 | \sa margin() | |
|
144 | */ | |
|
125 | 145 | void QChart::setMargin(int margin) |
|
126 | 146 | { |
|
127 | 147 | m_presenter->setMargin(margin); |
|
128 | 148 | } |
|
129 | 149 | |
|
150 | /*! | |
|
151 | Sets the \a theme used by the chart for rendering data graphical representation | |
|
152 | \sa ChartTheme, chartTheme() | |
|
153 | */ | |
|
130 | 154 | void QChart::setChartTheme(QChart::ChartTheme theme) |
|
131 | 155 | { |
|
132 | 156 | m_presenter->setChartTheme(theme); |
|
133 | 157 | } |
|
134 | 158 | |
|
159 | /*! | |
|
160 | Returns the theme enum used by the chart. | |
|
161 | \sa ChartTheme, setChartTheme() | |
|
162 | */ | |
|
135 | 163 | QChart::ChartTheme QChart::chartTheme() const |
|
136 | 164 | { |
|
137 | 165 | return m_presenter->chartTheme(); |
@@ -167,11 +195,17 void QChart::zoomReset() | |||
|
167 | 195 | m_dataset->clearDomains(); |
|
168 | 196 | } |
|
169 | 197 | |
|
198 | /*! | |
|
199 | Returns the pointer to the x axis object of the chart | |
|
200 | */ | |
|
170 | 201 | QChartAxis* QChart::axisX() const |
|
171 | 202 | { |
|
172 | 203 | return m_dataset->axisX(); |
|
173 | 204 | } |
|
174 | 205 | |
|
206 | /*! | |
|
207 | Returns the pointer to the y axis object of the chart | |
|
208 | */ | |
|
175 | 209 | QChartAxis* QChart::axisY() const |
|
176 | 210 | { |
|
177 | 211 | return m_dataset->axisY(); |
@@ -36,6 +36,10 m_horizonalRubberBand(false) | |||
|
36 | 36 | setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
|
37 | 37 | } |
|
38 | 38 | |
|
39 | ||
|
40 | /*! | |
|
41 | Destroys the object and it's children, like QChartSeries and QChartAxis object added to it. | |
|
42 | */ | |
|
39 | 43 | QChartView::~QChartView() |
|
40 | 44 | { |
|
41 | 45 | } |
@@ -95,7 +99,7 void QChartView::zoomOut() | |||
|
95 | 99 | } |
|
96 | 100 | |
|
97 | 101 | /*! |
|
98 |
Returns the chart margin, which is the distance between the widget edge and the |
|
|
102 | Returns the chart margin, which is the distance between the widget edge and the part of the chart where the actual data can be displayed. | |
|
99 | 103 | */ |
|
100 | 104 | int QChartView::margin() const |
|
101 | 105 | { |
@@ -103,7 +107,7 int QChartView::margin() const | |||
|
103 | 107 | } |
|
104 | 108 | |
|
105 | 109 | /*! |
|
106 |
Sets the ti |
|
|
110 | Sets the chart \a tile. A description text that is rendered above the chart. | |
|
107 | 111 | */ |
|
108 | 112 | void QChartView::setChartTitle(const QString& title) |
|
109 | 113 | { |
@@ -111,17 +115,24 void QChartView::setChartTitle(const QString& title) | |||
|
111 | 115 | } |
|
112 | 116 | |
|
113 | 117 | /*! |
|
114 | Sets the font that is used for rendering the description text that is rendered above the chart. | |
|
118 | Sets the \a font that is used for rendering the description text that is rendered above the chart. | |
|
115 | 119 | */ |
|
116 | 120 | void QChartView::setChartTitleFont(const QFont& font) |
|
117 | 121 | { |
|
118 | 122 | m_chart->setChartTitleFont(font); |
|
119 | 123 | } |
|
120 | 124 | |
|
125 | /*! | |
|
126 | Sets the \a brush that is used for painting the background of the chart area of the QChartView widget. | |
|
127 | */ | |
|
121 | 128 | void QChartView::setChartBackgroundBrush(const QBrush& brush) |
|
122 | 129 | { |
|
123 | 130 | m_chart->setChartBackgroundBrush(brush); |
|
124 | 131 | } |
|
132 | ||
|
133 | /*! | |
|
134 | Sets the \a pen that is used for painting the background of the chart area of the QChartView widget. | |
|
135 | */ | |
|
125 | 136 | void QChartView::setChartBackgroundPen(const QPen& pen) |
|
126 | 137 | { |
|
127 | 138 | m_chart->setChartBackgroundPen(pen); |
@@ -235,11 +246,19 void QChartView::keyPressEvent(QKeyEvent *event) | |||
|
235 | 246 | } |
|
236 | 247 | } |
|
237 | 248 | |
|
249 | /*! | |
|
250 | Sets the \a theme used by the chart for rendering the graphical representation of the data | |
|
251 | \sa QChart::ChartTheme, chartTheme() | |
|
252 | */ | |
|
238 | 253 | void QChartView::setChartTheme(QChart::ChartTheme theme) |
|
239 | 254 | { |
|
240 | 255 | m_chart->setChartTheme(theme); |
|
241 | 256 | } |
|
242 | 257 | |
|
258 | /*! | |
|
259 | Returns the theme enum used by the chart. | |
|
260 | \sa setChartTheme() | |
|
261 | */ | |
|
243 | 262 | QChart::ChartTheme QChartView::chartTheme() const |
|
244 | 263 | { |
|
245 | 264 | return m_chart->chartTheme(); |
General Comments 0
You need to be logged in to leave comments.
Login now