25 #include <QHBoxLayout>
29 #include <IceUtil/UUID.h>
33 #include <ArmarXGui/libraries/SimpleConfigDialog/ui_SimpleConfigDialog.h>
49 return entries.at(entryName).proxyName();
55 return hasProxyName(entryName) ? getProxyName(entryName) : def;
61 return entries.count(entryName);
67 auto manager = getIceManager();
68 for (
auto& entry : entries)
70 entry.second.setIceManager(manager);
77 return "SimpleConfigDialog" + uuid;
83 return ui->verticalLayout;
88 const std::string& label,
89 const std::string& defaultValue)
92 QHBoxLayout* horizontalLayout =
new QHBoxLayout;
93 horizontalLayout->addWidget(
new QLabel{QString::fromStdString(label)});
94 lineEdits[name] =
new QLineEdit;
95 lineEdits.at(name)->setText(QString::fromStdString(defaultValue));
96 horizontalLayout->addWidget(lineEdits.at(name));
97 getLayout()->addLayout(horizontalLayout);
103 return lineEdits.at(entryName)->text().toStdString();
109 return lineEdits.count(entryName);
115 const auto hasprx = hasProxyName(entryName);
116 const auto hasedt = hasLineEdit(entryName);
119 return hasprx ? getProxyName(entryName) : getLineEditText(entryName);
125 const auto hasprx = hasProxyName(entryName);
126 const auto hasedt = hasLineEdit(entryName);
129 return hasprx ? getProxyName(entryName) : (hasedt ? getLineEditText(entryName) : def);
133 armarx::SimpleConfigDialog::SimpleConfigDialogAdderBase::implAddEntries(
136 const std::vector<armarx::SimpleConfigDialog::EntryData>& entryData)
138 auto& entry = entryData.at(
index);
139 QHBoxLayout* horizontalLayout =
new QHBoxLayout;
141 horizontalLayout->addWidget(
new QLabel{QString::fromStdString(entry.description)});
145 horizontalLayout->addWidget(finder);
147 d.entries[entry.name] = {[finder]
151 d.
getLayout()->addLayout(horizontalLayout);