Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
XAxis Class Reference
Inheritance diagram for XAxis:
Inheritance graph
[legend]

Classes

struct  Payload
 

Public Types

enum  AxisDirection { DirAxisX, DirAxisY, DirAxisZ, AxisWeight }
 
enum  Tic { MajorTic, MinorTic, NoTics }
 

Public Member Functions

 XAxis (const char *name, bool runtime, AxisDirection dir, bool rightOrTop, Transaction &tr_graph, const shared_ptr< XGraph > &graph)
 
virtual XString getLabel () const
 
int drawAxis (const Snapshot &shot, XQGraphPainter *painter)
 
XGraph::GFloat valToAxis (XGraph::VFloat value)
 obtains axis pos from value
 
XGraph::VFloat axisToVal (XGraph::GFloat pos, XGraph::GFloat axis_prec=-1)
 
XGraph::GFloat screenToAxis (const Snapshot &shot, const XGraph::ScrPoint &scr)
 
void axisToScreen (const Snapshot &shot, XGraph::GFloat pos, XGraph::ScrPoint *scr)
 obtains screen position from axis
 
void valToScreen (const Snapshot &shot, XGraph::VFloat val, XGraph::ScrPoint *scr)
 
XGraph::VFloat screenToVal (const Snapshot &shot, const XGraph::ScrPoint &scr)
 
XString valToString (XGraph::VFloat val)
 
const shared_ptr< XStringNode > & label () const
 
const shared_ptr< XDoubleNode > & x () const
 
const shared_ptr< XDoubleNode > & y () const
 
const shared_ptr< XDoubleNode > & z () const
 
const shared_ptr< XDoubleNode > & length () const
 
const shared_ptr< XDoubleNode > & majorTicScale () const
 
const shared_ptr< XDoubleNode > & minorTicScale () const
 
const shared_ptr< XBoolNode > & displayMajorTics () const
 
const shared_ptr< XBoolNode > & displayMinorTics () const
 
const shared_ptr< XDoubleNode > & maxValue () const
 
const shared_ptr< XDoubleNode > & minValue () const
 
const shared_ptr< XBoolNode > & rightOrTopSided () const
 
const shared_ptr< XStringNode > & ticLabelFormat () const
 
const shared_ptr< XBoolNode > & displayLabel () const
 
const shared_ptr< XBoolNode > & displayTicLabels () const
 
const shared_ptr< XHexNode > & ticColor () const
 
const shared_ptr< XHexNode > & labelColor () const
 
const shared_ptr< XHexNode > & ticLabelColor () const
 
const shared_ptr< XBoolNode > & autoFreq () const
 
const shared_ptr< XBoolNode > & autoScale () const
 
const shared_ptr< XBoolNode > & logScale () const
 
void zoom (bool minchange, bool maxchange, XGraph::GFloat zoomscale, XGraph::GFloat center=0.5)
 
Tic queryTic (int length, int pos, XGraph::VFloat *ticnum)
 Obtains the type of tic and rounded value from position on axis.
 
void startAutoscale (const Snapshot &shot, float resolution, bool clearscale=false)
 Call this function before drawing or autoscale.
 
void fixScale (Transaction &tr, float resolution, bool suppressupdate=false)
 Preserves modified scale.
 
XGraph::VFloat fixedMin () const
 fixed value
 
XGraph::VFloat fixedMax () const
 
bool isIncluded (XGraph::VFloat x)
 
void tryInclude (XGraph::VFloat x)
 
const AxisDirection & direction () const
 
const XGraph::ScrPointdirVector () const
 
- Public Member Functions inherited from XNode
 XNode (const char *name, bool runtime=false)
 
template<class T >
shared_ptr< T > create (const char *name)
 
template<class T , typename... Args>
shared_ptr< T > create (const char *name, bool runtime, Args &&...args)
 
template<class T >
shared_ptr< T > create (Transaction &tr, const char *name)
 
template<class T , typename... Args>
shared_ptr< T > create (Transaction &tr, const char *name, bool runtime, Args &&...args)
 
XString getName () const
 
XString getTypename () const
 
shared_ptr< XNodegetChild (const XString &var) const
 
shared_ptr< XNodegetParent () const
 
void setUIEnabled (bool v)
 Enables/disables controls over scripting/GUI.
 
void disable ()
 Disables all scripting/GUI operations on this node hereafter.
 
