mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-15 00:49:55 +00:00
Auto Interval Discovery (Part 2 of 3)
In this part we have updated all the charts to reference
the RideItem::intervals() members instead of the TreeWidget
and RideFile::intervals().
The code to create/change/delete intervals is not included
so selecting and editing on charts/sidebar is disabled til
part 3 of the update, but hover should work properly.
Still left todo in future updates;
* Updates to the interval sidebar to list intervals
in a tree (by interval type) with a color selector
* Code to create, edit, delete etc the intervals via
the rideitem/intervalitem and see them reflected in
the ridefile
* Update to search for all the different types of
IntervalItems including routes and sustained intervals
This commit is contained in:
@@ -859,6 +859,8 @@ AddIntervalDialog::addClicked()
|
||||
// get stop in secs as a string from column 4
|
||||
for (int i=0; i<resultsTable->rowCount(); i++) {
|
||||
|
||||
//XXX REFACTOR NEED TO DECIDE HOW TO DO THIS!!
|
||||
#if 0
|
||||
// is it checked?
|
||||
QCheckBox *c = (QCheckBox *)resultsTable->cellWidget(i,0);
|
||||
if (c->isChecked()) {
|
||||
@@ -866,7 +868,6 @@ AddIntervalDialog::addClicked()
|
||||
double stop = resultsTable->item(i,4)->text().toDouble();
|
||||
QString name = resultsTable->item(i,2)->text();
|
||||
const RideFile *ride = context->ride ? context->ride->ride() : NULL;
|
||||
|
||||
QTreeWidgetItem *allIntervals = context->athlete->mutableIntervalItems();
|
||||
QTreeWidgetItem *last =
|
||||
new IntervalItem(ride, name, start, stop,
|
||||
@@ -878,6 +879,7 @@ AddIntervalDialog::addClicked()
|
||||
// add
|
||||
allIntervals->addChild(last);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
context->athlete->updateRideFileIntervals();
|
||||
done(0);
|
||||
|
||||
Reference in New Issue
Block a user