From be8ae85dbd8364c7f3bdf06cf408880cc17c55c2 Mon Sep 17 00:00:00 2001 From: Mark Liversedge Date: Thu, 9 Dec 2021 10:13:19 +0000 Subject: [PATCH] Rename Overview .. clunky, but for such an edge case its not worth the effort to make the UX slicker. At least now we can rename. Fixes #4032 --- src/Charts/Overview.cpp | 10 ++++++++++ src/Charts/Overview.h | 1 + 2 files changed, 11 insertions(+) diff --git a/src/Charts/Overview.cpp b/src/Charts/Overview.cpp index c55fec2f0..3c4dc2b74 100644 --- a/src/Charts/Overview.cpp +++ b/src/Charts/Overview.cpp @@ -39,6 +39,9 @@ OverviewWindow::OverviewWindow(Context *context, int scope) : GcChartWindow(cont QAction *importChart= new QAction(tr("Import Chart...")); addAction(importChart); + QAction *renameChart= new QAction(tr("Rename...")); + addAction(renameChart); + setControls(NULL); QHBoxLayout *main = new QHBoxLayout; @@ -73,6 +76,7 @@ OverviewWindow::OverviewWindow(Context *context, int scope) : GcChartWindow(cont // menu items connect(addTile, SIGNAL(triggered(bool)), this, SLOT(addTile())); connect(importChart, SIGNAL(triggered(bool)), this, SLOT(importChart())); + connect(renameChart, SIGNAL(triggered(bool)), this, SLOT(renameChart())); connect(space, SIGNAL(itemConfigRequested(ChartSpaceItem*)), this, SLOT(configItem(ChartSpaceItem*))); } @@ -94,6 +98,12 @@ OverviewWindow::addTile() } } +void +OverviewWindow::renameChart() +{ + emit showControls(); +} + void OverviewWindow::importChart() { diff --git a/src/Charts/Overview.h b/src/Charts/Overview.h index ae5c8273a..eb5fc725d 100644 --- a/src/Charts/Overview.h +++ b/src/Charts/Overview.h @@ -55,6 +55,7 @@ class OverviewWindow : public GcChartWindow // add a tile to the window void addTile(); void importChart(); + void renameChart(); // config item requested void configItem(ChartSpaceItem *);