text: implement formatting arguments
This commit is contained in:
@@ -681,6 +681,9 @@ void ViewerDisplayWidget::OpenTextGizmo(TextGizmo *text, QMouseEvent *event)
|
||||
Html::HtmlToDoc(text_edit->document(), text->GetHtml());
|
||||
text_edit->setProperty("gizmo", reinterpret_cast<quintptr>(text));
|
||||
connect(text_edit, &ViewerTextEditor::textChanged, this, &ViewerDisplayWidget::TextEditChanged);
|
||||
connect(text_edit, &ViewerTextEditor::destroyed, this, &ViewerDisplayWidget::TextEditDestroyed);
|
||||
|
||||
emit text->Activated();
|
||||
|
||||
// Get on screen text rect (this will be the text editor's global geometry)
|
||||
QRect global_text_area = gizmo_transform.map(text->GetRect()).boundingRect().toRect();
|
||||
@@ -1048,6 +1051,12 @@ void ViewerDisplayWidget::TextEditChanged()
|
||||
gizmo->UpdateInputHtml(html, GetGizmoTime());
|
||||
}
|
||||
|
||||
void ViewerDisplayWidget::TextEditDestroyed()
|
||||
{
|
||||
TextGizmo *gizmo = reinterpret_cast<TextGizmo*>(sender()->property("gizmo").value<quintptr>());
|
||||
emit gizmo->Deactivated();
|
||||
}
|
||||
|
||||
void ViewerDisplayWidget::SubtitlesChanged(const TimeRange &r)
|
||||
{
|
||||
if (time_ >= r.in() && time_ < r.out()) {
|
||||
|
||||
Reference in New Issue
Block a user