[soqt] 05/06: Add autopkgtests.
Anton Gladky
gladk at moszumanska.debian.org
Thu Oct 16 18:58:06 UTC 2014
This is an automated email from the git hooks/post-receive script.
gladk pushed a commit to branch master
in repository soqt.
commit 7c87f55f4669b01a71bdce438c999a02080022b8
Author: Anton Gladky <gladk at debian.org>
Date: Wed Oct 15 21:12:00 2014 +0200
Add autopkgtests.
---
debian/control | 1 +
debian/tests/buildtest | 24 ++++++++++
debian/tests/control | 2 +
debian/tests/test01 | 105 +++++++++++++++++++++++++++++++++++++++++
debian/tests/test02 | 114 +++++++++++++++++++++++++++++++++++++++++++++
debian/tests/test03 | 123 +++++++++++++++++++++++++++++++++++++++++++++++++
debian/tests/test04 | 120 +++++++++++++++++++++++++++++++++++++++++++++++
debian/tests/test05 | 84 +++++++++++++++++++++++++++++++++
8 files changed, 573 insertions(+)
diff --git a/debian/control b/debian/control
index 05f220c..2eb9237 100644
--- a/debian/control
+++ b/debian/control
@@ -16,6 +16,7 @@ Build-Depends:
Vcs-Git: git://anonscm.debian.org/debian-science/packages/soqt.git
Vcs-Browser: http://anonscm.debian.org/gitweb/?p=debian-science/packages/soqt.git
Standards-Version: 3.9.6
+XS-Testsuite: autopkgtest
Package: libsoqt-dev-common
Depends:
diff --git a/debian/tests/buildtest b/debian/tests/buildtest
new file mode 100755
index 0000000..cf483fa
--- /dev/null
+++ b/debian/tests/buildtest
@@ -0,0 +1,24 @@
+#!/bin/sh
+# autopkgtest check
+# (C) 2014 Anton Gladky
+
+set -e
+
+export OMPI_MCA_orte_rsh_agent=/bin/false
+
+WORKDIR=$(mktemp -d)
+trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
+cd $WORKDIR
+mkdir src
+cd src
+
+cat <<EOF > demo.cpp
+
+EOF
+
+soqt-config --build demo demo.cpp
+echo "build: OK"
+[ -x demo ]
+./demo
+echo "run: OK"
+ls -ln
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..b473c78
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: test01 test02 test03 test04 test05
+Depends: libsoqt4-dev, build-essential
diff --git a/debian/tests/test01 b/debian/tests/test01
new file mode 100755
index 0000000..9e1a7b1
--- /dev/null
+++ b/debian/tests/test01
@@ -0,0 +1,105 @@
+#!/bin/sh
+# autopkgtest check
+# (C) 2014 Anton Gladky
+
+set -e
+
+export OMPI_MCA_orte_rsh_agent=/bin/false
+
+WORKDIR=$(mktemp -d)
+trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
+cd $WORKDIR
+mkdir src
+cd src
+
+cat <<EOF > demo.cpp
+/**************************************************************************\
+ * Copyright (c) Kongsberg Oil & Gas Technologies AS
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of the copyright holder nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+\**************************************************************************/
+
+/*
+ * Press mouse button in viewer canvas to trigger assert deep in Coin for
+ * checking that debug symbols are available in the libraries.
+ *
+ * Jotted down 2002-01-11 by Lars J. Aas <larsa at sim.no>
+ */
+
+#include <Inventor/Qt/SoQt.h>
+#include <Inventor/Qt/viewers/SoQtExaminerViewer.h>
+
+#include <Inventor/nodes/SoCube.h>
+#include <Inventor/nodes/SoCallback.h>
+#include <Inventor/nodes/SoSeparator.h>
+
+#include <Inventor/actions/SoHandleEventAction.h>
+#include <Inventor/events/SoMouseButtonEvent.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+
+void
+callback(void * closure, SoAction * action)
+{
+ if ( action->isOfType(SoHandleEventAction::getClassTypeId()) ) {
+ SoHandleEventAction * heaction =
+ (SoHandleEventAction *) action;
+ if ( heaction->getEvent()->isOfType(SoMouseButtonEvent::getClassTypeId()) ) {
+ SoSeparator * sep = (SoSeparator *) closure;
+ sep->addChild(NULL); // trigger assert inside Coin
+ }
+ }
+}
+
+int
+main(int argc, char ** argv)
+{
+ QWidget * win = SoQt::init("Debug Test");
+ SoQtExaminerViewer * viewer = new SoQtExaminerViewer(win);
+ SoSeparator * sep = new SoSeparator;
+ SoCallback * cb = new SoCallback;
+ cb->setCallback(callback, sep);
+ sep->addChild(cb);
+ sep->addChild(new SoCube);
+ viewer->setSceneGraph(sep);
+ viewer->setViewing(FALSE);
+ viewer->hide();
+ // delete viewer;
+ return 0;
+}
+
+EOF
+
+soqt-config --build demo demo.cpp
+echo "build: OK"
+[ -x demo ]
+./demo
+echo "run: OK"
+ls -ln
diff --git a/debian/tests/test02 b/debian/tests/test02
new file mode 100755
index 0000000..919d6b5
--- /dev/null
+++ b/debian/tests/test02
@@ -0,0 +1,114 @@
+#!/bin/sh
+# autopkgtest check
+# (C) 2014 Anton Gladky
+
+set -e
+
+export OMPI_MCA_orte_rsh_agent=/bin/false
+
+WORKDIR=$(mktemp -d)
+trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
+cd $WORKDIR
+mkdir src
+cd src
+
+cat <<EOF > demo.cpp
+/**************************************************************************\
+ * Copyright (c) Kongsberg Oil & Gas Technologies AS
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of the copyright holder nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+\**************************************************************************/
+
+#include <Inventor/nodes/SoSeparator.h>
+#include <Inventor/nodes/SoMaterial.h>
+#include <Inventor/nodes/SoCube.h>
+#include <Inventor/nodes/SoTranslation.h>
+#include <Inventor/nodes/SoRotationXYZ.h>
+
+#include <Inventor/Qt/SoQt.h>
+#include <Inventor/Qt/SoQtColorEditor.h>
+#include <Inventor/Qt/nodes/SoGuiColorEditor.h>
+#include <Inventor/Qt/viewers/SoQtExaminerViewer.h>
+
+static SoMaterial * material;
+
+SoSeparator *
+makescene(void)
+{
+ SoSeparator * root = new SoSeparator;
+ root->addChild(material = new SoMaterial);
+ root->addChild(new SoCube);
+ return root;
+}
+
+int
+main(int argc, char ** argv)
+{
+ QWidget * w = SoQt::init(argc, argv, "SoQtColorEditor");
+ SoQtExaminerViewer * viewer = new SoQtExaminerViewer(w);
+ SoSeparator * root;
+ viewer->setSceneGraph(root = makescene());
+
+ // we want ColorEditor in scene
+ SoSeparator * editorscene = new SoSeparator;
+ SoTranslation * trans = new SoTranslation;
+ trans->translation.setValue(SbVec3f(2.0f, 0.0f, 0.0f));
+ SoRotationXYZ * rot = new SoRotationXYZ;
+ SoMaterial * mat = new SoMaterial;
+ mat->diffuseColor.setValue(0.8, 0.8, 0.8);
+ rot->axis = SoRotationXYZ::Y;
+ rot->angle = 0.5;
+ editorscene->addChild(trans);
+ editorscene->addChild(rot);
+ editorscene->addChild(mat);
+ SoGuiColorEditor * inscene = new SoGuiColorEditor;
+ inscene->wysiwyg.setValue(TRUE);
+ inscene->color.connectFrom(&(material->diffuseColor));
+ inscene->color.getValue(); // update field
+ material->diffuseColor.connectFrom(&(inscene->color));
+ editorscene->addChild(inscene);
+ root->insertChild(editorscene, 0);
+
+#if 0
+ SoQtColorEditor * editor = new SoQtColorEditor;
+ editor->attach(&(material->diffuseColor));
+ editor->show();
+#endif
+
+ return 0;
+}
+
+EOF
+
+soqt-config --build demo demo.cpp
+echo "build: OK"
+[ -x demo ]
+./demo
+echo "run: OK"
+ls -ln
diff --git a/debian/tests/test03 b/debian/tests/test03
new file mode 100755
index 0000000..82398cf
--- /dev/null
+++ b/debian/tests/test03
@@ -0,0 +1,123 @@
+#!/bin/sh
+# autopkgtest check
+# (C) 2014 Anton Gladky
+
+set -e
+
+export OMPI_MCA_orte_rsh_agent=/bin/false
+
+WORKDIR=$(mktemp -d)
+trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
+cd $WORKDIR
+mkdir src
+cd src
+
+cat <<EOF > demo.cpp
+/**************************************************************************\
+ * Copyright (c) Kongsberg Oil & Gas Technologies AS
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of the copyright holder nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+\**************************************************************************/
+
+/*
+ Demonstrates embedding of an SoQtExaminerViewer within a simple
+ widget hierarchy.
+*/
+
+/***********************************************************************/
+
+#include <Inventor/Qt/SoQt.h>
+#include <Inventor/Qt/viewers/SoQtExaminerViewer.h>
+#include <Inventor/nodes/SoCone.h>
+#include <Inventor/nodes/SoSeparator.h>
+#include <qapplication.h>
+#include <qsplitter.h>
+#include <qmainwindow.h>
+#include <qlistview.h>
+#include <qgl.h>
+
+
+class MyMainWindow : public QMainWindow {
+public:
+ MyMainWindow(void)
+ {
+ QSplitter * split = new QSplitter(this);
+
+ QListView * listview = new QListView(split);
+ QWidget * glw = new QWidget(split);
+
+ // Construct a simple scenegraph.
+
+ SoSeparator * root = new SoSeparator;
+
+ SoCone * cone = new SoCone;
+ root->addChild(cone);
+
+ // Add the examinerviewer.
+
+ SoQtExaminerViewer * examinerviewer = new SoQtExaminerViewer(glw);
+ examinerviewer->setSceneGraph(root);
+
+ split->resize(640, 480);
+ this->resize(640, 480);
+ }
+};
+
+/***********************************************************************/
+
+int
+main(int argc, char ** argv)
+{
+ // Initialize Qt and SoQt.
+
+ // You should not create a QApplication instance if you want
+ // to receive spaceball events.
+ // QApplication app(argc, argv);
+
+ SoQt::init((QWidget *)NULL);
+
+ // Set up scrollview window.
+ MyMainWindow * vp = new MyMainWindow();
+
+ // Map window.
+ // Set termination condition.
+ QObject::connect(qApp, SIGNAL(lastWindowClosed()), qApp, SLOT(quit()));
+ // Start event loop.
+
+ return 0;
+}
+
+EOF
+
+soqt-config --build demo demo.cpp
+echo "build: OK"
+[ -x demo ]
+./demo
+echo "run: OK"
+ls -ln
diff --git a/debian/tests/test04 b/debian/tests/test04
new file mode 100755
index 0000000..93f1105
--- /dev/null
+++ b/debian/tests/test04
@@ -0,0 +1,120 @@
+#!/bin/sh
+# autopkgtest check
+# (C) 2014 Anton Gladky
+
+set -e
+
+export OMPI_MCA_orte_rsh_agent=/bin/false
+
+WORKDIR=$(mktemp -d)
+trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
+cd $WORKDIR
+mkdir src
+cd src
+
+cat <<EOF > demo.cpp
+/**************************************************************************\
+ * Copyright (c) Kongsberg Oil & Gas Technologies AS
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of the copyright holder nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+\**************************************************************************/
+
+#include <Inventor/Qt/SoQt.h>
+#include <Inventor/Qt/SoQtRenderArea.h>
+
+#include <Inventor/nodes/SoCube.h>
+#include <Inventor/nodes/SoRotor.h>
+#include <Inventor/nodes/SoArray.h>
+#include <Inventor/nodes/SoDirectionalLight.h>
+#include <Inventor/nodes/SoPerspectiveCamera.h>
+#include <Inventor/nodes/SoSeparator.h>
+
+/*
+ This is a simple example, demonstrating proper behaviour for a
+ SoQtRenderArea when built with the 'embed' flag set to TRUE.
+*/
+
+static SoSeparator * get_scene_graph(void)
+{
+ SoSeparator * root = new SoSeparator;
+
+ SoGroup * group = new SoGroup;
+
+ SoRotor * rotor = new SoRotor;
+ rotor->rotation = SbRotation(SbVec3f(0.2, 0.5, 0.9), M_PI/4.0);
+ group->addChild(rotor);
+
+ SoCube * cube = new SoCube;
+ group->addChild(cube);
+
+ SoArray * array = new SoArray;
+ array->origin = SoArray::CENTER;
+ array->addChild(group);
+ array->numElements1 = 2;
+ array->numElements2 = 2;
+ array->separation1 = SbVec3f(4, 0, 0);
+ array->separation2 = SbVec3f(0, 4, 0);
+
+ root->addChild(array);
+ return root;
+}
+
+int main(int argc, char ** argv)
+{
+ QWidget * window = SoQt::init(argv[0]);
+
+ SoSeparator * root = new SoSeparator;
+ root->ref();
+ SoPerspectiveCamera * camera;
+ root->addChild(camera = new SoPerspectiveCamera);
+ root->addChild(new SoDirectionalLight);
+ SoSeparator * userroot = get_scene_graph();
+ root->addChild(userroot);
+
+
+ SoQtRenderArea * renderarea =
+ new SoQtRenderArea(window, "Renderarea demonstration", FALSE);
+ camera->viewAll( userroot, renderarea->getViewportRegion() );
+ renderarea->setSceneGraph(root);
+ renderarea->setBackgroundColor(SbColor(0.0f, 0.2f, 0.3f));
+
+
+ delete renderarea;
+ root->unref();
+ return 0;
+}
+
+EOF
+
+soqt-config --build demo demo.cpp
+echo "build: OK"
+[ -x demo ]
+./demo
+echo "run: OK"
+ls -ln
diff --git a/debian/tests/test05 b/debian/tests/test05
new file mode 100755
index 0000000..d983ce8
--- /dev/null
+++ b/debian/tests/test05
@@ -0,0 +1,84 @@
+#!/bin/sh
+# autopkgtest check
+# (C) 2014 Anton Gladky
+
+set -e
+
+export OMPI_MCA_orte_rsh_agent=/bin/false
+
+WORKDIR=$(mktemp -d)
+trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
+cd $WORKDIR
+mkdir src
+cd src
+
+cat <<EOF > demo.cpp
+/**************************************************************************\
+ * Copyright (c) Kongsberg Oil & Gas Technologies AS
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of the copyright holder nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+\**************************************************************************/
+
+#include <Inventor/Qt/SoQt.h>
+#include <qapplication.h>
+
+#include <Inventor/Qt/SoQt.h>
+#include <Inventor/Qt/viewers/SoQtExaminerViewer.h>
+#include <Inventor/nodes/SoCone.h>
+#include <qwidget.h>
+
+// Demonstrates that a widget built without decorations scales
+// correctly, as we've had some problems with this previously.
+int main(int argc, char ** argv)
+{
+ QWidget * window = SoQt::init(argc, argv, argv[0]);
+
+ SoQtExaminerViewer * viewer = new SoQtExaminerViewer
+ (window, "Examiner Viewer" ,TRUE,
+ SoQtFullViewer::BUILD_NONE);
+
+ viewer->setSceneGraph(new SoCone);
+
+ SoQt::show(window);
+
+ window->resize(500, 500);
+
+
+ delete viewer;
+ return 0;
+}
+
+EOF
+
+soqt-config --build demo demo.cpp
+echo "build: OK"
+[ -x demo ]
+./demo
+echo "run: OK"
+ls -ln
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/soqt.git
More information about the debian-science-commits
mailing list