File Export (part 1 of 2)

The export functions in mainwindow are getting quite
cumbersome with multiple menu options.

This patch creates a single menu option "Export.." which
allows the user to select a supported format and a filename.

To support this the ridefile reader code needed to be adjusted
to allow registered readers to declare capability to write and
use a consistent (virtual) method to do so.

By modifying the base class for ride file reader we now allow
new readers to register both read and write capability.
This commit is contained in:
Mark Liversedge
2011-10-12 14:19:14 +01:00
parent da90450d12
commit cc0fbdf47d
41 changed files with 166 additions and 218 deletions

View File

@@ -50,9 +50,8 @@ RideFile *TcxFileReader::openRideFile(QFile &file, QStringList &errors, QList<Ri
}
bool
TcxFileReader::writeRideFile(MainWindow *mainWindow, const QString cyclist, const RideFile *ride, QFile &file) const
TcxFileReader::writeRideFile(MainWindow *mainWindow, const RideFile *ride, QFile &file) const
{
Q_UNUSED(cyclist);
QDomText text;
QDomDocument doc;
QDomProcessingInstruction hdr = doc.createProcessingInstruction("xml","version=\"1.0\"");