Changeset - f93a2d942980
[Not reviewed]
Hasan Yavuz Ă–ZDERYA - 10 years ago 2016-03-22 18:04:43
hy@ozderya.net
suppress signed unsigned comparison warning
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/mainwindow.cpp
Show inline comments
 
@@ -357,49 +357,49 @@ void MainWindow::onNumOfChannelsChanged(
 
            curve->setSamples(channelMan.channelBuffer(i));
 
            curve->setPen(Plot::makeColor(i));
 
            curve->attach(ui->plot);
 
            curves.append(curve);
 
        }
 
    }
 
    else if(numOfChannels < oldNum)
 
    {
 
        // remove channels
 
        for (unsigned int i = 0; i < oldNum - numOfChannels; i++)
 
        {
 
            // also deletes owned FrameBuffer TODO: which souldn't happen
 
            delete curves.takeLast();
 
        }
 
    }
 

	
 
    ui->plot->replot();
 
}
 

	
 
void MainWindow::onChannelNameChanged(unsigned channel, QString name)
 
{
 
    // This slot is triggered also when a new channel is added, in
 
    // this case curve list doesn't contain said channel. No worries,
 
    // since `onNumOfChannelsChanged` slot will update curve list.
 
    if (channel < curves.size()) // check if channel exists in curve list
 
    if ((int) channel < curves.size()) // check if channel exists in curve list
 
    {
 
        curves[channel]->setTitle(name);
 
        ui->plot->replot();
 
    }
 
}
 

	
 
void MainWindow::onAutoScaleChecked(bool checked)
 
{
 
    if (checked)
 
    {
 
        ui->plot->setAxis(true);
 
        ui->lYmin->setEnabled(false);
 
        ui->lYmax->setEnabled(false);
 
        ui->spYmin->setEnabled(false);
 
        ui->spYmax->setEnabled(false);
 
    }
 
    else
 
    {
 
        ui->lYmin->setEnabled(true);
 
        ui->lYmax->setEnabled(true);
 
        ui->spYmin->setEnabled(true);
 
        ui->spYmax->setEnabled(true);
 

	
 
        ui->plot->setAxis(false,  ui->spYmin->value(), ui->spYmax->value());
0 comments (0 inline, 0 general)