![]() |
Dash Core
0.12.2.1
P2P Digital Currency
|
#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 () |
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 18 of file csvmodelwriter.h.
|
explicit |
Definition at line 11 of file csvmodelwriter.cpp.
void CSVModelWriter::addColumn | ( | const QString & | title, |
int | column, | ||
int | role = Qt::EditRole |
||
) |
Definition at line 22 of file csvmodelwriter.cpp.
Referenced by TransactionView::exportClicked(), and AddressBookPage::on_exportButton_clicked().
void CSVModelWriter::setModel | ( | const QAbstractItemModel * | model | ) |
Definition at line 17 of file csvmodelwriter.cpp.
Referenced by TransactionView::exportClicked(), and AddressBookPage::on_exportButton_clicked().
bool CSVModelWriter::write | ( | ) |
Perform export of the model to CSV.
Definition at line 49 of file csvmodelwriter.cpp.
Referenced by TransactionView::exportClicked(), and AddressBookPage::on_exportButton_clicked().
|
private |
Definition at line 43 of file csvmodelwriter.h.
Referenced by addColumn(), and write().
|
private |
Definition at line 34 of file csvmodelwriter.h.
Referenced by write().
|
private |
Definition at line 35 of file csvmodelwriter.h.
Referenced by setModel(), and write().