Commit 150a4ce2 authored by cyrush's avatar cyrush

Added option to request ghost zones to the inverse ghost zone filter. This resolves #122

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@11841 18c085ea-50e0-402c-830e-de6fd14e8384
parent 26aebb3c
<?xml version="1.0"?>
<Plugin name="InverseGhostZone" type="operator" label="Inverse Ghost Zone" version="1.0" enabled="true" iconFile="InverseGhostZone.xpm" category="Debugging">
<Attribute name="InverseGhostZoneAttributes" purpose="This class contains attributes for the inverse ghost zone operator." persistent="true">
<Plugin name="InverseGhostZone" type="operator" label="Inverse Ghost Zone" version="1.0" enabled="true" mdspecificcode="false" engspecificcode="false" onlyengine="false" noengine="false" iconFile="InverseGhostZone.xpm" category="Debugging">
<Attribute name="InverseGhostZoneAttributes" purpose="This class contains attributes for the inverse ghost zone operator." persistent="true" keyframe="true" exportAPI="" exportInclude="">
<Enum name="ShowType">
GhostZonesOnly
GhostZonesAndRealZones
</Enum>
<Field name="requestGhostZones" label="Request Ghost Zones" type="bool">
true
</Field>
<Field name="showType" label="Zones to Display:" type="enum" subtype="ShowType">
GhostZonesOnly
</Field>
......
......@@ -76,14 +76,62 @@ InverseGhostZoneAttributes::ShowType_FromString(const std::string &s, InverseGho
return false;
}
// ****************************************************************************
// Method: InverseGhostZoneAttributes::InverseGhostZoneAttributes
//
// Purpose:
// Init utility for the InverseGhostZoneAttributes class.
//
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: omitted
//
// Modifications:
//
// ****************************************************************************
void InverseGhostZoneAttributes::Init()
{
requestGhostZones = true;
showType = GhostZonesOnly;
InverseGhostZoneAttributes::SelectAll();
}
// ****************************************************************************
// Method: InverseGhostZoneAttributes::InverseGhostZoneAttributes
//
// Purpose:
// Copy utility for the InverseGhostZoneAttributes class.
//
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: omitted
//
// Modifications:
//
// ****************************************************************************
void InverseGhostZoneAttributes::Copy(const InverseGhostZoneAttributes &obj)
{
requestGhostZones = obj.requestGhostZones;
showType = obj.showType;
InverseGhostZoneAttributes::SelectAll();
}
// Type map format string
const char *InverseGhostZoneAttributes::TypeMapFormatString = "i";
const char *InverseGhostZoneAttributes::TypeMapFormatString = INVERSEGHOSTZONEATTRIBUTES_TMFS;
const AttributeGroup::private_tmfs_t InverseGhostZoneAttributes::TmfsStruct = {INVERSEGHOSTZONEATTRIBUTES_TMFS};
// ****************************************************************************
// Method: InverseGhostZoneAttributes::InverseGhostZoneAttributes
//
// Purpose:
// Constructor for the InverseGhostZoneAttributes class.
// Default constructor for the InverseGhostZoneAttributes class.
//
// Note: Autogenerated by xml2atts.
//
......@@ -97,7 +145,28 @@ const char *InverseGhostZoneAttributes::TypeMapFormatString = "i";
InverseGhostZoneAttributes::InverseGhostZoneAttributes() :
AttributeSubject(InverseGhostZoneAttributes::TypeMapFormatString)
{
showType = GhostZonesOnly;
InverseGhostZoneAttributes::Init();
}
// ****************************************************************************
// Method: InverseGhostZoneAttributes::InverseGhostZoneAttributes
//
// Purpose:
// Constructor for the derived classes of InverseGhostZoneAttributes class.
//
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: omitted
//
// Modifications:
//
// ****************************************************************************
InverseGhostZoneAttributes::InverseGhostZoneAttributes(private_tmfs_t tmfs) :
AttributeSubject(tmfs.tmfs)
{
InverseGhostZoneAttributes::Init();
}
// ****************************************************************************
......@@ -118,9 +187,28 @@ InverseGhostZoneAttributes::InverseGhostZoneAttributes() :
InverseGhostZoneAttributes::InverseGhostZoneAttributes(const InverseGhostZoneAttributes &obj) :
AttributeSubject(InverseGhostZoneAttributes::TypeMapFormatString)
{
showType = obj.showType;
InverseGhostZoneAttributes::Copy(obj);
}
// ****************************************************************************
// Method: InverseGhostZoneAttributes::InverseGhostZoneAttributes
//
// Purpose:
// Copy constructor for derived classes of the InverseGhostZoneAttributes class.
//
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: omitted
//
// Modifications:
//
// ****************************************************************************
SelectAll();
InverseGhostZoneAttributes::InverseGhostZoneAttributes(const InverseGhostZoneAttributes &obj, private_tmfs_t tmfs) :
AttributeSubject(tmfs.tmfs)
{
InverseGhostZoneAttributes::Copy(obj);
}
// ****************************************************************************
......@@ -162,9 +250,9 @@ InverseGhostZoneAttributes&
InverseGhostZoneAttributes::operator = (const InverseGhostZoneAttributes &obj)
{
if (this == &obj) return *this;
showType = obj.showType;
SelectAll();
InverseGhostZoneAttributes::Copy(obj);
return *this;
}
......@@ -187,7 +275,8 @@ bool
InverseGhostZoneAttributes::operator == (const InverseGhostZoneAttributes &obj) const
{
// Create the return value
return ((showType == obj.showType));
return ((requestGhostZones == obj.requestGhostZones) &&
(showType == obj.showType));
}
// ****************************************************************************
......@@ -331,7 +420,8 @@ InverseGhostZoneAttributes::NewInstance(bool copy) const
void
InverseGhostZoneAttributes::SelectAll()
{
Select(ID_showType, (void *)&showType);
Select(ID_requestGhostZones, (void *)&requestGhostZones);
Select(ID_showType, (void *)&showType);
}
///////////////////////////////////////////////////////////////////////////////
......@@ -364,6 +454,12 @@ InverseGhostZoneAttributes::CreateNode(DataNode *parentNode, bool completeSave,
// Create a node for InverseGhostZoneAttributes.
DataNode *node = new DataNode("InverseGhostZoneAttributes");
if(completeSave || !FieldsEqual(ID_requestGhostZones, &defaultObject))
{
addToParent = true;
node->AddNode(new DataNode("requestGhostZones", requestGhostZones));
}
if(completeSave || !FieldsEqual(ID_showType, &defaultObject))
{
addToParent = true;
......@@ -406,6 +502,8 @@ InverseGhostZoneAttributes::SetFromNode(DataNode *parentNode)
return;
DataNode *node;
if((node = searchNode->GetNode("requestGhostZones")) != 0)
SetRequestGhostZones(node->AsBool());
if((node = searchNode->GetNode("showType")) != 0)
{
// Allow enums to be int or string in the config file
......@@ -428,6 +526,13 @@ InverseGhostZoneAttributes::SetFromNode(DataNode *parentNode)
// Set property methods
///////////////////////////////////////////////////////////////////////////////
void
InverseGhostZoneAttributes::SetRequestGhostZones(bool requestGhostZones_)
{
requestGhostZones = requestGhostZones_;
Select(ID_requestGhostZones, (void *)&requestGhostZones);
}
void
InverseGhostZoneAttributes::SetShowType(InverseGhostZoneAttributes::ShowType showType_)
{
......@@ -439,6 +544,12 @@ InverseGhostZoneAttributes::SetShowType(InverseGhostZoneAttributes::ShowType sho
// Get property methods
///////////////////////////////////////////////////////////////////////////////
bool
InverseGhostZoneAttributes::GetRequestGhostZones() const
{
return requestGhostZones;
}
InverseGhostZoneAttributes::ShowType
InverseGhostZoneAttributes::GetShowType() const
{
......@@ -469,7 +580,8 @@ InverseGhostZoneAttributes::GetFieldName(int index) const
{
switch (index)
{
case ID_showType: return "showType";
case ID_requestGhostZones: return "requestGhostZones";
case ID_showType: return "showType";
default: return "invalid index";
}
}
......@@ -494,7 +606,8 @@ InverseGhostZoneAttributes::GetFieldType(int index) const
{
switch (index)
{
case ID_showType: return FieldType_enum;
case ID_requestGhostZones: return FieldType_bool;
case ID_showType: return FieldType_enum;
default: return FieldType_unknown;
}
}
......@@ -519,7 +632,8 @@ InverseGhostZoneAttributes::GetFieldTypeName(int index) const
{
switch (index)
{
case ID_showType: return "enum";
case ID_requestGhostZones: return "bool";
case ID_showType: return "enum";
default: return "invalid index";
}
}
......@@ -546,6 +660,11 @@ InverseGhostZoneAttributes::FieldsEqual(int index_, const AttributeGroup *rhs) c
bool retval = false;
switch (index_)
{
case ID_requestGhostZones:
{ // new scope
retval = (requestGhostZones == obj.requestGhostZones);
}
break;
case ID_showType:
{ // new scope
retval = (showType == obj.showType);
......
......@@ -41,6 +41,7 @@
#include <string>
#include <AttributeSubject.h>
// ****************************************************************************
// Class: InverseGhostZoneAttributes
//
......@@ -65,13 +66,23 @@ public:
GhostZonesAndRealZones
};
// These constructors are for objects of this class
InverseGhostZoneAttributes();
InverseGhostZoneAttributes(const InverseGhostZoneAttributes &obj);
protected:
// These constructors are for objects derived from this class
InverseGhostZoneAttributes(private_tmfs_t tmfs);
InverseGhostZoneAttributes(const InverseGhostZoneAttributes &obj, private_tmfs_t tmfs);
public:
virtual ~InverseGhostZoneAttributes();
virtual InverseGhostZoneAttributes& operator = (const InverseGhostZoneAttributes &obj);
virtual bool operator == (const InverseGhostZoneAttributes &obj) const;
virtual bool operator != (const InverseGhostZoneAttributes &obj) const;
private:
void Init();
void Copy(const InverseGhostZoneAttributes &obj);
public:
virtual const std::string TypeName() const;
virtual bool CopyAttributes(const AttributeGroup *);
......@@ -82,9 +93,11 @@ public:
virtual void SelectAll();
// Property setting methods
void SetRequestGhostZones(bool requestGhostZones_);
void SetShowType(ShowType showType_);
// Property getting methods
bool GetRequestGhostZones() const;
ShowType GetShowType() const;
// Persistence methods
......@@ -107,14 +120,19 @@ public:
// IDs that can be used to identify fields in case statements
enum {
ID_showType = 0
ID_requestGhostZones = 0,
ID_showType,
ID__LAST
};
private:
int showType;
bool requestGhostZones;
int showType;
// Static class format string for type map.
static const char *TypeMapFormatString;
static const private_tmfs_t TmfsStruct;
};
#define INVERSEGHOSTZONEATTRIBUTES_TMFS "bi"
#endif
......@@ -59,7 +59,7 @@ import llnl.visit.Plugin;
public class InverseGhostZoneAttributes extends AttributeSubject implements Plugin
{
private static int numAdditionalAttributes = 1;
private static int InverseGhostZoneAttributes_numAdditionalAtts = 2;
// Enum values
public final static int SHOWTYPE_GHOSTZONESONLY = 0;
......@@ -68,22 +68,25 @@ public class InverseGhostZoneAttributes extends AttributeSubject implements Plug
public InverseGhostZoneAttributes()
{
super(numAdditionalAttributes);
super(InverseGhostZoneAttributes_numAdditionalAtts);
requestGhostZones = true;
showType = SHOWTYPE_GHOSTZONESONLY;
}
public InverseGhostZoneAttributes(int nMoreFields)
{
super(numAdditionalAttributes + nMoreFields);
super(InverseGhostZoneAttributes_numAdditionalAtts + nMoreFields);
requestGhostZones = true;
showType = SHOWTYPE_GHOSTZONESONLY;
}
public InverseGhostZoneAttributes(InverseGhostZoneAttributes obj)
{
super(numAdditionalAttributes);
super(InverseGhostZoneAttributes_numAdditionalAtts);
requestGhostZones = obj.requestGhostZones;
showType = obj.showType;
SelectAll();
......@@ -96,43 +99,62 @@ public class InverseGhostZoneAttributes extends AttributeSubject implements Plug
public int GetNumAdditionalAttributes()
{
return numAdditionalAttributes;
return InverseGhostZoneAttributes_numAdditionalAtts;
}
public boolean equals(InverseGhostZoneAttributes obj)
{
// Create the return value
return ((showType == obj.showType));
return ((requestGhostZones == obj.requestGhostZones) &&
(showType == obj.showType));
}
public String GetName() { return "InverseGhostZone"; }
public String GetVersion() { return "1.0"; }
// Property setting methods
public void SetRequestGhostZones(boolean requestGhostZones_)
{
requestGhostZones = requestGhostZones_;
Select(0);
}
public void SetShowType(int showType_)
{
showType = showType_;
Select(0);
Select(1);
}
// Property getting methods
public int GetShowType() { return showType; }
public boolean GetRequestGhostZones() { return requestGhostZones; }
public int GetShowType() { return showType; }
// Write and read methods.
public void WriteAtts(CommunicationBuffer buf)
{
if(WriteSelect(0, buf))
buf.WriteBool(requestGhostZones);
if(WriteSelect(1, buf))
buf.WriteInt(showType);
}
public void ReadAtts(int index, CommunicationBuffer buf)
{
SetShowType(buf.ReadInt());
switch(index)
{
case 0:
SetRequestGhostZones(buf.ReadBool());
break;
case 1:
SetShowType(buf.ReadInt());
break;
}
}
public String toString(String indent)
{
String str = new String();
str = str + boolToString("requestGhostZones", requestGhostZones, indent) + "\n";
str = str + indent + "showType = ";
if(showType == SHOWTYPE_GHOSTZONESONLY)
str = str + "SHOWTYPE_GHOSTZONESONLY";
......@@ -144,6 +166,7 @@ public class InverseGhostZoneAttributes extends AttributeSubject implements Plug
// Attributes
private int showType;
private boolean requestGhostZones;
private int showType;
}
......@@ -50,7 +50,7 @@
// Note: Autogenerated by xml2python. Do not modify by hand!
//
// Programmer: xml2python
// Creation: Fri Aug 8 13:23:36 PST 2008
// Creation: omitted
//
// ****************************************************************************
......@@ -76,6 +76,11 @@ PyInverseGhostZoneAttributes_ToString(const InverseGhostZoneAttributes *atts, co
std::string str;
char tmpStr[1000];
if(atts->GetRequestGhostZones())
SNPRINTF(tmpStr, 1000, "%srequestGhostZones = 1\n", prefix);
else
SNPRINTF(tmpStr, 1000, "%srequestGhostZones = 0\n", prefix);
str += tmpStr;
const char *showType_names = "GhostZonesOnly, GhostZonesAndRealZones";
switch (atts->GetShowType())
{
......@@ -103,6 +108,30 @@ InverseGhostZoneAttributes_Notify(PyObject *self, PyObject *args)
return Py_None;
}
/*static*/ PyObject *
InverseGhostZoneAttributes_SetRequestGhostZones(PyObject *self, PyObject *args)
{
InverseGhostZoneAttributesObject *obj = (InverseGhostZoneAttributesObject *)self;
int ival;
if(!PyArg_ParseTuple(args, "i", &ival))
return NULL;
// Set the requestGhostZones in the object.
obj->data->SetRequestGhostZones(ival != 0);
Py_INCREF(Py_None);
return Py_None;
}
/*static*/ PyObject *
InverseGhostZoneAttributes_GetRequestGhostZones(PyObject *self, PyObject *args)
{
InverseGhostZoneAttributesObject *obj = (InverseGhostZoneAttributesObject *)self;
PyObject *retval = PyInt_FromLong(obj->data->GetRequestGhostZones()?1L:0L);
return retval;
}
/*static*/ PyObject *
InverseGhostZoneAttributes_SetShowType(PyObject *self, PyObject *args)
{
......@@ -138,8 +167,10 @@ InverseGhostZoneAttributes_GetShowType(PyObject *self, PyObject *args)
static struct PyMethodDef InverseGhostZoneAttributes_methods[] = {
PyMethodDef PyInverseGhostZoneAttributes_methods[INVERSEGHOSTZONEATTRIBUTES_NMETH] = {
{"Notify", InverseGhostZoneAttributes_Notify, METH_VARARGS},
{"SetRequestGhostZones", InverseGhostZoneAttributes_SetRequestGhostZones, METH_VARARGS},
{"GetRequestGhostZones", InverseGhostZoneAttributes_GetRequestGhostZones, METH_VARARGS},
{"SetShowType", InverseGhostZoneAttributes_SetShowType, METH_VARARGS},
{"GetShowType", InverseGhostZoneAttributes_GetShowType, METH_VARARGS},
{NULL, NULL}
......@@ -168,8 +199,10 @@ InverseGhostZoneAttributes_compare(PyObject *v, PyObject *w)
}
PyObject *
InverseGhostZoneAttributes_getattr(PyObject *self, char *name)
PyInverseGhostZoneAttributes_getattr(PyObject *self, char *name)
{
if(strcmp(name, "requestGhostZones") == 0)
return InverseGhostZoneAttributes_GetRequestGhostZones(self, NULL);
if(strcmp(name, "showType") == 0)
return InverseGhostZoneAttributes_GetShowType(self, NULL);
if(strcmp(name, "GhostZonesOnly") == 0)
......@@ -178,11 +211,11 @@ InverseGhostZoneAttributes_getattr(PyObject *self, char *name)
return PyInt_FromLong(long(InverseGhostZoneAttributes::GhostZonesAndRealZones));
return Py_FindMethod(InverseGhostZoneAttributes_methods, self, name);
return Py_FindMethod(PyInverseGhostZoneAttributes_methods, self, name);
}
static int
InverseGhostZoneAttributes_setattr(PyObject *self, char *name, PyObject *args)
int
PyInverseGhostZoneAttributes_setattr(PyObject *self, char *name, PyObject *args)
{
// Create a tuple to contain the arguments since all of the Set
// functions expect a tuple.
......@@ -191,13 +224,17 @@ InverseGhostZoneAttributes_setattr(PyObject *self, char *name, PyObject *args)
Py_INCREF(args);
PyObject *obj = NULL;
if(strcmp(name, "showType") == 0)
if(strcmp(name, "requestGhostZones") == 0)
obj = InverseGhostZoneAttributes_SetRequestGhostZones(self, tuple);
else if(strcmp(name, "showType") == 0)
obj = InverseGhostZoneAttributes_SetShowType(self, tuple);
if(obj != NULL)
Py_DECREF(obj);
Py_DECREF(tuple);
if( obj == NULL)
PyErr_Format(PyExc_RuntimeError, "Unable to set unknown attribute: '%s'", name);
return (obj != NULL) ? 0 : -1;
}
......@@ -243,8 +280,8 @@ static PyTypeObject InverseGhostZoneAttributesType =
//
(destructor)InverseGhostZoneAttributes_dealloc, // tp_dealloc
(printfunc)InverseGhostZoneAttributes_print, // tp_print
(getattrfunc)InverseGhostZoneAttributes_getattr, // tp_getattr
(setattrfunc)InverseGhostZoneAttributes_setattr, // tp_setattr
(getattrfunc)PyInverseGhostZoneAttributes_getattr, // tp_getattr
(setattrfunc)PyInverseGhostZoneAttributes_setattr, // tp_setattr
(cmpfunc)InverseGhostZoneAttributes_compare, // tp_compare
(reprfunc)0, // tp_repr
//
......
......@@ -44,17 +44,21 @@
//
// Functions exposed to the VisIt module.
//
#define INVERSEGHOSTZONEATTRIBUTES_NMETH 6
void PyInverseGhostZoneAttributes_StartUp(InverseGhostZoneAttributes *subj, void *data);
void PyInverseGhostZoneAttributes_CloseDown();
PyMethodDef * PyInverseGhostZoneAttributes_GetMethodTable(int *nMethods);
PyMethodDef * PyInverseGhostZoneAttributes_GetMethodTable(int *nMethods);
bool PyInverseGhostZoneAttributes_Check(PyObject *obj);
InverseGhostZoneAttributes * PyInverseGhostZoneAttributes_FromPyObject(PyObject *obj);
PyObject * PyInverseGhostZoneAttributes_New();
PyObject * PyInverseGhostZoneAttributes_Wrap(const InverseGhostZoneAttributes *attr);
PyObject * PyInverseGhostZoneAttributes_New();
PyObject * PyInverseGhostZoneAttributes_Wrap(const InverseGhostZoneAttributes *attr);
void PyInverseGhostZoneAttributes_SetParent(PyObject *obj, PyObject *parent);
void PyInverseGhostZoneAttributes_SetDefaults(const InverseGhostZoneAttributes *atts);
std::string PyInverseGhostZoneAttributes_GetLogString();
std::string PyInverseGhostZoneAttributes_ToString(const InverseGhostZoneAttributes *, const char *);
PyObject * PyInverseGhostZoneAttributes_getattr(PyObject *self, char *name);
int PyInverseGhostZoneAttributes_setattr(PyObject *self, char *name, PyObject *args);
extern PyMethodDef PyInverseGhostZoneAttributes_methods[INVERSEGHOSTZONEATTRIBUTES_NMETH];
#endif
......@@ -118,9 +118,7 @@ QvisInverseGhostZoneWindow::~QvisInverseGhostZoneWindow()
// Creation: omitted
//
// Modifications:
// Cyrus Harrison, Mon Aug 18 20:03:17 PDT 2008
// Qt4 Port - Autogen and changed radio button labels.
//
//
// ****************************************************************************
void
......@@ -129,22 +127,27 @@ QvisInverseGhostZoneWindow::CreateWindowContents()
QGridLayout *mainLayout = new QGridLayout(0);
topLayout->addLayout(mainLayout);
requestGhostZones = new QCheckBox(tr("Request Ghost Zones"), central);
connect(requestGhostZones, SIGNAL(toggled(bool)),
this, SLOT(requestGhostZonesChanged(bool)));
mainLayout->addWidget(requestGhostZones, 0,0);
showTypeLabel = new QLabel(tr("Zones to Display:"), central);
mainLayout->addWidget(showTypeLabel,0,0);
showType = new QButtonGroup(central);
QWidget *showTypeWidget = new QWidget(central);
QHBoxLayout *showTypeLayout = new QHBoxLayout(showTypeWidget);
mainLayout->addWidget(showTypeLabel,1,0);
showType = new QWidget(central);
showTypeButtonGroup= new QButtonGroup(showType);
QHBoxLayout *showTypeLayout = new QHBoxLayout(showType);
showTypeLayout->setMargin(0);
showTypeLayout->setSpacing(10);
QRadioButton *showTypeShowTypeGhostZonesOnly = new QRadioButton(tr("Ghost zones only"), showTypeWidget);
showType->addButton(showTypeShowTypeGhostZonesOnly,0);
QRadioButton *showTypeShowTypeGhostZonesOnly = new QRadioButton(tr("GhostZonesOnly"), showType);
showTypeButtonGroup->addButton(showTypeShowTypeGhostZonesOnly,0);
showTypeLayout->addWidget(showTypeShowTypeGhostZonesOnly);
QRadioButton *showTypeShowTypeGhostZonesAndRealZones = new QRadioButton(tr("Ghost zones and real zones"), showTypeWidget);
showType->addButton(showTypeShowTypeGhostZonesAndRealZones,1);
QRadioButton *showTypeShowTypeGhostZonesAndRealZones = new QRadioButton(tr("GhostZonesAndRealZones"), showType);
showTypeButtonGroup->addButton(showTypeShowTypeGhostZonesAndRealZones,1);
showTypeLayout->addWidget(showTypeShowTypeGhostZonesAndRealZones);
connect(showType, SIGNAL(buttonClicked(int)),
connect(showTypeButtonGroup, SIGNAL(buttonClicked(int)),
this, SLOT(showTypeChanged(int)));
mainLayout->addWidget(showTypeWidget, 0,1);
mainLayout->addWidget(showType, 1,1);
}
......@@ -180,11 +183,16 @@ QvisInverseGhostZoneWindow::UpdateWindow(bool doAll)
switch(i)
{
case InverseGhostZoneAttributes::ID_requestGhostZones:
requestGhostZones->blockSignals(true);
requestGhostZones->setChecked(atts->GetRequestGhostZones());
requestGhostZones->blockSignals(false);
break;
case InverseGhostZoneAttributes::ID_showType:
showType->blockSignals(true);
if(showType->button((int)atts->GetShowType()) != 0)
showType->button((int)atts->GetShowType())->setChecked(true);
showType->blockSignals(false);
showTypeButtonGroup->blockSignals(true);
if(showTypeButtonGroup->button((int)atts->GetShowType()) != 0)
showTypeButtonGroup->button((int)atts->GetShowType())->setChecked(true);
showTypeButtonGroup->blockSignals(false);
break;
}
}
......@@ -217,6 +225,15 @@ QvisInverseGhostZoneWindow::GetCurrentValues(int which_widget)
//
void
QvisInverseGhostZoneWindow::requestGhostZonesChanged(bool val)
{
atts->SetRequestGhostZones(val);
SetUpdate(false);
Apply();
}
void
QvisInverseGhostZoneWindow::showTypeChanged(int val)
{
......
......@@ -86,9 +86,12 @@ class QvisInverseGhostZoneWindow : public QvisOperatorWindow
void UpdateWindow(bool doAll);
virtual void GetCurrentValues(int which_widget);
private slots:
void requestGhostZonesChanged(bool val);
void showTypeChanged(int val);
private:
QButtonGroup *showType;
QCheckBox *requestGhostZones;
QWidget *showType;
QButtonGroup *showTypeButtonGroup;
QLabel *showTypeLabel;
InverseGhostZoneAttributes *atts;
......
......@@ -226,3 +226,28 @@ avtInverseGhostZoneFilter::UpdateDataObjectInfo(void)
}
// ****************************************************************************
// Method: avtInverseGhostZoneFilter::ModifyContract
//
// Purpose:
// Request ghost zones if desired.
//
// Programmer: Cyrus Harrison.
// Creation: Thu Jul 8 13:01:33 PDT 2010
//
// Modifications:
//
//
// ****************************************************************************
avtContract_p
avtInverseGhostZoneFilter::ModifyContract(avtContract_p in_spec)
{
avtContract_p contract = new avtContract(in_spec);
if(atts.GetRequestGhostZones())
contract->GetDataRequest()->SetDesiredGhostDataType(GHOST_ZONE_DATA);
return contract;
}