4 @SuppressWarnings public class QChart : QObject{
5 public enum ChartTheme {
7 ChartThemeBlueCerulean,
11 ChartThemeHighContrast,
15 public enum AnimationOption {
17 GridAxisAnimations = 0x1,
18 SeriesAnimations = 0x2,
22 nativehandle = QtXnl.createQObject(QType.qtChart,
this, 0);
23 if (nativehandle == 0){
24 throw new Exception(
"can not create QChart");
33 QtXnl.widget_set_native_value(nativehandle, Constant.QCHART_ADDSERIES, series.nativehandle);
37 QtXnl.widget_set_native_value(nativehandle, Constant.QCHART_REMOVESERIES, series.nativehandle);
41 QtXnl.widget_slot(nativehandle, Constant.QCHART_REMOVEALLSERIES);
45 QtXnl.widget_slot_string(nativehandle, Constant.QCHART_SETTITLE, title);
49 return (
String)QtXnl.core_getString(nativehandle, Constant.QCHART_TITLE);
53 QtXnl.widget_set_vint_value(nativehandle, Constant.QCHART_SETTHEME, theme);
57 return (ChartTheme)QtXnl.widget_get_int_value(nativehandle, Constant.QCHART_THEME);
61 QtXnl.widget_slot(nativehandle, Constant.QCHART_CREATEDEFAULTAXES);
64 public void setAxisX(QAbstractAxis axis, QAbstractSeries series){
65 QtXnl.long_intlong2(nativehandle, Constant.QCHART_SETASIXSERIALX, axis.nativehandle, series == nilptr ? 0l : series.nativehandle);
68 public void setAxisY(QAbstractAxis axis, QAbstractSeries series){
69 QtXnl.long_intlong2(nativehandle, Constant.QCHART_SETASIXSERIALY, axis.nativehandle, series == nilptr ? 0l : series.nativehandle);
73 return (QAbstractAxis)QtXnl.widget_get_object(nativehandle, Constant.QCHART_AXISX);
77 return (QAbstractAxis)QtXnl.widget_get_object(nativehandle, Constant.QCHART_AXISY);
81 QtXnl.widget_set_vint_value(nativehandle, Constant.QCHART_SETANIMATIONOPTIONS, options);
84 QtXnl.widget_set_vint_value(nativehandle, Constant.QCHART_SETANIMATIONDURATION, duration);
void setTheme(ChartTheme theme)
void setTitle(String title)
void setAnimationOptions(AnimationOption options)
void setAxisX(QAbstractAxis axis, QAbstractSeries series)
void setAnimationDuration(int duration)
void addSeries(QAbstractSeries series)
void setAxisY(QAbstractAxis axis, QAbstractSeries series)
void removeSeries(QAbstractSeries series)