Skip to content
Permalink
Browse files
Switch to QgsCodeEditorHTML for composer html code editor
  • Loading branch information
nyalldawson committed Jul 20, 2014
1 parent dcdd02b commit bc6551c2853d1bdc1006d2d67b9be062c3105858
Showing with 5 additions and 9 deletions.
  1. +3 −7 src/app/composer/qgscomposerhtmlwidget.cpp
  2. +2 −2 src/app/composer/qgscomposerhtmlwidget.h
@@ -19,21 +19,17 @@
#include "qgscomposerhtml.h"
#include "qgscomposition.h"
#include "qgsexpressionbuilderdialog.h"
#include "qgscodeeditorhtml.h"
#include <QFileDialog>
#include <QSettings>
#include <Qsci/qsciscintilla.h>
#include <Qsci/qscilexerhtml.h>


QgsComposerHtmlWidget::QgsComposerHtmlWidget( QgsComposerHtml* html, QgsComposerFrame* frame ): QgsComposerItemBaseWidget( 0, html ), mHtml( html ), mFrame( frame )
{
setupUi( this );

//setup html editor
mHtmlEditor = new QsciScintilla( this );
mHtmlEditor->setLexer( new QsciLexerHTML );
mHtmlEditor->setFolding( QsciScintilla::BoxedFoldStyle );
//hide the line numbers
mHtmlEditor->setMarginWidth( 1, 0 );
mHtmlEditor = new QgsCodeEditorHTML( this );

connect( mHtmlEditor, SIGNAL( textChanged() ), this, SLOT( htmlEditorChanged() ) );
htmlEditorLayout->addWidget( mHtmlEditor );
@@ -20,7 +20,7 @@

class QgsComposerHtml;
class QgsComposerFrame;
class QsciScintilla;
class QgsCodeEditorHTML;

class QgsComposerHtmlWidget: public QgsComposerItemBaseWidget, private Ui::QgsComposerHtmlWidgetBase
{
@@ -53,7 +53,7 @@ class QgsComposerHtmlWidget: public QgsComposerItemBaseWidget, private Ui::QgsCo

QgsComposerHtml* mHtml;
QgsComposerFrame* mFrame;
QsciScintilla *mHtmlEditor;
QgsCodeEditorHTML *mHtmlEditor;
};

#endif // QGSCOMPOSERHTMLWIDGET_H

0 comments on commit bc6551c

Please sign in to comment.