| 43 | } |
| 44 | |
| 45 | void OptionsWidget::AddOptionRow(const std::string& label_text, |
| 46 | QWidget* widget, |
| 47 | void* option) { |
| 48 | QLabel* label = new QLabel(tr(label_text.c_str()), this); |
| 49 | label->setFont(font()); |
| 50 | label->setAlignment(Qt::AlignRight | Qt::AlignVCenter); |
| 51 | grid_layout_->addWidget(label, grid_layout_->rowCount(), 0); |
| 52 | |
| 53 | widget->setFont(font()); |
| 54 | grid_layout_->addWidget(widget, grid_layout_->rowCount() - 1, 1); |
| 55 | |
| 56 | option_rows_.emplace(option, std::make_pair(label, widget)); |
| 57 | widget_rows_.emplace(widget, std::make_pair(label, widget)); |
| 58 | } |
| 59 | |
| 60 | void OptionsWidget::AddWidgetRow(const std::string& label_text, |
| 61 | QWidget* widget) { |