Classes | |
struct | Payload |
struct | tCanvasPoint |
Public Member Functions | |
XPlot (const char *name, bool runtime, Transaction &tr_graph, const shared_ptr< XGraph > &graph) | |
virtual XString | getLabel () const |
virtual void | clearAllPoints (Transaction &tr)=0 |
int | screenToVal (const Snapshot &shot, const XGraph::ScrPoint &scr, XGraph::ValPoint *val, XGraph::SFloat scr_prec=-1) |
void | screenToGraph (const Snapshot &shot, const XGraph::ScrPoint &pt, XGraph::GPoint *g) |
void | graphToScreen (const Snapshot &shot, const XGraph::GPoint &pt, XGraph::ScrPoint *scr) |
void | graphToVal (const Snapshot &shot, const XGraph::GPoint &pt, XGraph::ValPoint *val) |
const shared_ptr< XStringNode > & | label () const |
const shared_ptr< XUIntNode > & | maxCount () const |
const shared_ptr< XBoolNode > & | displayMajorGrid () const |
const shared_ptr< XBoolNode > & | displayMinorGrid () const |
const shared_ptr< XBoolNode > & | drawLines () const |
const shared_ptr< XBoolNode > & | drawBars () const |
const shared_ptr< XBoolNode > & | drawPoints () const |
const shared_ptr< XBoolNode > & | colorPlot () const |
const shared_ptr< XHexNode > & | majorGridColor () const |
const shared_ptr< XHexNode > & | minorGridColor () const |
const shared_ptr< XHexNode > & | pointColor () const |
const shared_ptr< XHexNode > & | lineColor () const |
const shared_ptr< XHexNode > & | barColor () const |
const shared_ptr< XHexNode > & | colorPlotColorHigh () const |
const shared_ptr< XHexNode > & | colorPlotColorLow () const |
const shared_ptr < XTouchableNode > & | clearPoints () const |
const shared_ptr< XItemNode < XAxisList, XAxis > > & | axisX () const |
const shared_ptr< XItemNode < XAxisList, XAxis > > & | axisY () const |
const shared_ptr< XItemNode < XAxisList, XAxis > > & | axisZ () const |
const shared_ptr< XItemNode < XAxisList, XAxis > > & | axisW () const |
const shared_ptr< XDoubleNode > & | zwoAxisZ () const |
z value without AxisZ | |
const shared_ptr< XDoubleNode > & | intensity () const |
virtual int | validateAutoScale (const Snapshot &shot) |
auto-scale | |
int | drawPlot (const Snapshot &shot, XQGraphPainter *painter) |
Draws points from snapshot. | |
int | drawLegend (const Snapshot &shot, XQGraphPainter *painter, const XGraph::ScrPoint &spt, float dx, float dy) |
void | drawGrid (const Snapshot &shot, XQGraphPainter *painter, bool drawzaxis=true) |
virtual void | snapshot (const Snapshot &shot)=0 |
Takes a snap-shot all points for rendering. | |
int | findPoint (const Snapshot &shot, int start, const XGraph::GPoint &gmin, const XGraph::GPoint &gmax, XGraph::GFloat width, XGraph::ValPoint *val, XGraph::GPoint *g1) |
bool | fixScales (const Snapshot &) |
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< XNode > | getChild (const XString &var) const |
shared_ptr< XNode > | getParent () 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) |
XNode * | upperNode (Snapshot< XNode > &shot) |
Finds the parent node in shot. | |
Snapshot< XNode > | iterate_commit (Closure) |
Snapshot< XNode > | iterate_commit_if (Closure) |
void | iterate_commit_while (Closure) |
void | print_ () const |
Node (const Node &)=delete | |
Node & | operator= (const Node &)=delete |
Protected Attributes | |
const weak_ptr< XGraph > | m_graph |
shared_ptr< XAxis > | m_curAxisX |
shared_ptr< XAxis > | m_curAxisY |
shared_ptr< XAxis > | m_curAxisZ |
shared_ptr< XAxis > | m_curAxisW |
XGraph::ScrPoint | m_scr0 |
XGraph::ScrPoint | m_len |
std::vector< XGraph::ValPoint > | m_ptsSnapped |
Private Member Functions | |
void | onClearPoints (const Snapshot &, XTouchableNode *) |
bool | clipLine (const tCanvasPoint &c1, const tCanvasPoint &c2, XGraph::ScrPoint *s1, XGraph::ScrPoint *s2, bool blendcolor, unsigned int *color1, unsigned int *color2, float *alpha1, float *alpha2) |
bool | isPtIncluded (const XGraph::GPoint &pt) |
void | drawGrid (const Snapshot &shot, XQGraphPainter *painter, shared_ptr< XAxis > &axis1, shared_ptr< XAxis > &axis2) |
void | graphToScreenFast (const XGraph::GPoint &pt, XGraph::ScrPoint *scr) |
void | valToGraphFast (const XGraph::ValPoint &pt, XGraph::GPoint *gr) |
unsigned int | blendColor (unsigned int c1, unsigned int c2, float t) |
Private Attributes | |
const shared_ptr< XStringNode > | m_label |
const shared_ptr< XUIntNode > | m_maxCount |
const shared_ptr< XBoolNode > | m_displayMajorGrid |
const shared_ptr< XBoolNode > | m_displayMinorGrid |
const shared_ptr< XBoolNode > | m_drawLines |
const shared_ptr< XBoolNode > | m_drawBars |
const shared_ptr< XBoolNode > | m_drawPoints |
const shared_ptr< XBoolNode > | m_colorPlot |
const shared_ptr< XHexNode > | m_majorGridColor |
const shared_ptr< XHexNode > | m_minorGridColor |
const shared_ptr< XHexNode > | m_pointColor |
const shared_ptr< XHexNode > | m_lineColor |
const shared_ptr< XHexNode > | m_barColor |
const shared_ptr< XHexNode > | m_colorPlotColorHigh |
const shared_ptr< XHexNode > | m_colorPlotColorLow |
const shared_ptr< XTouchableNode > | m_clearPoints |
const shared_ptr< XItemNode < XAxisList, XAxis > > | m_axisX |
const shared_ptr< XItemNode < XAxisList, XAxis > > | m_axisY |
const shared_ptr< XItemNode < XAxisList, XAxis > > | m_axisZ |
const shared_ptr< XItemNode < XAxisList, XAxis > > | m_axisW |
const shared_ptr< XDoubleNode > | m_zwoAxisZ |
z value without AxisZ | |
const shared_ptr< XDoubleNode > | m_intensity |
shared_ptr< XListener > | m_lsnClearPoints |
std::vector< tCanvasPoint > | m_canvasPtsSnapped |
Additional Inherited Members | |
Public Types inherited from Transactional::Node< XNode > | |
using | NodeNotFoundError = std::domain_error |
using | NodeList = fast_vector< shared_ptr< XNode >, 2 > |
using | iterator = typename NodeList::iterator |
using | const_iterator = typename NodeList::const_iterator |
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(). | |
int XPlot::drawLegend | ( | const Snapshot & | shot, |
XQGraphPainter * | painter, | ||
const XGraph::ScrPoint & | spt, | ||
float | dx, | ||
float | dy | ||
) |
Draws a point for legneds. spt the center of the point. dx,dy the size of the area.
Definition at line 394 of file graph.cpp.
References fixScales(), and XQGraphPainter::setColor().
int XPlot::findPoint | ( | const Snapshot & | shot, |
int | start, | ||
const XGraph::GPoint & | gmin, | ||
const XGraph::GPoint & | gmax, | ||
XGraph::GFloat | width, | ||
XGraph::ValPoint * | val, | ||
XGraph::GPoint * | g1 | ||
) |
Definition at line 310 of file graph.cpp.
References Vector4< T >::distance2(), and fixScales().
bool XPlot::fixScales | ( | const Snapshot & | shot | ) |
Definition at line 222 of file graph.cpp.
References zwoAxisZ().
Referenced by drawLegend(), drawPlot(), findPoint(), and screenToVal().
|
inlinevirtual |
int XPlot::screenToVal | ( | const Snapshot & | shot, |
const XGraph::ScrPoint & | scr, | ||
XGraph::ValPoint * | val, | ||
XGraph::SFloat | scr_prec = -1 |
||
) |
obtains values from screen coordinate if scr_prec > 0, value will be rounded around scr_prec
Definition at line 273 of file graph.cpp.
References fixScales().