mirror of https://github.com/vitalif/openscad
added scintilla editor classes
parent
5a0df4e6d9
commit
59a71b7e6e
|
@ -285,7 +285,8 @@ HEADERS += src/typedefs.h \
|
||||||
src/CsgInfo.h \
|
src/CsgInfo.h \
|
||||||
\
|
\
|
||||||
src/AutoUpdater.h \
|
src/AutoUpdater.h \
|
||||||
src/legacyeditor.h
|
src/legacyeditor.h \
|
||||||
|
src/scintillaeditor.h
|
||||||
|
|
||||||
SOURCES += src/version_check.cc \
|
SOURCES += src/version_check.cc \
|
||||||
src/ProgressWidget.cc \
|
src/ProgressWidget.cc \
|
||||||
|
@ -369,7 +370,8 @@ SOURCES += src/version_check.cc \
|
||||||
src/openscad.cc \
|
src/openscad.cc \
|
||||||
src/mainwin.cc \
|
src/mainwin.cc \
|
||||||
src/FontListDialog.cc \
|
src/FontListDialog.cc \
|
||||||
src/legacyeditor.cc
|
src/legacyeditor.cc \
|
||||||
|
src/scintillaeditor.cpp
|
||||||
|
|
||||||
# ClipperLib
|
# ClipperLib
|
||||||
SOURCES += src/polyclipping/clipper.cpp
|
SOURCES += src/polyclipping/clipper.cpp
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE QtCreatorProject>
|
<!DOCTYPE QtCreatorProject>
|
||||||
<!-- Written by QtCreator 2.8.1, 2014-06-01T01:42:15. -->
|
<!-- Written by QtCreator 2.8.1, 2014-06-03T20:19:45. -->
|
||||||
<qtcreator>
|
<qtcreator>
|
||||||
<data>
|
<data>
|
||||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#include "Tree.h"
|
#include "Tree.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "legacyeditor.h"
|
#include "legacyeditor.h"
|
||||||
|
#include "scintillaeditor.h"
|
||||||
#include "editor.h"
|
#include "editor.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <QMutex>
|
#include <QMutex>
|
||||||
|
@ -106,6 +107,7 @@ private:
|
||||||
void setDockWidgetTitle(QDockWidget *dockWidget, QString prefix, bool topLevel);
|
void setDockWidgetTitle(QDockWidget *dockWidget, QString prefix, bool topLevel);
|
||||||
|
|
||||||
LegacyEditor *legacy;
|
LegacyEditor *legacy;
|
||||||
|
ScintillaEditor *scintilla;
|
||||||
Editor *editor;
|
Editor *editor;
|
||||||
|
|
||||||
class QMessageBox *openglbox;
|
class QMessageBox *openglbox;
|
||||||
|
|
|
@ -166,10 +166,14 @@ bool MainWindow::undockMode = false;
|
||||||
MainWindow::MainWindow(const QString &filename)
|
MainWindow::MainWindow(const QString &filename)
|
||||||
: root_inst("group"), font_list_dialog(NULL), tempFile(NULL), progresswidget(NULL)
|
: root_inst("group"), font_list_dialog(NULL), tempFile(NULL), progresswidget(NULL)
|
||||||
{
|
{
|
||||||
|
setupUi(this);
|
||||||
legacy = new LegacyEditor(editorDockContents);
|
legacy = new LegacyEditor(editorDockContents);
|
||||||
editor = legacy;
|
editor = legacy;
|
||||||
|
|
||||||
setupUi(this);
|
scintilla = new ScintillaEditor(editorDockContents);
|
||||||
|
//editor = scintilla;
|
||||||
|
editor->setMinimumSize(editorDockContents->sizeHint());
|
||||||
|
|
||||||
setCorner(Qt::TopLeftCorner, Qt::LeftDockWidgetArea);
|
setCorner(Qt::TopLeftCorner, Qt::LeftDockWidgetArea);
|
||||||
setCorner(Qt::TopRightCorner, Qt::RightDockWidgetArea);
|
setCorner(Qt::TopRightCorner, Qt::RightDockWidgetArea);
|
||||||
setCorner(Qt::BottomLeftCorner, Qt::LeftDockWidgetArea);
|
setCorner(Qt::BottomLeftCorner, Qt::LeftDockWidgetArea);
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
#include "scintillaeditor.h"
|
||||||
|
|
||||||
|
ScintillaEditor::ScintillaEditor(QWidget *parent) : Editor(parent)
|
||||||
|
{
|
||||||
|
qsci = new QsciScintilla;
|
||||||
|
qsci->setMarginLineNumbers(10,true);
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
#ifndef SCINTILLAEDITOR_H
|
||||||
|
#define SCINTILLAEDITOR_H
|
||||||
|
|
||||||
|
#include <QObject>
|
||||||
|
#include <QWidget>
|
||||||
|
#include <Qsci/qsciscintilla.h>
|
||||||
|
|
||||||
|
#include "editor.h"
|
||||||
|
|
||||||
|
class ScintillaEditor : public Editor
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
ScintillaEditor(QWidget *parent);
|
||||||
|
QsciScintilla *qsci;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // SCINTILLAEDITOR_H
|
Loading…
Reference in New Issue