mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-15 00:49:55 +00:00
remove XmlRideFile and "Export to XML"
These were part of an earlier attempt at a GC-specific ride file format. They aren't in use now, and they'll be replaced by the new one when it's done.
This commit is contained in:
@@ -256,8 +256,6 @@ MainWindow::MainWindow(const QDir &home) :
|
||||
SLOT(downloadRide()), tr("Ctrl+D"));
|
||||
rideMenu->addAction(tr("&Export to CSV..."), this,
|
||||
SLOT(exportCSV()), tr("Ctrl+E"));
|
||||
rideMenu->addAction(tr("&Export to XML..."), this,
|
||||
SLOT(exportXML()));
|
||||
rideMenu->addAction(tr("&Import from File..."), this,
|
||||
SLOT (importFile()), tr ("Ctrl+I"));
|
||||
rideMenu->addAction(tr("Find &best intervals..."), this,
|
||||
@@ -463,32 +461,6 @@ MainWindow::currentRide()
|
||||
return ((RideItem*) treeWidget->selectedItems().first())->ride;
|
||||
}
|
||||
|
||||
void
|
||||
MainWindow::exportXML()
|
||||
{
|
||||
if ((treeWidget->selectedItems().size() != 1)
|
||||
|| (treeWidget->selectedItems().first()->type() != RIDE_TYPE)) {
|
||||
QMessageBox::critical(this, tr("Select Ride"), tr("No ride selected!"));
|
||||
return;
|
||||
}
|
||||
|
||||
RideItem *ride = (RideItem*) treeWidget->selectedItems().first();
|
||||
|
||||
QString fileName = QFileDialog::getSaveFileName(
|
||||
this, tr("Export XML"), QDir::homePath(), tr("XML (*.xml)"));
|
||||
if (fileName.length() == 0)
|
||||
return;
|
||||
|
||||
QString err;
|
||||
QFile file(fileName);
|
||||
ride->ride->writeAsXml(file, err);
|
||||
if (err.length() > 0) {
|
||||
QMessageBox::critical(this, tr("Export XML"),
|
||||
tr("Error writing %1: %2").arg(fileName).arg(err));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
MainWindow::exportCSV()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user