29 #include <QTextStream> 35 m_delimiter(delimiter)
62 if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) {
63 m_error = tr(
"Failed to open file %1 for writing")
68 QTextStream out(&file);
86 if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) {
87 m_error = tr(
"Failed to open file %1 for writing")
92 QTextStream out(&file);
94 for (MultiSelection::SelectionList::iterator i =
98 int f0(i->getStartFrame()), f1(i->getEndFrame());
CSVFileWriter(QString path, Model *model, QString delimiter=",")
virtual QString getError() const
virtual void writeSelection(MultiSelection *selection)
virtual QString toDelimitedDataStringSubset(QString, int, int) const
Model is the base class for all data models that represent any sort of data on a time scale based on ...
A class that manages the creation of a temporary file with a given prefix and the renaming of that fi...
virtual const char * what() const
virtual QString toDelimitedDataString(QString delimiter) const
void moveToTarget()
Rename the temporary file to the target filename.
const SelectionList & getSelections() const
QString getTemporaryFilename()
Return the name of the temporary file.
virtual bool isOK() const