From 22e884d08f7ca8ed4d24b5e43219864fc91df861 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Fri, 6 Jun 2014 20:52:38 -0400 Subject: [PATCH] Quick and dirty fixup --- openscad.pro | 2 ++ setenv_mac-qt4.sh | 2 +- src/MainWindow.ui | 26 +------------------------- src/mainwin.cc | 7 ++++--- src/scintillaeditor.cpp | 4 +++- src/scintillaeditor.h | 2 ++ 6 files changed, 13 insertions(+), 30 deletions(-) diff --git a/openscad.pro b/openscad.pro index 1f9d12e7..746b3ca2 100644 --- a/openscad.pro +++ b/openscad.pro @@ -84,6 +84,8 @@ else { TARGET = openscad } +LIBS += -lqscintilla2 + win* { RC_FILE = openscad_win32.rc QTPLUGIN += qtaccessiblewidgets diff --git a/setenv_mac-qt4.sh b/setenv_mac-qt4.sh index 1616245d..22ccbb69 100644 --- a/setenv_mac-qt4.sh +++ b/setenv_mac-qt4.sh @@ -1,4 +1,4 @@ -export OPENSCAD_LIBRARIES=$PWD/../libraries/install +export OPENSCAD_LIBRARIES=$PWD/../libraries/install-qt4 export DYLD_LIBRARY_PATH=$OPENSCAD_LIBRARIES/lib export DYLD_FRAMEWORK_PATH=$OPENSCAD_LIBRARIES/lib export QMAKESPEC=unsupported/macx-clang diff --git a/src/MainWindow.ui b/src/MainWindow.ui index cdcf6fb7..7a6c7d8b 100644 --- a/src/MainWindow.ui +++ b/src/MainWindow.ui @@ -120,7 +120,7 @@ 0 0 936 - 34 + 22 @@ -360,25 +360,6 @@ - - - - - 100 - 100 - - - - - Monaco - 8 - - - - Qt::WheelFocus - - - @@ -969,11 +950,6 @@
QGLView.h
1 - - Editor - QWidget -
editor.h
-
diff --git a/src/mainwin.cc b/src/mainwin.cc index 85bdebe8..deb4b828 100644 --- a/src/mainwin.cc +++ b/src/mainwin.cc @@ -167,11 +167,12 @@ MainWindow::MainWindow(const QString &filename) : root_inst("group"), font_list_dialog(NULL), tempFile(NULL), progresswidget(NULL) { setupUi(this); - legacy = new LegacyEditor(editorDockContents); - editor = legacy; +// legacy = new LegacyEditor(editorDockContents); +// editor = legacy; scintilla = new ScintillaEditor(editorDockContents); - //editor = scintilla; + editor = scintilla; + editorDockContents->layout()->addWidget(editor); editor->setMinimumSize(editorDockContents->sizeHint()); setCorner(Qt::TopLeftCorner, Qt::LeftDockWidgetArea); diff --git a/src/scintillaeditor.cpp b/src/scintillaeditor.cpp index 9dcc38bb..ee92bef6 100644 --- a/src/scintillaeditor.cpp +++ b/src/scintillaeditor.cpp @@ -2,6 +2,8 @@ ScintillaEditor::ScintillaEditor(QWidget *parent) : Editor(parent) { - qsci = new QsciScintilla; + layout = new QVBoxLayout(this); + qsci = new QsciScintilla(this);; + layout->addWidget(qsci); qsci->setMarginLineNumbers(10,true); } diff --git a/src/scintillaeditor.h b/src/scintillaeditor.h index 6090fa6c..36c3ef19 100644 --- a/src/scintillaeditor.h +++ b/src/scintillaeditor.h @@ -4,6 +4,7 @@ #include #include #include +#include #include "editor.h" @@ -12,6 +13,7 @@ class ScintillaEditor : public Editor public: ScintillaEditor(QWidget *parent); QsciScintilla *qsci; + QVBoxLayout *layout; }; #endif // SCINTILLAEDITOR_H