Gui: allow to set font family and size and syntax highlighting

This commit is contained in:
wmayer
2019-12-19 23:17:46 +01:00
parent 99e5bededb
commit d969581ff8
6 changed files with 93 additions and 10 deletions

View File

@@ -40,15 +40,14 @@ TextDocument::TextDocument()
ADD_PROPERTY_TYPE(
Text, (""), 0, App::Prop_Hidden,
"Content of the document.");
ADD_PROPERTY_TYPE(
ReadOnly, (false), 0, App::Prop_None,
"Defines whether the content can be edited.");
}
void TextDocument::onChanged(const Property* prop)
{
if (prop == &Text)
textChanged();
else if (prop == &Label)
labelChanged();
DocumentObject::onChanged(prop);
}
@@ -57,7 +56,12 @@ const char* TextDocument::getViewProviderName() const
return "Gui::ViewProviderTextDocument";
}
boost::signals2::connection TextDocument::connect(const TextSlot &sub)
boost::signals2::connection TextDocument::connectText(const TextSlot &sub)
{
return textChanged.connect(sub);
}
boost::signals2::connection TextDocument::connectLabel(const TextSlot &sub)
{
return labelChanged.connect(sub);
}