Skip to content
Snippets Groups Projects
Commit da6a5ca4 authored by Otmane Lahlou's avatar Otmane Lahlou
Browse files

ENH: connect centralview manipulator and quicklook renderer to update the red...

ENH: connect centralview manipulator and quicklook renderer to update the red square coordinates to render
parent afbf9994
No related branches found
No related tags found
No related merge requests found
......@@ -96,10 +96,17 @@ MainWindow
)
);
// instanciate the Ql manipulator here to be able to connect
// instanciate the Ql manipulator/renderer here to be able to connect
// its signals to the centralWidget manipulator slots
m_QLModelRenderer = new ImageModelRenderer();
m_QLViewManipulator = new QuicklookViewManipulator();
// Connect centralWidget manipulator to Ql renderer when viewportRegionChanged
QObject::connect(
imageViewManipulator, SIGNAL( ViewportRegionRepresentationChanged(const ImageRegionType&) ),
m_QLModelRenderer, SLOT( OnViewportRegionRepresentationChanged(const ImageRegionType&) )
);
// Connect ql mousePressEventpressed to centralWidget manipulator
QObject::connect(
m_QLViewManipulator, SIGNAL( ViewportRegionChanged(double, double) ),
......@@ -140,15 +147,12 @@ void
MainWindow
::InitializeDockWidgets()
{
// instanciate the renderer relative to this widget
ImageModelRenderer* qlModelRenderer = new ImageModelRenderer();
//
// EXPERIMENTAL QUICKLOOK Widget.
assert( qobject_cast< GLImageWidget* >( centralWidget() )!=NULL );
GLImageWidget* qlWidget = new GLImageWidget(
m_QLViewManipulator,
qlModelRenderer,
m_QLModelRenderer,
this,
qobject_cast< GLImageWidget* >( centralWidget() )
);
......@@ -446,6 +450,29 @@ MainWindow
SLOT( OnSpacingChanged(const SpacingType&) )
);
// TODO : OLU uncomment those connects when ql and central view
// are well connected
// // TODO : where to do this
// QObject::connect(
// // vectorImageModel->GetQuicklookModel(),
// // TODO: Remove temporary hack by better design.
// centralWidget(),
// SIGNAL( movingMouse() ),
// // to:
// GetQuicklookDock()->widget(),
// SLOT( updateGL() )
// );
// // TODO : where to do this
// QObject::connect(
// // vectorImageModel->GetQuicklookModel(),
// // TODO: Remove temporary hack by better design.
// centralWidget(),
// SIGNAL( releasingMouse() ),
// // to:
// GetQuicklookDock()->widget(),
// SLOT( updateGL() )
// );
/*
// Connect newly selected model to UI controller.
......
......@@ -64,6 +64,7 @@ namespace mvd
class AbstractModel;
class AbstractModelController;
class QuicklookViewManipulator;
class ImageModelRenderer;
namespace Ui
{
......@@ -178,7 +179,11 @@ private:
* \brief ql manipulator.
*/
QuicklookViewManipulator* m_QLViewManipulator;
/**
* \brief ql manipulator.
*/
ImageModelRenderer* m_QLModelRenderer;
/*-[ PRIVATE SLOTS SECTION ]-----------------------------------------------*/
......
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