24 #include <ArmarXGui/libraries/SimpleConfigDialog/ui_SimpleConfigDialog.h>
28 #include <IceUtil/UUID.h>
31 #include <QHBoxLayout>
39 uuid {IceUtil::generateUUID()}
51 return entries.at(entryName).proxyName();
56 return hasProxyName(entryName) ? getProxyName(entryName) : def;
61 return entries.count(entryName);
66 auto manager = getIceManager();
67 for (
auto& entry : entries)
69 entry.second.setIceManager(manager);
75 return "SimpleConfigDialog" + uuid;
81 return ui->verticalLayout;
87 QHBoxLayout* horizontalLayout =
new QHBoxLayout;
88 horizontalLayout->addWidget(
new QLabel {QString::fromStdString(label)});
89 lineEdits[name] =
new QLineEdit;
90 lineEdits.at(name)->setText(QString::fromStdString(defaultValue));
91 horizontalLayout->addWidget(lineEdits.at(name));
92 getLayout()->addLayout(horizontalLayout);
97 return lineEdits.at(entryName)->text().toStdString();
102 return lineEdits.count(entryName);
107 const auto hasprx = hasProxyName(entryName);
108 const auto hasedt = hasLineEdit(entryName);
111 return hasprx ? getProxyName(entryName) : getLineEditText(entryName);
116 const auto hasprx = hasProxyName(entryName);
117 const auto hasedt = hasLineEdit(entryName);
120 return hasprx ? getProxyName(entryName) : (hasedt ? getLineEditText(entryName) : def);
123 void armarx::SimpleConfigDialog::SimpleConfigDialogAdderBase::implAddEntries(
armarx::SimpleConfigDialog& d, std::size_t
index,
const std::vector<armarx::SimpleConfigDialog::EntryData>& entryData)
125 auto& entry = entryData.at(
index);
126 QHBoxLayout* horizontalLayout =
new QHBoxLayout;
128 horizontalLayout->addWidget(
new QLabel {QString::fromStdString(entry.description)});
132 horizontalLayout->addWidget(finder);
134 d.entries[entry.name] =
143 d.
getLayout()->addLayout(horizontalLayout);