@@ -1,69 +1,71 | |||||
1 | #include <QApplication> |
|
1 | #include <QApplication> | |
2 | #include <QMainWindow> |
|
2 | #include <QMainWindow> | |
3 | #include <qchartview.h> |
|
3 | #include <qchartview.h> | |
4 | #include <qbarseries.h> |
|
4 | #include <qbarseries.h> | |
5 | #include <qbarset.h> |
|
5 | #include <qbarset.h> | |
6 | #include <qbarcategory.h> |
|
6 | #include <qbarcategory.h> | |
7 |
|
7 | |||
8 | QTCOMMERCIALCHART_USE_NAMESPACE |
|
8 | QTCOMMERCIALCHART_USE_NAMESPACE | |
9 |
|
9 | |||
10 | int main(int argc, char *argv[]) |
|
10 | int main(int argc, char *argv[]) | |
11 | { |
|
11 | { | |
12 | QApplication a(argc, argv); |
|
12 | QApplication a(argc, argv); | |
13 | QMainWindow window; |
|
13 | QMainWindow window; | |
14 |
|
14 | |||
15 | //! [1] |
|
15 | //! [1] | |
16 | // Create category |
|
16 | // Create category | |
17 | QBarCategory *category = new QBarCategory; |
|
17 | QBarCategory *category = new QBarCategory; | |
18 | *category << "Jan" << "Feb" << "Mar" << "Apr" << "May" << "June" << "Jul" << "Aug" << "Sep" << "Oct" << "Nov" << "Dec"; |
|
18 | *category << "Jan" << "Feb" << "Mar" << "Apr" << "May" << "June" << "Jul" << "Aug" << "Sep" << "Oct" << "Nov" << "Dec"; | |
19 | //! [1] |
|
19 | //! [1] | |
20 |
|
20 | |||
21 | //! [2] |
|
21 | //! [2] | |
22 | // Create some test sets for chat |
|
22 | // Create some test sets for chat | |
23 |
|
23 | |||
24 | QBarSet *set0 = new QBarSet("Bub"); |
|
24 | QBarSet *set0 = new QBarSet("Bub"); | |
25 | QBarSet *set1 = new QBarSet("Bob"); |
|
25 | QBarSet *set1 = new QBarSet("Bob"); | |
26 | QBarSet *set2 = new QBarSet("Guybrush"); |
|
26 | QBarSet *set2 = new QBarSet("Guybrush"); | |
27 | QBarSet *set3 = new QBarSet("Larry"); |
|
27 | QBarSet *set3 = new QBarSet("Larry"); | |
28 | QBarSet *set4 = new QBarSet("Zak"); |
|
28 | QBarSet *set4 = new QBarSet("Zak"); | |
29 |
|
29 | |||
30 | *set0 << 1 << 2 << 3 << 4 << 5 << 6 << 7 << 8 << 9 << 10 << 11 << 12; |
|
30 | *set0 << 1 << 2 << 3 << 4 << 5 << 6 << 7 << 8 << 9 << 10 << 11 << 12; | |
31 | *set1 << 5 << 0 << 0 << 4 << 0 << 7 << 8 << 9 << 9 << 0 << 4 << 2; |
|
31 | *set1 << 5 << 0 << 0 << 4 << 0 << 7 << 8 << 9 << 9 << 0 << 4 << 2; | |
32 | *set2 << 3 << 5 << 8 << 13 << 8 << 5 << 3 << 2 << 1 << 1 << 3 << 5; |
|
32 | *set2 << 3 << 5 << 8 << 13 << 8 << 5 << 3 << 2 << 1 << 1 << 3 << 5; | |
33 | *set3 << 5 << 6 << 7 << 3 << 4 << 5 << 8 << 9 << 10 << 5 << 2 << 7; |
|
33 | *set3 << 5 << 6 << 7 << 3 << 4 << 5 << 8 << 9 << 10 << 5 << 2 << 7; | |
34 | *set4 << 9 << 7 << 5 << 3 << 1 << 2 << 4 << 6 << 8 << 10 << 1 << 6; |
|
34 | *set4 << 9 << 7 << 5 << 3 << 1 << 2 << 4 << 6 << 8 << 10 << 1 << 6; | |
35 | //! [2] |
|
35 | //! [2] | |
36 |
|
36 | |||
37 | //! [3] |
|
37 | //! [3] | |
38 | // Create series and add sets to it |
|
38 | // Create series and add sets to it | |
39 | QBarSeries* series= new QBarSeries(category); |
|
39 | QBarSeries* series= new QBarSeries(category); | |
40 |
|
40 | |||
41 | series->addBarSet(set0); |
|
41 | series->addBarSet(set0); | |
42 | series->addBarSet(set1); |
|
42 | series->addBarSet(set1); | |
43 | series->addBarSet(set2); |
|
43 | series->addBarSet(set2); | |
44 | series->addBarSet(set3); |
|
44 | series->addBarSet(set3); | |
45 | series->addBarSet(set4); |
|
45 | series->addBarSet(set4); | |
46 | //! [3] |
|
46 | //! [3] | |
47 |
|
47 | |||
48 | //! [4] |
|
48 | //! [4] | |
49 | // Enable some features |
|
49 | // Enable some features | |
|
50 | // series->setToolTipEnabled(); | |||
|
51 | // series->enableFloatingValues(); | |||
50 | series->setToolTipEnabled(); |
|
52 | series->setToolTipEnabled(); | |
51 |
series-> |
|
53 | series->setFloatingValuesEnabled(); | |
52 | //! [4] |
|
54 | //! [4] | |
53 |
|
55 | |||
54 | //! [5] |
|
56 | //! [5] | |
55 | // Create view for chart and add series to it. Apply theme. |
|
57 | // Create view for chart and add series to it. Apply theme. | |
56 |
|
58 | |||
57 | QChartView* chartView = new QChartView(&window); |
|
59 | QChartView* chartView = new QChartView(&window); | |
58 | chartView->addSeries(series); |
|
60 | chartView->addSeries(series); | |
59 | chartView->setChartTitle("simple stacked barchart"); |
|
61 | chartView->setChartTitle("simple stacked barchart"); | |
60 | chartView->setChartTheme(QChart::ChartThemeIcy); |
|
62 | chartView->setChartTheme(QChart::ChartThemeIcy); | |
61 | //! [5] |
|
63 | //! [5] | |
62 |
|
64 | |||
63 | window.setCentralWidget(chartView); |
|
65 | window.setCentralWidget(chartView); | |
64 | window.resize(600, 300); |
|
66 | window.resize(600, 300); | |
65 | window.show(); |
|
67 | window.show(); | |
66 |
|
68 | |||
67 | return a.exec(); |
|
69 | return a.exec(); | |
68 | } |
|
70 | } | |
69 |
|
71 |
@@ -1,69 +1,69 | |||||
1 | #include <QApplication> |
|
1 | #include <QApplication> | |
2 | #include <QMainWindow> |
|
2 | #include <QMainWindow> | |
3 | #include <QStandardItemModel> |
|
3 | #include <QStandardItemModel> | |
4 | #include <qpercentbarseries.h> |
|
4 | #include <qpercentbarseries.h> | |
5 | #include <qbarcategory.h> |
|
5 | #include <qbarcategory.h> | |
6 | #include <qchartview.h> |
|
6 | #include <qchartview.h> | |
7 | #include <qbarset.h> |
|
7 | #include <qbarset.h> | |
8 |
|
8 | |||
9 | QTCOMMERCIALCHART_USE_NAMESPACE |
|
9 | QTCOMMERCIALCHART_USE_NAMESPACE | |
10 |
|
10 | |||
11 | int main(int argc, char *argv[]) |
|
11 | int main(int argc, char *argv[]) | |
12 | { |
|
12 | { | |
13 | QApplication a(argc, argv); |
|
13 | QApplication a(argc, argv); | |
14 | QMainWindow window; |
|
14 | QMainWindow window; | |
15 |
|
15 | |||
16 | //! [1] |
|
16 | //! [1] | |
17 | // Create category |
|
17 | // Create category | |
18 | QBarCategory *category = new QBarCategory; |
|
18 | QBarCategory *category = new QBarCategory; | |
19 | *category << "Jan" << "Feb" << "Mar" << "Apr" << "May" << "June" << "Jul" << "Aug" << "Sep" << "Oct" << "Nov" << "Dec"; |
|
19 | *category << "Jan" << "Feb" << "Mar" << "Apr" << "May" << "June" << "Jul" << "Aug" << "Sep" << "Oct" << "Nov" << "Dec"; | |
20 | //! [1] |
|
20 | //! [1] | |
21 |
|
21 | |||
22 | //! [2] |
|
22 | //! [2] | |
23 | // Create some test sets for chat |
|
23 | // Create some test sets for chat | |
24 | QBarSet *set0 = new QBarSet("Bub"); |
|
24 | QBarSet *set0 = new QBarSet("Bub"); | |
25 | QBarSet *set1 = new QBarSet("Bob"); |
|
25 | QBarSet *set1 = new QBarSet("Bob"); | |
26 | QBarSet *set2 = new QBarSet("Guybrush"); |
|
26 | QBarSet *set2 = new QBarSet("Guybrush"); | |
27 | QBarSet *set3 = new QBarSet("Larry"); |
|
27 | QBarSet *set3 = new QBarSet("Larry"); | |
28 | QBarSet *set4 = new QBarSet("Zak"); |
|
28 | QBarSet *set4 = new QBarSet("Zak"); | |
29 |
|
29 | |||
30 | *set0 << 1 << 2 << 3 << 4 << 5 << 6 << 7 << 8 << 9 << 10 << 11 << 12; |
|
30 | *set0 << 1 << 2 << 3 << 4 << 5 << 6 << 7 << 8 << 9 << 10 << 11 << 12; | |
31 | *set1 << 5 << 0 << 0 << 4 << 0 << 7 << 8 << 9 << 9 << 0 << 4 << 2; |
|
31 | *set1 << 5 << 0 << 0 << 4 << 0 << 7 << 8 << 9 << 9 << 0 << 4 << 2; | |
32 | *set2 << 3 << 5 << 8 << 13 << 8 << 5 << 3 << 2 << 1 << 1 << 3 << 5; |
|
32 | *set2 << 3 << 5 << 8 << 13 << 8 << 5 << 3 << 2 << 1 << 1 << 3 << 5; | |
33 | *set3 << 5 << 6 << 7 << 3 << 4 << 5 << 8 << 9 << 10 << 5 << 2 << 7; |
|
33 | *set3 << 5 << 6 << 7 << 3 << 4 << 5 << 8 << 9 << 10 << 5 << 2 << 7; | |
34 | *set4 << 9 << 7 << 5 << 3 << 1 << 2 << 4 << 6 << 8 << 10 << 1 << 6; |
|
34 | *set4 << 9 << 7 << 5 << 3 << 1 << 2 << 4 << 6 << 8 << 10 << 1 << 6; | |
35 | //! [2] |
|
35 | //! [2] | |
36 |
|
36 | |||
37 | //! [3] |
|
37 | //! [3] | |
38 | // Create series and add sets to it |
|
38 | // Create series and add sets to it | |
39 | QPercentBarSeries* series = new QPercentBarSeries(category); |
|
39 | QPercentBarSeries* series = new QPercentBarSeries(category); | |
40 |
|
40 | |||
41 | series->addBarSet(set0); |
|
41 | series->addBarSet(set0); | |
42 | series->addBarSet(set1); |
|
42 | series->addBarSet(set1); | |
43 | series->addBarSet(set2); |
|
43 | series->addBarSet(set2); | |
44 | series->addBarSet(set3); |
|
44 | series->addBarSet(set3); | |
45 | series->addBarSet(set4); |
|
45 | series->addBarSet(set4); | |
46 | //! [3] |
|
46 | //! [3] | |
47 |
|
47 | |||
48 | //! [4] |
|
48 | //! [4] | |
49 | // Enable features |
|
49 | // Enable features | |
50 | series->setToolTipEnabled(); |
|
50 | series->setToolTipEnabled(); | |
51 |
series-> |
|
51 | series->setFloatingValuesEnabled(); | |
52 | //! [4] |
|
52 | //! [4] | |
53 |
|
53 | |||
54 | //! [5] |
|
54 | //! [5] | |
55 | // Create view for chart and add series to it. Apply theme. |
|
55 | // Create view for chart and add series to it. Apply theme. | |
56 |
|
56 | |||
57 | QChartView* chartView = new QChartView(&window); |
|
57 | QChartView* chartView = new QChartView(&window); | |
58 | chartView->addSeries(series); |
|
58 | chartView->addSeries(series); | |
59 | chartView->setChartTitle("simple percent barchart"); |
|
59 | chartView->setChartTitle("simple percent barchart"); | |
60 | chartView->setChartTheme(QChart::ChartThemeIcy); |
|
60 | chartView->setChartTheme(QChart::ChartThemeIcy); | |
61 | //! [5] |
|
61 | //! [5] | |
62 |
|
62 | |||
63 | window.setCentralWidget(chartView); |
|
63 | window.setCentralWidget(chartView); | |
64 | window.resize(400, 300); |
|
64 | window.resize(400, 300); | |
65 | window.show(); |
|
65 | window.show(); | |
66 |
|
66 | |||
67 | return a.exec(); |
|
67 | return a.exec(); | |
68 | } |
|
68 | } | |
69 |
|
69 |
@@ -1,68 +1,68 | |||||
1 | #include <QApplication> |
|
1 | #include <QApplication> | |
2 | #include <QMainWindow> |
|
2 | #include <QMainWindow> | |
3 | #include <qchartview.h> |
|
3 | #include <qchartview.h> | |
4 | #include <qstackedbarseries.h> |
|
4 | #include <qstackedbarseries.h> | |
5 | #include <qbarset.h> |
|
5 | #include <qbarset.h> | |
6 | #include <qbarcategory.h> |
|
6 | #include <qbarcategory.h> | |
7 |
|
7 | |||
8 | QTCOMMERCIALCHART_USE_NAMESPACE |
|
8 | QTCOMMERCIALCHART_USE_NAMESPACE | |
9 |
|
9 | |||
10 | int main(int argc, char *argv[]) |
|
10 | int main(int argc, char *argv[]) | |
11 | { |
|
11 | { | |
12 | QApplication a(argc, argv); |
|
12 | QApplication a(argc, argv); | |
13 | QMainWindow window; |
|
13 | QMainWindow window; | |
14 |
|
14 | |||
15 | //! [1] |
|
15 | //! [1] | |
16 | // Create category |
|
16 | // Create category | |
17 | QBarCategory *category = new QBarCategory; |
|
17 | QBarCategory *category = new QBarCategory; | |
18 | *category << "Jan" << "Feb" << "Mar" << "Apr" << "May" << "June" << "Jul" << "Aug" << "Sep" << "Oct" << "Nov" << "Dec"; |
|
18 | *category << "Jan" << "Feb" << "Mar" << "Apr" << "May" << "June" << "Jul" << "Aug" << "Sep" << "Oct" << "Nov" << "Dec"; | |
19 | //! [1] |
|
19 | //! [1] | |
20 |
|
20 | |||
21 | //! [2] |
|
21 | //! [2] | |
22 | // Create some test sets for chat |
|
22 | // Create some test sets for chat | |
23 | QBarSet *set0 = new QBarSet("Bub"); |
|
23 | QBarSet *set0 = new QBarSet("Bub"); | |
24 | QBarSet *set1 = new QBarSet("Bob"); |
|
24 | QBarSet *set1 = new QBarSet("Bob"); | |
25 | QBarSet *set2 = new QBarSet("Guybrush"); |
|
25 | QBarSet *set2 = new QBarSet("Guybrush"); | |
26 | QBarSet *set3 = new QBarSet("Larry"); |
|
26 | QBarSet *set3 = new QBarSet("Larry"); | |
27 | QBarSet *set4 = new QBarSet("Zak"); |
|
27 | QBarSet *set4 = new QBarSet("Zak"); | |
28 |
|
28 | |||
29 | *set0 << 1 << 2 << 3 << 4 << 5 << 6 << 7 << 8 << 9 << 10 << 11 << 12; |
|
29 | *set0 << 1 << 2 << 3 << 4 << 5 << 6 << 7 << 8 << 9 << 10 << 11 << 12; | |
30 | *set1 << 5 << 0 << 0 << 4 << 0 << 7 << 8 << 9 << 9 << 0 << 4 << 2; |
|
30 | *set1 << 5 << 0 << 0 << 4 << 0 << 7 << 8 << 9 << 9 << 0 << 4 << 2; | |
31 | *set2 << 3 << 5 << 8 << 13 << 8 << 5 << 3 << 2 << 1 << 1 << 3 << 5; |
|
31 | *set2 << 3 << 5 << 8 << 13 << 8 << 5 << 3 << 2 << 1 << 1 << 3 << 5; | |
32 | *set3 << 5 << 6 << 7 << 3 << 4 << 5 << 8 << 9 << 10 << 5 << 2 << 7; |
|
32 | *set3 << 5 << 6 << 7 << 3 << 4 << 5 << 8 << 9 << 10 << 5 << 2 << 7; | |
33 | *set4 << 9 << 7 << 5 << 3 << 1 << 2 << 4 << 6 << 8 << 10 << 1 << 6; |
|
33 | *set4 << 9 << 7 << 5 << 3 << 1 << 2 << 4 << 6 << 8 << 10 << 1 << 6; | |
34 | //! [2] |
|
34 | //! [2] | |
35 |
|
35 | |||
36 | //! [3] |
|
36 | //! [3] | |
37 | // Create series and add sets to it |
|
37 | // Create series and add sets to it | |
38 | QStackedBarSeries* series = new QStackedBarSeries(category); |
|
38 | QStackedBarSeries* series = new QStackedBarSeries(category); | |
39 |
|
39 | |||
40 | series->addBarSet(set0); |
|
40 | series->addBarSet(set0); | |
41 | series->addBarSet(set1); |
|
41 | series->addBarSet(set1); | |
42 | series->addBarSet(set2); |
|
42 | series->addBarSet(set2); | |
43 | series->addBarSet(set3); |
|
43 | series->addBarSet(set3); | |
44 | series->addBarSet(set4); |
|
44 | series->addBarSet(set4); | |
45 | //! [3] |
|
45 | //! [3] | |
46 |
|
46 | |||
47 | //! [4] |
|
47 | //! [4] | |
48 | // Enable features |
|
48 | // Enable features | |
49 | series->setToolTipEnabled(); |
|
49 | series->setToolTipEnabled(); | |
50 |
series-> |
|
50 | series->setFloatingValuesEnabled(); | |
51 | //! [4] |
|
51 | //! [4] | |
52 |
|
52 | |||
53 | //! [5] |
|
53 | //! [5] | |
54 | // Create view for chart and add series to it. Apply theme. |
|
54 | // Create view for chart and add series to it. Apply theme. | |
55 |
|
55 | |||
56 | QChartView* chartView = new QChartView(&window); |
|
56 | QChartView* chartView = new QChartView(&window); | |
57 | chartView->addSeries(series); |
|
57 | chartView->addSeries(series); | |
58 | chartView->setChartTitle("simple stacked barchart"); |
|
58 | chartView->setChartTitle("simple stacked barchart"); | |
59 | chartView->setChartTheme(QChart::ChartThemeIcy); |
|
59 | chartView->setChartTheme(QChart::ChartThemeIcy); | |
60 | //! [5] |
|
60 | //! [5] | |
61 |
|
61 | |||
62 | window.setCentralWidget(chartView); |
|
62 | window.setCentralWidget(chartView); | |
63 | window.resize(400, 300); |
|
63 | window.resize(400, 300); | |
64 | window.show(); |
|
64 | window.show(); | |
65 |
|
65 | |||
66 | return a.exec(); |
|
66 | return a.exec(); | |
67 | } |
|
67 | } | |
68 |
|
68 |
@@ -1,51 +1,36 | |||||
1 | #include "qpercentbarseries.h" |
|
1 | #include "qpercentbarseries.h" | |
2 |
|
2 | |||
3 | QTCOMMERCIALCHART_BEGIN_NAMESPACE |
|
3 | QTCOMMERCIALCHART_BEGIN_NAMESPACE | |
4 |
|
4 | |||
5 | /*! |
|
5 | /*! | |
6 | \class QPercentBarSeries |
|
6 | \class QPercentBarSeries | |
7 | \brief part of QtCommercial chart API. |
|
7 | \brief part of QtCommercial chart API. | |
8 |
|
8 | |||
9 | QPercentBarSeries represents a series of data shown as bars. Each bar of QBarSet is shown as percentage |
|
9 | QPercentBarSeries represents a series of data shown as bars. Each bar of QBarSet is shown as percentage | |
10 | of all bars in category. One QPercentBarSeries can contain multible QBarSet data sets. |
|
10 | of all bars in category. One QPercentBarSeries can contain multible QBarSet data sets. | |
11 | QBarSeries groups the data from sets to categories, which are defined by QBarCategory class. |
|
11 | QBarSeries groups the data from sets to categories, which are defined by QBarCategory class. | |
12 |
|
12 | |||
13 | \mainclass |
|
13 | \mainclass | |
14 |
|
14 | |||
15 | Example on how to create category: |
|
|||
16 | \snippet ../example/barchart/main.cpp 1 |
|
|||
17 |
|
||||
18 | Example on how to create sets of data: |
|
|||
19 | \snippet ../example/barchart/main.cpp 2 |
|
|||
20 |
|
||||
21 | Example on how to add sets to bar chart: |
|
|||
22 | \snippet ../example/barchart/main.cpp 3 |
|
|||
23 |
|
||||
24 | Example on how to enable tooltip and floating values: |
|
|||
25 | \snippet ../example/barchart/main.cpp 4 |
|
|||
26 |
|
||||
27 | Example on how to create view and apply theme: |
|
|||
28 | \snippet ../example/barchart/main.cpp 5 |
|
|||
29 |
|
||||
30 | \sa QBarCategory, QBarSet, QStackedBarSeries, QBarSeries |
|
15 | \sa QBarCategory, QBarSet, QStackedBarSeries, QBarSeries | |
31 | */ |
|
16 | */ | |
32 |
|
17 | |||
33 | /*! |
|
18 | /*! | |
34 | \fn virtual QChartSeriesType QPercentBarSeries::type() const |
|
19 | \fn virtual QChartSeriesType QPercentBarSeries::type() const | |
35 | \brief Returns type of series. |
|
20 | \brief Returns type of series. | |
36 | \sa QChartSeries, QChartSeriesType |
|
21 | \sa QChartSeries, QChartSeriesType | |
37 | */ |
|
22 | */ | |
38 |
|
23 | |||
39 | /*! |
|
24 | /*! | |
40 | Constructs empty QPercentBarSeries. Parameter \a category defines the categories for chart. |
|
25 | Constructs empty QPercentBarSeries. Parameter \a category defines the categories for chart. | |
41 | QPercentBarSeries is QObject which is a child of a \a parent. |
|
26 | QPercentBarSeries is QObject which is a child of a \a parent. | |
42 | */ |
|
27 | */ | |
43 | QPercentBarSeries::QPercentBarSeries(QBarCategory *category, QObject *parent) |
|
28 | QPercentBarSeries::QPercentBarSeries(QBarCategory *category, QObject *parent) | |
44 | : QBarSeries(category, parent) |
|
29 | : QBarSeries(category, parent) | |
45 | { |
|
30 | { | |
46 | } |
|
31 | } | |
47 |
|
32 | |||
48 | #include "moc_qpercentbarseries.cpp" |
|
33 | #include "moc_qpercentbarseries.cpp" | |
49 |
|
34 | |||
50 | QTCOMMERCIALCHART_END_NAMESPACE |
|
35 | QTCOMMERCIALCHART_END_NAMESPACE | |
51 |
|
36 |
@@ -1,51 +1,36 | |||||
1 | #include "qstackedbarseries.h" |
|
1 | #include "qstackedbarseries.h" | |
2 |
|
2 | |||
3 | QTCOMMERCIALCHART_BEGIN_NAMESPACE |
|
3 | QTCOMMERCIALCHART_BEGIN_NAMESPACE | |
4 |
|
4 | |||
5 | /*! |
|
5 | /*! | |
6 | \class QStackedBarSeries |
|
6 | \class QStackedBarSeries | |
7 | \brief part of QtCommercial chart API. |
|
7 | \brief part of QtCommercial chart API. | |
8 |
|
8 | |||
9 | QStackedBarSeries represents a series of data shown as bars. All bars in same category are |
|
9 | QStackedBarSeries represents a series of data shown as bars. All bars in same category are | |
10 | stacked on top of each other. One QStackedBarSeries can contain multible QBarSet data sets. |
|
10 | stacked on top of each other. One QStackedBarSeries can contain multible QBarSet data sets. | |
11 | QStackedBarSeries groups the data from sets to categories, which are defined by QBarCategory class. |
|
11 | QStackedBarSeries groups the data from sets to categories, which are defined by QBarCategory class. | |
12 |
|
12 | |||
13 | \mainclass |
|
13 | \mainclass | |
14 |
|
14 | |||
15 | Example on how to create category: |
|
|||
16 | \snippet ../example/barchart/main.cpp 1 |
|
|||
17 |
|
||||
18 | Example on how to create sets of data: |
|
|||
19 | \snippet ../example/barchart/main.cpp 2 |
|
|||
20 |
|
||||
21 | Example on how to add sets to bar chart: |
|
|||
22 | \snippet ../example/barchart/main.cpp 3 |
|
|||
23 |
|
||||
24 | Example on how to enable tooltip and floating values: |
|
|||
25 | \snippet ../example/barchart/main.cpp 4 |
|
|||
26 |
|
||||
27 | Example on how to create view and apply theme: |
|
|||
28 | \snippet ../example/barchart/main.cpp 5 |
|
|||
29 |
|
||||
30 | \sa QBarCategory, QBarSet, QPercentBarSeries, QBarSeries |
|
15 | \sa QBarCategory, QBarSet, QPercentBarSeries, QBarSeries | |
31 | */ |
|
16 | */ | |
32 |
|
17 | |||
33 | /*! |
|
18 | /*! | |
34 | \fn virtual QChartSeriesType QStackedBarSeries::type() const |
|
19 | \fn virtual QChartSeriesType QStackedBarSeries::type() const | |
35 | \brief Returns type of series. |
|
20 | \brief Returns type of series. | |
36 | \sa QChartSeries, QChartSeriesType |
|
21 | \sa QChartSeries, QChartSeriesType | |
37 | */ |
|
22 | */ | |
38 |
|
23 | |||
39 | /*! |
|
24 | /*! | |
40 | Constructs empty QStackedBarSeries. Parameter \a category defines the categories for chart. |
|
25 | Constructs empty QStackedBarSeries. Parameter \a category defines the categories for chart. | |
41 | QStackedBarSeries is QObject which is a child of a \a parent. |
|
26 | QStackedBarSeries is QObject which is a child of a \a parent. | |
42 | */ |
|
27 | */ | |
43 | QStackedBarSeries::QStackedBarSeries(QBarCategory *category, QObject *parent) |
|
28 | QStackedBarSeries::QStackedBarSeries(QBarCategory *category, QObject *parent) | |
44 | : QBarSeries(category, parent) |
|
29 | : QBarSeries(category, parent) | |
45 | { |
|
30 | { | |
46 | } |
|
31 | } | |
47 |
|
32 | |||
48 | #include "moc_qstackedbarseries.cpp" |
|
33 | #include "moc_qstackedbarseries.cpp" | |
49 |
|
34 | |||
50 | QTCOMMERCIALCHART_END_NAMESPACE |
|
35 | QTCOMMERCIALCHART_END_NAMESPACE | |
51 |
|
36 |
General Comments 0
You need to be logged in to leave comments.
Login now