Skip to content
Snippets Groups Projects
Commit e52c835e authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

*** empty log message ***

parent 4d6f33e4
No related branches found
No related tags found
No related merge requests found
# Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle
#
# See the LICENSE.txt file for license information. Please report all
# bugs and problems to <gmsh@geuz.org>.
include variables
GMSH_MAJOR_VERSION = 2
GMSH_MINOR_VERSION = 4
GMSH_PATCH_VERSION = 0
GMSH_EXTRA_VERSION = ""
GMSH_VERSION =\
${GMSH_MAJOR_VERSION}.${GMSH_MINOR_VERSION}.${GMSH_PATCH_VERSION}${GMSH_EXTRA_VERSION}
GMSH_SHORT_LICENSE = "GNU General Public License"
GMSH_VERSION_FILE = Common/GmshVersion.h
GMSH_DATE = `date "+%Y%m%d"`
GMSH_API =\
Geo/GModel.h Geo/GEntity.h\
Geo/GPoint.h Geo/GVertex.h Geo/GEdge.h Geo/GFace.h Geo/GRegion.h\
Geo/GEdgeLoop.h Geo/GEdgeCompound.h Geo/GFaceCompound.h Geo/GRegionCompound.h\
Geo/MVertex.h Geo/MEdge.h Geo/MFace.h Geo/MElement.h Geo/MPoint.h Geo/MLine.h\
Geo/MTriangle.h Geo/MQuadrangle.h Geo/MTetrahedron.h Geo/MHexahedron.h\
Geo/MPrism.h Geo/MPyramid.h Geo/MElementCut.h\
Geo/discreteVertex.h Geo/discreteEdge.h Geo/discreteFace.h Geo/discreteRegion.h\
Geo/SPoint2.h Geo/SPoint3.h Geo/SVector3.h Geo/SBoundingBox3d.h Geo/Pair.h\
Geo/Range.h Geo/SOrientedBoundingBox.h Geo/CellComplex.h Geo/ChainComplex.h\
contrib/kbipack/gmp_normal_form.h contrib/kbipack/gmp_matrix.h contrib/kbipack/gmp_blas.h\
Numeric/Gauss.h Numeric/FunctionSpace.h Numeric/GmshMatrix.h\
Numeric/gmshAssembler.h Numeric/gmshTermOfFormulation.h Numeric/gmshLaplace.h\
Numeric/gmshElasticity.h Numeric/gmshLinearSystem.h Numeric/gmshLinearSystemGmm.h\
Numeric/gmshLinearSystemFull.h Numeric/gmshFunction.h\
Post/PView.h Post/PViewData.h Plugin/PluginManager.h\
Graphics/drawContext.h\
Common/VertexArray.h Common/GmshMessage.h\
Common/Gmsh.h Common/GmshConfig.h Common/GmshDefines.h Common/GmshVersion.h
# Main building rules
all: link
link: compile
${LINKER} ${OPTIM} ${DASH}o bin/gmsh${EXEEXT} ${GMSH_LIBS}
compile: variables initialtag
ifneq (${UNAME},WIN32MSVC)
@for i in ${GMSH_DIRS}; do (cd $$i && ${MAKE}); done
else
for %%i in (${GMSH_DIRS}) do ${MAKE} -C %%i
endif
install: variables
mkdir -p ${bindir}
cp -f bin/gmsh${EXEEXT} ${bindir}
chmod 755 ${bindir}/gmsh${EXEEXT}
mkdir -p ${mandir}/man1
cp -f doc/gmsh.1 ${mandir}/man1
uninstall:
rm -f ${bindir}/gmsh${EXEEXT}
rm -f ${mandir}/man1/gmsh.1
tag:
ifneq (${UNAME},WIN32MSVC)
echo "#define GMSH_MAJOR_VERSION ${GMSH_MAJOR_VERSION}" > ${GMSH_VERSION_FILE}
echo "#define GMSH_MINOR_VERSION ${GMSH_MINOR_VERSION}" >> ${GMSH_VERSION_FILE}
echo "#define GMSH_PATCH_VERSION ${GMSH_PATCH_VERSION}" >> ${GMSH_VERSION_FILE}
echo "#define GMSH_EXTRA_VERSION \"${GMSH_EXTRA_VERSION}\"" >> ${GMSH_VERSION_FILE}
echo "#define GMSH_VERSION \"${GMSH_VERSION}\"" >> ${GMSH_VERSION_FILE}
echo "#define GMSH_DATE \"`date`\"" >> ${GMSH_VERSION_FILE}
echo "#define GMSH_HOST \"${HOSTNAME}\"" >> ${GMSH_VERSION_FILE}
echo "#define GMSH_PACKAGER \"`whoami`\"" >> ${GMSH_VERSION_FILE}
echo "#define GMSH_OS \"${UNAME}\"" >> ${GMSH_VERSION_FILE}
echo "#define GMSH_SHORT_LICENSE \"${GMSH_SHORT_LICENSE}\"" >> ${GMSH_VERSION_FILE}
else
echo #define GMSH_MAJOR_VERSION ${GMSH_MAJOR_VERSION} > ${GMSH_VERSION_FILE}
echo #define GMSH_MINOR_VERSION ${GMSH_MINOR_VERSION} >> ${GMSH_VERSION_FILE}
echo #define GMSH_PATCH_VERSION ${GMSH_PATCH_VERSION} >> ${GMSH_VERSION_FILE}
echo #define GMSH_EXTRA_VERSION "${GMSH_EXTRA_VERSION}" >> ${GMSH_VERSION_FILE}
echo #define GMSH_VERSION "${GMSH_VERSION}" >> ${GMSH_VERSION_FILE}
echo #define GMSH_DATE "" >> ${GMSH_VERSION_FILE}
echo #define GMSH_HOST "${HOSTNAME}" >> ${GMSH_VERSION_FILE}
echo #define GMSH_PACKAGER "" >> ${GMSH_VERSION_FILE}
echo #define GMSH_OS "${UNAME}" >> ${GMSH_VERSION_FILE}
echo #define GMSH_SHORT_LICENSE ${GMSH_SHORT_LICENSE} >> ${GMSH_VERSION_FILE}
endif
# Rules to build the Gmsh library
.PHONY: lib
lib: variables initialtag
ifneq (${UNAME},WIN32MSVC)
@for i in ${GMSH_DIRS}; do (cd $$i && ${MAKE} cpobj); done
${AR} ${ARFLAGS}lib/libGmsh${LIBEXT} lib/*${OBJEXT}
${RANLIB} lib/libGmsh${LIBEXT}
rm -f lib/*${OBJEXT}
else
for %%i in (${GMSH_DIRS}); do ${MAKE} -C %%i
${AR} ${ARFLAGS}bin\libGmsh${LIBEXT} lib\*${LIBEXT}
erase lib\*${LIBEXT}
move bin\libGmsh${LIBEXT} "lib"
endif
install-lib: lib
ifneq (${UNAME},WIN32MSVC)
mkdir -p ${includedir}/gmsh
rm -f ${includedir}/gmsh/*
cp -f ${GMSH_API} ${includedir}/gmsh
mkdir -p ${libdir}
cp -f lib/libGmsh${LIBEXT} ${libdir}/libGmsh${LIBSUFFIX}${LIBEXT}
else
if not exist ${includedir}\gmsh mkdir ${includedir}\gmsh
if not exist ${libdir} mkdir ${libdir}
erase /q ${includedir}\gmsh\*.h
for %%i in (${subst /,\,${GMSH_API}}) do copy %%i ${includedir}\gmsh
copy /y lib\libGmsh${LIBEXT} ${libdir}\libGmsh${LIBSUFFIX}${LIBEXT}
endif
uninstall-lib:
rm -rf ${includedir}/gmsh
rm -rf ${libdir}/libGmsh${LIBSUFFIX}${LIBEXT}
# Macintosh-specific rules
link-mac-universal: compile
${LINKER} -arch i386 ${OPTIM} -o bin/gmsh_i386 ${GMSH_LIBS}
${LINKER} -arch ppc ${OPTIM} -o bin/gmsh_ppc ${GMSH_LIBS}
lipo -create bin/gmsh_i386 bin/gmsh_ppc -output bin/gmsh
rm -f bin/gmsh_i386 bin/gmsh_ppc
install-mac: variables package-mac
cp -rf gmsh-${GMSH_VERSION}/Gmsh.app /Applications
rm -rf gmsh-${GMSH_VERSION} gmsh-${GMSH_VERSION}-MacOSX.tgz
uninstall-mac:
rm -rf /Applications/Gmsh.app
framework: lib
rm -rf Gmsh.framework
mkdir -p Gmsh.framework
mkdir -p Gmsh.framework/Versions
mkdir -p Gmsh.framework/Versions/A
mkdir -p Gmsh.framework/Versions/A/Headers
mkdir -p Gmsh.framework/Versions/A/Resources
cp lib/libGmsh${LIBEXT} Gmsh.framework/Versions/A/Gmsh
cp ${GMSH_API} Gmsh.framework/Versions/A/Headers/
sed -e "s/GMSH_VERSION/${GMSH_VERSION}/g" utils/misc/Info_framework.plist\
> Gmsh.framework/Versions/A/Resources/Info.plist
cd Gmsh.framework/Versions && ln -s A Current
cd Gmsh.framework && ln -s Versions/Current/Gmsh
cd Gmsh.framework && ln -s Versions/Current/Headers
cd Gmsh.framework && ln -s Versions/Current/Resources
# Utilities
variables: configure
@echo "********************************************************************"
@echo "Please configure Gmsh by running ./configure"
@echo "For help, type ./configure --help"
@echo "********************************************************************"
@exit 1
.PHONY: parser
parser:
cd Parser && ${MAKE} parser
.PHONY: utils
utils:
cd utils/converters/autocad && ${MAKE}
cd utils/misc && ${MAKE}
.PHONY: doc
doc:
cd doc/texinfo && ${MAKE} all
cd doc && tar zcf ../gmsh-${GMSH_VERSION}-doc.tgz\
FAQ.txt CREDITS.txt VERSIONS.txt README.win32 gmsh.1\
texinfo/gmsh.pdf texinfo/gmsh.txt\
texinfo/*.html texinfo/gmsh-info.tgz
doc-info:
cd doc/texinfo && ${MAKE} info
purge:
rm -f `find . -name "*~" -o -name "*~~" -o -name ".gmsh-errors"\
-o -name "\#*" -o -name ".\#*" -o -name ".DS_Store"\
-o -name "gmon.out" -o -name ".gdb_history" -o -name "debug?.pos"\
-o -name "*.bak"`
clean:
ifneq (${UNAME},WIN32MSVC)
for i in doc lib ${GMSH_DIRS}; do (cd $$i && ${MAKE} clean); done
rm -f ${GMSH_VERSION_FILE}
else
for %%i in (doc lib ${GMSH_DIRS}) do ${MAKE} -C %%i clean
erase Common\GmshVersion.h
endif
clean-fm:
rm -f Geo/fourier*.o Geo/GModelIO_Fourier.o Fltk/GUI_Projection.o
depend: initialtag
mv -f Common/GmshConfig.h .
cp -f utils/misc/GmshConfig.depend Common/GmshConfig.h
for i in ${GMSH_DIRS}; do (cd $$i && ${MAKE} depend); done
mv -f GmshConfig.h Common/
nodepend:
for i in ${GMSH_DIRS} ; do\
(cd $$i && (sed '/^# DO NOT DELETE THIS LINE/q' Makefile) > Makefile.new\
&& cp Makefile Makefile.bak\
&& cp Makefile.new Makefile\
&& rm -f Makefile.new);\
done
initialtag:
ifneq (${UNAME},WIN32MSVC)
@if [ ! -r ${GMSH_VERSION_FILE} ]; then ${MAKE} tag ; fi
else
${MAKE} tag
endif
tags:
gtags
htags
etags:
etags `find . \( -name "*.cpp" -o -name "*.c" -o -name "*.h" -o\
-name "*.y" -o -name "*.l" \)`
# Rules to package the sources
source-tree: purge
rm -rf gmsh-${GMSH_VERSION}
tar zcf gmsh.tgz --exclude "*.o" --exclude "*.a" --exclude "gmsh"\
--exclude "variables" --exclude "config.log" --exclude "config.status"\
--exclude "autom4*" --exclude "Makefile.distrib" --exclude "Makefile.bak"\
--exclude "benchmarks" --exclude "zzz_*" --exclude "HTML"\
--exclude "*TAGS*" --exclude "GSYMS" --exclude "GPATH" --exclude "CVS"\
*
mkdir gmsh-${GMSH_VERSION}
cd gmsh-${GMSH_VERSION} && tar zxf ../gmsh.tgz
rm -f gmsh.tgz
source: source-tree
cd gmsh-${GMSH_VERSION} && rm -rf ${GMSH_VERSION_FILE}\
Common/GmshConfig.h contrib/Tetgen*/*.{cxx,h}\
utils/nightly utils/misc/variables.i*
tar zcf gmsh-${GMSH_VERSION}-source.tgz gmsh-${GMSH_VERSION}
# Rules to package the binaries
package-unix:
rm -rf gmsh-${GMSH_VERSION}
mkdir gmsh-${GMSH_VERSION}
cp bin/gmsh gmsh-${GMSH_VERSION}
strip gmsh-${GMSH_VERSION}/gmsh
cp doc/gmsh.1 doc/LICENSE.txt doc/VERSIONS.txt doc/FAQ.txt doc/CREDITS.txt\
gmsh-${GMSH_VERSION}
cp -R tutorial gmsh-${GMSH_VERSION}
cp -R demos gmsh-${GMSH_VERSION}
rm -rf gmsh-${GMSH_VERSION}/*/CVS
rm -f gmsh-${GMSH_VERSION}/tutorial/t*.msh
rm -f gmsh-${GMSH_VERSION}/*/*~
tar cf gmsh-${GMSH_VERSION}-${UNAME}.tar gmsh-${GMSH_VERSION}
gzip gmsh-${GMSH_VERSION}-${UNAME}.tar
mv gmsh-${GMSH_VERSION}-${UNAME}.tar.gz gmsh-${GMSH_VERSION}-${UNAME}.tgz
package-win:
rm -rf gmsh-${GMSH_VERSION}
mkdir gmsh-${GMSH_VERSION}
cp bin/gmsh.exe gmsh-${GMSH_VERSION}
strip gmsh-${GMSH_VERSION}/gmsh.exe
cp doc/README.win32 gmsh-${GMSH_VERSION}/README.txt
cp doc/LICENSE.txt doc/VERSIONS.txt doc/FAQ.txt doc/CREDITS.txt\
gmsh-${GMSH_VERSION}
cp -R tutorial gmsh-${GMSH_VERSION}
cp -R demos gmsh-${GMSH_VERSION}
rm -rf gmsh-${GMSH_VERSION}/*/CVS
rm -f gmsh-${GMSH_VERSION}/tutorial/t*.msh
rm -f gmsh-${GMSH_VERSION}/*/*~
unix2dos gmsh-${GMSH_VERSION}/*.txt
unix2dos gmsh-${GMSH_VERSION}/tutorial/*
unix2dos gmsh-${GMSH_VERSION}/demos/*
cd gmsh-${GMSH_VERSION} && zip -r gmsh-${GMSH_VERSION}-Windows.zip *
mv gmsh-${GMSH_VERSION}/gmsh-${GMSH_VERSION}-Windows.zip .
package-mac:
rm -rf gmsh-${GMSH_VERSION}
mkdir gmsh-${GMSH_VERSION}
mkdir gmsh-${GMSH_VERSION}/Gmsh.app
mkdir gmsh-${GMSH_VERSION}/Gmsh.app/Contents
mkdir gmsh-${GMSH_VERSION}/Gmsh.app/Contents/Resources
mkdir gmsh-${GMSH_VERSION}/Gmsh.app/Contents/MacOS
echo "APPLGMSH" > gmsh-${GMSH_VERSION}/Gmsh.app/Contents/PkgInfo
sed -e "s/GMSH_VERSION/Gmsh ${GMSH_VERSION}/g" utils/misc/Info.plist\
> gmsh-${GMSH_VERSION}/Gmsh.app/Contents/Info.plist
cp bin/gmsh gmsh-${GMSH_VERSION}/Gmsh.app/Contents/MacOS/Gmsh
strip gmsh-${GMSH_VERSION}/Gmsh.app/Contents/MacOS/Gmsh
cp Fltk/MacIcons.icns gmsh-${GMSH_VERSION}/Gmsh.app/Contents/Resources/Gmsh.icns
cp Fltk/MacIconsGeo.icns gmsh-${GMSH_VERSION}/Gmsh.app/Contents/Resources/GmshGeo.icns
cp Fltk/MacIconsMsh.icns gmsh-${GMSH_VERSION}/Gmsh.app/Contents/Resources/GmshMsh.icns
cp Fltk/MacIconsPos.icns gmsh-${GMSH_VERSION}/Gmsh.app/Contents/Resources/GmshPos.icns
cp -R tutorial demos gmsh-${GMSH_VERSION}
cp doc/LICENSE.txt doc/VERSIONS.txt doc/FAQ.txt doc/CREDITS.txt\
gmsh-${GMSH_VERSION}
rm -rf gmsh-${GMSH_VERSION}/*/CVS\
gmsh-${GMSH_VERSION}/tutorial/t*.msh\
gmsh-${GMSH_VERSION}/*/*~
tar zcf gmsh-${GMSH_VERSION}-MacOSX.tgz gmsh-${GMSH_VERSION}
package-rpm:
tar zcf /usr/src/rpm/SOURCES/gmsh-${GMSH_VERSION}.tar.gz .
rpmbuild -bb --define 'gmshversion ${GMSH_VERSION}' utils/misc/gmsh.spec
mv /usr/src/rpm/RPMS/i386/gmsh-${GMSH_VERSION}-?.i386.rpm .
mv /usr/src/rpm/BUILD/gmsh-${GMSH_VERSION}/gmsh-${GMSH_VERSION}-${UNAME}.tgz .
rm -f /usr/src/rpm/SOURCES/gmsh-${GMSH_VERSION}.tar.gz
rm -rf /usr/src/rpm/BUILD/gmsh-${GMSH_VERSION}
# Rules to distribute official releases
distrib-pre:
mv -f Makefile Makefile.distrib
sed -e "s/^GMSH_EXTRA_VERSION.*/GMSH_EXTRA_VERSION =/g"\
Makefile.distrib > Makefile
make tag
distrib-pre-cvs:
mv -f Makefile Makefile.distrib
sed -e "s/^GMSH_EXTRA_VERSION.*/GMSH_EXTRA_VERSION = \"-cvs-${GMSH_DATE}\"/g"\
Makefile.distrib > Makefile
make tag
distrib-post:
mv -f Makefile.distrib Makefile
rm -f ${GMSH_VERSION_FILE}
distrib-unix:
make distrib-pre
make link
make package-unix
make distrib-post
ldd bin/gmsh
distrib-unix-nightly:
make distrib-pre-cvs
make link
make package-unix
make distrib-post
distrib-win:
make distrib-pre
make link
make package-win
make distrib-post
objdump -p bin/gmsh.exe | grep DLL
distrib-win-nightly:
make distrib-pre-cvs
make link
make package-win
make distrib-post
distrib-mac:
make distrib-pre
make link-mac-universal
make package-mac
make distrib-post
otool -L bin/gmsh
distrib-mac-nightly:
make distrib-pre-cvs
make link-mac-universal
make package-mac
make distrib-post
distrib-source:
make distrib-pre
make source
make distrib-post
distrib-source-nightly:
make distrib-pre-cvs
make source
make distrib-post
This is Gmsh, an automatic three-dimensional finite element mesh
generator with built-in pre- and post-processing facilities.
To install Gmsh, type
./configure
make
make install
This requires FLTK 1.1.7 or above, configured with OpenGL support.
FLTK is freely available from http://www.fltk.org. To install a
non-graphical version of Gmsh (that does not require FLTK), type
./configure --disable-gui
make
make install
For a description of all other configuration options, type
./configure --help
To build Gmsh with Microsoft Visual C++, follow the intructions in
doc/README.msvc.
Gmsh is distributed under the terms of the GNU General Public License,
with an exception to allow for easier linking with external mesh
generators. See doc/LICENSE.txt and doc/CREDITS.txt for more
information.
See the doc/ and tutorial/ directories for documentation. The
reference manual is located in doc/texinfo/.
See the demos/ directory for additional examples.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
project(qtgmsh)
cmake_minimum_required(VERSION 2.4.0)
find_package(Qt4 REQUIRED) # find and setup Qt4 for this project
set(QT_USE_QTOPENGL TRUE)
include(${QT_USE_FILE})
set(qtgmsh_SRCS
glwidget.cpp
main.cpp
window.cpp
)
set(qtgmsh_MOC_HDRS
glwidget.h
window.h
)
qt4_wrap_cpp(qtgmsh_MOC_SRCS ${qtgmsh_MOC_HDRS})
add_executable(qtgmsh ${qtgmsh_SRCS} ${qtgmsh_MOC_SRCS})
include_directories(../include)
find_library(GMSH_LIBRARIES Gmsh ../lib)
target_link_libraries(qtgmsh ${QT_LIBRARIES} ${GMSH_LIBRARIES} -llapack -lblas)
#install(TARGETS qtproject DESTINATION bin)
# tell cmake to process CMakeLists.txt in that subdirectory
# add_subdirectory(src)
#include <QtGui>
#include <QtOpenGL>
#include <math.h>
#include "glwidget.h"
drawContext *GLWidget::_ctx = 0;
// Gmsh redefinitions (reimplement stuff in Fltk/Draw.h)
void Draw(){ GLWidget::_ctx->draw3d(); GLWidget::_ctx->draw2d(); }
void DrawCurrentOpenglWindow(bool make_current){}
void DrawPlugin(void (*draw)(void *context)){}
int GetFontIndex(const char *fontname){ return 0; }
int GetFontEnum(int index){ return 0; }
const char *GetFontName(int index){ return "Helvetica"; }
int GetFontAlign(const char *alignstr){ return 0; }
int GetFontSize(){ return 18; }
void SetFont(int fontid, int fontsize){}
double GetStringWidth(const char *str){ return 0; }
int GetStringHeight(){ return 18; }
int GetStringDescent(){ return 6; }
void DrawString(const char *str){ }
GLWidget::GLWidget(QWidget *parent)
: QGLWidget(parent)
{
_ctx = new drawContext();
}
GLWidget::~GLWidget()
{
makeCurrent();
delete _ctx;
}
QSize GLWidget::minimumSizeHint() const
{
return QSize(50, 50);
}
QSize GLWidget::sizeHint() const
{
return QSize(400, 400);
}
void GLWidget::setXRotation(int angle)
{
emit xRotationChanged(angle);
updateGL();
}
void GLWidget::initializeGL()
{
}
void GLWidget::paintGL()
{
glViewport(_ctx->viewport[0], _ctx->viewport[1],
_ctx->viewport[2], _ctx->viewport[3]);
glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
Draw();
}
void GLWidget::resizeGL(int width, int height)
{
_ctx->viewport[2] = width;
_ctx->viewport[3] = height;
}
void GLWidget::mousePressEvent(QMouseEvent *event)
{
}
void GLWidget::mouseMoveEvent(QMouseEvent *event)
{
/*
int dx = event->x() - lastPos.x();
int dy = event->y() - lastPos.y();
if (event->buttons() & Qt::LeftButton) {
setXRotation(xRot + 8 * dy);
setYRotation(yRot + 8 * dx);
} else if (event->buttons() & Qt::RightButton) {
setXRotation(xRot + 8 * dy);
setZRotation(zRot + 8 * dx);
}
lastPos = event->pos();
*/
}
#ifndef GLWIDGET_H
#define GLWIDGET_H
#include <QGLWidget>
#include <gmsh/Gmsh.h>
#include <gmsh/drawContext.h>
class GLWidget : public QGLWidget
{
Q_OBJECT
private:
public:
static drawContext *_ctx;
GLWidget(QWidget *parent = 0);
~GLWidget();
QSize minimumSizeHint() const;
QSize sizeHint() const;
public slots:
void setXRotation(int angle);
signals:
void xRotationChanged(int angle);
protected:
void initializeGL();
void paintGL();
void resizeGL(int width, int height);
void mousePressEvent(QMouseEvent *event);
void mouseMoveEvent(QMouseEvent *event);
};
#endif
#include <QApplication>
#include <gmsh/Gmsh.h>
#include "window.h"
int main(int argc, char *argv[])
{
GmshInitialize(argc, argv);
GmshSetOption("General", "Terminal", 1.);
for(int i = 1; i < argc; i++) GmshMergeFile(argv[i]);
QApplication app(argc, argv);
Window window;
window.show();
return app.exec();
}
#include <QtGui>
#include "glwidget.h"
#include "window.h"
Window::Window()
{
glWidget = new GLWidget;
xSlider = new QSlider(Qt::Vertical);
xSlider->setRange(0, 360 * 16);
xSlider->setSingleStep(16);
xSlider->setPageStep(15 * 16);
xSlider->setTickInterval(15 * 16);
xSlider->setTickPosition(QSlider::TicksRight);
xSlider->setValue(15 * 16);
connect(xSlider, SIGNAL(valueChanged(int)), glWidget, SLOT(setXRotation(int)));
connect(glWidget, SIGNAL(xRotationChanged(int)), xSlider, SLOT(setValue(int)));
QHBoxLayout *mainLayout = new QHBoxLayout;
mainLayout->addWidget(glWidget);
mainLayout->addWidget(xSlider);
setLayout(mainLayout);
setWindowTitle(tr("QtGmsh"));
}
#ifndef WINDOW_H
#define WINDOW_H
#include <QWidget>
class QSlider;
class GLWidget;
class Window : public QWidget
{
Q_OBJECT
private:
GLWidget *glWidget;
QSlider *xSlider;
public:
Window();
};
#endif
# Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle
#
# See the LICENSE.txt file for license information. Please report all
# bugs and problems to <gmsh@geuz.org>.
# OS and host
UNAME=@UNAME@
HOSTNAME=@HOSTNAME@
# The names of the C and C++ compilers
CC=@CC@
CXX=@CXX@
# If you need to link to dynamic libraries installed in non-standard
# locations and are using the GNU linker, you may want to add
# '-Wl,--rpath,/path/to/dynamic/library' to the 'LINKER' variable
# below. Alternatively, you could edit the 'LD_LIBARY_PATH'
# environement variable or use the 'ldconfig' program.
LINKER=@LINKER@
# All compiler flags except optimization flags
FLAGS=@FLAGS@
# Additional system includes
SYSINCLUDE=
# Compiler optimization flags
OPTIM=@OPTIM@
# Gmsh subdirectories
GMSH_DIRS=@GMSH_DIRS@
# Gmsh libraries
GMSH_LIBS=@GMSH_LIBS@
# How you create a static library on this machine
AR=@AR@
ARFLAGS=
RANLIB=@RANLIB@
# The symbol used in front of compiler flags
DASH=-
# The extension to use for object files, libraries and executables
OBJEXT=.o
LIBEXT=@LIBEXT@
EXEEXT=@EXEEXT@
# File handling commands
RM=rm -f
# Installation directories
prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
datadir=@datadir@
datarootdir=@datarootdir@
includedir=@includedir@
libdir=@libdir@
mandir=@mandir@
infodir=@infodir@
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment