Commit 30a64d6b authored by Utkarsh Ayachit's avatar Utkarsh Ayachit

ENH: Moved properties/domains around so that the domains on the

XYPlotRepresentation now show arrays produced by the PolyLineToRectilinearGrid
filter.
parent 7583059c
......@@ -175,6 +175,7 @@ SET(Kit_SRCS
vtkSMXDMFInformationHelper.cxx
vtkSMXDMFPropertyDomain.cxx
vtkSMXMLPVAnimationWriterProxy.cxx
vtkSMXYPlotRepresentationProxy.cxx
)
SET( ServerManagerNonWrapped_SRCS
......
/*=========================================================================
Program: ParaView
Module: vtkSMXYPlotRepresentationProxy.cxx
Copyright (c) Kitware, Inc.
All rights reserved.
See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#include "vtkSMXYPlotRepresentationProxy.h"
#include "vtkObjectFactory.h"
#include "vtkSMSourceProxy.h"
#include "vtkSMProxyProperty.h"
vtkStandardNewMacro(vtkSMXYPlotRepresentationProxy);
vtkCxxRevisionMacro(vtkSMXYPlotRepresentationProxy, "1.1");
//----------------------------------------------------------------------------
vtkSMXYPlotRepresentationProxy::vtkSMXYPlotRepresentationProxy()
{
}
//----------------------------------------------------------------------------
vtkSMXYPlotRepresentationProxy::~vtkSMXYPlotRepresentationProxy()
{
}
//----------------------------------------------------------------------------
bool vtkSMXYPlotRepresentationProxy::EndCreateVTKObjects()
{
if (!this->Superclass::EndCreateVTKObjects())
{
return false;
}
vtkSMProxy* subProxy = this->GetSubProxy("DummyConsumer");
vtkSMProxyProperty* pp = vtkSMProxyProperty::SafeDownCast(
subProxy->GetProperty("Input"));
pp->RemoveAllProxies();
pp->AddProxy(this->PostProcessorProxy);
pp->UpdateDependentDomains();
}
//----------------------------------------------------------------------------
void vtkSMXYPlotRepresentationProxy::Update(vtkSMViewProxy* view)
{
if (!this->ObjectsCreated)
{
vtkErrorMacro("Objects not created yet!");
return;
}
this->Superclass::Update(view);
vtkSMProxy* subProxy = this->GetSubProxy("DummyConsumer");
vtkSMProxyProperty* pp = vtkSMProxyProperty::SafeDownCast(
subProxy->GetProperty("Input"));
pp->UpdateDependentDomains();
}
//----------------------------------------------------------------------------
void vtkSMXYPlotRepresentationProxy::PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os, indent);
}
/*=========================================================================
Program: ParaView
Module: vtkSMXYPlotRepresentationProxy.h
Copyright (c) Kitware, Inc.
All rights reserved.
See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
// .NAME vtkSMXYPlotRepresentationProxy
// .SECTION Description
//
#ifndef __vtkSMXYPlotRepresentationProxy_h
#define __vtkSMXYPlotRepresentationProxy_h
#include "vtkSMClientDeliveryRepresentationProxy.h"
class VTK_EXPORT vtkSMXYPlotRepresentationProxy :
public vtkSMClientDeliveryRepresentationProxy
{
public:
static vtkSMXYPlotRepresentationProxy* New();
vtkTypeRevisionMacro(vtkSMXYPlotRepresentationProxy,
vtkSMClientDeliveryRepresentationProxy);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// Called to update the Display. Default implementation does nothing.
// Argument is the view requesting the update. Can be null in the
// case when something other than a view is requesting the update.
// Overridden to update the domains on the DummyConsumer proxy.
virtual void Update() { this->Update(0); };
virtual void Update(vtkSMViewProxy* view);
//BTX
protected:
vtkSMXYPlotRepresentationProxy();
~vtkSMXYPlotRepresentationProxy();
// Description:
// This method is called after CreateVTKObjects().
// This gives subclasses an opportunity to do some post-creation
// initialization.
virtual bool EndCreateVTKObjects();
private:
vtkSMXYPlotRepresentationProxy(const vtkSMXYPlotRepresentationProxy&); // Not implemented
void operator=(const vtkSMXYPlotRepresentationProxy&); // Not implemented
//ETX
};
#endif
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