QucsGUI
0.0.19

prepare data for plotting purposes in Diagram. More...
#include <graph.h>
Data Structures  
class  ScrPt 
Public Types  
typedef std::vector< ScrPt >  container 
typedef container::iterator  iterator 
typedef container::const_iterator  const_iterator 
Public Member Functions  
Graph (const Diagram *, const QString &_Line="")  
~Graph ()  
int  loadDatFile (const QString &filename) 
does not (yet) load a dat file.  
int  loadIndepVarData (const QString &, char *datfilecontent, DataX *where) 
Reads the data of an independent variable.  
void  paint (ViewPainter *, int, int) 
void  paintLines (ViewPainter *, int, int) 
QString  save () 
bool  load (const QString &) 
int  getSelected (int, int) 
Checks if the coordinates x/y point to the graph.  
Graph *  sameNewOne () 
unsigned  numAxes () const 
DataX const *  axis (uint i) const 
size_t  count (uint i) const 
QString  axisName (unsigned i) const 
bool  isEmpty () const 
QVector< DataX * > &  mutable_axes () 
void  clear () 
void  resizeScrPoints (size_t s) 
iterator  begin () 
iterator  end () 
const_iterator  begin () const 
const_iterator  end () const 
void  createMarkerText () const 
std::pair< double, double >  findSample (std::vector< double > &) const 
find a sample point close to VarPos, snap to it, and return data at VarPos  
Diagram const *  parentDiagram () const 
Data Fields  
QDateTime  lastLoaded 
int  yAxisNo 
double *  cPointsY 
int  countY 
QString  Var 
QColor  Color 
int  Thick 
graphstyle_t  Style 
QList< Marker * >  Markers 
int  Precision 
int  numMode 
Private Member Functions  
DataX *  mutable_axis (uint i) 
void  drawLines (int, int, ViewPainter *) const 
draw a (line) graph from screen coord pairs  
void  drawStarSymbols (int, int, ViewPainter *) const 
void  drawCircleSymbols (int, int, ViewPainter *) const 
void  drawArrowSymbols (int, int, ViewPainter *) const 
Private Attributes  
QVector< DataX * >  cPointsX 
std::vector< ScrPt >  ScrPoints 
Diagram const *  diagram 
prepare data for plotting purposes in Diagram.
a Graph is a list of graphs (bug?!) iterating yields points (in screen coordinates) and control tokens.
also stores markers.
typedef container::const_iterator Graph::const_iterator 
typedef std::vector<ScrPt> Graph::container 
typedef container::iterator Graph::iterator 
Graph::Graph  (  const Diagram *  d, 
const QString &  _Line = "" 

) 
Graph::~Graph  (  ) 
DataX const* Graph::axis  (  uint  i  )  const [inline] 
QString Graph::axisName  (  unsigned  i  )  const [inline] 
iterator Graph::begin  (  )  [inline] 
const_iterator Graph::begin  (  )  const [inline] 
void Graph::clear  (  )  [inline] 
size_t Graph::count  (  uint  i  )  const [inline] 
void Graph::createMarkerText  (  )  const 
void Graph::drawArrowSymbols  (  int  x0i, 
int  y0i,  
ViewPainter *  p  
)  const [private] 
Definition at line 231 of file viewpainter.cpp.
void Graph::drawCircleSymbols  (  int  x0i, 
int  y0i,  
ViewPainter *  p  
)  const [private] 
Definition at line 206 of file viewpainter.cpp.
void Graph::drawLines  (  int  x0, 
int  y0,  
ViewPainter *  p  
)  const [private] 
draw a (line) graph from screen coord pairs
Definition at line 104 of file viewpainter.cpp.
void Graph::drawStarSymbols  (  int  x0i, 
int  y0i,  
ViewPainter *  p  
)  const [private] 
Definition at line 173 of file viewpainter.cpp.
iterator Graph::end  (  )  [inline] 
const_iterator Graph::end  (  )  const [inline] 
std::pair< double, double > Graph::findSample  (  std::vector< double > &  VarPos  )  const 
int Graph::getSelected  (  int  x, 
int  y  
) 
Checks if the coordinates x/y point to the graph.
returns the number of the branch of the graph, 1 upon a miss.
x/y are relative to diagram cx/cy. 5 is the precision the user must point onto the graph.
FIXME: should return reference to hit sample point or some context.
Definition at line 164 of file graph.cpp.
bool Graph::isEmpty  (  )  const [inline] 
bool Graph::load  (  const QString &  _s  ) 
int Graph::loadDatFile  (  const QString &  fileName  ) 
does not (yet) load a dat file.
only part of it. this way, it would belong to graph.cpp. but it's too obsolete, lets see..
FIXME: must invalidate markers.
Definition at line 783 of file diagram.cpp.
int Graph::loadIndepVarData  (  const QString &  Variable, 
char *  FileString,  
DataX *  pD  
) 
Reads the data of an independent variable.
Returns the number of points.
Definition at line 1024 of file diagram.cpp.
QVector<DataX*>& Graph::mutable_axes  (  )  [inline] 
DataX* Graph::mutable_axis  (  uint  i  )  [inline, private] 
unsigned Graph::numAxes  (  )  const [inline] 
void Graph::paint  (  ViewPainter *  p, 
int  x0,  
int  y0  
) 
void Graph::paintLines  (  ViewPainter *  p, 
int  x0,  
int  y0  
) 
Diagram const* Graph::parentDiagram  (  )  const [inline] 
void Graph::resizeScrPoints  (  size_t  s  )  [inline] 
Graph * Graph::sameNewOne  (  ) 
QString Graph::save  (  ) 
QColor Graph::Color 
int Graph::countY 
QVector<DataX*> Graph::cPointsX [private] 
double* Graph::cPointsY 
Diagram const* Graph::diagram [private] 
QDateTime Graph::lastLoaded 
QList<Marker *> Graph::Markers 
int Graph::numMode 
int Graph::Precision 
std::vector<ScrPt> Graph::ScrPoints [private] 
int Graph::Thick 
QString Graph::Var 
int Graph::yAxisNo 