00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef PLOT_VIEWER_HH_
00020 #define PLOT_VIEWER_HH_
00021
00022
00023
00024
00025
00026 #include <QStandardItemModel>
00027 #include <QGraphicsScene>
00028 #include <QWidget>
00029 #include <QString>
00030
00031 #include "plot_data.hh"
00032 #include "plot_function.hh"
00033 #include "plot_group.hh"
00034 #include "plot_function_info.hh"
00035 #include "plot_data_info_fw.hh"
00036 #include "plot_group_info.hh"
00037
00038 namespace ost{namespace gui{
00039
00040
00041
00042 class PlotViewerPanel;
00043 class PlotLegendPanel;
00044
00045
00046 class DLLEXPORT_OST_GUI PlotViewer: public QWidget
00047 {
00048 typedef boost::shared_ptr<QStandardItem> QStandardItemPtr;
00049 public:
00050 PlotViewer(QWidget* parent,const QString& name="");
00051 virtual ~PlotViewer();
00052 PlotDataInfoPtr Add(PlotDataPtr dataptr, bool fit=false);
00053 PlotFunctionInfoPtr Add(PlotFunctionPtr functionptr);
00054 PlotGroupInfoPtr Add(PlotGroupPtr groupptr, bool fit=false);
00055 void SetMinimumX(Real x);
00056 void SetMaximumX(Real x);
00057 void SetMinimumY(Real y);
00058 void SetMaximumY(Real y);
00059 Real GetMinimumX() const;
00060 Real GetMaximumX() const;
00061 Real GetMinimumY() const;
00062 Real GetMaximumY() const;
00063 void SetAutofit(bool fit=true);
00064 private:
00065 QGraphicsScene scene_;
00066 PlotViewerPanel* viewer_;
00067 PlotLegendPanel* legend_;
00068 QStandardItemModel model_;
00069 std::vector<QStandardItemPtr> ptr_list_;
00070 };
00071
00072 }}
00073
00074 #endif