2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-03 07:56:03 +00:00

Refactor Ui::Radiobutton. Add Ui::Radioenum<Enum>.

Now group of Ui::Radiobutton instances share Ui::RadiobuttonGroup.
All value management is done through the group instance, not through
separate radio buttons. Also a template for groups over enums added.
This commit is contained in:
John Preston
2017-03-19 00:06:10 +03:00
parent 0a40bf2071
commit 12cbf78191
17 changed files with 247 additions and 170 deletions

View File

@@ -90,12 +90,8 @@ void BlockWidget::createChildRow(object_ptr<Ui::Checkbox> &child, style::margins
connect(child, SIGNAL(changed()), this, slot);
}
void BlockWidget::createChildRow(object_ptr<Ui::Radiobutton> &child, style::margins &margin, const std::shared_ptr<Ui::RadiobuttonGroup> &group, int value, const QString &text) {
child.create(this, group, value, text, st::defaultBoxCheckbox);
}
void BlockWidget::createChildRow(object_ptr<Ui::LinkButton> &child, style::margins &margin, const QString &text, const char *slot, const style::LinkButton &st) {
child .create(this, text, st);
child.create(this, text, st);
connect(child, SIGNAL(clicked()), this, slot);
}