0
0
mirror of https://github.com/yse/easy_profiler.git synced 2024-12-26 08:01:51 +08:00

#91 [UI] Snapshot feature further progress (intermediate commit)

This commit is contained in:
Victor Zarubkin 2018-04-22 16:15:10 +03:00
parent ef7b41fd0d
commit ae5c46477d
3 changed files with 666 additions and 635 deletions

File diff suppressed because it is too large Load Diff

View File

@ -378,9 +378,9 @@ MainWindow::MainWindow() : Parent(), m_theme("default"), m_lastAddress("localhos
static_cast<DiagramWidget*>(m_graphicsView->widget())->view()->inspectCurrentView(true);
});
action = toolbar->addAction(QIcon(imagePath("crop")), "Crop and save");
action->setToolTip("Crop and save selected area\nas separate .prof file.");
connect(action, &QAction::triggered, this, &This::onCropAndSaveClicked);
action = toolbar->addAction(QIcon(imagePath("crop")), "Snapshot");
action->setToolTip("Save selected area\nas separate .prof file.");
connect(action, &QAction::triggered, this, &This::onSnapshotClicked);
toolbar->addSeparator();
auto menu = new QMenu("Settings", this);
@ -2230,7 +2230,7 @@ void MainWindow::onFrameTimeChanged()
//////////////////////////////////////////////////////////////////////////
void MainWindow::onCropAndSaveClicked(bool)
void MainWindow::onSnapshotClicked(bool)
{
profiler::timestamp_t beginTime = 0, endTime = 0;
const bool hasSelection = static_cast<DiagramWidget*>(m_graphicsView->widget())->view()->getSelectionRegionForSaving(beginTime, endTime);

View File

@ -346,7 +346,7 @@ protected slots:
void onEventTracingEnableChange(bool _checked);
void onFrameTimeEditFinish();
void onFrameTimeChanged();
void onCropAndSaveClicked(bool);
void onSnapshotClicked(bool);
void onBlockStatusChange(profiler::block_id_t _id, profiler::EasyBlockStatus _status);