Add generating thumbnails from cmd line

This commit is contained in:
2025-03-17 11:08:18 +01:00
parent 21675d9479
commit f30dd2a520
8 changed files with 124 additions and 27 deletions
+5 -16
View File
@@ -327,22 +327,6 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
_lastDir = settings.value("mainwindow/lastdir", _lastDir).toString();
QStringList args = QCoreApplication::arguments();
args.removeFirst();
for(auto &arg : args)
{
QUrl url(arg);
QFileInfo info(url.isLocalFile() ? url.toLocalFile() : arg);
if(info.exists())
{
m_ringList->setFile(info.canonicalFilePath());
updateWindowTitle();
_lastDir = info.absoluteDir().absolutePath();
settings.setValue("mainwindow/lastdir", _lastDir);
break;
}
}
m_image->setFocus();
// workaround for nasty wayland backend bug https://bugreports.qt.io/browse/QTBUG-87332
@@ -565,6 +549,11 @@ void MainWindow::loadFile(const QString &path)
}
}
void MainWindow::loadFiles(const QStringList &paths)
{
m_ringList->setFiles(paths);
}
void MainWindow::loadFile(int row)
{
m_ringList->loadFile(row);