Wt examples  3.3.5
/usr/src/RPM/BUILD/wt-3.3.5-rc2/examples/charts/ChartConfig.h
Go to the documentation of this file.
00001 // This may look like C code, but it's really -*- C++ -*-
00002 /*
00003  * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
00004  *
00005  * See the LICENSE file for terms of use.
00006  */
00007 #ifndef CHART_CONFIG_H_
00008 #define CHART_CONFIG_H_
00009 
00010 #include <Wt/WContainerWidget>
00011 #include <Wt/Chart/WDataSeries>
00012 
00013 namespace Wt {
00014   class WCheckBox;
00015   class WComboBox;
00016   class WFormWidget;
00017   class WLineEdit;
00018   class WTable;
00019 
00020   namespace Chart {
00021     class WCartesianChart;
00022   }
00023 }
00024 
00029 
00037 class ChartConfig : public Wt::WContainerWidget
00038 {
00039 public:
00042   ChartConfig(Wt::Chart::WCartesianChart *chart, Wt::WContainerWidget *parent);
00043 
00044   void setValueFill(Wt::Chart::FillRangeType fill);
00045 
00046 private:
00047   Wt::Chart::WCartesianChart  *chart_;
00048   Wt::Chart::FillRangeType fill_;
00049 
00051   struct SeriesControl {
00052     Wt::WCheckBox *enabledEdit;
00053     Wt::WComboBox *typeEdit;
00054     Wt::WComboBox *markerEdit;
00055     Wt::WComboBox *axisEdit;
00056     Wt::WCheckBox *legendEdit;
00057     Wt::WCheckBox *shadowEdit;
00058     Wt::WComboBox *labelsEdit;
00059   };
00060 
00062   std::vector<SeriesControl> seriesControls_;
00063 
00065   struct AxisControl {
00066     Wt::WCheckBox *visibleEdit;
00067     Wt::WComboBox *scaleEdit;
00068     Wt::WCheckBox *autoEdit;
00069     Wt::WLineEdit *minimumEdit;
00070     Wt::WLineEdit *maximumEdit;
00071     Wt::WCheckBox *gridLinesEdit;
00072     Wt::WLineEdit *labelAngleEdit;
00073     Wt::WLineEdit *titleEdit;
00074     Wt::WComboBox *titleOrientationEdit;
00075     Wt::WComboBox *tickDirectionEdit;
00076     Wt::WComboBox *locationEdit;
00077   };
00078 
00080   std::vector<AxisControl> axisControls_;
00081 
00082   Wt::WLineEdit *titleEdit_;
00083   Wt::WLineEdit *chartWidthEdit_;
00084   Wt::WLineEdit *chartHeightEdit_;
00085   Wt::WComboBox *chartOrientationEdit_;
00086   Wt::WComboBox *legendLocationEdit_;
00087   Wt::WComboBox *legendSideEdit_;
00088   Wt::WComboBox *legendAlignmentEdit_;
00089   Wt::WCheckBox *borderEdit_;
00090 
00091   void connectSignals(Wt::WFormWidget *w);
00092   void update();
00093 
00094   static bool validate(Wt::WFormWidget *w);
00095 };
00096 
00099 #endif // CHARTS_EXAMPLE_H_

Generated on Tue Mar 22 2016 for the C++ Web Toolkit (Wt) by doxygen 1.7.6.1