Skip to content
Snippets Groups Projects
Commit e6d45e38 authored by Andreas Schenk's avatar Andreas Schenk
Browse files

Revert "Delete unused files"

DataViewerProxy is needed to avoid crashes in Python
This reverts commit 0c00106a.
parent 2f6c12eb
No related branches found
No related tags found
No related merge requests found
...@@ -65,6 +65,7 @@ query_editor.py ...@@ -65,6 +65,7 @@ query_editor.py
) )
if (ENABLE_IMG) if (ENABLE_IMG)
list(APPEND OST_GUI_PYMOD_SOURCES list(APPEND OST_GUI_PYMOD_SOURCES
data_viewer_proxy.cc
export_data_viewer.cc export_data_viewer.cc
export_overlay.cc export_overlay.cc
export_overlay_manager.cc export_overlay_manager.cc
......
//------------------------------------------------------------------------------
// This file is part of the OpenStructure project <www.openstructure.org>
//
// Copyright (C) 2008-2010 by the OpenStructure authors
// Copyright (C) 2003-2010 by the IPLT 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
//------------------------------------------------------------------------------
/*
Authors: Ansgar Philippsen, Andreas Schenk
*/
#include <ost/message.hh>
//#include <ost/gui/snapshot.hh>
#include "data_viewer_proxy.hh"
namespace ost { namespace img { namespace gui {
DataViewerProxy::DataViewerProxy(DataViewer* v):
ost::gui::SipHandler<ost::img::gui::DataViewer>(v)
{}
NormalizerPtr DataViewerProxy::GetNormalizer() const
{
return Me()->GetNormalizer();
}
void DataViewerProxy::Renormalize()
{
Me()->Renormalize();
}
void DataViewerProxy::UpdateView()
{
Me()->UpdateView();
}
void DataViewerProxy::Recenter()
{
Me()->Recenter();
}
Extent DataViewerProxy::GetSelection() const
{
return Me()->GetSelection();
}
void DataViewerProxy::SetData(const Data& d)
{
Me()->SetData(d);
}
void DataViewerProxy::SetName(const String& name)
{
Me()->SetName(name);
}
int DataViewerProxy::AddOverlay(const OverlayPtr& ov, bool make_active)
{
return Me()->AddOverlay(ov,make_active);
}
void DataViewerProxy::ClearOverlays()
{
Me()->ClearOverlays();
}
OverlayManagerPtr DataViewerProxy::GetOverlayManager() const
{
return Me()->GetOverlayManager();
}
void DataViewerProxy::AddDockWidget(QWidget* w, const QString& name, bool shown)
{
Me()->AddDockWidget(w,name, shown);
}
void DataViewerProxy::RemoveDockWidget(QWidget* w)
{
Me()->RemoveDockWidget(w);
}
void DataViewerProxy::SetAntialiasing(bool f)
{
Me()->SetAntialiasing(f);
}
void DataViewerProxy::Show()
{
Me()->show();
}
void DataViewerProxy::Hide()
{
Me()->hide();
}
}}} //ns
//------------------------------------------------------------------------------
// This file is part of the OpenStructure project <www.openstructure.org>
//
// Copyright (C) 2008-2010 by the OpenStructure authors
// Copyright (C) 2003-2010 by the IPLT 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
//------------------------------------------------------------------------------
/*
DataViewer proxy
Authors: Ansgar Philippsen, Andreas Schenk
*/
#ifndef IMG_GUI_DATA_VIEWER_PROXY_H
#define IMG_GUI_DATA_VIEWER_PROXY_H
#include <boost/shared_ptr.hpp>
#include <ost/img/point.hh>
#include <ost/img/extent.hh>
#include <ost/img/normalizer_impl.hh>
#include <ost/gui/data_viewer/overlay_base_fw.hh>
#include <ost/gui/data_viewer/overlay_manager_fw.hh>
#include <ost/gui/data_viewer/data_viewer.hh>
#include <ost/gui/module_config.hh>
#include "sip_handler.hh"
class QWidget;
class QString;
namespace ost { namespace img { namespace gui {
// fw decl
class DataViewer;
class TEMPLATE_EXPORT DataViewerProxy : public ost::gui::SipHandler<DataViewer>{
public:
DataViewerProxy(DataViewer* v);
// data viewer interface
void SetData(const Data& data);
void SetName(const String& name);
NormalizerPtr GetNormalizer() const;
void Renormalize();
void Recenter();
void UpdateView();
Extent GetSelection() const;
int AddOverlay(const OverlayPtr& ov, bool make_active=true);
OverlayManagerPtr GetOverlayManager() const;
void ClearOverlays();
void AddDockWidget(QWidget* w, const QString& name, bool shown=true);
void RemoveDockWidget(QWidget* w);
void SetAntialiasing(bool f);
// ensure that data viewer is visible
void Show();
//void ShowClickedPosition(bool show=true);
//Vec3 GetClickedPosition();
void Hide();
};
typedef boost::shared_ptr<DataViewerProxy> DataViewerProxyPtr;
}}} //ns
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment