Skip to content
Snippets Groups Projects
Commit f9a32a75 authored by stefan's avatar stefan
Browse files

Changed sequence_viewer to new sip export

git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@2083 5a81b35b-ba03-0410-adc8-b2c5c5119f08
parent a7b9f189
No related branches found
No related tags found
No related merge requests found
...@@ -25,15 +25,15 @@ using namespace boost::python; ...@@ -25,15 +25,15 @@ using namespace boost::python;
#include <ost/gui/gl_win.hh> #include <ost/gui/gl_win.hh>
#include <ost/gui/perspective.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/scene_win/scene_win.hh>
#include <ost/gui/sequence_viewer/sequence_viewer.hh>
#include <ost/gui/tools/tool_options_win.hh> #include <ost/gui/tools/tool_options_win.hh>
#include <ost/gui/python_shell/python_shell.hh>
#include "transfer_ownership.hh" #include "transfer_ownership.hh"
#include "sip_handler.hh" #include "sip_handler.hh"
#include "tool_options_win_proxy.hh" #include "tool_options_win_proxy.hh"
#include "sequence_viewer_proxy.hh"
#if OST_IMG_ENABLED #if OST_IMG_ENABLED
#include "data_viewer_proxy.hh" #include "data_viewer_proxy.hh"
using namespace ost::img::gui; using namespace ost::img::gui;
...@@ -49,11 +49,6 @@ ToolOptionsWinProxy app_get_tool_options_win(GostyApp* app) ...@@ -49,11 +49,6 @@ ToolOptionsWinProxy app_get_tool_options_win(GostyApp* app)
return ToolOptionsWinProxy(app->GetToolOptionsWin()); return ToolOptionsWinProxy(app->GetToolOptionsWin());
} }
SequenceViewerProxy app_get_seq_viewer(GostyApp* app)
{
return SequenceViewerProxy(app->GetSequenceViewer());
}
#if OST_IMG_ENABLED #if OST_IMG_ENABLED
DataViewerProxyPtr app_create_data_viewer1(GostyApp* app, const ost::img::Data& d, const QString& name) DataViewerProxyPtr app_create_data_viewer1(GostyApp* app, const ost::img::Data& d, const QString& name)
{ {
...@@ -102,8 +97,10 @@ void export_Gosty() ...@@ -102,8 +97,10 @@ void export_Gosty()
return_value_policy<reference_existing_object>()) return_value_policy<reference_existing_object>())
.add_property("scene_win", make_function(&GostyApp::GetSceneWin, .add_property("scene_win", make_function(&GostyApp::GetSceneWin,
return_value_policy<reference_existing_object>())) return_value_policy<reference_existing_object>()))
.def("GetSequenceViewer", &app_get_seq_viewer) .def("GetSequenceViewer", &GostyApp::GetSequenceViewer,
.add_property("seq_viewer", &app_get_seq_viewer) 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) .def("GetToolOptionsWin", &app_get_tool_options_win)
.add_property("tool_options_win", &app_get_tool_options_win) .add_property("tool_options_win", &app_get_tool_options_win)
#if OST_IMG_ENABLED #if OST_IMG_ENABLED
......
...@@ -22,8 +22,6 @@ ...@@ -22,8 +22,6 @@
#include "sip_handler.hh" #include "sip_handler.hh"
#include "spnav_input_proxy.hh"
using namespace boost::python; using namespace boost::python;
using namespace ost; using namespace ost;
using namespace ost::gui; using namespace ost::gui;
...@@ -41,7 +39,7 @@ object spnav_get_instance() ...@@ -41,7 +39,7 @@ object spnav_get_instance()
void export_Input() 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("GetQThread", &spnav_get_instance).staticmethod("GetQThread")
.def("GetQObject", &get_py_qobject<SpnavInput>) .def("GetQObject", &get_py_qobject<SpnavInput>)
.add_property("qobject", &get_py_qobject<SpnavInput>) .add_property("qobject", &get_py_qobject<SpnavInput>)
......
...@@ -20,11 +20,11 @@ ...@@ -20,11 +20,11 @@
#include <boost/python.hpp> #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 "sip_handler.hh"
#include <ost/gui/scene_win/context_menu.hh>
using namespace boost::python; using namespace boost::python;
using namespace ost; using namespace ost;
......
...@@ -18,7 +18,9 @@ ...@@ -18,7 +18,9 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
#include <boost/python.hpp> #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 boost::python;
using namespace ost; using namespace ost;
...@@ -27,9 +29,11 @@ using namespace ost::gui; ...@@ -27,9 +29,11 @@ using namespace ost::gui;
void export_SequenceViewer() void export_SequenceViewer()
{ {
class_<SequenceViewerProxy, bases<SipHandlerBase> >("SequenceViewer") class_<SequenceViewer, boost::noncopyable >("SequenceViewer", no_init)
.def("Show", &SequenceViewerProxy::Show) .def("Show", &SequenceViewer::show)
.def("Hide", &SequenceViewerProxy::Hide) .def("Hide", &SequenceViewer::hide)
.def("GetQObject",&get_py_qobject<SequenceViewer>)
.add_property("qobject", &get_py_qobject<SequenceViewer>)
; ;
} }
//------------------------------------------------------------------------------
// 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
//------------------------------------------------------------------------------
// 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
//------------------------------------------------------------------------------
// 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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment