gcu::SpectrumView Class Reference
#include <gcu/spectrumview.h>
List of all members.
|
Public Member Functions |
| SpectrumView (SpectrumDocument *pDoc) |
| Constructor.
|
virtual | ~SpectrumView () |
| Destructor.
|
void | SetAxisBounds (GogAxisType target, double min, double max, bool inverted) |
void | SetAxisLabel (GogAxisType target, char const *unit) |
void | ShowAxis (GogAxisType target, bool show) |
void | InvertAxis (GogAxisType target, bool inverted) |
void | Render (cairo_t *cr, double width, double height) |
void | OnMinChanged () |
void | OnYMinChanged () |
void | OnMaxChanged () |
void | OnYMaxChanged () |
void | OnXRangeChanged () |
void | OnYRangeChanged () |
GogSeries * | NewSeries (bool new_plot) |
void | SaveAsImage (std::string const &filename, char const *mime_type, unsigned width, unsigned height) const |
SpectrumDocument * | GetDoc (void) const |
GtkWidget * | GetWidget (void) const |
GtkWidget * | GetOptionBox (void) const |
GogSeries * | GetSeries (void) const |
Detailed Description
The view class used for spectra. This API is still quite unstable and might change in the future.
Definition at line 38 of file spectrumview.h.
Constructor & Destructor Documentation
Constructor.
- Parameters:
-
Creates a view for the document.
virtual gcu::SpectrumView::~SpectrumView |
( |
|
) |
[virtual] |
Member Function Documentation
gcu::SpectrumView::GetDoc |
( |
void |
|
) |
const [inline] |
gcu::SpectrumView::GetOptionBox |
( |
void |
|
) |
const [inline] |
- Returns:
- a GtkBox to which an optional user interface might be added.
Definition at line 164 of file spectrumview.h.
gcu::SpectrumView::GetSeries |
( |
void |
|
) |
const [inline] |
- Returns:
- the first GogSeries* created for the view.
Definition at line 168 of file spectrumview.h.
gcu::SpectrumView::GetWidget |
( |
void |
|
) |
const [inline] |
- Returns:
- the widget used to display the spectrum.
Definition at line 160 of file spectrumview.h.
void gcu::SpectrumView::InvertAxis |
( |
GogAxisType |
target, |
|
|
bool |
inverted | |
|
) |
| | |
- Parameters:
-
| target | an axis type. |
| inverted | whether to invert the axis scale or not |
Used to invert the first axis of either GOG_AXIS_X or GOG_AXIS_Y types.
GogSeries* gcu::SpectrumView::NewSeries |
( |
bool |
new_plot |
) |
|
- Parameters:
-
| new_plot | if true, a new plot is created (this is not yet implemented). Creates a new GogSeries for the chart. |
void gcu::SpectrumView::OnMaxChanged |
( |
|
) |
|
Called by the framework if the maximum has changed for the x-axis.
void gcu::SpectrumView::OnMinChanged |
( |
|
) |
|
Called by the framework if the minimum has changed for the x-axis.
void gcu::SpectrumView::OnXRangeChanged |
( |
|
) |
|
Called by the framework if the range has changed for the x-axis.
void gcu::SpectrumView::OnYMaxChanged |
( |
|
) |
|
Called by the framework if the maximum has changed for the y-axis.
void gcu::SpectrumView::OnYMinChanged |
( |
|
) |
|
Called by the framework if the minimum has changed for the y-axis.
void gcu::SpectrumView::OnYRangeChanged |
( |
|
) |
|
Called by the framework if the range has changed for the y-axis.
void gcu::SpectrumView::Render |
( |
cairo_t * |
cr, |
|
|
double |
width, |
|
|
double |
height | |
|
) |
| | |
- Parameters:
-
| cr | the cairo_t* to which render. |
| width | the width of the rendering area. |
| height | the height of the rendering area. |
Renders the chart to
cr.
void gcu::SpectrumView::SaveAsImage |
( |
std::string const & |
filename, |
|
|
char const * |
mime_type, |
|
|
unsigned |
width, |
|
|
unsigned |
height | |
|
) |
| | const |
- Parameters:
-
| filename | the name of the file. |
| mime_type | the requested mime type. |
| width | the width of the generated image. |
| height | the height of the generated image. |
Export the view contents as an image. The size of the new image is defined by the width and height parameters. Supported ilage file format include svg, png, jpeg, ps, eps, and pdf, and possibly a few other bitmap formats.
void gcu::SpectrumView::SetAxisBounds |
( |
GogAxisType |
target, |
|
|
double |
min, |
|
|
double |
max, |
|
|
bool |
inverted | |
|
) |
| | |
- Parameters:
-
| target | an axis type. |
| min | the mimimum value to show. |
| max | the maximum value to show. |
| inverted | whether to invert the axis. |
Sets the scale of the first axis of the selected type.
void gcu::SpectrumView::SetAxisLabel |
( |
GogAxisType |
target, |
|
|
char const * |
unit | |
|
) |
| | |
- Parameters:
-
| target | an axis type. |
| unit | a text (might be a unit). |
Sets the text for the label of the first axis of the selected type.
void gcu::SpectrumView::ShowAxis |
( |
GogAxisType |
target, |
|
|
bool |
show | |
|
) |
| | |
- Parameters:
-
| target | an axis type. |
| show | whether to show the axis or not |
Used to show or hide the first axis of either GOG_AXIS_X or GOG_AXIS_Y types.
The documentation for this class was generated from the following file: