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 #include <goffice/graph/gog-series.h>
00028 #include <gtk/gtkwidget.h>
00029
00031 namespace gcu
00032 {
00033
00034 class SpectrumDocument;
00035
00040 class SpectrumView
00041 {
00042 public:
00044
00049 SpectrumView (SpectrumDocument *pDoc);
00050
00052
00055 virtual ~SpectrumView ();
00056
00065 void SetAxisBounds (GogAxisType target, double min, double max, bool inverted);
00066
00073 void SetAxisLabel (GogAxisType target, char const *unit);
00074
00081 void ShowAxis (GogAxisType target, bool show);
00082
00089 void InvertAxis (GogAxisType target, bool inverted);
00090
00098 void Render (cairo_t *cr, double width, double height);
00099
00103 void OnMinChanged ();
00104
00108 void OnYMinChanged ();
00109
00113 void OnMaxChanged ();
00114
00118 void OnYMaxChanged ();
00119
00123 void OnXRangeChanged ();
00124
00128 void OnYRangeChanged ();
00129
00134 GogSeries *NewSeries (bool new_plot);
00135
00146 void SaveAsImage (std::string const &filename, char const *mime_type, unsigned width, unsigned height) const;
00147
00148 private:
00149 GtkSpinButton *xminbtn, *xmaxbtn, *yminbtn, *ymaxbtn;
00150 GtkRange *xrange, *yrange;
00151 gulong minsgn, maxsgn, yminsgn, ymaxsgn, xrangesgn, yrangesgn;
00152 double xmin, xmax, xstep, ymin, ymax, ystep;
00153
00157 GCU_RO_PROP (SpectrumDocument *, Doc)
00161 GCU_RO_PROP (GtkWidget *, Widget)
00165 GCU_RO_PROP (GtkWidget *, OptionBox)
00169 GCU_RO_PROP (GogSeries *, Series)
00170 };
00171
00172 }
00173
00174 #endif // GCU_SPECTRUM_VIEW_H