The Gnome Chemistry Utils  0.12.11
Public Member Functions | Protected Attributes
gcu::SpectrumDocument Class Reference

#include <gcu/spectrumdoc.h>

Inheritance diagram for gcu::SpectrumDocument:
gcu::Document gcu::Printable gcu::Object gcu::DialogOwner gcu::DialogOwner

List of all members.

Public Member Functions

 SpectrumDocument ()
 SpectrumDocument (Application *app, SpectrumView *view=NULL)
 ~SpectrumDocument ()
void Load (char const *uri, char const *mime_type=NULL)
void OnXUnitChanged (int i)
void OnYUnitChanged (int i)
void OnXAxisInvert (bool inverted)
void OnShowIntegral ()
void OnTransformFID (GtkButton *btn)
SpectrumViewGetView (void)
bool GetEmpty (void) const
SpectrumType GetSpectrumType (void) const
SpectrumUnitType GetXUnit (void) const
SpectrumUnitType GetYUnit (void) const
bool GetIntegralVisible (void) const

Protected Attributes

SpectrumViewm_View

Detailed Description

The document class used for spectra. This API is still quite unstable and might change in the future.

Definition at line 268 of file spectrumdoc.h.


Constructor & Destructor Documentation

Default constructor

Parameters:
appthe application.
viewan optional already existing SpectrumView instance.

Default destructor


Member Function Documentation

gcu::SpectrumDocument::GetEmpty ( void  ) const [inline]
Returns:
true if the document does not have any data, false otherwise.

Definition at line 365 of file spectrumdoc.h.

gcu::SpectrumDocument::GetIntegralVisible ( void  ) const [inline]
Returns:
true if the integral of an NMR spectrum is visible, false in all other cases.

Definition at line 384 of file spectrumdoc.h.

gcu::SpectrumDocument::GetSpectrumType ( void  ) const [inline]
Returns:
the gcu::SpectrumType of the document, or GCU_SPECTRUM_TYPE_MAX.

Definition at line 369 of file spectrumdoc.h.

gcu::SpectrumDocument::GetView ( void  ) [inline]
Returns:
the SpectrumView instance associated with the document.

Definition at line 361 of file spectrumdoc.h.

gcu::SpectrumDocument::GetXUnit ( void  ) const [inline]
Returns:
the unit of the x-axis as gcu::SpectumUnitType, or GCU_SPECTRUM_UNIT_MAX.

Definition at line 374 of file spectrumdoc.h.

gcu::SpectrumDocument::GetYUnit ( void  ) const [inline]
Returns:
the unit of the y-axis as gcu::SpectumUnitType, or GCU_SPECTRUM_UNIT_MAX.

Definition at line 379 of file spectrumdoc.h.

void gcu::SpectrumDocument::Load ( char const *  uri,
char const *  mime_type = NULL 
)
Parameters:
urithe uri of the spectrum file.
mime_typethe mime type of the spectrum file.

Loads a spaectrum from the provided uri. Default mime type is NULL, "chemical/x-jcamp-dx" is the only one supported at the moment.

Used to show or hide the integral curve for an NMR spectrum.

void gcu::SpectrumDocument::OnTransformFID ( GtkButton *  btn)
Parameters:
btnthe clicked GtkButton.

Called to transform an FID to the NMR spectrum. The label in the GtkButton might be changed.

void gcu::SpectrumDocument::OnXAxisInvert ( bool  inverted)
Parameters:
invertedwhether to invert the X axis scale.

Called to change the X axis scale order. This is used by the framework after a user made an appropriate request from the graphical interface.

Parameters:
ithe rank of the unit to set.

Called to change the displayed X axis unit. The values acceptable for the parameter are spectrum type dependent. This is used by the framework after a user made an appropriate request from the graphical interface.

Parameters:
ithe rank of the unit to set.

Called to change the displayed Y axis unit. The values acceptable for the parameter are spectrum type dependent. This is used by the framework after a user made an appropriate request from the graphical interface.


Member Data Documentation

The SpectrumView instance associated with the document.

Definition at line 361 of file spectrumdoc.h.


The documentation for this class was generated from the following file: