spectrumview.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef GCU_SPECTRUM_VIEW_H
00024 #define GCU_SPECTRUM_VIEW_H
00025
00026 #include "macros.h"
00027
00029 namespace gcu
00030 {
00031
00032 class SpectrumDocument;
00033
00038 class SpectrumView
00039 {
00040 friend class SpectrumViewPrivate;
00041 public:
00043
00048 SpectrumView (SpectrumDocument *pDoc);
00049
00051
00054 virtual ~SpectrumView ();
00055
00064 void SetAxisBounds (GogAxisType target, double min, double max, bool inverted);
00065
00072 void SetAxisLabel (GogAxisType target, char const *unit);
00073
00080 void ShowAxis (GogAxisType target, bool show);
00081
00088 void InvertAxis (GogAxisType target, bool inverted);
00089
00097 void Render (cairo_t *cr, double width, double height);
00098
00102 void OnMinChanged ();
00103
00107 void OnYMinChanged ();
00108
00112 void OnMaxChanged ();
00113
00117 void OnYMaxChanged ();
00118
00122 void OnXRangeChanged ();
00123
00127 void OnYRangeChanged ();
00128
00133 GogSeries *NewSeries (bool new_plot);
00134
00145 void SaveAsImage (std::string const &filename, char const *mime_type, unsigned width, unsigned height) const;
00146
00147 private:
00148 GtkSpinButton *xminbtn, *xmaxbtn, *yminbtn, *ymaxbtn;
00149 GtkRange *xrange, *yrange;
00150 gulong minsgn, maxsgn, yminsgn, ymaxsgn, xrangesgn, yrangesgn;
00151 double xmin, xmax, xstep, ymin, ymax, ystep;
00152
00156 GCU_RO_PROP (SpectrumDocument *, Doc)
00160 GCU_RO_PROP (GtkWidget *, Widget)
00164 GCU_RO_PROP (GtkWidget *, OptionBox)
00168 GCU_RO_PROP (GogSeries *, Series)
00169 GCU_RO_PROP (int, Width)
00170 GCU_RO_PROP (int, Height)
00171 };
00172
00173 }
00174
00175 #endif // GCU_SPECTRUM_VIEW_H