CSV export
This commit is contained in:
@@ -137,6 +137,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
|
||||
fileMenu->addSeparator();
|
||||
fileMenu->addAction(tr("Index directory"), this, SLOT(indexDir()));
|
||||
fileMenu->addAction(tr("Reindex files"), this, SLOT(reindex()));
|
||||
fileMenu->addAction(tr("Export database to CSV"), this, &MainWindow::exportCSV);
|
||||
fileMenu->addSeparator();
|
||||
QAction *liveModeAction = fileMenu->addAction(tr("Live mode"), this, SLOT(liveMode(bool)));
|
||||
liveModeAction->setCheckable(true);
|
||||
@@ -615,6 +616,19 @@ void MainWindow::showSettingsDialog()
|
||||
settingsDialog.exec();
|
||||
}
|
||||
|
||||
void MainWindow::exportCSV()
|
||||
{
|
||||
QStringList documentDir = QStandardPaths::standardLocations(QStandardPaths::DocumentsLocation);
|
||||
if(documentDir.empty())documentDir.append("");
|
||||
QString file = QFileDialog::getSaveFileName(this,
|
||||
tr("Save as"),
|
||||
documentDir.first(),
|
||||
tr("CSV file (*.csv)"));
|
||||
|
||||
if(!file.isEmpty())
|
||||
m_databaseView->exportCSV(file);
|
||||
}
|
||||
|
||||
void MainWindow::updateWindowTitle()
|
||||
{
|
||||
ImagePtr ptr = m_ringList->currentImage();
|
||||
|
||||
Reference in New Issue
Block a user