From f9a32a759dffd4d9168a4b923bc64e1fd5e35a78 Mon Sep 17 00:00:00 2001 From: stefan <stefan@5a81b35b-ba03-0410-adc8-b2c5c5119f08> Date: Wed, 21 Apr 2010 13:13:32 +0000 Subject: [PATCH] Changed sequence_viewer to new sip export git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@2083 5a81b35b-ba03-0410-adc8-b2c5c5119f08 --- modules/gui/pymod/export_gosty.cc | 15 +++--- modules/gui/pymod/export_input.cc | 4 +- modules/gui/pymod/export_scene_win.cc | 4 +- modules/gui/pymod/export_sequence_viewer.cc | 12 +++-- modules/gui/pymod/scene_win_proxy.hh | 52 --------------------- modules/gui/pymod/sequence_viewer_proxy.hh | 47 ------------------- modules/gui/pymod/spnav_input_proxy.hh | 40 ---------------- 7 files changed, 17 insertions(+), 157 deletions(-) delete mode 100644 modules/gui/pymod/scene_win_proxy.hh delete mode 100644 modules/gui/pymod/sequence_viewer_proxy.hh delete mode 100644 modules/gui/pymod/spnav_input_proxy.hh diff --git a/modules/gui/pymod/export_gosty.cc b/modules/gui/pymod/export_gosty.cc index 170afd972..6a654ff69 100644 --- a/modules/gui/pymod/export_gosty.cc +++ b/modules/gui/pymod/export_gosty.cc @@ -25,15 +25,15 @@ using namespace boost::python; #include <ost/gui/gl_win.hh> #include <ost/gui/perspective.hh> +#include <ost/gui/python_shell/python_shell.hh> #include <ost/gui/scene_win/scene_win.hh> +#include <ost/gui/sequence_viewer/sequence_viewer.hh> #include <ost/gui/tools/tool_options_win.hh> -#include <ost/gui/python_shell/python_shell.hh> #include "transfer_ownership.hh" #include "sip_handler.hh" #include "tool_options_win_proxy.hh" -#include "sequence_viewer_proxy.hh" #if OST_IMG_ENABLED #include "data_viewer_proxy.hh" using namespace ost::img::gui; @@ -49,11 +49,6 @@ ToolOptionsWinProxy app_get_tool_options_win(GostyApp* app) return ToolOptionsWinProxy(app->GetToolOptionsWin()); } -SequenceViewerProxy app_get_seq_viewer(GostyApp* app) -{ - return SequenceViewerProxy(app->GetSequenceViewer()); -} - #if OST_IMG_ENABLED DataViewerProxyPtr app_create_data_viewer1(GostyApp* app, const ost::img::Data& d, const QString& name) { @@ -102,8 +97,10 @@ void export_Gosty() return_value_policy<reference_existing_object>()) .add_property("scene_win", make_function(&GostyApp::GetSceneWin, return_value_policy<reference_existing_object>())) - .def("GetSequenceViewer", &app_get_seq_viewer) - .add_property("seq_viewer", &app_get_seq_viewer) + .def("GetSequenceViewer", &GostyApp::GetSequenceViewer, + return_value_policy<reference_existing_object>()) + .add_property("seq_viewer", make_function(&GostyApp::GetSequenceViewer, + return_value_policy<reference_existing_object>())) .def("GetToolOptionsWin", &app_get_tool_options_win) .add_property("tool_options_win", &app_get_tool_options_win) #if OST_IMG_ENABLED diff --git a/modules/gui/pymod/export_input.cc b/modules/gui/pymod/export_input.cc index 25ede19bc..b5ecfb156 100644 --- a/modules/gui/pymod/export_input.cc +++ b/modules/gui/pymod/export_input.cc @@ -22,8 +22,6 @@ #include "sip_handler.hh" -#include "spnav_input_proxy.hh" - using namespace boost::python; using namespace ost; using namespace ost::gui; @@ -41,7 +39,7 @@ object spnav_get_instance() void export_Input() { - class_<SpnavInput, bases<SipHandlerBase>, boost::noncopyable >("SpnavInput",no_init) + class_<SpnavInput, boost::noncopyable >("SpnavInput",no_init) .def("GetQThread", &spnav_get_instance).staticmethod("GetQThread") .def("GetQObject", &get_py_qobject<SpnavInput>) .add_property("qobject", &get_py_qobject<SpnavInput>) diff --git a/modules/gui/pymod/export_scene_win.cc b/modules/gui/pymod/export_scene_win.cc index 766a676f4..1d659c420 100644 --- a/modules/gui/pymod/export_scene_win.cc +++ b/modules/gui/pymod/export_scene_win.cc @@ -20,11 +20,11 @@ #include <boost/python.hpp> -#include "scene_win_proxy.hh" +#include <ost/gui/scene_win/scene_win.hh> +#include <ost/gui/scene_win/context_menu.hh> #include "sip_handler.hh" -#include <ost/gui/scene_win/context_menu.hh> using namespace boost::python; using namespace ost; diff --git a/modules/gui/pymod/export_sequence_viewer.cc b/modules/gui/pymod/export_sequence_viewer.cc index cc53523e6..e6127166c 100644 --- a/modules/gui/pymod/export_sequence_viewer.cc +++ b/modules/gui/pymod/export_sequence_viewer.cc @@ -18,7 +18,9 @@ //------------------------------------------------------------------------------ #include <boost/python.hpp> -#include "sequence_viewer_proxy.hh" +#include <ost/gui/sequence_viewer/sequence_viewer.hh> + +#include "sip_handler.hh" using namespace boost::python; using namespace ost; @@ -27,9 +29,11 @@ using namespace ost::gui; void export_SequenceViewer() { - class_<SequenceViewerProxy, bases<SipHandlerBase> >("SequenceViewer") - .def("Show", &SequenceViewerProxy::Show) - .def("Hide", &SequenceViewerProxy::Hide) + class_<SequenceViewer, boost::noncopyable >("SequenceViewer", no_init) + .def("Show", &SequenceViewer::show) + .def("Hide", &SequenceViewer::hide) + .def("GetQObject",&get_py_qobject<SequenceViewer>) + .add_property("qobject", &get_py_qobject<SequenceViewer>) ; } diff --git a/modules/gui/pymod/scene_win_proxy.hh b/modules/gui/pymod/scene_win_proxy.hh deleted file mode 100644 index 58c5d5a3f..000000000 --- a/modules/gui/pymod/scene_win_proxy.hh +++ /dev/null @@ -1,52 +0,0 @@ -//------------------------------------------------------------------------------ -// This file is part of the OpenStructure project <www.openstructure.org> -// -// Copyright (C) 2008-2010 by the OpenStructure authors -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License as published by the Free -// Software Foundation; either version 3.0 of the License, or (at your option) -// any later version. -// This library is distributed in the hope that it will be useful, but WITHOUT -// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more -// details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with this library; if not, write to the Free Software Foundation, Inc., -// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -//------------------------------------------------------------------------------ -#ifndef OST_GUI_SCENE_WIN_PROXY_HH -#define OST_GUI_SCENE_WIN_PROXY_HH - -#include <ost/gfx/gfx_node.hh> -#include <ost/gui/scene_win/scene_win.hh> - -#include "sip_handler.hh" - -namespace ost { namespace gui { - -class SceneWinProxy : public SipHandler<SceneWin> { -public: - SceneWinProxy(SceneWin* gl_win=NULL): - SipHandler<SceneWin>(gl_win) - { } - - void Show() - { - return Me()->show(); - } - void Hide() - { - return Me()->hide(); - } - - ContextMenu* GetContextMenu() - { - return Me()->GetContextMenu(); - } -}; - -}} - -#endif diff --git a/modules/gui/pymod/sequence_viewer_proxy.hh b/modules/gui/pymod/sequence_viewer_proxy.hh deleted file mode 100644 index 0f1ffe3cf..000000000 --- a/modules/gui/pymod/sequence_viewer_proxy.hh +++ /dev/null @@ -1,47 +0,0 @@ -//------------------------------------------------------------------------------ -// This file is part of the OpenStructure project <www.openstructure.org> -// -// Copyright (C) 2008-2010 by the OpenStructure authors -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License as published by the Free -// Software Foundation; either version 3.0 of the License, or (at your option) -// any later version. -// This library is distributed in the hope that it will be useful, but WITHOUT -// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more -// details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with this library; if not, write to the Free Software Foundation, Inc., -// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -//------------------------------------------------------------------------------ -#ifndef OST_GUI_SEQUENCE_VIEWER_PROXY_HH -#define OST_GUI_SEQUENCE_VIEWER_PROXY_HH - -#include <ost/gui/sequence_viewer/sequence_viewer.hh> - -#include "sip_handler.hh" - -namespace ost { namespace gui { - -class SequenceViewerProxy : public SipHandler<SequenceViewer> { - -public: - SequenceViewerProxy(SequenceViewer* seq_viewer=NULL): - SipHandler<SequenceViewer>(seq_viewer) - { } - - void Show() - { - return Me()->show(); - } - void Hide() - { - return Me()->hide(); - } -}; - -}} - -#endif diff --git a/modules/gui/pymod/spnav_input_proxy.hh b/modules/gui/pymod/spnav_input_proxy.hh deleted file mode 100644 index 3421f8d59..000000000 --- a/modules/gui/pymod/spnav_input_proxy.hh +++ /dev/null @@ -1,40 +0,0 @@ -//------------------------------------------------------------------------------ -// This file is part of the OpenStructure project <www.openstructure.org> -// -// Copyright (C) 2008-2010 by the OpenStructure authors -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License as published by the Free -// Software Foundation; either version 3.0 of the License, or (at your option) -// any later version. -// This library is distributed in the hope that it will be useful, but WITHOUT -// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more -// details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with this library; if not, write to the Free Software Foundation, Inc., -// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -//------------------------------------------------------------------------------ -#ifndef OST_GUI_SPNAV_INPUT_PROXY_HH -#define OST_GUI_SPNAV_INPUT_PROXY_HH - -#include <ost/gui/input/spnav_input.hh> - -#include "sip_handler.hh" - -namespace ost { namespace gui { - -class SpnavInputProxy : public SipHandler<SpnavInput> { -public: - SpnavInputProxy(SpnavInput* input=NULL): - SipHandler<SpnavInput>(input) - { } - static SpnavInputProxy* Instance(){ - return new SpnavInputProxy(SpnavInput::Instance()); - } -}; - -}} - -#endif -- GitLab