示例#1
0
文件: graph.cpp 项目: kolzar/sail7
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;
}
示例#2
0
文件: graph.cpp 项目: kolzar/sail7
void Graph::DeselectPoint()
{
	CCurve *pCurve;
	for(int i=0; i<m_oaCurves.size(); i++)
	{
		pCurve = (CCurve*)m_oaCurves.at(i);
		pCurve->SetSelected(-1);
	}
}