- Public Member Functions inherited from Transactional::Node< XNode >
bool insert (Transaction< XNode > &tr, const shared_ptr< XNode > &var, bool online_after_insertion=false)
 
void insert (const shared_ptr< XNode > &var)
 
bool release (Transaction< XNode > &tr, const shared_ptr< XNode > &var)
 
void release (const shared_ptr< XNode > &var)
 
void releaseAll ()
 
bool swap (Transaction< XNode > &tr, const shared_ptr< XNode > &x, const shared_ptr< XNode > &y)
 
void swap (const shared_ptr< XNode > &x, const shared_ptr< XNode > &y)
 
XNodeupperNode (Snapshot< XNode > &shot)
 Finds the parent node in shot.
 
Snapshot< XNodeiterate_commit (Closure)
 
Snapshot< XNodeiterate_commit_if (Closure)
 
void iterate_commit_while (Closure)
 
void print_ () const
 
 Node (const Node &)=delete
 
Nodeoperator= (const Node &)=delete
 

Private Member Functions

void startAutoscale_ (const Snapshot &shot, bool clearscale)
 
void drawLabel (const Snapshot &shot, XQGraphPainter *painter)
 
void performAutoFreq (const Snapshot &shot, float resolution)
 

Private Attributes

AxisDirection m_direction
 
XGraph::ScrPoint m_dirVector
 
const weak_ptr< XGraphm_graph
 
const shared_ptr< XStringNodem_label
 
const shared_ptr< XDoubleNodem_x
 
const shared_ptr< XDoubleNodem_y
 
const shared_ptr< XDoubleNodem_z
 
const shared_ptr< XDoubleNodem_length
 
const shared_ptr< XDoubleNodem_majorTicScale
 
const shared_ptr< XDoubleNodem_minorTicScale
 
const shared_ptr< XBoolNodem_displayMajorTics
 
const shared_ptr< XBoolNodem_displayMinorTics
 
const shared_ptr< XDoubleNodem_max
 
const shared_ptr< XDoubleNodem_min
 
const shared_ptr< XBoolNodem_rightOrTopSided
 
const shared_ptr< XStringNodem_ticLabelFormat
 
const shared_ptr< XBoolNodem_displayLabel
 
const shared_ptr< XBoolNodem_displayTicLabels
 
const shared_ptr< XHexNodem_ticColor
 
const shared_ptr< XHexNodem_labelColor
 
const shared_ptr< XHexNodem_ticLabelColor
 
const shared_ptr< XBoolNodem_autoFreq
 
const shared_ptr< XBoolNodem_autoScale
 
const shared_ptr< XBoolNodem_logScale
 
XGraph::VFloat m_minFixed
 
XGraph::VFloat m_maxFixed
 
XGraph::VFloat m_majorFixed
 
XGraph::VFloat m_minorFixed
 
XGraph::VFloat m_invLogMaxOverMinFixed
 
XGraph::VFloat m_invMaxMinusMinFixed
 
bool m_bLogscaleFixed
 
bool m_bAutoscaleFixed
 

Additional Inherited Members

- Static Public Member Functions inherited from XNode
template<class T__ >
static shared_ptr< T__ > createOrphan (const char *name)
 
template<class T__ , typename... Args_>
static shared_ptr< T__ > createOrphan (const char *name, bool runtime, Args_ &&...args)
 
- Protected Member Functions inherited from Transactional::Node< XNode >
 Node ()
 Use create().
 

Detailed Description

Definition at line 276 of file graph.h.

Member Function Documentation

XGraph::VFloat XAxis::axisToVal ( XGraph::GFloat  pos,
XGraph::GFloat  axis_prec = -1 
)

obtains value from position on axis

Parameters
posnormally, 0 < pos < 1
axis_precprecision on axis. if > 0, value will be rounded

Definition at line 959 of file graph.cpp.

Referenced by queryTic().

virtual XString XAxis::getLabel ( ) const
inlinevirtual
Returns
i18n name for UI.

Reimplemented from XNode.

Definition at line 285 of file graph.h.

XGraph::GFloat XAxis::screenToAxis ( const Snapshot shot,
const XGraph::ScrPoint scr 
)

obtains axis pos from screen coordinate

Returns
pos in axis

Definition at line 988 of file graph.cpp.


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

Generated for KAME4 by  doxygen 1.8.3