/home/koen/project/wt/cvs/wt/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::WComboBox *labelsEdit;
00058   };
00059 
00061   std::vector<SeriesControl> seriesControls_;
00062 
00064   struct AxisControl {
00065     Wt::WCheckBox *visibleEdit;
00066     Wt::WComboBox *scaleEdit;
00067     Wt::WCheckBox *autoEdit;
00068     Wt::WLineEdit *minimumEdit;
00069     Wt::WLineEdit *maximumEdit;
00070     Wt::WCheckBox *gridLinesEdit;
00071     Wt::WLineEdit *labelAngleEdit;
00072   };
00073 
00075   std::vector<AxisControl> axisControls_;
00076 
00077   Wt::WLineEdit *titleEdit_;
00078   Wt::WLineEdit *chartWidthEdit_;
00079   Wt::WLineEdit *chartHeightEdit_;
00080   Wt::WComboBox *chartOrientationEdit_;
00081 
00082   void connectSignals(Wt::WFormWidget *w);
00083   void update();
00084 
00085   static bool validate(Wt::WFormWidget *w);
00086 };
00087 
00090 #endif // CHARTS_EXAMPLE_H_

Generated on Fri Jul 25 17:05:59 2008 for Wt by doxygen 1.5.3