Simple implementation of CSV export.
This commit is contained in:
@ -121,6 +121,13 @@ void GenericCore::importCSVFile(const QString& filePath) {
|
||||
m_mainModel->insertItems(m_mainModel->rowCount(), itemValuesList);
|
||||
}
|
||||
|
||||
bool GenericCore::exportCSVFile(const QString& filePath) {
|
||||
qInfo() << "exporting items to CSV...";
|
||||
qDebug() << "filePath:" << filePath;
|
||||
const QList<QStringList> itemsAsStringLists = m_mainModel->getItemsAsStringLists();
|
||||
return FileHandler::exportToCSVFile(itemsAsStringLists, filePath);
|
||||
}
|
||||
|
||||
void GenericCore::setupModels() {
|
||||
m_mainModel = make_shared<TableModel>(m_modelUndoStack, this);
|
||||
// TODO add QAbstractItemModelTester
|
||||
|
||||
Reference in New Issue
Block a user