37 setWindowFlags(Qt::Dialog);
38 setWindowModality(Qt::ApplicationModal);
41 font.setPointSize(10);
52 QLabel* label =
new QLabel(tr(label_text.c_str()),
this);
53 label->setFont(font());
54 label->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
57 widget->setFont(font());
66 QLabel* label =
new QLabel(tr(label_text.c_str()),
this);
67 label->setFont(font());
68 label->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
71 widget->setFont(font());
79 QLabel* label =
new QLabel(tr(label_text.c_str()),
this);
80 label->setFont(font());
81 label->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
84 QWidget* layout_widget =
new QWidget(
this);
85 layout_widget->setLayout(layout);
86 layout->setContentsMargins(0, 0, 0, 0);
94 const std::string& label_text,
95 const int min,
const int max) {
96 QSpinBox* spinbox =
new QSpinBox(
this);
97 spinbox->setMinimum(min);
98 spinbox->setMaximum(max);
108 double* option,
const std::string& label_text,
const double min,
109 const double max,
const double step,
const int decimals) {
110 QDoubleSpinBox* spinbox =
new QDoubleSpinBox(
this);
111 spinbox->setMinimum(min);
112 spinbox->setMaximum(max);
113 spinbox->setSingleStep(step);
114 spinbox->setDecimals(decimals);
124 double* option,
const std::string& label_text,
const double min,
125 const double max,
const double step,
const int decimals) {
126 QDoubleSpinBox* spinbox =
new QDoubleSpinBox(
this);
127 spinbox->setMinimum(min);
128 spinbox->setMaximum(max);
129 spinbox->setSingleStep(step);
130 spinbox->setDecimals(decimals);
140 const std::string& label_text) {
141 QCheckBox* checkbox =
new QCheckBox(
this);
151 const std::string& label_text) {
152 QLineEdit* line_edit =
new QLineEdit(
this);
162 const std::string& label_text) {
163 QLineEdit* line_edit =
new QLineEdit(
this);
167 auto SelectPathFunc = [
this, line_edit]() {
168 line_edit->setText(QFileDialog::getOpenFileName(
this, tr(
"Select file")));
171 QPushButton* select_button =
new QPushButton(tr(
"Select file"),
this);
172 select_button->setFont(font());
173 connect(select_button, &QPushButton::released,
this, SelectPathFunc);
182 const std::string& label_text) {
183 QLineEdit* line_edit =
new QLineEdit(
this);
187 auto SelectPathFunc = [
this, line_edit]() {
189 QFileDialog::getExistingDirectory(
this, tr(
"Select folder")));
192 QPushButton* select_button =
new QPushButton(tr(
"Select folder"),
this);
193 select_button->setFont(font());
194 connect(select_button, &QPushButton::released,
this, SelectPathFunc);
203 QLabel* label =
new QLabel(
"",
this);
204 label->setFont(font());
209 QLabel* label =
new QLabel(tr(title.c_str()),
this);
210 label->setFont(font());
211 label->setContentsMargins(0, 0, 0, 5);
218 option.first->setValue(*option.second);
222 option.first->setValue(*option.second);
226 option.first->setValue(std::log10(*option.second));
230 option.first->setChecked(*option.second);
234 option.first->setText(QString::fromStdString(*option.second));
238 option.first->setText(QString::fromStdString(*option.second));
244 *option.second = option.first->value();
248 *option.second = option.first->value();
252 *option.second = std::pow(10, option.first->value());
256 *option.second = option.first->isChecked();
260 *option.second = option.first->text().toUtf8().constData();
264 *option.second = option.first->text().toUtf8().constData();
276 option_row.first->show();
277 option_row.second->show();
282 option_row.first->hide();
283 option_row.second->hide();
288 widget_row.first->show();
289 widget_row.second->show();
294 widget_row.first->hide();
295 widget_row.second->hide();
300 layout_row.first->show();
301 layout_row.second->show();
306 layout_row.first->hide();
307 layout_row.second->hide();
CLOUDVIEWER_HOST_DEVICE Pair< First, Second > make_pair(const First &_first, const Second &_second)