Wt examples  3.7.1
ChartConfig.h
Go to the documentation of this file.
1 // This may look like C code, but it's really -*- C++ -*-
2 /*
3  * Copyright (C) 2008 Emweb bv, Herent, Belgium.
4  *
5  * See the LICENSE file for terms of use.
6  */
7 #ifndef CHART_CONFIG_H_
8 #define CHART_CONFIG_H_
9 
10 #include <Wt/WContainerWidget>
11 #include <Wt/Chart/WDataSeries>
12 
13 namespace Wt {
14  class WCheckBox;
15  class WComboBox;
16  class WFormWidget;
17  class WLineEdit;
18  class WStandardItemModel;
19  class WTable;
20  class WValidator;
21 
22  namespace Chart {
23  class WAxis;
24  class WCartesianChart;
25  }
26 }
27 
32 
41 {
42 public:
46 
47  void setValueFill(Wt::Chart::FillRangeType fill);
48 
49 private:
52 
54  struct SeriesControl {
63  };
64 
66  std::vector<SeriesControl> seriesControls_;
67 
69  struct AxisControl {
81  };
82 
84  std::vector<AxisControl> axisControls_;
85 
94 
95  Wt::WStandardItemModel *xAxesModel_, *yAxesModel_, *xScales_, *yScales_;
97  Wt::WValidator *anyNumberValidator_, *angleValidator_;
98 
99  void connectSignals(Wt::WFormWidget *w);
100  void update();
101  void addXAxis();
102  void addYAxis();
103  void addAxis(Wt::Chart::Axis axis, int axisId);
104  void removeXAxis(const Wt::Chart::WAxis *axis);
105  void removeYAxis(const Wt::Chart::WAxis *axis);
106  void clearXAxes();
107  void clearYAxes();
108 
109  static bool validate(Wt::WFormWidget *w);
110 };
111 
114 #endif // CHARTS_EXAMPLE_H_
Wt::WCheckBox * borderEdit_
Definition: ChartConfig.h:93
Wt::WComboBox * xAxisEdit
Definition: ChartConfig.h:58
Wt::Chart::FillRangeType fill_
Definition: ChartConfig.h:51
Wt::WValidator * anyNumberValidator_
Definition: ChartConfig.h:97
Wt::WComboBox * scaleEdit
Definition: ChartConfig.h:71
Wt::WLineEdit * titleEdit_
Definition: ChartConfig.h:86
Wt::Chart::WCartesianChart * chart_
Definition: ChartConfig.h:50
Wt::WTable * axisConfig_
Definition: ChartConfig.h:96
Wt::WCheckBox * enabledEdit
Definition: ChartConfig.h:55
Wt::WComboBox * locationEdit
Definition: ChartConfig.h:80
Struct that holds the controls for one series.
Definition: ChartConfig.h:54
Wt::WLineEdit * titleEdit
Definition: ChartConfig.h:77
Wt::WComboBox * typeEdit
Definition: ChartConfig.h:56
Wt::WCheckBox * visibleEdit
Definition: ChartConfig.h:70
Wt::WComboBox * markerEdit
Definition: ChartConfig.h:57
Wt::WLineEdit * chartWidthEdit_
Definition: ChartConfig.h:87
Struct that holds the controls for one axis.
Definition: ChartConfig.h:69
Wt::WComboBox * chartOrientationEdit_
Definition: ChartConfig.h:89
Wt::WComboBox * legendLocationEdit_
Definition: ChartConfig.h:90
std::vector< SeriesControl > seriesControls_
Controls for series.
Definition: ChartConfig.h:66
Wt::WLineEdit * minimumEdit
Definition: ChartConfig.h:73
Wt::WComboBox * legendSideEdit_
Definition: ChartConfig.h:91
std::vector< AxisControl > axisControls_
Controls for axes.
Definition: ChartConfig.h:84
Wt::WCheckBox * shadowEdit
Definition: ChartConfig.h:61
Wt::WComboBox * labelsEdit
Definition: ChartConfig.h:62
Wt::WComboBox * yAxisEdit
Definition: ChartConfig.h:59
Wt::WComboBox * tickDirectionEdit
Definition: ChartConfig.h:79
Wt::WLineEdit * labelAngleEdit
Definition: ChartConfig.h:76
Wt::WStandardItemModel * yScales_
Definition: ChartConfig.h:95
Wt::WCheckBox * legendEdit
Definition: ChartConfig.h:60
Wt::WCheckBox * gridLinesEdit
Definition: ChartConfig.h:75
Wt::WComboBox * titleOrientationEdit
Definition: ChartConfig.h:78
Wt::WComboBox * legendAlignmentEdit_
Definition: ChartConfig.h:92
Wt::WCheckBox * autoEdit
Definition: ChartConfig.h:72
A class that allows configuration of a cartesian chart.
Definition: ChartConfig.h:40
Wt::WLineEdit * maximumEdit
Definition: ChartConfig.h:74
Wt::WLineEdit * chartHeightEdit_
Definition: ChartConfig.h:88

Generated on Tue Dec 15 2020 for the C++ Web Toolkit (Wt) by doxygen 1.8.13