Skip to content

Commit

Permalink
Quick and dirty fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
kintel authored and t-paul committed Jun 7, 2014
1 parent 59a71b7 commit 22e884d
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 30 deletions.
2 changes: 2 additions & 0 deletions openscad.pro
Expand Up @@ -84,6 +84,8 @@ else {
TARGET = openscad
}

LIBS += -lqscintilla2

win* {
RC_FILE = openscad_win32.rc
QTPLUGIN += qtaccessiblewidgets
Expand Down
2 changes: 1 addition & 1 deletion 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
Expand Down
26 changes: 1 addition & 25 deletions src/MainWindow.ui
Expand Up @@ -120,7 +120,7 @@
<x>0</x>
<y>0</y>
<width>936</width>
<height>34</height>
<height>22</height>
</rect>
</property>
<widget class="QMenu" name="menu_File">
Expand Down Expand Up @@ -360,25 +360,6 @@
</layout>
</widget>
</item>
<item>
<widget class="Editor" name="editor" native="true">
<property name="minimumSize">
<size>
<width>100</width>
<height>100</height>
</size>
</property>
<property name="font">
<font>
<family>Monaco</family>
<pointsize>8</pointsize>
</font>
</property>
<property name="focusPolicy">
<enum>Qt::WheelFocus</enum>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
Expand Down Expand Up @@ -969,11 +950,6 @@
<header>QGLView.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>Editor</class>
<extends>QWidget</extends>
<header>editor.h</header>
</customwidget>
</customwidgets>
<resources>
<include location="../openscad.qrc"/>
Expand Down
7 changes: 4 additions & 3 deletions src/mainwin.cc
Expand Up @@ -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);
Expand Down
4 changes: 3 additions & 1 deletion src/scintillaeditor.cpp
Expand Up @@ -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);
}
2 changes: 2 additions & 0 deletions src/scintillaeditor.h
Expand Up @@ -4,6 +4,7 @@
#include <QObject>
#include <QWidget>
#include <Qsci/qsciscintilla.h>
#include <QVBoxLayout>

#include "editor.h"

Expand All @@ -12,6 +13,7 @@ class ScintillaEditor : public Editor
public:
ScintillaEditor(QWidget *parent);
QsciScintilla *qsci;
QVBoxLayout *layout;
};

#endif // SCINTILLAEDITOR_H

0 comments on commit 22e884d

Please sign in to comment.