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:
Sean Rhea
2009-10-31 15:12:48 -04:00
parent 5dc82a6c93
commit 868e3d4b6b
6 changed files with 0 additions and 296 deletions

View File

@@ -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()
{