mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 16:18:42 +00:00
Code Cleanup: Deprecating stuff
Train view - race* - out of date and no used Train view - SimpleNetwork - not used Analysis view - WeeklySummaryWindow - not used MainWindow - RideCalendar - deprecated 2 years ago
This commit is contained in:
@@ -48,17 +48,6 @@ DiaryWindow::DiaryWindow(MainWindow *mainWindow) :
|
||||
prev->setFlat(true);
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
// viewMode - monthly or weekly
|
||||
viewMode = new QComboBox;
|
||||
viewMode->addItem("View Month");
|
||||
viewMode->addItem("View Week"); // we can add more later...
|
||||
viewMode->addItem("View Ride"); // we can add more later...
|
||||
viewMode->setFixedWidth(120);
|
||||
|
||||
viewMode->setCurrentIndex(appsettings->cvalue(mainWindow->cyclist, GC_DIARY_VIEW, "1").toInt());
|
||||
#endif
|
||||
|
||||
controls->addWidget(prev);
|
||||
controls->addWidget(next);
|
||||
controls->addStretch();
|
||||
@@ -84,19 +73,8 @@ DiaryWindow::DiaryWindow(MainWindow *mainWindow) :
|
||||
monthlyView->setGridStyle(Qt::DotLine);
|
||||
monthlyView->setFrameStyle(QFrame::NoFrame);
|
||||
|
||||
// weekly view via QxtScheduleView
|
||||
weeklyView = new QxtScheduleView;
|
||||
weeklyViewProxy = new QxtScheduleViewProxy(this, &fieldDefinitions, mainWindow);
|
||||
weeklyViewProxy->setSourceModel(mainWindow->listView->sqlModel);
|
||||
weeklyView->setCurrentZoomDepth (30, Qxt::Minute);
|
||||
weeklyView->setDateRange(QDate(2010,9,2), QDate(2010,9,8));
|
||||
weeklyView->setModel(weeklyViewProxy);
|
||||
|
||||
RideSummaryWindow *rideSummary = new RideSummaryWindow(mainWindow);
|
||||
allViews = new QStackedWidget(this);
|
||||
allViews->addWidget(monthlyView);
|
||||
allViews->addWidget(weeklyView);
|
||||
allViews->addWidget(rideSummary);
|
||||
//allViews->setCurrentIndex(viewMode->currentIndex());
|
||||
allViews->setCurrentIndex(0);
|
||||
|
||||
@@ -108,7 +86,6 @@ DiaryWindow::DiaryWindow(MainWindow *mainWindow) :
|
||||
connect(this, SIGNAL(rideItemChanged(RideItem*)), this, SLOT(rideSelected()));
|
||||
//connect(mainWindow, SIGNAL(rideSelected()), this, SLOT(rideSelected()));
|
||||
connect(mainWindow, SIGNAL(configChanged()), this, SLOT(configChanged()));
|
||||
connect(weeklyView, SIGNAL(indexSelected(QModelIndex)), this, SLOT(weeklySelected(QModelIndex)));
|
||||
connect(next, SIGNAL(clicked()), this, SLOT(nextClicked()));
|
||||
connect(prev, SIGNAL(clicked()), this, SLOT(prevClicked()));
|
||||
}
|
||||
@@ -151,8 +128,6 @@ DiaryWindow::rideSelected()
|
||||
calendarModel->setMonth(when.month(), when.year());
|
||||
|
||||
when = when.addDays(Qt::Monday - when.dayOfWeek());
|
||||
weeklyView->setDateRange(when, when.addDays(6));
|
||||
weeklyView->setViewMode(QxtScheduleView::DayView);
|
||||
|
||||
#if 0
|
||||
// ok update title
|
||||
@@ -238,20 +213,6 @@ DiaryWindow::nextClicked()
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
DiaryWindow::weeklySelected(QModelIndex index)
|
||||
{
|
||||
if (active) return;
|
||||
|
||||
// lets select it in the ride list then!
|
||||
QString filename = weeklyViewProxy->data(index, QxtScheduleViewProxy::FilenameRole).toString();
|
||||
active = true;
|
||||
mainWindow->selectRideFile(QFileInfo(filename).fileName());
|
||||
//weeklyView->setViewMode(QxtScheduleView::DayView);
|
||||
active = false;
|
||||
rideSelected();
|
||||
}
|
||||
|
||||
bool
|
||||
DiaryWindow::eventFilter(QObject *object, QEvent *e)
|
||||
{
|
||||
|
||||
@@ -31,11 +31,6 @@
|
||||
// list view
|
||||
#include "RideNavigator.h"
|
||||
|
||||
// weekly view
|
||||
#include "qxtscheduleview.h"
|
||||
#include "QxtScheduleViewProxy.h"
|
||||
#include "WeeklyViewItemDelegate.h"
|
||||
|
||||
// monthly view
|
||||
#include <QTableView>
|
||||
#include "GcCalendarModel.h"
|
||||
@@ -63,7 +58,6 @@ class DiaryWindow : public GcWindow
|
||||
void configChanged();
|
||||
void nextClicked();
|
||||
void prevClicked();
|
||||
void weeklySelected(QModelIndex);
|
||||
void setDefaultView(int);
|
||||
bool eventFilter(QObject *object, QEvent *e); // traps monthly view
|
||||
|
||||
@@ -79,9 +73,6 @@ class DiaryWindow : public GcWindow
|
||||
QTableView *monthlyView;
|
||||
GcCalendarModel *calendarModel;
|
||||
|
||||
QxtScheduleView *weeklyView;
|
||||
QxtScheduleViewProxy *weeklyViewProxy;
|
||||
|
||||
bool active;
|
||||
QList<FieldDefinition> fieldDefinitions;
|
||||
};
|
||||
|
||||
@@ -48,7 +48,6 @@
|
||||
#include "SummaryWindow.h"
|
||||
#include "MetadataWindow.h"
|
||||
#include "TreeMapWindow.h"
|
||||
#include "WeeklySummaryWindow.h"
|
||||
#include "DialWindow.h"
|
||||
#include "RealtimePlotWindow.h"
|
||||
#include "SpinScanPlotWindow.h"
|
||||
@@ -137,7 +136,7 @@ GcWindowRegistry::newGcWindow(GcWinID id, MainWindow *main)
|
||||
case GcWindowTypes::Scatter: returning = new ScatterWindow(main, main->home); break;
|
||||
case GcWindowTypes::Summary: returning = new SummaryWindow(main); break;
|
||||
case GcWindowTypes::TreeMap: returning = new TreeMapWindow(main, main->useMetricUnits, main->home); break;
|
||||
case GcWindowTypes::WeeklySummary: returning = new WeeklySummaryWindow(main->useMetricUnits, main); break;
|
||||
case GcWindowTypes::WeeklySummary: returning = new SummaryWindow(main); break; // deprecated
|
||||
#if defined Q_OS_MAC || defined GC_HAVE_VLC // mac uses Quicktime / Win/Linux uses VLC
|
||||
case GcWindowTypes::VideoPlayer: returning = new VideoWindow(main, main->home); break;
|
||||
#else
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
#include "MainWindow.h"
|
||||
#include "AboutDialog.h"
|
||||
#include "AddIntervalDialog.h"
|
||||
#include "AthleteTool.h"
|
||||
#include "BestIntervalDialog.h"
|
||||
#include "BlankState.h"
|
||||
#include "ChooseCyclistDialog.h"
|
||||
@@ -52,7 +51,6 @@
|
||||
#include "Units.h"
|
||||
#include "Zones.h"
|
||||
|
||||
#include "RideCalendar.h"
|
||||
#include "DatePickerDialog.h"
|
||||
#include "ToolsDialog.h"
|
||||
#include "ToolsRhoEstimator.h"
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include "NullController.h"
|
||||
#include "RaceDispatcher.h"
|
||||
#include "RealtimeData.h"
|
||||
|
||||
#include <math.h>
|
||||
|
||||
27
src/src.pro
27
src/src.pro
@@ -211,13 +211,10 @@ win32 {
|
||||
# local qxt widgets - rather than add another dependency on libqxt
|
||||
DEFINES += QXT_STATIC
|
||||
SOURCES += ../qxt/src/qxtspanslider.cpp \
|
||||
../qxt/src/qxtscheduleview.cpp \
|
||||
../qxt/src/qxtscheduleview_p.cpp \
|
||||
../qxt/src/qxtscheduleheaderwidget.cpp \
|
||||
../qxt/src/qxtscheduleviewheadermodel_p.cpp \
|
||||
../qxt/src/qxtscheduleitemdelegate.cpp \
|
||||
../qxt/src/qxtstyleoptionscheduleviewitem.cpp \
|
||||
../qxt/src/qxtstringspinbox.cpp \
|
||||
../qxt/src/qxtstringspinbox.cpp
|
||||
HEADERS += ../qxt/src/qxtspanslider.h \
|
||||
../qxt/src/qxtspanslider_p.h \
|
||||
../qxt/src/qxtstringspinbox.h
|
||||
|
||||
isEmpty( QTSOAP_INSTALL ) {
|
||||
include( ../qtsolutions/soap/qtsoap.pri )
|
||||
@@ -228,23 +225,12 @@ HEADERS += TPUpload.h TPUploadDialog.h TPDownload.h TPDownloadDialog.h
|
||||
SOURCES += TPUpload.cpp TPUploadDialog.cpp TPDownload.cpp TPDownloadDialog.cpp
|
||||
DEFINES += GC_HAVE_SOAP
|
||||
|
||||
HEADERS += ../qxt/src/qxtspanslider.h \
|
||||
../qxt/src/qxtspanslider_p.h \
|
||||
../qxt/src/qxtscheduleview.h \
|
||||
../qxt/src/qxtscheduleview_p.h \
|
||||
../qxt/src/qxtscheduleheaderwidget.h \
|
||||
../qxt/src/qxtscheduleviewheadermodel_p.h \
|
||||
../qxt/src/qxtscheduleitemdelegate.h \
|
||||
../qxt/src/qxtstyleoptionscheduleviewitem.h \
|
||||
../qxt/src/qxtstringspinbox.h \
|
||||
|
||||
HEADERS += \
|
||||
AboutDialog.h \
|
||||
AddDeviceWizard.h \
|
||||
AddIntervalDialog.h \
|
||||
Aerolab.h \
|
||||
AerolabWindow.h \
|
||||
AthleteTool.h \
|
||||
AllPlot.h \
|
||||
AllPlotWindow.h \
|
||||
ANT.h \
|
||||
@@ -350,7 +336,6 @@ HEADERS += \
|
||||
QuarqdClient.h \
|
||||
QuarqParser.h \
|
||||
QuarqRideFile.h \
|
||||
QxtScheduleViewProxy.h \
|
||||
RawRideFile.h \
|
||||
RealtimeData.h \
|
||||
RealtimePlotWindow.h \
|
||||
@@ -408,8 +393,6 @@ HEADERS += \
|
||||
TreeMapPlot.h \
|
||||
TtbDialog.h \
|
||||
Units.h \
|
||||
WeeklySummaryWindow.h \
|
||||
WeeklyViewItemDelegate.h \
|
||||
WithingsDownload.h \
|
||||
WkoRideFile.h \
|
||||
WorkoutPlotWindow.h \
|
||||
@@ -433,7 +416,6 @@ SOURCES += \
|
||||
AerolabWindow.cpp \
|
||||
AllPlot.cpp \
|
||||
AllPlotWindow.cpp \
|
||||
AthleteTool.cpp \
|
||||
ANT.cpp \
|
||||
ANTChannel.cpp \
|
||||
ANTLogger.cpp \
|
||||
@@ -605,7 +587,6 @@ SOURCES += \
|
||||
TRIMPPoints.cpp \
|
||||
WattsPerKilogram.cpp \
|
||||
WithingsDownload.cpp \
|
||||
WeeklySummaryWindow.cpp \
|
||||
WkoRideFile.cpp \
|
||||
WorkoutPlotWindow.cpp \
|
||||
WorkoutWizard.cpp \
|
||||
|
||||
Reference in New Issue
Block a user