Add reindex action

This commit is contained in:
2022-04-22 22:01:21 +02:00
parent 95e4774507
commit 903ec65d52
4 changed files with 91 additions and 53 deletions
+8
View File
@@ -91,6 +91,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
fileMenu->addAction(tr("Move marked files"), this, SLOT(moveMarked()));
fileMenu->addAction(tr("Save as"), this, SLOT(saveAs()), QKeySequence("Ctrl+S"));
fileMenu->addAction(tr("Index directory"), this, SLOT(indexDir()));
fileMenu->addAction(tr("Reindex files"), this, SLOT(reindex()));
QAction *liveModeAction = fileMenu->addAction(tr("Live mode"), this, SLOT(liveMode(bool)));
liveModeAction->setCheckable(true);
fileMenu->addAction(tr("Exit"), this, SLOT(close()));
@@ -358,6 +359,13 @@ void MainWindow::indexDir()
}
}
void MainWindow::reindex()
{
QProgressDialog progressDialog(tr("Indexing FITS files"), tr("Cancel"), 0, 1, this);
progressDialog.setModal(true);
m_database->reindex(&progressDialog);
}
void MainWindow::saveAs()
{
QString selectedFilter;