mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 16:18:42 +00:00
Re-instate zoom interval in MainWindow/AllPlot
Added a new signal to MainWindow to trigger a zoom to interval. This signal has been trapped in AllPlot (Ride Plot), but will also need to be supported in; * Ride Editor - highlight/zoom to interval data * Aerolab - Same as ride plot * Maps - Zoom in to section
This commit is contained in:
@@ -315,7 +315,7 @@ AllPlotWindow::AllPlotWindow(MainWindow *mainWindow) :
|
||||
allPlotLayout->setStretch(1,20);
|
||||
|
||||
QVBoxLayout *vlayout = new QVBoxLayout(this);
|
||||
vlayout->setContentsMargins(10,10,10,10);
|
||||
vlayout->setContentsMargins(2,2,2,2);
|
||||
vlayout->setSpacing(0);
|
||||
vlayout->addWidget(allPlotFrame);
|
||||
vlayout->addWidget(stackFrame);
|
||||
@@ -354,6 +354,7 @@ AllPlotWindow::AllPlotWindow(MainWindow *mainWindow) :
|
||||
connect(mainWindow, SIGNAL(rideDirty()), this, SLOT(rideSelected()));
|
||||
connect(mainWindow, SIGNAL(zonesChanged()), this, SLOT(zonesChanged()));
|
||||
connect(mainWindow, SIGNAL(intervalsChanged()), this, SLOT(intervalsChanged()));
|
||||
connect(mainWindow, SIGNAL(intervalZoom(IntervalItem*)), this, SLOT(zoomInterval(IntervalItem*)));
|
||||
connect(mainWindow, SIGNAL(intervalSelected()), this, SLOT(intervalSelected()));
|
||||
connect(mainWindow, SIGNAL(configChanged()), allPlot, SLOT(configChanged()));
|
||||
connect(mainWindow, SIGNAL(configChanged()), this, SLOT(configChanged()));
|
||||
|
||||
@@ -71,9 +71,6 @@ class AllPlotWindow : public GcWindow
|
||||
void clearSelection();
|
||||
void hideSelection();
|
||||
|
||||
// zoom to interval range (via span-slider)
|
||||
void zoomInterval(IntervalItem *);
|
||||
|
||||
// get properties - the setters are below
|
||||
bool isStacked() const { return showStack->isChecked(); }
|
||||
int isShowGrid() const { return showGrid->checkState(); }
|
||||
@@ -116,6 +113,7 @@ class AllPlotWindow : public GcWindow
|
||||
|
||||
// trap widget signals
|
||||
void zoomChanged();
|
||||
void zoomInterval(IntervalItem *);
|
||||
void moveLeft();
|
||||
void moveRight();
|
||||
void showStackChanged(int state);
|
||||
|
||||
@@ -691,6 +691,7 @@ MainWindow::showContextMenuPopup(const QPoint &pos)
|
||||
connect(actFrontInt, SIGNAL(triggered(void)), this, SLOT(frontInterval(void)));
|
||||
connect(actBackInt, SIGNAL(triggered(void)), this, SLOT(backInterval(void)));
|
||||
|
||||
menu.addAction(actZoomInt);
|
||||
menu.addAction(actRenameInt);
|
||||
menu.addAction(actDeleteInt);
|
||||
menu.exec(intervalWidget->mapToGlobal( pos ));
|
||||
@@ -1451,7 +1452,7 @@ MainWindow::intervalEdited(QTreeWidgetItem *, int) {
|
||||
void
|
||||
MainWindow::zoomInterval() {
|
||||
// zoom into this interval on allPlot
|
||||
//allPlotWindow->zoomInterval(activeInterval);
|
||||
emit intervalZoom(activeInterval);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -158,6 +158,7 @@ class MainWindow : public QMainWindow
|
||||
signals:
|
||||
|
||||
void intervalSelected();
|
||||
void intervalZoom(IntervalItem*);
|
||||
void intervalsChanged();
|
||||
void zonesChanged();
|
||||
void seasonsChanged();
|
||||
|
||||
Reference in New Issue
Block a user