Wt examples 3.1.10
/build/buildd/witty-3.1.10/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   };
00074 
00076   std::vector<AxisControl> axisControls_;
00077 
00078   Wt::WLineEdit *titleEdit_;
00079   Wt::WLineEdit *chartWidthEdit_;
00080   Wt::WLineEdit *chartHeightEdit_;
00081   Wt::WComboBox *chartOrientationEdit_;
00082   Wt::WComboBox *legendLocationEdit_;
00083   Wt::WComboBox *legendSideEdit_;
00084   Wt::WComboBox *legendAlignmentEdit_;
00085 
00086   void connectSignals(Wt::WFormWidget *w);
00087   void update();
00088 
00089   static bool validate(Wt::WFormWidget *w);
00090 };
00091 
00094 #endif // CHARTS_EXAMPLE_H_

Generated on Mon Nov 14 2011 for the C++ Web Toolkit (Wt) by doxygen 1.7.4