Implement highlight in Types dialog (#1186)

This commit is contained in:
Itay Cohen 2019-02-12 14:09:45 +00:00 committed by xarkes
parent 281d4e95e0
commit bc974e432f
2 changed files with 5 additions and 0 deletions

View File

@ -3,6 +3,7 @@
#include "Cutter.h" #include "Cutter.h"
#include "common/Configuration.h" #include "common/Configuration.h"
#include "common/SyntaxHighlighter.h"
#include "widgets/TypesWidget.h" #include "widgets/TypesWidget.h"
#include <QFileDialog> #include <QFileDialog>
@ -14,6 +15,8 @@ LoadNewTypesDialog::LoadNewTypesDialog(QWidget *parent) :
{ {
ui->setupUi(this); ui->setupUi(this);
ui->plainTextEdit->setPlainText(""); ui->plainTextEdit->setPlainText("");
syntaxHighLighter = new SyntaxHighlighter(ui->plainTextEdit->document());
ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false); ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false);
} }

View File

@ -7,6 +7,7 @@
namespace Ui { namespace Ui {
class LoadNewTypesDialog; class LoadNewTypesDialog;
} }
class SyntaxHighlighter;
class LoadNewTypesDialog : public QDialog class LoadNewTypesDialog : public QDialog
{ {
@ -38,6 +39,7 @@ private slots:
private: private:
std::unique_ptr<Ui::LoadNewTypesDialog> ui; std::unique_ptr<Ui::LoadNewTypesDialog> ui;
SyntaxHighlighter *syntaxHighLighter;
signals: signals:
/*! /*!