[traff_assessment_tool] Add UI for Clear()

Signed-off-by: mvglasow <michael -at- vonglasow.com>
This commit is contained in:
mvglasow
2025-06-07 14:41:54 +03:00
parent 488159e2f9
commit 9f4b6d73ce
2 changed files with 11 additions and 0 deletions

View File

@@ -265,6 +265,7 @@ MainWindow::MainWindow(Framework & framework)
menuBar()->addMenu(fileMenu);
fileMenu->addAction("Open sample", QKeySequence("Ctrl+O"), this, &MainWindow::OnOpenTrafficSample);
fileMenu->addAction("Clear TraFF cache", QKeySequence("Ctrl+D"), this, &MainWindow::OnClearCache);
m_closeTrafficSampleAction = fileMenu->addAction("Close sample", QKeySequence("Ctrl+W"), this, &MainWindow::OnCloseTrafficSample);
m_saveTrafficSampleAction = fileMenu->addAction("Save sample", QKeySequence("Ctrl+S"), this, &MainWindow::OnSaveTrafficSample);
@@ -400,6 +401,11 @@ void MainWindow::OnOpenTrafficSample()
#endif
}
void MainWindow::OnClearCache()
{
m_framework.GetTrafficManager().Clear();
}
void MainWindow::OnCloseTrafficSample()
{
// TODO(mgsergio):

View File

@@ -40,6 +40,11 @@ private:
* Called when the user requests to open a sample file.
*/
void OnOpenTrafficSample();
/**
* Called when the user requests to clear the cache.
*/
void OnClearCache();
void OnCloseTrafficSample();
void OnSaveTrafficSample();
void OnPathEditingStop();