Example #1
0
bool Graph::SelectPoint(QString const &CurveName, int sel)
{
	QString str;
	CCurve *pCurve = NULL;
	
	if(sel<0) 
	{
//		pCurve->SetSelected(-1);
		return false;				
	}		
	
	for(int i=0; i<m_oaCurves.size(); i++)
	{
		pCurve = (CCurve*)m_oaCurves.at(i);
		pCurve->GetTitle(str);
		if(str == CurveName)
		{
			if(sel>pCurve->GetCount())
			{
				pCurve->SetSelected(-1);
				return false;				
			}
			else
			{
				pCurve->SetSelected(sel);
				return true;
			}
		}
	}
//	pCurve->SetSelected(-1);
	return false;
}
Example #2
0
void Graph::DeselectPoint()
{
	CCurve *pCurve;
	for(int i=0; i<m_oaCurves.size(); i++)
	{
		pCurve = (CCurve*)m_oaCurves.at(i);
		pCurve->SetSelected(-1);
	}
}