Changeset - 92c0f8665f08
[Not reviewed]
snapshots
0 2 0
Hasan Yavuz Ă–ZDERYA - 10 years ago 2015-09-20 08:17:23
hy@ozderya.net
implemented clear snapshots menu item
2 files changed with 14 insertions and 0 deletions:
0 comments (0 inline, 0 general)
mainwindow.cpp
Show inline comments
 
@@ -115,12 +115,15 @@ MainWindow::MainWindow(QWidget *parent) 
 
    QObject::connect(ui->actionClear, SIGNAL(triggered(bool)),
 
                     this, SLOT(clearPlot()));
 

	
 
    QObject::connect(ui->actionSnapShot, SIGNAL(triggered(bool)),
 
                     this, SLOT(takeSnapShot()));
 

	
 
    QObject::connect(ui->actionClearSnapShots, SIGNAL(triggered(bool)),
 
                     this, SLOT(clearSnapshots()));
 

	
 
    // setup number of channels spinbox
 
    QObject::connect(ui->spNumOfChannels,
 
                     SELECT<int>::OVERLOAD_OF(&QSpinBox::valueChanged),
 
                     this, &MainWindow::onNumOfChannelsChanged);
 

	
 
    // setup number format buttons
 
@@ -757,6 +760,16 @@ void MainWindow::updateSnapShotMenu()
 
            ui->menuSnapShots->addAction(ss->menuAction());
 
        }
 
        ui->menuSnapShots->addSeparator();
 
        ui->menuSnapShots->addAction(ui->actionClearSnapShots);
 
    }
 
}
 

	
 
void MainWindow::clearSnapshots()
 
{
 
    for (auto snapshot : snapshots)
 
    {
 
        delete snapshot;
 
    }
 
    snapshots.clear();
 
    updateSnapShotMenu();
 
}
mainwindow.h
Show inline comments
 
@@ -130,12 +130,13 @@ private slots:
 

	
 
    void clearPlot();
 

	
 
    void spsTimerTimeout();
 

	
 
    void takeSnapShot();
 
    void clearSnapshots();
 

	
 
    void demoTimerTimeout();
 
    void enableDemo(bool enabled);
 

	
 
    void onExportCsv();
 
};
0 comments (0 inline, 0 general)