Add QChart to Python Chart (3a of 5)

Added a rectangle selection tool for scatter charts. Click on
the canvas and drag to highlight points of interest and click
on rectangle to drag around, resize with wheel events.

Additionally, improved some of the aesthetics on axes and labels
etc to make the chart look and feel similar to the rest of the
qwt based charts.

There are likely to be a large number of commits for part 3, to
cover auto calculation of mean/max/sum/regree for selected points
and extend to other types of selections and apply to other chart
types.
This commit is contained in:
Mark Liversedge
2020-02-15 23:47:01 +00:00
parent 70e31235ed
commit ab4601cc33
4 changed files with 513 additions and 38 deletions

View File

@@ -80,19 +80,19 @@ GcWindowRegistry::initialize()
{
static GcWindowRegistry GcWindowsInit[34] = {
// name GcWinID
{ VIEW_HOME|VIEW_DIARY, tr("Metric Trends"),GcWindowTypes::LTM },
{ VIEW_HOME|VIEW_DIARY, tr("Collection TreeMap"),GcWindowTypes::TreeMap },
{ VIEW_HOME|VIEW_DIARY, tr("Trends"),GcWindowTypes::LTM },
{ VIEW_HOME|VIEW_DIARY, tr("TreeMap"),GcWindowTypes::TreeMap },
//{ VIEW_HOME, tr("Weekly Summary"),GcWindowTypes::WeeklySummary },// DEPRECATED
{ VIEW_HOME|VIEW_DIARY, tr("Critical Mean Maximal"),GcWindowTypes::CriticalPowerSummary },
{ VIEW_HOME|VIEW_DIARY, tr("Power Duration "),GcWindowTypes::CriticalPowerSummary },
//{ VIEW_HOME, tr("Training Plan"),GcWindowTypes::SeasonPlan },
//{ VIEW_HOME|VIEW_DIARY, tr("Performance Manager"),GcWindowTypes::PerformanceManager },
{ VIEW_ANALYSIS, tr("Overview"),GcWindowTypes::Overview },
{ VIEW_ANALYSIS|VIEW_INTERVAL, tr("Activity Summary"),GcWindowTypes::RideSummary },
{ VIEW_ANALYSIS|VIEW_INTERVAL, tr("Summary"),GcWindowTypes::RideSummary },
{ VIEW_ANALYSIS, tr("Details"),GcWindowTypes::MetadataWindow },
{ VIEW_ANALYSIS, tr("Summary and Details"),GcWindowTypes::Summary },
{ VIEW_ANALYSIS, tr("Editor"),GcWindowTypes::RideEditor },
{ VIEW_ANALYSIS|VIEW_INTERVAL, tr("Performance"),GcWindowTypes::AllPlot },
{ VIEW_ANALYSIS, tr("Critical Mean Maximals"),GcWindowTypes::CriticalPower },
{ VIEW_ANALYSIS, tr("Power Duration"),GcWindowTypes::CriticalPower },
{ VIEW_ANALYSIS, tr("Histogram"),GcWindowTypes::Histogram },
{ VIEW_HOME|VIEW_DIARY, tr("Distribution"),GcWindowTypes::Distribution },
{ VIEW_ANALYSIS, tr("Pedal Force vs Velocity"),GcWindowTypes::PfPv },
@@ -103,11 +103,11 @@ GcWindowRegistry::initialize()
{ VIEW_ANALYSIS, tr("Python Chart"),GcWindowTypes::Python },
{ VIEW_HOME, tr("Python Chart "),GcWindowTypes::PythonSeason },
//{ VIEW_ANALYSIS, tr("Bing Map"),GcWindowTypes::BingMap },
{ VIEW_ANALYSIS, tr("2d Plot"),GcWindowTypes::Scatter },
{ VIEW_ANALYSIS, tr("Aerolab Chung Analysis"),GcWindowTypes::Aerolab },
{ VIEW_ANALYSIS, tr("Scatter"),GcWindowTypes::Scatter },
{ VIEW_ANALYSIS, tr("Aerolab"),GcWindowTypes::Aerolab },
{ VIEW_DIARY, tr("Calendar"),GcWindowTypes::Diary },
{ VIEW_DIARY, tr("Navigator"), GcWindowTypes::ActivityNavigator },
{ VIEW_DIARY|VIEW_HOME, tr("Summary"), GcWindowTypes::DateRangeSummary },
{ VIEW_DIARY|VIEW_HOME, tr("Summary "), GcWindowTypes::DateRangeSummary },
{ VIEW_TRAIN, tr("Telemetry"),GcWindowTypes::DialWindow },
{ VIEW_TRAIN, tr("Workout"),GcWindowTypes::WorkoutPlot },
{ VIEW_TRAIN, tr("Realtime"),GcWindowTypes::RealtimePlot },