Skip to content

Commit

Permalink
Switch to QgsCodeEditorHTML for composer html code editor
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jul 20, 2014
1 parent dcdd02b commit bc6551c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
10 changes: 3 additions & 7 deletions src/app/composer/qgscomposerhtmlwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down
4 changes: 2 additions & 2 deletions src/app/composer/qgscomposerhtmlwidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

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

class QgsComposerHtmlWidget: public QgsComposerItemBaseWidget, private Ui::QgsComposerHtmlWidgetBase
{
Expand Down Expand Up @@ -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.