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

@@ -25,9 +25,10 @@
#define GUI_ViewProviderTextDocument_H
#include "PreCompiled.h"
#include "ViewProviderDocumentObject.h"
#include <QPointer>
class QPlainTextEdit;
namespace Gui {
@@ -37,11 +38,23 @@ public:
ViewProviderTextDocument();
~ViewProviderTextDocument() {}
App::PropertyBool ReadOnly;
App::PropertyFloat FontSize;
App::PropertyFont FontName;
App::PropertyEnumeration SyntaxHighlighter;
bool doubleClicked();
void setupContextMenu(QMenu* menu, QObject* receiver, const char* member);
bool isShow() const { return true; }
void onChanged(const App::Property* prop);
private:
bool activateView() const;
private:
QPointer<QPlainTextEdit> editorWidget;
static const char* SyntaxEnums[];
};
}