diff --git a/src/AerolabWindow.cpp b/src/AerolabWindow.cpp index 20e8eb46e..115e8746c 100644 --- a/src/AerolabWindow.cpp +++ b/src/AerolabWindow.cpp @@ -244,8 +244,8 @@ AerolabWindow::AerolabWindow(Context *context) : connect(btnEstCdACrr, SIGNAL(clicked()), this, SLOT(doEstCdACrr())); connect(context, SIGNAL(configChanged()), aerolab, SLOT(configChanged())); connect(context, SIGNAL(configChanged()), this, SLOT(configChanged())); - connect(context->mainWindow, SIGNAL(intervalSelected() ), this, SLOT(intervalSelected())); - connect(context->mainWindow, SIGNAL(intervalZoom(IntervalItem*) ), this, SLOT(zoomInterval(IntervalItem*))); + connect(context, SIGNAL(intervalSelected() ), this, SLOT(intervalSelected())); + connect(context, SIGNAL(intervalZoom(IntervalItem*) ), this, SLOT(zoomInterval(IntervalItem*))); connect(allZoomer, SIGNAL( zoomed(const QRectF) ), this, SLOT(zoomChanged())); diff --git a/src/AllPlotWindow.cpp b/src/AllPlotWindow.cpp index e3094f3f6..723277f43 100644 --- a/src/AllPlotWindow.cpp +++ b/src/AllPlotWindow.cpp @@ -436,7 +436,7 @@ AllPlotWindow::AllPlotWindow(Context *context) : connect(context, SIGNAL(configChanged()), this, SLOT(configChanged())); connect(context->athlete, SIGNAL(zonesChanged()), this, SLOT(zonesChanged())); connect(context, SIGNAL(intervalsChanged()), this, SLOT(intervalsChanged())); - connect(context->mainWindow, SIGNAL(intervalZoom(IntervalItem*)), this, SLOT(zoomInterval(IntervalItem*))); + connect(context, SIGNAL(intervalZoom(IntervalItem*)), this, SLOT(zoomInterval(IntervalItem*))); connect(context, SIGNAL(intervalSelected()), this, SLOT(intervalSelected())); connect(context, SIGNAL(rideDeleted(RideItem*)), this, SLOT(rideDeleted(RideItem*))); diff --git a/src/BingMap.cpp b/src/BingMap.cpp index 4121f74b9..380e06e63 100644 --- a/src/BingMap.cpp +++ b/src/BingMap.cpp @@ -55,7 +55,7 @@ BingMap::BingMap(Context *context) : GcWindow(context), context(context), range( connect(view->page()->mainFrame(), SIGNAL(javaScriptWindowObjectCleared()), this, SLOT(updateFrame())); connect(context, SIGNAL(intervalsChanged()), webBridge, SLOT(intervalsChanged())); connect(context, SIGNAL(intervalSelected()), webBridge, SLOT(intervalsChanged())); - connect(context->mainWindow, SIGNAL(intervalZoom(IntervalItem*)), this, SLOT(zoomInterval(IntervalItem*))); + connect(context, SIGNAL(intervalZoom(IntervalItem*)), this, SLOT(zoomInterval(IntervalItem*))); first = true; } diff --git a/src/Context.h b/src/Context.h index c43bfe722..e25b045bc 100644 --- a/src/Context.h +++ b/src/Context.h @@ -24,6 +24,7 @@ class RideFile; class RideItem; +class IntervalItem; class ErgFile; class Context; @@ -80,6 +81,7 @@ class Context : public QObject void notifyRideSelected(RideItem*x) { ride=x; rideSelected(x); } void notifyRideAdded(RideItem *x) { ride=x; rideAdded(x); } void notifyRideDeleted(RideItem *x) { ride=x; rideDeleted(x); } + void notifyIntervalZoom(IntervalItem*x) { emit intervalZoom(x); } void notifyIntervalSelected() { intervalSelected(); } void notifyIntervalsChanged() { emit intervalsChanged(); } void notifyRideClean() { rideClean(ride); } @@ -94,6 +96,7 @@ class Context : public QObject void rideDeleted(RideItem *); void intervalSelected(); void intervalsChanged(); + void intervalZoom(IntervalItem*); void rideDirty(RideItem*); void rideClean(RideItem*); diff --git a/src/CriticalPowerWindow.cpp b/src/CriticalPowerWindow.cpp index d1e269573..67ae90976 100644 --- a/src/CriticalPowerWindow.cpp +++ b/src/CriticalPowerWindow.cpp @@ -28,6 +28,8 @@ #include #include #include +#include +#include #include #include #include "Season.h" diff --git a/src/GoogleMapControl.cpp b/src/GoogleMapControl.cpp index 00888e8a0..85243963f 100644 --- a/src/GoogleMapControl.cpp +++ b/src/GoogleMapControl.cpp @@ -61,7 +61,7 @@ GoogleMapControl::GoogleMapControl(Context *context) : GcChartWindow(context), c connect(view->page()->mainFrame(), SIGNAL(javaScriptWindowObjectCleared()), this, SLOT(updateFrame())); connect(context, SIGNAL(intervalsChanged()), webBridge, SLOT(intervalsChanged())); connect(context, SIGNAL(intervalSelected()), webBridge, SLOT(intervalsChanged())); - connect(context->mainWindow, SIGNAL(intervalZoom(IntervalItem*)), this, SLOT(zoomInterval(IntervalItem*))); + connect(context, SIGNAL(intervalZoom(IntervalItem*)), this, SLOT(zoomInterval(IntervalItem*))); first = true; } diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 04c49f9bc..ab4744b06 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -2222,7 +2222,7 @@ MainWindow::zoomIntervalSelected() // zoom the one interval that is selected via popup menu for (int i=0; iathlete->allIntervals->childCount();) { if (context->athlete->allIntervals->child(i)->isSelected()) { - emit intervalZoom((IntervalItem*)(context->athlete->allIntervals->child(i))); + context->notifyIntervalZoom((IntervalItem*)(context->athlete->allIntervals->child(i))); break; } else i++; } @@ -2231,7 +2231,7 @@ MainWindow::zoomIntervalSelected() void MainWindow::zoomInterval() { // zoom into this interval on allPlot - emit intervalZoom(activeInterval); + context->notifyIntervalZoom(activeInterval); } void diff --git a/src/MainWindow.h b/src/MainWindow.h index 07b99081d..840a5ae99 100644 --- a/src/MainWindow.h +++ b/src/MainWindow.h @@ -23,11 +23,7 @@ #include #include #include -#include -#include #include "RideItem.h" -#include "GcWindowRegistry.h" -#include "RealtimeData.h" #include "SpecialFields.h" #include "TimeUtils.h" @@ -36,21 +32,7 @@ #include #endif -class MetricAggregator; -class Zones; -class HrZones; -class RideFile; -class ErgFile; -class RideMetadata; -class WithingsDownload; -class ZeoDownload; -class CalendarDownload; -class DiaryWindow; -class ICalendar; -class CalDAV; class HomeWindow; -class GcWindowTool; -class Seasons; class IntervalSummaryWindow; class RideNavigator; class GcToolBar; @@ -61,13 +43,10 @@ class LTMSidebar; class LionFullScreen; class QTFullScreen; class TrainSidebar; -class Lucene; -class NamedSearches; class ChartSettings; class QtMacSegmentedButton; class QtMacButton; class GcScopeBar; -class RideFileCache; class Library; class BlankStateAnalysisPage; class BlankStateHomePage; @@ -179,7 +158,6 @@ class MainWindow : public QMainWindow signals: void filterChanged(QStringList&); - void intervalZoom(IntervalItem*); public slots: void showTreeContextMenuPopup(const QPoint &); diff --git a/src/PowerHist.h b/src/PowerHist.h index 0b0a3366e..72428696b 100644 --- a/src/PowerHist.h +++ b/src/PowerHist.h @@ -29,6 +29,7 @@ #include #include +#include #include #include #include diff --git a/src/RealtimePlotWindow.cpp b/src/RealtimePlotWindow.cpp index 58f43a848..bb6d315ac 100644 --- a/src/RealtimePlotWindow.cpp +++ b/src/RealtimePlotWindow.cpp @@ -92,7 +92,7 @@ RealtimePlotWindow::RealtimePlotWindow(Context *context) : connect(smoothLineEdit, SIGNAL(editingFinished()), this, SLOT(setSmoothingFromLineEdit())); // get updates.. - connect(context->mainWindow, SIGNAL(telemetryUpdate(RealtimeData)), this, SLOT(telemetryUpdate(RealtimeData))); + connect(context, SIGNAL(telemetryUpdate(RealtimeData)), this, SLOT(telemetryUpdate(RealtimeData))); // lets initialise all the smoothing variables hrtot = hrindex = cadtot = cadindex = spdtot = spdindex = alttot = altindex = powtot = powindex = 0;