8 #include "ui_multifile_prefix.h"
11 #include <QFormLayout>
20 QVBoxLayout* vlayout =
ui->verticalLayoutFrame;
24 QStringList prev_prefixes =
25 settings.value(
"DialogMultifilePrefix::previous").toStringList();
27 for (
int i = 0; i < prev_prefixes.size(); i += 2)
33 for (QString filename : filenames)
35 auto label_file =
new QLabel(filename,
this);
36 label_file->setTextInteractionFlags(Qt::TextSelectableByMouse);
38 auto form_layout =
new QFormLayout();
39 auto label =
new QLabel(
"Prefix: ");
40 auto line_edit =
new QLineEdit();
42 form_layout->addRow(label, line_edit);
44 vlayout->insertWidget(index++, label_file);
45 vlayout->insertLayout(index++, form_layout);
53 line_edit->setText(QFileInfo(filename).baseName());
74 QStringList prev_prefixes;
77 for (
const auto& [filename, line_edit] :
_line_edits)
85 prev_prefixes.push_back(filename);
86 prev_prefixes.push_back(prefix);
89 settings.setValue(
"DialogMultifilePrefix::previous", prev_prefixes);