Commit 00c9dd9a authored by Utkarsh Ayachit's avatar Utkarsh Ayachit

ENH: This commit is to add support for display panels for the new bar and line

chart views. It includes a plethora of sub commits:
* Added support for vtkQtChartSeriesOptionsModel which is a model from which the
  series options are obtained by the chart layer. Also includes concrete
  subclasses for this one.
* vtkSMProperty now has a Parent ivar which refers to the Proxy to which the
  property belongs. This was needed for the vtkSMChartingArraysInformationHelper
  to make it easy to fill up the info property with the list of available
  arrays.
* Added support to vtkSMPropertyHelper to handle setting/getting of status
  properties i.e. StringVectorProperties with first value being the array name
  (or similar) and the second (or a few more) being the value or status for that
  array. This is used to get/set the series options with ease.
parent cbcbe267
......@@ -73,6 +73,7 @@ QT4_WRAP_CPP(MOC_BUILT_SOURCES
pqApplicationOptions.h
pqApplicationOptionsDialog.h
pqAutoGeneratedObjectPanel.h
pqBarChartDisplayPanel.h
pqBarChartDisplayProxyEditor.h
pqBarChartOptionsEditor.h
pqBoxChartOptionsEditor.h
......@@ -84,6 +85,7 @@ QT4_WRAP_CPP(MOC_BUILT_SOURCES
pqChartOptionsEditor.h
pqChartViewContextMenu.h
pqChartViewContextMenuHandler.h
pqChartSeriesEditorModel.h
pqClientAboutDialog.h
pqClientMainWindow.h
pqClipPanel.h
......@@ -127,6 +129,7 @@ QT4_WRAP_CPP(MOC_BUILT_SOURCES
pqKeyFrameEditor.h
pqKeyFrameTimeValidator.h
pqKeyFrameTypeWidget.h
pqLineChartDisplayPanel.h
pqLineChartOptionsEditor.h
pqLineSourceWidget.h
pqLineWidget.h
......@@ -238,6 +241,7 @@ SET(UI_FORMS
Resources/UI/pqAnimationSettings.ui
#Resources/UI/pqAnimationViewWidget.ui
Resources/UI/pqApplicationOptions.ui
Resources/UI/pqBarChartDisplayPanel.ui
Resources/UI/pqBarChartDisplayEditor.ui
Resources/UI/pqBarChartOptionsWidget.ui
Resources/UI/pqBoxChartOptionsWidget.ui
......@@ -269,6 +273,7 @@ SET(UI_FORMS
Resources/UI/pqImplicitPlaneWidget.ui
Resources/UI/pqKeyFrameEditor.ui
Resources/UI/pqKeyFrameTypeWidget.ui
Resources/UI/pqLineChartDisplayPanel.ui
Resources/UI/pqLineChartOptionsWidget.ui
Resources/UI/pqLineSourceControls.ui
Resources/UI/pqLineWidget.ui
......@@ -394,6 +399,8 @@ ADD_LIBRARY(pqComponents
pqApplicationOptionsDialog.h
pqAutoGeneratedObjectPanel.cxx
pqAutoGeneratedObjectPanel.h
pqBarChartDisplayPanel.cxx
pqBarChartDisplayPanel.h
pqBarChartDisplayProxyEditor.cxx
pqBarChartDisplayProxyEditor.h
pqBarChartOptionsEditor.cxx
......@@ -426,6 +433,8 @@ ADD_LIBRARY(pqComponents
pqChartViewContextMenu.h
pqChartViewContextMenuHandler.cxx
pqChartViewContextMenuHandler.h
pqChartSeriesEditorModel.cxx
pqChartSeriesEditorModel.h
pqClientAboutDialog.cxx
pqClientAboutDialog.h
pqClientMainWindow.cxx
......@@ -521,6 +530,8 @@ ADD_LIBRARY(pqComponents
pqKeyFrameTimeValidator.h
pqKeyFrameTypeWidget.cxx
pqKeyFrameTypeWidget.h
pqLineChartDisplayPanel.cxx
pqLineChartDisplayPanel.h
pqLineChartOptionsEditor.cxx
pqLineChartOptionsEditor.h
pqLineChartOptionsHandler.cxx
......
This diff is collapsed.
This diff is collapsed.
......@@ -6,7 +6,7 @@
<x>0</x>
<y>0</y>
<width>254</width>
<height>664</height>
<height>694</height>
</rect>
</property>
<layout class="QGridLayout" >
......@@ -318,6 +318,9 @@
<property name="text" >
<string>Rows</string>
</property>
<property name="icon" >
<iconset resource="../pqComponents.qrc" >:/pqWidgets/Icons/pqSpreadsheet16.png</iconset>
</property>
</item>
</widget>
</item>
......
/*=========================================================================
Program: ParaView
Module: pqBarChartDisplayPanel.cxx
Copyright (c) 2005,2006 Sandia Corporation, Kitware Inc.
All rights reserved.
ParaView is a free software; you can redistribute it and/or modify it
under the terms of the ParaView license version 1.2.
See License_v1.2.txt for the full ParaView license.
A copy of this license can be obtained by contacting
Kitware Inc.
28 Corporate Drive
Clifton Park, NY 12065
USA
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
========================================================================*/
#include "pqBarChartDisplayPanel.h"
#include "ui_pqBarChartDisplayPanel.h"
#include "vtkSMChartTableRepresentationProxy.h"
#include "vtkSMIntVectorProperty.h"
#include <QPointer>
#include <QDebug>
#include "pqChartSeriesEditorModel.h"
#include "pqComboBoxDomain.h"
#include "pqDataRepresentation.h"
#include "pqPropertyLinks.h"
#include "pqSignalAdaptorCompositeTreeWidget.h"
#include "pqSignalAdaptors.h"
//-----------------------------------------------------------------------------
class pqBarChartDisplayPanel::pqInternal : public Ui::pqBarChartDisplayPanel
{
public:
pqInternal()
{
this->Model = 0;
}
~pqInternal()
{
delete this->Model;
this->Model = 0;
}
pqPropertyLinks Links;
vtkWeakPointer<vtkSMChartTableRepresentationProxy> ChartRepresentation;
pqChartSeriesEditorModel *Model;
};
//-----------------------------------------------------------------------------
pqBarChartDisplayPanel::pqBarChartDisplayPanel(pqRepresentation* repr,
QWidget* parentObject): Superclass(repr, parentObject), Internal(0)
{
vtkSMChartTableRepresentationProxy* proxy =
vtkSMChartTableRepresentationProxy::SafeDownCast(repr->getProxy());
if (!proxy)
{
this->setEnabled(false);
qCritical() << "pqBarChartDisplayPanel "
"can only work with vtkSMChartTableRepresentationProxy";
return;
}
this->Internal = new pqBarChartDisplayPanel::pqInternal();
this->Internal->setupUi(this);
// Create the model for showing the list of series available.
this->Internal->Model = new pqChartSeriesEditorModel(this);
this->Internal->SeriesList->setModel(this->Internal->Model);
// Give the representation to our series editor model
this->Internal->Model->setRepresentation(
qobject_cast<pqDataRepresentation*>(repr));
/// Setup property links.
// Connect ViewData checkbox to the proxy's Visibility property
this->Internal->Links.addPropertyLink(this->Internal->ViewData,
"checked", SIGNAL(stateChanged(int)),
proxy, proxy->GetProperty("Visibility"));
// Connect the X axis array
this->Internal->Links.addPropertyLink(
this->Internal->UseArrayIndex, "checked", SIGNAL(toggled(bool)),
proxy, proxy->GetProperty("UseIndexForXAxis"));
pqSignalAdaptorComboBox* xAxisArrayAdaptor = new pqSignalAdaptorComboBox(
this->Internal->XAxisArray);
pqComboBoxDomain* xAxisArrayDomain = new pqComboBoxDomain(
this->Internal->XAxisArray, proxy->GetProperty("XArrayName"));
xAxisArrayDomain->forceDomainChanged(); // init list
this->Internal->Links.addPropertyLink(
xAxisArrayAdaptor, "currentText",
SIGNAL(currentTextChanged(const QString&)),
proxy, proxy->GetProperty("XArrayName"));
// Connect the AttributeType
pqSignalAdaptorComboBox* attributeModeAdaptor = new pqSignalAdaptorComboBox(
this->Internal->AttributeMode);
this->Internal->Links.addPropertyLink(
attributeModeAdaptor, "currentText",
SIGNAL(currentTextChanged(const QString&)),
proxy, proxy->GetProperty("AttributeType"));
// Set up the CompositeIndexAdaptor
pqSignalAdaptorCompositeTreeWidget* compositeIndexAdaptor =
new pqSignalAdaptorCompositeTreeWidget(
this->Internal->CompositeIndex,
vtkSMIntVectorProperty::SafeDownCast(
proxy->GetProperty("CompositeDataSetIndex")),
/*autoUpdateVisibility=*/true);
this->Internal->Links.addPropertyLink(
compositeIndexAdaptor, "values", SIGNAL(valuesChanged()),
proxy, proxy->GetProperty("CompositeDataSetIndex"));
// Request a render when any GUI widget is changed by the user.
QObject::connect(&this->Internal->Links, SIGNAL(qtWidgetChanged()),
this, SLOT(updateAllViews()), Qt::QueuedConnection);
// Now connect to the signals fired by widgets that are not directly connected
// to the server manager properties using pqPropertyLinks.
QItemSelectionModel *model = this->Internal->SeriesList->selectionModel();
QObject::connect(model,
SIGNAL(selectionChanged(const QItemSelection &, const QItemSelection &)),
this, SLOT(updateSeriesOptions()));
QObject::connect(model,
SIGNAL(currentChanged(const QModelIndex &, const QModelIndex &)),
this, SLOT(updateSeriesOptions()));
QObject::connect(this->Internal->Model, SIGNAL(modelReset()),
this, SLOT(updateSeriesOptions()));
QObject::connect(this->Internal->SeriesEnabled, SIGNAL(stateChanged(int)),
this, SLOT(setCurrentSeriesEnabled(int)));
this->Internal->Model->reload();
this->updateSeriesOptions();
}
//-----------------------------------------------------------------------------
pqBarChartDisplayPanel::~pqBarChartDisplayPanel()
{
delete this->Internal;
this->Internal = 0;
}
//-----------------------------------------------------------------------------
void pqBarChartDisplayPanel::updateSeriesOptions()
{
}
//-----------------------------------------------------------------------------
void pqBarChartDisplayPanel::setCurrentSeriesEnabled(int state)
{
if (state == Qt::PartiallyChecked)
{
// Ignore changes to partially checked state.
return;
}
bool enabled = (state == Qt::Checked);
this->Internal->SeriesEnabled->setTristate(false);
QItemSelectionModel *model = this->Internal->SeriesList->selectionModel();
QModelIndexList indexes = model->selectedIndexes();
foreach (QModelIndex idx, indexes)
{
this->Internal->Model->setSeriesEnabled(idx.row(), enabled);
}
if (indexes.size() > 0)
{
this->updateAllViews();
}
}
/*=========================================================================
Program: ParaView
Module: pqBarChartDisplayPanel.h
Copyright (c) 2005,2006 Sandia Corporation, Kitware Inc.
All rights reserved.
ParaView is a free software; you can redistribute it and/or modify it
under the terms of the ParaView license version 1.2.
See License_v1.2.txt for the full ParaView license.
A copy of this license can be obtained by contacting
Kitware Inc.
28 Corporate Drive
Clifton Park, NY 12065
USA
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
========================================================================*/
#ifndef __pqBarChartDisplayPanel_h
#define __pqBarChartDisplayPanel_h
#include "pqDisplayPanel.h"
/// pqBarChartDisplayPanel is the display panel for BarChartRepresentation2
/// proxy i.e. the representation for bar chart view.
class PQCOMPONENTS_EXPORT pqBarChartDisplayPanel : public pqDisplayPanel
{
Q_OBJECT
typedef pqDisplayPanel Superclass;
public:
pqBarChartDisplayPanel(pqRepresentation* representation, QWidget* parent=0);
~pqBarChartDisplayPanel();
protected slots:
/// Updates the state of the widgets showing the selected series options based
/// on the active selection.
void updateSeriesOptions();
/// Update the series enabled state for currently selected series.
void setCurrentSeriesEnabled(int state);
private:
pqBarChartDisplayPanel(const pqBarChartDisplayPanel&); // Not implemented.
void operator=(const pqBarChartDisplayPanel&); // Not implemented.
class pqInternal;
pqInternal* Internal;
};
#endif
This diff is collapsed.
/*=========================================================================
Program: ParaView
Module: pqChartSeriesEditorModel.h
Copyright (c) 2005,2006 Sandia Corporation, Kitware Inc.
All rights reserved.
ParaView is a free software; you can redistribute it and/or modify it
under the terms of the ParaView license version 1.2.
See License_v1.2.txt for the full ParaView license.
A copy of this license can be obtained by contacting
Kitware Inc.
28 Corporate Drive
Clifton Park, NY 12065
USA
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
========================================================================*/
#ifndef __pqChartSeriesEditorModel_h
#define __pqChartSeriesEditorModel_h
#include "pqCheckableHeaderModel.h"
#include "pqComponentsExport.h"
#include <QColor>
#include <QPointer>
#include "vtkWeakPointer.h"
class pqDataRepresentation;
class vtkSMChartTableRepresentationProxy;
/// pqChartSeriesEditorModel is a model that can be used to connect to a
/// Tree or Table view that shows the series that be plotted. It allows the user
/// to edit certain properties of the series as well such as color/legend name.
/// It provide API to simplify changing/querying almost all the series options
/// (although not all of them are shown in the [Tree|Table] View.
class PQCOMPONENTS_EXPORT pqChartSeriesEditorModel :
public pqCheckableHeaderModel
{
Q_OBJECT
typedef pqCheckableHeaderModel Superclass;
public:
pqChartSeriesEditorModel(QObject* parent=0);
virtual ~pqChartSeriesEditorModel();
/// Set the representation for the series editor model.
/// The model must have a pqDataRepresentation for one of the charting
/// representations otherwise it will remain empty.
void setRepresentation(pqDataRepresentation* display);
pqDataRepresentation* representation() const;
/// \name QAbstractItemModel Methods
//@{
/// \brief
/// Gets the number of rows for a given index.
/// \param parent The parent index.
/// \return
/// The number of rows for the given index.
virtual int rowCount(const QModelIndex &parent=QModelIndex()) const;
/// \brief
/// Gets the number of columns for a given index.
/// \param parent The parent index.
/// \return
/// The number of columns for the given index.
virtual int columnCount(const QModelIndex &parent=QModelIndex()) const;
/// \brief
/// Gets whether or not the given index has child items.
/// \param parent The parent index.
/// \return
/// True if the given index has child items.
virtual bool hasChildren(const QModelIndex &parent=QModelIndex()) const;
/// \brief
/// Gets a model index for a given location.
/// \param row The row number.
/// \param column The column number.
/// \param parent The parent index.
/// \return
/// A model index for the given location.
virtual QModelIndex index(int row, int column,
const QModelIndex &parent=QModelIndex()) const;
/// \brief
/// Gets the parent for a given index.
/// \param index The model index.
/// \return
/// A model index for the parent of the given index.
virtual QModelIndex parent(const QModelIndex &index) const;
/// \brief
/// Gets the data for a given model index.
/// \param index The model index.
/// \param role The role to get data for.
/// \return
/// The data for the given model index.
virtual QVariant data(const QModelIndex &index,
int role=Qt::DisplayRole) const;
/// \brief
/// Gets the flags for a given model index.
///
/// The flags for an item indicate if it is enabled, editable, etc.
///
/// \param index The model index.
/// \return
/// The flags for the given model index.
virtual Qt::ItemFlags flags(const QModelIndex &index) const;
/// \brief
/// Sets the data for the given model index.
/// \param index The model index.
/// \param value The new data for the given role.
/// \param role The role to set data for.
/// \return
/// True if the data was changed successfully.
virtual bool setData(const QModelIndex &index, const QVariant &value,
int role=Qt::EditRole);
virtual QVariant headerData(int section, Qt::Orientation orient,
int role=Qt::DisplayRole) const;
//@}
public slots:
/// Reloads the model i.e. refreshes all data from the display and resets the
/// model.
void reload();
// Description:
// API to set series properties.
void setSeriesEnabled(int row, bool enabled);
void setSeriesColor(int row, const QColor &color);
void setSeriesThickness(int row, int thickness);
void setSeriesStyle(int row, int style);
void setSeriesAxisCorner(int row, int axiscorner);
void setSeriesMarkerStyle(int row, int style);
// Description:
// API to get series properties.
const char* getSeriesName(int row) const;
bool getSeriesEnabled(int row) const;
QColor getSeriesColor(int row) const;
int getSeriesThickness(int row) const;
int getSeriesStyle(int row) const;
int getSeriesAxisCorner(int row) const;
int getSeriesMarkerStyle(int row) const;
private:
QPointer<pqDataRepresentation> Representation;
vtkWeakPointer<vtkSMChartTableRepresentationProxy> RepresentationProxy;
private:
pqChartSeriesEditorModel(const pqChartSeriesEditorModel&); // Not implemented.
void operator=(const pqChartSeriesEditorModel&); // Not implemented.
};
#endif
......@@ -38,11 +38,13 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <QVBoxLayout>
#include "pqApplicationCore.h"
#include "pqBarChartDisplayPanel.h"
#include "pqBarChartDisplayProxyEditor.h"
#include "pqDisplayPanelInterface.h"
#include "pqDisplayPanelDecoratorInterface.h"
#include "pqDisplayPanelInterface.h"
#include "pqDisplayPolicy.h"
#include "pqDisplayProxyEditor.h"
#include "pqLineChartDisplayPanel.h"
#include "pqOutputPort.h"
#include "pqPipelineRepresentation.h"
#include "pqPipelineSource.h"
......@@ -76,6 +78,8 @@ public:
QString type = proxy->getProxy()->GetXMLName();
if(type == "BarChartRepresentation" ||
type == "LineChartRepresentation" ||
type == "BarChartRepresentation2" ||
type == "XYPlotRepresentation" ||
type == "SpreadSheetRepresentation" ||
qobject_cast<pqTextRepresentation*>(proxy))
......@@ -104,6 +108,15 @@ public:
return new pqBarChartDisplayProxyEditor(proxy, p);
}
if (type == QString("LineChartRepresentation"))
{
return new pqLineChartDisplayPanel(proxy, p);
}
if (type == QString("BarChartRepresentation2"))
{
return new pqBarChartDisplayPanel(proxy, p);
}
if (type == "SpreadSheetRepresentation")
{
return new pqSpreadSheetDisplayEditor(proxy, p);
......
This diff is collapsed.
/*=========================================================================
Program: ParaView
Module: pqLineChartDisplayPanel.h
Copyright (c) 2005-2008 Sandia Corporation, Kitware Inc.
All rights reserved.
ParaView is a free software; you can redistribute it and/or modify it
under the terms of the ParaView license version 1.2.
See License_v1.2.txt for the full ParaView license.
A copy of this license can be obtained by contacting
Kitware Inc.
28 Corporate Drive
Clifton Park, NY 12065
USA
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
=========================================================================*/
#ifndef __pqLineChartDisplayPanel_h
#define __pqLineChartDisplayPanel_h
#include "pqDisplayPanel.h"
class pqRepresentation;
class QModelIndex;
/// Editor widget for line chart displays.
class PQCOMPONENTS_EXPORT pqLineChartDisplayPanel : public pqDisplayPanel
{
Q_OBJECT
public:
pqLineChartDisplayPanel(pqRepresentation* display, QWidget* parent=0);
virtual ~pqLineChartDisplayPanel();
public slots:
/// Reloads the series list from the display.
void reloadSeries();
protected slots:
/// Called when the attribute mode selection changes.
void onAttributeModeChanged();
/// Slot to listen to clicks for changing color.
void activateItem(const QModelIndex &index);
void updateOptionsWidgets();
void setCurrentSeriesEnabled(int state);
void setCurrentSeriesColor(const QColor &color);
void setCurrentSeriesThickness(int thickness);
void setCurrentSeriesStyle(int listIndex);
void setCurrentSeriesAxes(int listIndex);
void setCurrentSeriesMarkerStyle(int listIndex);
private:
pqLineChartDisplayPanel(const pqLineChartDisplayPanel&); // Not implemented.
void operator=(const pqLineChartDisplayPanel&); // Not implemented.
/// Set the display whose properties this editor is editing.
/// This call will raise an error is the display is not
/// a LineChartRepresentation proxy.
void setDisplay(pqRepresentation* display);
Qt::CheckState getEnabledState() const;
class pqInternal;
pqInternal* Internal;
};
#endif
......@@ -275,16 +275,20 @@ pqDataRepresentation* pqStandardViewModules::createDisplay(const QString& displa
pqServer* server,
QObject* p)
{
if(display_type == "BarChartRepresentation" ||
display_type == "BarChartRepresentation2")
if(display_type == "BarChartRepresentation")
{
return new pqBarChartRepresentation(group, n, proxy, server, p);
}
else if (display_type == "XYPlotRepresentation"||
display_type == "LineChartRepresentation")
else if (display_type == "XYPlotRepresentation") // old line chart
{
return new pqLineChartRepresentation(group, n, proxy, server, p);
}
else if (display_type == "LineChartRepresentation" ||
display_type == "BarChartRepresentation2")
{
// new chart representations.
return new pqDataRepresentation(group, n, proxy, server, p);
}
else if (display_type == "TextSourceRepresentation")
{
return new pqTextRepresentation(group, n, proxy, server, p);
......
......@@ -46,7 +46,9 @@ SET(Kit_SRCS
vtkSMCameraLink.cxx
vtkSMCameraManipulatorProxy.cxx
vtkSMCameraProxy.cxx
vtkSMChartingArraysInformationHelper.cxx
vtkSMChartRepresentationProxy.cxx
#vtkSMChartRepresentationProxy2.cxx
vtkSMClientDeliveryRepresentationProxy.cxx
vtkSMClientDeliveryStrategyProxy.cxx
vtkSMClientServerRenderSyncManagerHelper.cxx
......@@ -219,11 +221,14 @@ SET(Kit_SRCS
IF (VTK_USE_QVTK)
SET (Kit_SRCS
${Kit_SRCS}
vtkSMChartOptionsProxy.cxx
vtkSMBarChartSeriesOptionsProxy.cxx
vtkSMBarChartViewProxy.cxx
vtkSMBarChartRepresentationProxy.cxx
vtkSMChartNamedOptionsModelProxy.cxx
vtkSMChartOptionsProxy.cxx
vtkSMChartTableRepresentationProxy.cxx
vtkSMChartViewProxy.cxx
vtkSMLineChartSeriesOptionsProxy.cxx
vtkSMLineChartViewProxy.cxx
vtkSMLineChartRepresentationProxy.cxx
)
FIND_PACKAGE(Qt4)
INCLUDE(${QT_USE_FILE})
......@@ -233,6 +238,11 @@ IF (VTK_USE_QVTK)
${ParaView_BINARY_DIR}/VTK/GUISupport/Qt
${ParaView_SOURCE_DIR}/VTK/GUISupport/Qt/Chart
${ParaView_BINARY_DIR}/VTK/GUISupport/Qt/Chart)
SET_SOURCE_FILES_PROPERTIES(
vtkSMChartViewProxy.cxx
vtkSMChartNamedOptionsModelProxy.cxx
ABSTRACT)
ENDIF (VTK_USE_QVTK)
......
/*=========================================================================
Program: ParaView
Module: vtkSMBarChartSeriesOptionsProxy.cxx