Commit 3687fad1 authored by Alexander Wiebel's avatar Alexander Wiebel

[STYLE #9]

parent 4e2d2561
......@@ -179,7 +179,10 @@ public:
WVector3d v = j.first;
TS_ASSERT( wtracking::WTrackingUtility::followToNextVoxel( ds, j, boost::bind( &This::simpleDirFunc, this, boost::placeholders::_1, boost::placeholders::_2 ) ) );
TS_ASSERT( wtracking::WTrackingUtility::followToNextVoxel( ds, j, boost::bind( &This::simpleDirFunc,
this,
boost::placeholders::_1,
boost::placeholders::_2 ) ) );
TS_ASSERT( !wtracking::WTrackingUtility::onBoundary( g, j.first ) );
TS_ASSERT( g->encloses( j.first ) );
v += x * 0.8;
......@@ -500,8 +503,15 @@ public:
TS_ASSERT_THROWS_NOTHING(
wtracking::WThreadedTrackingFunction w( ds,
boost::bind( &This::dirFunc, this, boost::placeholders::_1, boost::placeholders::_2, WVector3d( 1.0, 0.0, 0.0 ) ),
boost::bind( &wtracking::WTrackingUtility::followToNextVoxel, boost::placeholders::_1, boost::placeholders::_2, boost::placeholders::_3 ),
boost::bind( &This::dirFunc,
this,
boost::placeholders::_1,
boost::placeholders::_2,
WVector3d( 1.0, 0.0, 0.0 ) ),
boost::bind( &wtracking::WTrackingUtility::followToNextVoxel,
boost::placeholders::_1,
boost::placeholders::_2,
boost::placeholders::_3 ),
boost::bind( &This::fibVis, this, boost::placeholders::_1 ),
boost::bind( &This::pntVis, this, boost::placeholders::_1 ) ) );
}
......@@ -515,8 +525,15 @@ public:
boost::shared_ptr< WGridRegular3D > g = boost::dynamic_pointer_cast< WGridRegular3D >( ds->getGrid() );
TS_ASSERT( g );
wtracking::WThreadedTrackingFunction w( ds, boost::bind( &This::dirFunc, this, boost::placeholders::_1, boost::placeholders::_2, WVector3d( 1.0, 0.0, 0.0 ) ),
boost::bind( &wtracking::WTrackingUtility::followToNextVoxel, boost::placeholders::_1, boost::placeholders::_2, boost::placeholders::_3 ),
wtracking::WThreadedTrackingFunction w( ds, boost::bind( &This::dirFunc,
this,
boost::placeholders::_1,
boost::placeholders::_2,
WVector3d( 1.0, 0.0, 0.0 ) ),
boost::bind( &wtracking::WTrackingUtility::followToNextVoxel,
boost::placeholders::_1,
boost::placeholders::_2,
boost::placeholders::_3 ),
boost::bind( &This::fibVis, this, boost::placeholders::_1 ),
boost::bind( &This::pntVis, this, boost::placeholders::_1 ) );
wtracking::WThreadedTrackingFunction::JobType job;
......@@ -543,7 +560,10 @@ public:
TS_ASSERT( g );
{
wtracking::WThreadedTrackingFunction w( ds, boost::bind( &This::dirFunc, this, boost::placeholders::_1, boost::placeholders::_2, x ),
boost::bind( &wtracking::WTrackingUtility::followToNextVoxel, boost::placeholders::_1, boost::placeholders::_2, boost::placeholders::_3 ),
boost::bind( &wtracking::WTrackingUtility::followToNextVoxel,
boost::placeholders::_1,
boost::placeholders::_2,
boost::placeholders::_3 ),
boost::bind( &This::fibVis, this, boost::placeholders::_1 ),
boost::bind( &This::pntVis, this, boost::placeholders::_1 ) );
wtracking::WThreadedTrackingFunction::JobType job;
......@@ -554,7 +574,10 @@ public:
}
{
wtracking::WThreadedTrackingFunction w( ds, boost::bind( &This::dirFunc, this, boost::placeholders::_1, boost::placeholders::_2, y ),
boost::bind( &wtracking::WTrackingUtility::followToNextVoxel, boost::placeholders::_1, boost::placeholders::_2, boost::placeholders::_3 ),
boost::bind( &wtracking::WTrackingUtility::followToNextVoxel,
boost::placeholders::_1,
boost::placeholders::_2,
boost::placeholders::_3 ),
boost::bind( &This::fibVis, this, boost::placeholders::_1 ),
boost::bind( &This::pntVis, this, boost::placeholders::_1 ) );
wtracking::WThreadedTrackingFunction::JobType job;
......
......@@ -55,7 +55,9 @@ WFiberSelector::WFiberSelector( boost::shared_ptr< const WDataSetFibers > fibers
m_removeRoiSignal =
boost::shared_ptr< boost::function< void( osg::ref_ptr< WROI > ) > >(
new boost::function< void( osg::ref_ptr< WROI > ) > ( boost::bind( &WFiberSelector::slotRemoveRoi, this, boost::placeholders::_1 ) ) );
new boost::function< void( osg::ref_ptr< WROI > ) > ( boost::bind( &WFiberSelector::slotRemoveRoi,
this,
boost::placeholders::_1 ) ) );
WKernel::getRunningKernel()->getRoiManager()->addRemoveNotifier( m_removeRoiSignal );
m_removeBranchSignal =
......
......@@ -64,8 +64,14 @@ WModuleConnector::WModuleConnector( boost::shared_ptr< WModule > module, std::st
// connect standard signals
// NOTE: these signals are NOT emitted by the connector this one is connected to, since a module can't send a "connection
// closed" message if the connection is closed.
subscribeSignal( CONNECTION_ESTABLISHED, boost::bind( &WModuleConnector::notifyConnectionEstablished, this, boost::placeholders::_1, boost::placeholders::_2 ) );
subscribeSignal( CONNECTION_CLOSED, boost::bind( &WModuleConnector::notifyConnectionClosed, this, boost::placeholders::_1, boost::placeholders::_2 ) );
subscribeSignal( CONNECTION_ESTABLISHED, boost::bind( &WModuleConnector::notifyConnectionEstablished,
this,
boost::placeholders::_1,
boost::placeholders::_2 ) );
subscribeSignal( CONNECTION_CLOSED, boost::bind( &WModuleConnector::notifyConnectionClosed,
this,
boost::placeholders::_1,
boost::placeholders::_2 ) );
signal_ConnectionEstablished.connect( getSignalHandler( CONNECTION_ESTABLISHED ) );
signal_ConnectionClosed.connect( getSignalHandler( CONNECTION_CLOSED ) );
......
......@@ -107,8 +107,14 @@ public:
m_in = boost::shared_ptr< WModuleInputData< T > >( new WModuleInputData< T >( module, "[FWD]" + name, description ) );
// subscribe both signals
m_in->subscribeSignal( CONNECTION_ESTABLISHED, boost::bind( &WModuleOutputForwardData::inputNotifyDataChange, this, boost::placeholders::_1, boost::placeholders::_2 ) );
m_in->subscribeSignal( DATA_CHANGED, boost::bind( &WModuleOutputForwardData::inputNotifyDataChange, this, boost::placeholders::_1, boost::placeholders::_2 ) );
m_in->subscribeSignal( CONNECTION_ESTABLISHED, boost::bind( &WModuleOutputForwardData::inputNotifyDataChange,
this,
boost::placeholders::_1,
boost::placeholders::_2 ) );
m_in->subscribeSignal( DATA_CHANGED, boost::bind( &WModuleOutputForwardData::inputNotifyDataChange,
this,
boost::placeholders::_1,
boost::placeholders::_2 ) );
};
/**
......@@ -176,4 +182,3 @@ typename WModuleOutputForwardData< T >::PtrType WModuleOutputForwardData< T >::c
}
#endif // WMODULEOUTPUTFORWARDDATA_H
......@@ -186,7 +186,9 @@ void WMCalculateGFA::resetGFAPool()
resetProgress( g->getNbCoordsX() * g->getNbCoordsY() * g->getNbCoordsZ() );
// create a new one
m_gfaFunc = boost::shared_ptr< GFAFuncType >( new GFAFuncType( m_dataSet, boost::bind( &This::perVoxelGFAFunc, this, boost::placeholders::_1 ) ) );
m_gfaFunc = boost::shared_ptr< GFAFuncType >( new GFAFuncType( m_dataSet, boost::bind( &This::perVoxelGFAFunc,
this,
boost::placeholders::_1 ) ) );
m_gfaPool = boost::shared_ptr< GFAPoolType >( new GFAPoolType( 0, m_gfaFunc ) );
m_gfaPool->subscribeExceptionSignal( boost::bind( &This::handleException, this, boost::placeholders::_1 ) );
m_moduleState.add( m_gfaPool->getThreadsDoneCondition() );
......
......@@ -182,7 +182,9 @@ void WMCalculateTensors::resetTensorPool()
resetProgress( g->getNbCoordsX() * g->getNbCoordsY() * g->getNbCoordsZ() );
// create a new one
m_tensorFunc = boost::shared_ptr< TensorFuncType >( new TensorFuncType( m_dataSet, boost::bind( &This::perVoxelTensorFunc, this, boost::placeholders::_1 ) ) );
m_tensorFunc = boost::shared_ptr< TensorFuncType >( new TensorFuncType( m_dataSet, boost::bind( &This::perVoxelTensorFunc,
this,
boost::placeholders::_1 ) ) );
m_tensorPool = boost::shared_ptr< TensorPoolType >( new TensorPoolType( 0, m_tensorFunc ) );
m_tensorPool->subscribeExceptionSignal( boost::bind( &This::handleException, this, boost::placeholders::_1 ) );
m_moduleState.add( m_tensorPool->getThreadsDoneCondition() );
......
......@@ -304,7 +304,10 @@ void WMDeterministicFTMori::resetTracking()
// create a new one
boost::shared_ptr< Tracking > t( new Tracking( m_eigenField,
boost::bind( &This::getEigenDirection, this, boost::placeholders::_1, boost::placeholders::_2 ),
boost::bind( &wtracking::WTrackingUtility::followToNextVoxel, boost::placeholders::_1, boost::placeholders::_2, boost::placeholders::_3 ),
boost::bind( &wtracking::WTrackingUtility::followToNextVoxel,
boost::placeholders::_1,
boost::placeholders::_2,
boost::placeholders::_3 ),
boost::bind( &This::fiberVis, this, boost::placeholders::_1 ),
boost::bind( &This::pointVis, this, boost::placeholders::_1 ) ) );
m_trackingPool = boost::shared_ptr< TrackingFuncType >( new TrackingFuncType( WM_MORI_NUM_CORES, t ) );
......
......@@ -735,7 +735,9 @@ void WMFiberDisplay::createFiberGeode( boost::shared_ptr< WDataSetFibers > fiber
}
// add an update callback which later handles several things like the filter attribute array
geometry->setUpdateCallback( new WGEFunctorCallback< osg::Drawable >( boost::bind( &WMFiberDisplay::geometryUpdate, this, boost::placeholders::_1 ) ) );
geometry->setUpdateCallback( new WGEFunctorCallback< osg::Drawable >( boost::bind( &WMFiberDisplay::geometryUpdate,
this,
boost::placeholders::_1 ) ) );
// set drawable
fibGeode->addDrawable( geometry );
......
......@@ -181,7 +181,12 @@ void WMHistogramView::moduleMain()
WGECamera::TWO_D, m_shutdownFlag.getValueChangeCondition() );
osg::ref_ptr< WUIViewEventHandler > eh = new WUIViewEventHandler( m_widget );
eh->subscribeMove( boost::bind( &WMHistogramView::handleMouseMove, this, boost::placeholders::_1 ) );
eh->subscribeResize( boost::bind( &WMHistogramView::handleResize, this, boost::placeholders::_1, boost::placeholders::_2, boost::placeholders::_3, boost::placeholders::_4 ) );
eh->subscribeResize( boost::bind( &WMHistogramView::handleResize,
this,
boost::placeholders::_1,
boost::placeholders::_2,
boost::placeholders::_3,
boost::placeholders::_4 ) );
m_widget->addEventHandler( eh );
m_widget->show();
......@@ -1001,4 +1006,3 @@ void WMHistogramView::createNothing()
{
errorLog() << "This histogram style is not yet implemented.";
}
......@@ -221,7 +221,12 @@ void WMMultiHistogramView::moduleMain()
WGECamera::TWO_D, m_shutdownFlag.getValueChangeCondition() );
osg::ref_ptr< WUIViewEventHandler > eh = new WUIViewEventHandler( m_widget );
eh->subscribeMove( boost::bind( &WMMultiHistogramView::handleMouseMove, this, boost::placeholders::_1 ) );
eh->subscribeResize( boost::bind( &WMMultiHistogramView::handleResize, this, boost::placeholders::_1, boost::placeholders::_2, boost::placeholders::_3, boost::placeholders::_4 ) );
eh->subscribeResize( boost::bind( &WMMultiHistogramView::handleResize,
this,
boost::placeholders::_1,
boost::placeholders::_2,
boost::placeholders::_3,
boost::placeholders::_4 ) );
m_widget->addEventHandler( eh );
m_widget->show();
......@@ -1218,4 +1223,3 @@ void WMMultiHistogramView::createNothing()
{
errorLog() << "This histogram style is not yet implemented.";
}
......@@ -306,7 +306,9 @@ WMNavigationSlices::PickCallback::PickCallback( osg::ref_ptr< osg::Node > node,
boost::shared_ptr< WGraphicsEngine > ge = WGraphicsEngine::getGraphicsEngine();
boost::shared_ptr< WGEViewer > viewer = ge->getViewerByName( "Main View" );
m_camera = viewer->getCamera();
m_pickConnection = viewer->getPickHandler()->getPickSignal()->connect( boost::bind( &WMNavigationSlices::PickCallback::pick, this, boost::placeholders::_1 ) );
m_pickConnection = viewer->getPickHandler()->getPickSignal()->connect( boost::bind( &WMNavigationSlices::PickCallback::pick,
this,
boost::placeholders::_1 ) );
node->getOrCreateStateSet()->addUniform( m_pickUniform );
}
......
......@@ -288,7 +288,12 @@ void WMTemplateUI::moduleMain()
eh->subscribeMove( boost::bind( &WMTemplateUI::handleMouseMove, this, boost::placeholders::_1 ) );
eh->subscribeDrag( boost::bind( &WMTemplateUI::handleMouseDrag, this, boost::placeholders::_1, boost::placeholders::_2 ) );
eh->subscribeRelease( boost::bind( &WMTemplateUI::handleButtonRelease, this, boost::placeholders::_1, boost::placeholders::_2 ) );
eh->subscribeResize( boost::bind( &WMTemplateUI::handleResize , this, boost::placeholders::_1, boost::placeholders::_2, boost::placeholders::_3, boost::placeholders::_4 ) );
eh->subscribeResize( boost::bind( &WMTemplateUI::handleResize ,
this,
boost::placeholders::_1,
boost::placeholders::_2,
boost::placeholders::_3,
boost::placeholders::_4 ) );
// This binds our member functions handleMouseMove, handleResize, and others to the event handler. You should consider reading the
// boost::bind documentation in case you do not completely understand the above lines.
// Finally, we add the event handler:
......
......@@ -47,8 +47,7 @@
#include <QtCore/QSettings>
#include <QtCore/QUrl>
#include <QInputDialog>
#include <QWebEngineView>
#include <QWebEngineView> // NOLINT
#include "core/WVersion.h" // NOTE: this file is auto-generated by CMAKE
......@@ -765,7 +764,11 @@ void WMainWindow::openLoadDialog()
void WMainWindow::asyncProjectLoad( std::string filename )
{
WProjectFile::SPtr proj( new WProjectFile( filename, boost::bind( &WMainWindow::slotLoadFinished, this, boost::placeholders::_1, boost::placeholders::_2, boost::placeholders::_3 ) ) );
WProjectFile::SPtr proj( new WProjectFile( filename, boost::bind( &WMainWindow::slotLoadFinished,
this,
boost::placeholders::_1,
boost::placeholders::_2,
boost::placeholders::_3 ) ) );
proj->load();
}
......@@ -808,7 +811,7 @@ void WMainWindow::openOpenWalnutHelpDialog()
window->show();
QWebEngineView *view = new QWebEngineView( this );
QWebEngineView *view = new QWebEngineView( this );
QString location( QString( "file://" ) + WPathHelper::getDocPath().string().c_str() + "/openwalnut-qt/" );
view->setHtml( content.c_str(), QUrl( location ) );
view->show();
......@@ -1203,7 +1206,7 @@ void WMainWindow::showWelcomeDialog( bool force )
content = boost::regex_replace( content, reg2, std::string( W_VERSION ) );
QWidget* w = NULL;
QWebEngineView* view = new QWebEngineView( this );
QWebEngineView* view = new QWebEngineView( this );
view->setHtml( QString::fromStdString( content ) );
view->setMinimumWidth( 640 );
// view->page()->setLinkDelegationPolicy( QWebEnginePage::DelegateExternalLinks );
......
......@@ -203,7 +203,11 @@ WQtGLScreenCapture::WQtGLScreenCapture( WQtGLDockWidget* parent ):
// we need to be notified about the screen grabbers state
m_recordConnection = m_viewer->getScreenCapture()->getRecordCondition()->subscribeSignal( boost::bind( &WQtGLScreenCapture::recCallback, this ) );
m_imageConnection = m_viewer->getScreenCapture()->subscribeSignal( boost::bind( &WQtGLScreenCapture::handleImage, this, boost::placeholders::_1, boost::placeholders::_2, boost::placeholders::_3 ) );
m_imageConnection = m_viewer->getScreenCapture()->subscribeSignal( boost::bind( &WQtGLScreenCapture::handleImage,
this,
boost::placeholders::_1,
boost::placeholders::_2,
boost::placeholders::_3 ) );
}
WQtGLScreenCapture::~WQtGLScreenCapture()
......@@ -368,4 +372,3 @@ void WQtGLScreenCapture::resolutionChange( bool force )
m_glDockWidget->restoreGLWidgetSize();
}
}
......@@ -224,11 +224,17 @@ int WQtGui::run()
m_kernel->getRootContainer()->addDefaultNotifier( WM_REMOVED, removedSignal );
// Connect Event
t_GenericSignalHandlerType connectionEstablishedSignal = boost::bind( &WQtGui::slotConnectionEstablished, this, boost::placeholders::_1, boost::placeholders::_2 );
t_GenericSignalHandlerType connectionEstablishedSignal = boost::bind( &WQtGui::slotConnectionEstablished,
this,
boost::placeholders::_1,
boost::placeholders::_2 );
m_kernel->getRootContainer()->addDefaultNotifier( CONNECTION_ESTABLISHED, connectionEstablishedSignal );
// Disconnect Event
t_GenericSignalHandlerType connectionClosedSignal = boost::bind( &WQtGui::slotConnectionClosed, this, boost::placeholders::_1, boost::placeholders::_2 );
t_GenericSignalHandlerType connectionClosedSignal = boost::bind( &WQtGui::slotConnectionClosed,
this,
boost::placeholders::_1,
boost::placeholders::_2 );
m_kernel->getRootContainer()->addDefaultNotifier( CONNECTION_CLOSED, connectionClosedSignal );
boost::shared_ptr< boost::function< void( osg::ref_ptr< WROI > ) > > assocRoiSignal;
......@@ -420,4 +426,3 @@ void WQtGui::execInGUIThreadAsync( boost::function< void( void ) > functor, WCon
WDeferredCallEvent* ev = new WDeferredCallEvent( functor, notify );
QCoreApplication::postEvent( getMainWindow(), ev );
}
......@@ -26,10 +26,9 @@
#include <vector>
#include <iostream>
#include <QWebEngineView> //NOLINT
#include <QWebEnginePage> //NOLINT
#include <QVBoxLayout>
#include <QWebEngineView>
#include <QWebEnginePage>
#include <QToolBar>
#include <QToolButton>
#include <QHBoxLayout>
......@@ -211,7 +210,7 @@ WQtModuleMetaInfo::WQtModuleMetaInfo( WModule::SPtr module, QWidget* parent ):
layout->setContentsMargins( 0, 0, 0, 0 );
// create the QT webview
QWebEngineView* view = new QWebEngineView( this );
QWebEngineView* view = new QWebEngineView( this );
// create a webpage and add it to the view
QWebEnginePage* page = new QWebEnginePage( this );
......
......@@ -25,8 +25,8 @@
#ifndef WQTMODULEMETAINFO_H
#define WQTMODULEMETAINFO_H
#include <QWidget>
#include <QWebEnginePage>
#include <QWidget>
#include "core/kernel/WModule.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment