##// END OF EJS Templates
Merge branch 'master' of https://git.it.local/repos/QtCommercialDevel-13049/charts Conflicts: example/example.pro src/chartdataset.cpp src/chartpresenter.cpp src/charttheme_p.h

File last commit:

r386:fe666a26d3fa
r426:95162da3dc01 merge
Show More
main.cpp
38 lines | 794 B | text/x-c | CppLexer
Jani Honkonen
Added piechart example
r128 #include <QtGui/QApplication>
#include <QMainWindow>
#include <qchartglobal.h>
Michal Klocek
Removes QChartWidget...
r136 #include <qchartview.h>
Jani Honkonen
Added piechart example
r128 #include <qpieseries.h>
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 #include <qpieslice.h>
Jani Honkonen
Added piechart example
r128
QTCOMMERCIALCHART_USE_NAMESPACE
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 QMainWindow window;
Jani Honkonen
Add pie example to pie series doc. Also made the basic pie example real simple. Have to add separate examples for customization.
r341 QChartView* chartView = new QChartView(&window);
//! [1]
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 QPieSeries *series = new QPieSeries();
Jani Honkonen
Add pie example to pie series doc. Also made the basic pie example real simple. Have to add separate examples for customization.
r341 series->add(1, "Slice 1");
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 series->add(2, "Slice 2");
series->add(3, "Slice 3");
series->add(4, "Slice 4");
series->add(5, "Slice 5");
Jani Honkonen
Clear background when there is only pie chart.
r293 chartView->addSeries(series);
Jani Honkonen
Add pie example to pie series doc. Also made the basic pie example real simple. Have to add separate examples for customization.
r341 //! [1]
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203
Jani Honkonen
Update pie doc
r345 //! [2]
Jani Honkonen
Review corrections for pie
r386 series->setHoverHighlighting();
series->setClickExplodes();
Jani Honkonen
Update pie doc
r345 //! [2]
Jani Honkonen
Refactor pie (again). QPieSlice's now emit signals and no id's anymore. Just pointers in the interface.
r203 window.setCentralWidget(chartView);
window.resize(600, 600);
window.show();
Jani Honkonen
Added piechart example
r128
return a.exec();
}