diff --git a/openscad.pro.user b/openscad.pro.user
index aab1c165..1a682a4f 100644
--- a/openscad.pro.user
+++ b/openscad.pro.user
@@ -1,6 +1,6 @@
-
+
ProjectExplorer.Project.ActiveTarget
@@ -15,13 +15,13 @@
Cpp
- CppGlobal
+ CppGlobal
QmlJS
- QmlJSGlobal
+ QmlJSGlobal
2
@@ -51,13 +51,14 @@
ProjectExplorer.Project.Target.0
- Desktop
- Desktop
- {5feaa906-51d1-436d-a443-3bc608e0fec2}
+ Qt 4.8.6 (qt4)
+ Qt 4.8.6 (qt4)
+ {90222843-28c9-4a66-ac82-99bd31ae7263}
0
0
0
+
true
@@ -66,7 +67,7 @@
QtProjectManager.QMakeBuildStep
false
false
-
+ CONFIG+=experimental
false
@@ -79,7 +80,7 @@
-r
false
- -r -w
+
2
@@ -98,57 +99,6 @@
-r
true
- -r -w clean
-
-
- 1
- Clean
-
- ProjectExplorer.BuildSteps.Clean
-
- 2
- false
-
- OPENSCAD_LIBRARIES=$$PWD/../libraries/install
-
- MacPorts QT4 Release
-
- Qt4ProjectManager.Qt4BuildConfiguration
- 0
- /home/shaina/myrepo/openscad
- false
-
-
- INVALID
-
-
- qmake
-
- QtProjectManager.QMakeBuildStep
- false
- false
-
- false
-
-
- Make
-
- Qt4ProjectManager.MakeStep
- false
-
-
-
- 2
- Build
-
- ProjectExplorer.BuildSteps.Build
-
-
-
- Make
-
- Qt4ProjectManager.MakeStep
- true
clean
@@ -160,117 +110,13 @@
2
false
- 4.7.4 Debug
-
- Qt4ProjectManager.Qt4BuildConfiguration
- 2
- $$PWD/../openscad-build-desktop
- -1
- true
-
-
- INVALID
-
-
- qmake
-
- QtProjectManager.QMakeBuildStep
- false
- false
-
- false
-
-
- Make
-
- Qt4ProjectManager.MakeStep
- false
-
-
-
- 2
- Build
-
- ProjectExplorer.BuildSteps.Build
-
-
-
- Make
-
- Qt4ProjectManager.MakeStep
- true
- clean
-
-
- 1
- Clean
-
- ProjectExplorer.BuildSteps.Clean
-
- 2
- false
-
- 4.7.4 Release
+ Release
Qt4ProjectManager.Qt4BuildConfiguration
0
- $$PWD/../openscad-build-desktop
- -1
true
-
- ProjectExplorer.ToolChain.Gcc:/usr/bin/g++.x86-macos-generic-mach_o-64bit./usr/bin/gdb
-
-
- qmake
- Clone of qmake
- QtProjectManager.QMakeBuildStep
- false
- false
- -spec macx-g++
- false
-
-
- Make
- Clone of Make
- Qt4ProjectManager.MakeStep
- false
-
-
-
- 2
- Build
- Clone of Build
- ProjectExplorer.BuildSteps.Build
-
-
-
- Make
- Clone of Make
- Qt4ProjectManager.MakeStep
- true
- clean
-
-
- 1
- Clean
- Clone of Clean
- ProjectExplorer.BuildSteps.Clean
-
- 2
- false
-
- OPENSCAD_LIBRARIES=$$PWD/../libraries/install
-
- Desktop Qt 4.7.4 for GCC (Qt SDK) Debug
- Desktop Qt 4.7.4 for GCC (Qt SDK)
- Qt4ProjectManager.Qt4BuildConfiguration
- 0
- $$PWD/../openscad-release-desktop
- 3
- true
-
- 5
+ 1
0
@@ -279,14 +125,13 @@
ProjectExplorer.BuildSteps.Deploy
1
- No deployment
+ Deploy locally
ProjectExplorer.DefaultDeployConfiguration
1
- true
false
false
@@ -296,8 +141,12 @@
0.01
10
true
+ 1
25
+ 1
+ true
+ false
true
valgrind
@@ -321,7 +170,7 @@
openscad
- Qt4ProjectManager.Qt4RunConfiguration:/home/shaina/fresh/openscad/openscad.pro
+ Qt4ProjectManager.Qt4RunConfiguration:/home/shaina/openscad/openscad.pro
openscad.pro
false
@@ -332,7 +181,7 @@
false
false
false
- false
+ true
1
@@ -343,10 +192,10 @@
ProjectExplorer.Project.Updater.EnvironmentId
- {ced832b3-b30c-421a-b068-ce4699c38209}
+ {56f57d1a-fe9b-42b2-a96b-3ac76cf7565f}
ProjectExplorer.Project.Updater.FileVersion
- 14
+ 15
diff --git a/src/Preferences.cc b/src/Preferences.cc
index 94df31b3..7d311aa0 100644
--- a/src/Preferences.cc
+++ b/src/Preferences.cc
@@ -64,6 +64,7 @@ Preferences::Preferences(QWidget *parent) : QMainWindow(parent)
this->defaultmap["editor/fontfamily"] = found_family;
this->defaultmap["editor/fontsize"] = 12;
this->defaultmap["editor/syntaxhighlight"] = "For Light Background";
+ this->defaultmap["editor/editortype"] = "Simple Editor";
#if defined (Q_OS_MAC)
this->defaultmap["editor/ctrlmousewheelzoom"] = false;
@@ -83,9 +84,12 @@ Preferences::Preferences(QWidget *parent) : QMainWindow(parent)
connect(this->fontSize, SIGNAL(currentIndexChanged(const QString&)),
this, SLOT(on_fontSize_editTextChanged(const QString &)));
+ connect(this->editorType, SIGNAL(currentIndexChanged(const QString&)),
+ this, SLOT(on_editorType_editTextChanged(const QString &)));
+
// reset GUI fontsize if fontSize->addItem emitted signals that changed it.
this->fontSize->setEditText( QString("%1").arg( savedsize ) );
-
+
// Setup default settings
this->defaultmap["3dview/colorscheme"] = this->colorSchemeChooser->currentItem()->text();
this->defaultmap["advanced/opencsg_show_warning"] = true;
@@ -296,6 +300,12 @@ void Preferences::on_fontSize_editTextChanged(const QString &size)
emit fontChanged(getValue("editor/fontfamily").toString(), intsize);
}
+void Preferences::on_editorType_editTextChanged(const QString &type)
+{
+ QSettings settings;
+ settings.setValue("editor/editortype", type);
+}
+
void Preferences::on_syntaxHighlight_currentIndexChanged(const QString &s)
{
QSettings settings;
@@ -465,6 +475,10 @@ void Preferences::updateGUI()
int shidx = this->syntaxHighlight->findText(shighlight);
if (shidx >= 0) this->syntaxHighlight->setCurrentIndex(shidx);
+ QString editortypevar = getValue("editor/editortype").toString();
+ int edidx = this->editorType->findText(editortypevar);
+ if (edidx >=0) this->editorType->setCurrentIndex(edidx);
+
this->mouseWheelZoomBox->setChecked(getValue("editor/ctrlmousewheelzoom").toBool());
if (AutoUpdater *updater = AutoUpdater::updater()) {
diff --git a/src/Preferences.h b/src/Preferences.h
index 102ddf15..35a06faf 100644
--- a/src/Preferences.h
+++ b/src/Preferences.h
@@ -37,7 +37,7 @@ public slots:
void on_mdiCheckBox_toggled(bool);
void on_undockCheckBox_toggled(bool);
void on_checkNowButton_clicked();
-
+ void on_editorType_editTextChanged(const QString &);
signals:
void requestRedraw() const;
void updateMdiMode(bool mdi) const;
@@ -45,6 +45,7 @@ signals:
void fontChanged(const QString &family, uint size) const;
void openCSGSettingsChanged() const;
void syntaxHighlightChanged(const QString &s);
+ void editorTypeChanged(const QString &type);
private:
Preferences(QWidget *parent = NULL);
diff --git a/src/Preferences.ui b/src/Preferences.ui
index 2eb1b129..389ec3d6 100644
--- a/src/Preferences.ui
+++ b/src/Preferences.ui
@@ -27,7 +27,7 @@
-
- 4
+ 1
@@ -100,185 +100,227 @@
-
+
+
+
+ 100
+ 10
+ 271
+ 27
+
+
-
-
-
-
-
-
-
- 75
- true
-
-
-
- Font
-
-
- false
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
- -
-
-
-
- DejaVu Sans
- 12
-
-
-
-
- -
-
-
- true
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
-
+
+ Simple Editor
+
-
-
-
- 0
-
-
-
-
-
-
- 75
- true
-
-
-
- Color syntax highlighting
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
-
- For Light Background
-
-
- -
-
- For Dark Background
-
-
- -
-
- Off
-
-
-
-
- -
-
-
- Qt::Horizontal
-
-
- QSizePolicy::Expanding
-
-
-
- 30
- 20
-
-
-
-
-
+
+ QScintilla Editor
+
- -
-
-
- 5
-
-
-
-
-
-
- 75
- true
-
-
+
+
+
+
+ 9
+ 9
+ 81
+ 31
+
+
+
+ Editor Type
+
+
+
+
+
+ 10
+ 50
+ 352
+ 55
+
+
+
+
-
+
+
+
+ 75
+ true
+
+
+
+ Font
+
+
+ false
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+
+ DejaVu Sans
+ 12
+
+
+
+
+ -
+
+
+ true
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
+
+
+
+
+ 10
+ 110
+ 400
+ 29
+
+
+
+
+ 0
+
+ -
+
+
+
+ 75
+ true
+
+
+
+ Color syntax highlighting
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
-
- Use Ctrl/Cmd-Mouse-wheel to zoom text
+ For Light Background
-
-
- -
-
+
+ -
-
+ For Dark Background
-
-
- -
-
-
- Qt::Horizontal
+
+ -
+
+ Off
-
-
- 40
- 20
-
-
-
-
-
-
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 77
-
-
-
-
-
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+ QSizePolicy::Expanding
+
+
+
+ 30
+ 20
+
+
+
+
+
+
+
+
+
+ 10
+ 150
+ 365
+ 27
+
+
+
+
+ 5
+
+ -
+
+
+
+ 75
+ true
+
+
+
+ Use Ctrl/Cmd-Mouse-wheel to zoom text
+
+
+
+ -
+
+
+
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
+
@@ -426,7 +468,16 @@
-
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
0
-
@@ -464,7 +515,7 @@
0
0
803
- 325
+ 332
diff --git a/src/mainwin.cc b/src/mainwin.cc
index 7b4127a1..f9efbc77 100644
--- a/src/mainwin.cc
+++ b/src/mainwin.cc
@@ -97,7 +97,7 @@
#include "cgal.h"
#include "cgalworker.h"
#include "cgalutils.h"
-
+#include
#else
#include "PolySetEvaluator.h"
@@ -170,11 +170,22 @@ MainWindow::MainWindow(const QString &filename)
{
setupUi(this);
+ QString editortype = Preferences::inst()->getValue("editor/editortype").toString();
+
+ if(editortype == "Simple Editor")
+ {
+ editor = new LegacyEditor(editorDockContents);
+ } else if(editortype == "QScintilla Editor")
+ {
+ editor = new ScintillaEditor(editorDockContents);
+ }
+/*
#ifdef USE_SCINTILLA_EDITOR
editor = new ScintillaEditor(editorDockContents);
#else
editor = new LegacyEditor(editorDockContents);
#endif
+*/
editorDockContents->layout()->addWidget(editor);
setCorner(Qt::TopLeftCorner, Qt::LeftDockWidgetArea);