![]() |
Feathercoin
0.5.0
P2P Digital Currency
|
Export a Qt table model to a CSV file. More...
#include <csvmodelwriter.h>
Classes | |
struct | Column |
Public Member Functions | |
CSVModelWriter (const QString &filename, QObject *parent=0) | |
void | setModel (const QAbstractItemModel *model) |
void | addColumn (const QString &title, int column, int role=Qt::EditRole) |
bool | write () |
Perform export of the model to CSV. More... | |
Private Attributes | |
QString | filename |
const QAbstractItemModel * | model |
QList< Column > | columns |
Export a Qt table model to a CSV file.
This is useful for analyzing or post-processing the data in a spreadsheet.
Definition at line 14 of file csvmodelwriter.h.
|
explicit |
Definition at line 7 of file csvmodelwriter.cpp.
void CSVModelWriter::addColumn | ( | const QString & | title, |
int | column, | ||
int | role = Qt::EditRole |
||
) |
Definition at line 18 of file csvmodelwriter.cpp.
void CSVModelWriter::setModel | ( | const QAbstractItemModel * | model | ) |
Definition at line 13 of file csvmodelwriter.cpp.
bool CSVModelWriter::write | ( | ) |
Perform export of the model to CSV.
Definition at line 45 of file csvmodelwriter.cpp.
|
private |
Definition at line 39 of file csvmodelwriter.h.
|
private |
Definition at line 30 of file csvmodelwriter.h.
|
private |
Definition at line 31 of file csvmodelwriter.h.