Skip to content

Commit

Permalink
use m_ prefix for data memters, re #11708
Browse files Browse the repository at this point in the history
  • Loading branch information
FedeMPouzols committed May 8, 2015
1 parent 8ad9300 commit 5fd01c9
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 44 deletions.
Expand Up @@ -103,8 +103,8 @@ protected slots:
/// Create the current data representation.
void setupData();

QPointer<pqMultiSliceView> mainView; ///< The main view class
Ui::MultiSliceViewClass ui; ///< The view's UI form
QPointer<pqMultiSliceView> m_mainView; ///< The main view class
Ui::MultiSliceViewClass m_ui; ///< The view's UI form
};

}
Expand Down
Expand Up @@ -93,10 +93,10 @@ protected slots:
private:
Q_DISABLE_COPY(StandardView)

bool cameraReset;
QPointer<pqPipelineSource> scaler; ///< Holder for the ScaleWorkspace
Ui::StandardView ui; ///< The standard view's UI form
QPointer<pqRenderView> view; ///< The main view
bool m_cameraReset;
QPointer<pqPipelineSource> m_scaler; ///< Holder for the ScaleWorkspace
Ui::StandardView m_ui; ///< The standard view's UI form
QPointer<pqRenderView> m_view; ///< The main view

/// Set the rebin and unbin button visibility
void setRebinAndUnbinButtons();
Expand Down
28 changes: 14 additions & 14 deletions Code/Mantid/Vates/VatesSimpleGui/ViewWidgets/src/MultisliceView.cpp
Expand Up @@ -113,11 +113,11 @@ static void GetOrientations(vtkSMSourceProxy* producer, vtkVector3d sliceNormals

MultiSliceView::MultiSliceView(QWidget *parent, RebinnedSourcesManager* rebinnedSourcesManager) : ViewBase(parent, rebinnedSourcesManager)
{
this->ui.setupUi(this);
pqRenderView *tmp = this->createRenderView(this->ui.renderFrame,
this->m_ui.setupUi(this);
pqRenderView *tmp = this->createRenderView(this->m_ui.renderFrame,
QString("MultiSlice"));
this->mainView = qobject_cast<pqMultiSliceView *>(tmp);
QObject::connect(this->mainView,
this->m_mainView = qobject_cast<pqMultiSliceView *>(tmp);
QObject::connect(this->m_mainView,
SIGNAL(sliceClicked(int, double, int, int)),
this,
SLOT(checkSliceClicked(int,double,int,int)));
Expand All @@ -130,12 +130,12 @@ MultiSliceView::~MultiSliceView()
void MultiSliceView::destroyView()
{
pqObjectBuilder *builder = pqApplicationCore::instance()->getObjectBuilder();
builder->destroy(this->mainView);
builder->destroy(this->m_mainView);
}

pqRenderView* MultiSliceView::getView()
{
return qobject_cast<pqRenderView*>(this->mainView.data());
return qobject_cast<pqRenderView*>(this->m_mainView.data());
}


Expand All @@ -147,7 +147,7 @@ void MultiSliceView::setupData()
if (this->origSrc)
{
pqDataRepresentation *drep = builder->createDataRepresentation(\
this->origSrc->getOutputPort(0), this->mainView);
this->origSrc->getOutputPort(0), this->m_mainView);
vtkSMPropertyHelper(drep->getProxy(), "Representation").Set("Slices");
drep->getProxy()->UpdateVTKObjects();
}
Expand All @@ -163,17 +163,17 @@ void MultiSliceView::render()

void MultiSliceView::renderAll()
{
this->mainView->render();
this->m_mainView->render();
}

void MultiSliceView::resetDisplay()
{
this->mainView->resetDisplay();
this->m_mainView->resetDisplay();
}

void MultiSliceView::resetCamera()
{
this->mainView->resetCamera();
this->m_mainView->resetCamera();
}

/**
Expand Down Expand Up @@ -205,15 +205,15 @@ void MultiSliceView::checkSliceViewCompat()
QString wsName = this->getWorkspaceName();
if (wsName.isEmpty())
{
QObject::disconnect(this->mainView, 0, this, 0);
QObject::disconnect(this->m_mainView, 0, this, 0);
}
}

void MultiSliceView::changedSlicePoint(Mantid::Kernel::VMD selectedPoint)
{
vtkSMPropertyHelper(this->mainView->getProxy(),"XSlicesValues").Set(selectedPoint[0]);
this->mainView->getProxy()->UpdateVTKObjects();
this->mainView->render();
vtkSMPropertyHelper(this->m_mainView->getProxy(),"XSlicesValues").Set(selectedPoint[0]);
this->m_mainView->getProxy()->UpdateVTKObjects();
this->m_mainView->render();
}

/**
Expand Down
48 changes: 24 additions & 24 deletions Code/Mantid/Vates/VatesSimpleGui/ViewWidgets/src/StandardView.cpp
Expand Up @@ -49,27 +49,27 @@ namespace SimpleGui
m_cutMDAction(NULL),
m_unbinAction(NULL)
{
this->ui.setupUi(this);
this->cameraReset = false;
this->m_ui.setupUi(this);
this->m_cameraReset = false;

// Set up the buttons
setupViewButtons();

// Set the cut button to create a slice on the data
QObject::connect(this->ui.cutButton, SIGNAL(clicked()), this,
QObject::connect(this->m_ui.cutButton, SIGNAL(clicked()), this,
SLOT(onCutButtonClicked()));

// Listen to a change in the active source, to adapt our rebin buttons
QObject::connect(&pqActiveObjects::instance(), SIGNAL(sourceChanged(pqPipelineSource*)),
this, SLOT(activeSourceChangeListener(pqPipelineSource*)));

// Set the scale button to create the ScaleWorkspace operator
QObject::connect(this->ui.scaleButton, SIGNAL(clicked()),
QObject::connect(this->m_ui.scaleButton, SIGNAL(clicked()),
this, SLOT(onScaleButtonClicked()));

this->view = this->createRenderView(this->ui.renderFrame);
this->m_view = this->createRenderView(this->m_ui.renderFrame);

QObject::connect(this->view.data(), SIGNAL(endRender()),
QObject::connect(this->m_view.data(), SIGNAL(endRender()),
this, SLOT(onRenderDone()));


Expand All @@ -83,7 +83,7 @@ void StandardView::setupViewButtons()
{

// Populate the rebin button
QMenu* rebinMenu = new QMenu(this->ui.rebinToolButton);
QMenu* rebinMenu = new QMenu(this->m_ui.rebinToolButton);

m_binMDAction = new QAction("BinMD", rebinMenu);
m_binMDAction->setIconVisibleInMenu(false);
Expand All @@ -102,8 +102,8 @@ void StandardView::setupViewButtons()
rebinMenu->addAction(m_cutMDAction);
rebinMenu->addAction(m_unbinAction);

this->ui.rebinToolButton->setPopupMode(QToolButton::InstantPopup);
this->ui.rebinToolButton->setMenu(rebinMenu);
this->m_ui.rebinToolButton->setPopupMode(QToolButton::InstantPopup);
this->m_ui.rebinToolButton->setMenu(rebinMenu);

QObject::connect(m_binMDAction, SIGNAL(triggered()),
this, SLOT(onRebin()), Qt::QueuedConnection);
Expand All @@ -122,12 +122,12 @@ void StandardView::destroyView()
{
pqObjectBuilder *builder = pqApplicationCore::instance()->getObjectBuilder();
this->destroyFilter(builder, QString("Slice"));
builder->destroy(this->view);
builder->destroy(this->m_view);
}

pqRenderView* StandardView::getView()
{
return this->view.data();
return this->m_view.data();
}

void StandardView::render()
Expand All @@ -143,12 +143,12 @@ void StandardView::render()

if (this->isPeaksWorkspace(this->origSrc))
{
this->ui.cutButton->setEnabled(false);
this->m_ui.cutButton->setEnabled(false);
}

// Show the data
pqDataRepresentation *drep = builder->createDataRepresentation(\
this->origSrc->getOutputPort(0), this->view);
this->origSrc->getOutputPort(0), this->m_view);
QString reptype = "Surface";
if (this->isPeaksWorkspace(this->origSrc))
{
Expand Down Expand Up @@ -182,7 +182,7 @@ void StandardView::onCutButtonClicked()
void StandardView::onScaleButtonClicked()
{
pqObjectBuilder *builder = pqApplicationCore::instance()->getObjectBuilder();
this->scaler = builder->createFilter("filters",
this->m_scaler = builder->createFilter("filters",
"MantidParaViewScaleWorkspace",
this->getPvActiveSrc());
}
Expand All @@ -193,41 +193,41 @@ void StandardView::onScaleButtonClicked()
*/
void StandardView::onRenderDone()
{
if (this->cameraReset)
if (this->m_cameraReset)
{
this->resetCamera();
this->cameraReset = false;
this->m_cameraReset = false;
}
}

void StandardView::renderAll()
{
this->view->render();
this->m_view->render();
}

void StandardView::resetDisplay()
{
this->view->resetDisplay();
this->view->forceRender();
this->m_view->resetDisplay();
this->m_view->forceRender();
}

void StandardView::resetCamera()
{
this->view->resetCamera();
this->view->forceRender();
this->m_view->resetCamera();
this->m_view->forceRender();
}

/**
* This function enables the cut button for the standard view.
*/
void StandardView::updateUI()
{
this->ui.cutButton->setEnabled(true);
this->m_ui.cutButton->setEnabled(true);
}

void StandardView::updateView()
{
this->cameraReset = true;
this->m_cameraReset = true;
}

void StandardView::closeSubWindows()
Expand Down Expand Up @@ -303,7 +303,7 @@ void StandardView::allowUnbinOption(bool allow) {


/**
* Listen for a change of the active source in order to check if the the
* Listen for a change of the active source in order to check if the
* active source is an MDEventSource for which we allow rebinning.
*/
void StandardView::activeSourceChangeListener(pqPipelineSource* source)
Expand Down

0 comments on commit 5fd01c9

Please sign in to comment.