void BlockWidget::createChildWidget( object_ptr<Ui::LinkButton> &child, style::margins &margin, const QString &text, const char *slot, const style::LinkButton &st) { child.create(this, text, st); connect(child, SIGNAL(clicked()), this, slot); }
void BlockWidget::createChildWidget( object_ptr<Ui::Checkbox> &child, style::margins &margin, const QString &text, base::lambda<void(bool checked)> callback, bool checked) { child.create(this, text, checked, st::defaultBoxCheckbox); subscribe(child->checkedChanged, std::move(callback)); }
void InfoWidget::LabeledWidget::setLabelText(object_ptr<Ui::FlatLabel> &text, const TextWithEntities &textWithEntities, const QString ©Text) { text.destroy(); if (textWithEntities.text.isEmpty()) return; text.create(this, QString(), Ui::FlatLabel::InitType::Simple, _valueSt); text->show(); text->setMarkedText(textWithEntities); text->setContextCopyText(copyText); text->setSelectable(true); text->setDoubleClickSelectsParagraph(true); }