Changeset - be1c704d9dcc
[Not reviewed]
plot-manager
0 1 0
Hasan Yavuz Ă–ZDERYA - 9 years ago 2016-08-25 01:47:06
hy@ozderya.net
simplify code
1 file changed with 2 insertions and 9 deletions:
0 comments (0 inline, 0 general)
src/plotmanager.cpp
Show inline comments
 
@@ -186,36 +186,29 @@ unsigned PlotManager::numOfCurves()
 
    return curves.size();
 
}
 

	
 
void PlotManager::setTitle(unsigned index, QString title)
 
{
 
    curves[index]->setTitle(title);
 

	
 
    plotWidget(index)->replot();
 
}
 

	
 
Plot* PlotManager::plotWidget(unsigned curveIndex)
 
{
 
    if (isMulti)
 
    {
 
        return plotWidgets[curveIndex];
 
    }
 
    else
 
    {
 
        return plotWidgets[0];
 
    }
 
}
 

	
 
void PlotManager::replot()
 
{
 
    if (isMulti)
 
    for (auto plot : plotWidgets)
 
    {
 
        for (auto plot : plotWidgets)
 
        {
 
            plot->replot();
 
        }
 
    }
 
    else
 
    {
 
        plotWidgets[0]->replot();
 
        plot->replot();
 
    }
 
}
0 comments (0 inline, 0 general)