22 : QDialog(parent), m_old_params(
std::move(old_params)), m_new_params(new_params) {
24 QAbstractItemModel *model =
m_uiForm.tableWidget->model();
25 int nparams(
static_cast<int>(new_params.size()));
26 model->insertRows(0, nparams);
27 for (
int row = 0; row < nparams; ++row) {
28 QString par = QString::fromStdString(new_params[row]);
29 model->setData(model->index(row, 0), par);
30 model->setData(model->index(row, 1), par);
32 connect(
m_uiForm.btnRename, SIGNAL(clicked()),
this, SLOT(accept()));
33 connect(
m_uiForm.btnCancel, SIGNAL(clicked()),
this, SLOT(reject()));
46 QAbstractItemModel *model =
m_uiForm.tableWidget->model();
47 for (
int row = 0; row <
m_uiForm.tableWidget->rowCount(); ++row) {
48 if (model->data(model->index(row, 1)).toString() == name) {
64 int i_ = name.indexOf(
'_');
66 QString old_index = name.mid(i_ + 1);
68 int n = old_index.toInt(&ok);
72 base = name.mid(0, i_);
81 QString tst(base + QString::number(
index));
84 tst = base + QString::number(
index);
94 std::vector<std::string> out;
95 QAbstractItemModel *model =
m_uiForm.tableWidget->model();
96 for (
int row = 0; row <
m_uiForm.tableWidget->rowCount(); ++row) {
97 out.emplace_back(model->data(model->index(row, 1)).toString().toStdString());
105 QAbstractItemModel *model =
m_uiForm.tableWidget->model();
106 for (
int row = 0; row <
m_uiForm.tableWidget->rowCount(); ++row) {
107 QString name = model->data(model->index(row, 0)).toString();
118 QAbstractItemModel *model =
m_uiForm.tableWidget->model();
119 for (
int row = 0; row <
m_uiForm.tableWidget->rowCount(); ++row) {
120 QString name = model->data(model->index(row, 0)).toString();
121 model->setData(model->index(row, 1), name);
std::map< DeltaEMode::Type, std::string > index