mirror of https://github.com/vitalif/openscad
Merge branch 'master' of github.com:openscad/openscad
Conflicts: scripts/linux-build-dependencies.shfelipesanches-svg
commit
f1634d545d
20
README.md
20
README.md
|
@ -97,6 +97,20 @@ Follow the instructions for the platform you're compiling on below.
|
|||
* [Bison (2.4)](http://www.gnu.org/software/bison/)
|
||||
* [Flex (2.5.35)](http://flex.sourceforge.net/)
|
||||
|
||||
### Getting the source code
|
||||
|
||||
Install git (http://git-scm.com/) onto your system. Then run a clone:
|
||||
|
||||
git clone git://github.com/openscad/openscad.git
|
||||
|
||||
This will download the latest sources into a directory named 'openscad'.
|
||||
|
||||
To pull the MCAD library (http://reprap.org/wiki/MCAD), do the following:
|
||||
|
||||
cd openscad
|
||||
git submodule init
|
||||
git submodule update
|
||||
|
||||
### Building for Mac OS X
|
||||
|
||||
First, make sure that you have XCode installed to get GCC. Then after
|
||||
|
@ -124,9 +138,9 @@ Then after you've cloned this git repository, use a package manager to
|
|||
download packages for the dependency libraries listed above. Convenience
|
||||
scripts are provided for some popular systems:
|
||||
|
||||
Ubuntu, Debian: ./scripts/ubuntu-build-dependencies.sh
|
||||
OpenSUSE: ./scripts/opensuse-build-dependencies.sh
|
||||
Fedora, Redhat: ./scripts/fedora-build-dependencies.sh
|
||||
Ubuntu, Debian: ./scripts/ubuntu-build-dependencies.sh
|
||||
OpenSUSE: ./scripts/opensuse-build-dependencies.sh
|
||||
Fedora: ./scripts/fedora-build-dependencies.sh
|
||||
|
||||
Check your library versions to make sure they meet the minimum
|
||||
requirements listed above. After that follow the Compilation
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
#!/usr/local/bin/bash -e
|
||||
|
||||
echo "Tested on FreeBSD 9. Please see README.md for info on older systems."
|
||||
|
||||
if [ "`pkg_info | grep -i cgal `" ]; then
|
||||
echo Stopping. Please remove any CGAL packages you have installed and restart
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ "`pkg_info | grep -i opencsg`" ]; then
|
||||
echo Stopping. Please remove any OpenCSG packages you have installed and restart
|
||||
exit
|
||||
fi
|
||||
|
||||
OPENSCADDIR=$PWD
|
||||
if [ ! -f $OPENSCADDIR/openscad.pro ]; then
|
||||
echo "Must be run from the OpenSCAD source root directory"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
. ./scripts/setenv-freebsdbuild.sh
|
||||
|
||||
pkg_add -r bison boost-libs cmake git bash eigen2 flex gmake gmp mpfr
|
||||
pkg_add -r xorg libGLU libXmu libXi xorg-vfbserver glew
|
||||
pkg_add -r qt4-corelib qt4-gui qt4-moc qt4-opengl qt4-qmake qt4-rcc qt4-uic
|
||||
|
||||
BASEDIR=/usr/local ./scripts/linux-build-dependencies.sh cgal-use-sys-libs
|
||||
BASEDIR=/usr/local ./scripts/linux-build-dependencies.sh opencsg
|
|
@ -207,6 +207,10 @@ build_opencsg()
|
|||
fi
|
||||
fi
|
||||
|
||||
if [ `uname | grep FreeBSD` ]; then
|
||||
sed -ibak s/X11R6/local/g src/Makefile
|
||||
fi
|
||||
|
||||
if [ "`command -v qmake-qt4`" ]; then
|
||||
OPENCSG_QMAKE=qmake-qt4
|
||||
else
|
||||
|
@ -225,6 +229,7 @@ build_opencsg()
|
|||
fi
|
||||
|
||||
make
|
||||
|
||||
cp -av lib/* $DEPLOYDIR/lib
|
||||
cp -av include/* $DEPLOYDIR/include
|
||||
cd $OPENSCADDIR
|
||||
|
@ -267,7 +272,7 @@ if [ ! $NUMCPU ]; then
|
|||
fi
|
||||
|
||||
if [ ! -d $BASEDIR/bin ]; then
|
||||
mkdir --parents $BASEDIR/bin
|
||||
mkdir -p $BASEDIR/bin
|
||||
fi
|
||||
|
||||
echo "Using basedir:" $BASEDIR
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
# run with '. ./scripts/setenv-freebsdbuild.sh'
|
||||
|
||||
# use in conjuction with freebsd-build-dependencies.sh
|
||||
|
||||
QMAKESPEC=freebsd-g++
|
||||
QTDIR=/usr/local/share/qt4
|
|
@ -67,6 +67,9 @@ Preferences::Preferences(QWidget *parent) : QMainWindow(parent)
|
|||
connect(this->fontSize, SIGNAL(currentIndexChanged(const QString&)),
|
||||
this, SLOT(on_fontSize_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;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "editor.h"
|
||||
#include "Preferences.h"
|
||||
|
||||
#ifndef _QCODE_EDIT_
|
||||
void Editor::indentSelection()
|
||||
|
@ -70,4 +71,40 @@ void Editor::uncommentSelection()
|
|||
cursor.setPosition(p2, QTextCursor::KeepAnchor);
|
||||
setTextCursor(cursor);
|
||||
}
|
||||
|
||||
void Editor::zoomIn()
|
||||
{
|
||||
// See also QT's implementation in QEditor.cpp
|
||||
QSettings settings;
|
||||
QFont tmp_font = this->font() ;
|
||||
if ( font().pointSize() >= 1 )
|
||||
tmp_font.setPointSize( 1 + font().pointSize() );
|
||||
else
|
||||
tmp_font.setPointSize( 1 );
|
||||
settings.setValue("editor/fontsize", tmp_font.pointSize());
|
||||
this->setFont( tmp_font );
|
||||
}
|
||||
|
||||
void Editor::zoomOut()
|
||||
{
|
||||
QSettings settings;
|
||||
QFont tmp_font = this->font();
|
||||
if ( font().pointSize() >= 2 )
|
||||
tmp_font.setPointSize( -1 + font().pointSize() );
|
||||
else
|
||||
tmp_font.setPointSize( 1 );
|
||||
settings.setValue("editor/fontsize", tmp_font.pointSize());
|
||||
this->setFont( tmp_font );
|
||||
}
|
||||
|
||||
void Editor::wheelEvent ( QWheelEvent * event )
|
||||
{
|
||||
if (event->modifiers() == Qt::ControlModifier) {
|
||||
if (event->delta() > 0 )
|
||||
zoomIn();
|
||||
else if (event->delta() < 0 )
|
||||
zoomOut();
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QWidget>
|
||||
#include <QWheelEvent>
|
||||
|
||||
#ifdef _QCODE_EDIT_
|
||||
#include <qeditor.h>
|
||||
|
@ -24,6 +25,8 @@ public slots:
|
|||
#else
|
||||
Editor(QWidget *parent) : QTextEdit(parent) { setAcceptRichText(false); }
|
||||
public slots:
|
||||
void zoomIn();
|
||||
void zoomOut();
|
||||
void setLineWrapping(bool on) { if(on) setWordWrapMode(QTextOption::WrapAnywhere); }
|
||||
void setContentModified(bool y) { document()->setModified(y); }
|
||||
bool isContentModified() { return document()->isModified(); }
|
||||
|
@ -31,5 +34,7 @@ public slots:
|
|||
void unindentSelection();
|
||||
void commentSelection();
|
||||
void uncommentSelection();
|
||||
private:
|
||||
void wheelEvent ( QWheelEvent * event );
|
||||
#endif
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue