Gui: allow to set font family and size and syntax highlighting
This commit is contained in:
@@ -73,7 +73,6 @@ void TextDocumentEditorView::setupEditor()
|
||||
{
|
||||
connect(getEditor()->document(), SIGNAL(modificationChanged(bool)),
|
||||
this, SLOT(setWindowModified(bool)));
|
||||
getEditor()->setReadOnly(textDocument->ReadOnly.getValue());
|
||||
setWindowTitle(QString::fromUtf8(textDocument->Label.getValue())
|
||||
+ QString::fromLatin1("[*]"));
|
||||
getEditor()->setPlainText(
|
||||
@@ -82,8 +81,10 @@ void TextDocumentEditorView::setupEditor()
|
||||
|
||||
void TextDocumentEditorView::setupConnection()
|
||||
{
|
||||
textConnection = textDocument->connect(
|
||||
textConnection = textDocument->connectText(
|
||||
boost::bind(&TextDocumentEditorView::sourceChanged, this));
|
||||
labelConnection = textDocument->connectLabel(
|
||||
boost::bind(&TextDocumentEditorView::labelChanged, this));
|
||||
}
|
||||
|
||||
void TextDocumentEditorView::sourceChanged()
|
||||
@@ -96,6 +97,12 @@ void TextDocumentEditorView::sourceChanged()
|
||||
}
|
||||
}
|
||||
|
||||
void TextDocumentEditorView::labelChanged()
|
||||
{
|
||||
setWindowTitle(QString::fromUtf8(textDocument->Label.getValue())
|
||||
+ QString::fromLatin1("[*]"));
|
||||
}
|
||||
|
||||
void TextDocumentEditorView::refresh()
|
||||
{
|
||||
QString text = QString::fromUtf8(
|
||||
|
||||
Reference in New Issue
Block a user