For another project, please consult its home page to locate the current issue tracker.
View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0009330 | ParaView | Bug | public | 2009-07-28 21:03 | 2009-08-13 22:32 | ||||
Reporter | Alan Scott | ||||||||
Assigned To | Utkarsh Ayachit | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | |||||||||
Target Version | 3.6.2 | Fixed in Version | 3.6.2 | ||||||
Summary | 0009330: Turn off Object Id and FileId for plots | ||||||||
Description | Could we please turn off ObjectId and FileId by default with all plots? These two variables never change, and will never be used. Nice to have for 3.6.2. | ||||||||
Tags | No tags attached. | ||||||||
Project | |||||||||
Topic Name | |||||||||
Type | |||||||||
Attached Files | ChartHiddenSeries.patch [^] (33,171 bytes) 2009-07-29 18:33 [Show Content] [Hide Content]Index: Qt/Components/pqApplicationOptions.cxx =================================================================== RCS file: /cvsroot/ParaView3/ParaView3/Qt/Components/pqApplicationOptions.cxx,v retrieving revision 1.12 diff -u -r1.12 pqApplicationOptions.cxx --- Qt/Components/pqApplicationOptions.cxx 31 Mar 2009 16:47:05 -0000 1.12 +++ Qt/Components/pqApplicationOptions.cxx 29 Jul 2009 22:32:47 -0000 @@ -40,6 +40,7 @@ #include "pqAnimationScene.h" #include "pqApplicationCore.h" +#include "pqChartRepresentation.h" #include "pqObjectInspectorWidget.h" #include "pqPluginManager.h" #include "pqRenderView.h" @@ -151,6 +152,19 @@ this->Internal->AnimationCacheLimitLabel, SLOT(setEnabled(bool))); + QObject::connect(this->Internal->ChartHiddenSeries, + SIGNAL(itemChanged(QListWidgetItem*)), + this, SIGNAL(changesAvailable())); + + QObject::connect(this->Internal->ChartNewHiddenSeries, SIGNAL(clicked(bool)), + this, SLOT(onChartNewHiddenSeries())); + QObject::connect(this->Internal->ChartDeleteHiddenSeries, + SIGNAL(clicked(bool)), + this, SLOT(onChartDeleteHiddenSeries())); + QObject::connect(this->Internal->ChartResetHiddenSeries, + SIGNAL(clicked(bool)), + this, SLOT(onChartResetHiddenSeries())); + QMenu* paletteMenu = new QMenu(this->Internal->Palette) << pqSetName("paletteMenu"); this->Internal->Palette->setMenu(paletteMenu); @@ -241,6 +255,13 @@ pqAnimationScene::setCacheLimitSetting( this->Internal->AnimationCacheLimit->value()); + QStringList hidden; + for (int i = 0; i < this->Internal->ChartHiddenSeries->count(); i++) + { + hidden << this->Internal->ChartHiddenSeries->item(i)->text(); + } + pqChartRepresentation::setHiddenSeriesSetting(hidden); + pqApplicationCore::instance()->loadGlobalPropertiesFromSettings(); // render all views. @@ -290,6 +311,17 @@ pqAnimationScene::getCacheGeometrySetting()); this->Internal->AnimationCacheLimit->setValue( pqAnimationScene::getCacheLimitSetting()); + + while (this->Internal->ChartHiddenSeries->count() > 0) + { + delete this->Internal->ChartHiddenSeries->takeItem(0); + } + foreach (QString hidden, pqChartRepresentation::getHiddenSeriesSetting()) + { + QListWidgetItem *item + = new QListWidgetItem(hidden, this->Internal->ChartHiddenSeries); + item->setFlags(Qt::ItemIsSelectable|Qt::ItemIsEditable|Qt::ItemIsEnabled); + } } //----------------------------------------------------------------------------- @@ -346,3 +378,44 @@ { this->loadPalette(action->objectName()); } + +//----------------------------------------------------------------------------- +void pqApplicationOptions::onChartNewHiddenSeries() +{ + QListWidgetItem *item = new QListWidgetItem(""); + item->setFlags(Qt::ItemIsSelectable|Qt::ItemIsEditable|Qt::ItemIsEnabled); + this->Internal->ChartHiddenSeries->insertItem(0, item); + this->Internal->ChartHiddenSeries->editItem(item); + + emit this->changesAvailable(); +} + +//----------------------------------------------------------------------------- +void pqApplicationOptions::onChartDeleteHiddenSeries() +{ + foreach (QListWidgetItem *item, + this->Internal->ChartHiddenSeries->selectedItems()) + { + int row = this->Internal->ChartHiddenSeries->row(item); + delete this->Internal->ChartHiddenSeries->takeItem(row); + } + + emit this->changesAvailable(); +} + +//----------------------------------------------------------------------------- +void pqApplicationOptions::onChartResetHiddenSeries() +{ + while (this->Internal->ChartHiddenSeries->count() > 0) + { + delete this->Internal->ChartHiddenSeries->takeItem(0); + } + foreach (QString hidden, pqChartRepresentation::defaultHiddenSeriesSetting()) + { + QListWidgetItem *item + = new QListWidgetItem(hidden, this->Internal->ChartHiddenSeries); + item->setFlags(Qt::ItemIsSelectable|Qt::ItemIsEditable|Qt::ItemIsEnabled); + } + + emit this->changesAvailable(); +} Index: Qt/Components/pqApplicationOptions.h =================================================================== RCS file: /cvsroot/ParaView3/ParaView3/Qt/Components/pqApplicationOptions.h,v retrieving revision 1.4 diff -u -r1.4 pqApplicationOptions.h --- Qt/Components/pqApplicationOptions.h 9 Mar 2009 18:47:00 -0000 1.4 +++ Qt/Components/pqApplicationOptions.h 29 Jul 2009 22:32:47 -0000 @@ -65,6 +65,9 @@ protected slots: void resetColorsToDefault(); void onPalette(QAction*); + void onChartNewHiddenSeries(); + void onChartDeleteHiddenSeries(); + void onChartResetHiddenSeries(); private: class pqInternal; Index: Qt/Components/Resources/UI/pqApplicationOptions.ui =================================================================== RCS file: /cvsroot/ParaView3/ParaView3/Qt/Components/Resources/UI/pqApplicationOptions.ui,v retrieving revision 1.10 diff -u -r1.10 pqApplicationOptions.ui --- Qt/Components/Resources/UI/pqApplicationOptions.ui 31 Mar 2009 16:47:07 -0000 1.10 +++ Qt/Components/Resources/UI/pqApplicationOptions.ui 29 Jul 2009 22:32:47 -0000 @@ -1,117 +1,103 @@ -<ui version="4.0" > +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> <class>pqApplicationOptions</class> - <widget class="QWidget" name="pqApplicationOptions" > - <property name="geometry" > + <widget class="QWidget" name="pqApplicationOptions"> + <property name="geometry"> <rect> <x>0</x> <y>0</y> - <width>400</width> - <height>370</height> + <width>412</width> + <height>392</height> </rect> </property> - <property name="windowTitle" > + <property name="windowTitle"> <string>Form</string> </property> - <layout class="QVBoxLayout" > - <property name="spacing" > - <number>6</number> - </property> - <property name="leftMargin" > - <number>9</number> - </property> - <property name="topMargin" > - <number>9</number> - </property> - <property name="rightMargin" > - <number>9</number> - </property> - <property name="bottomMargin" > - <number>9</number> - </property> + <layout class="QVBoxLayout"> <item> - <widget class="QStackedWidget" name="stackedWidget" > - <property name="currentIndex" > + <widget class="QStackedWidget" name="stackedWidget"> + <property name="currentIndex"> <number>0</number> </property> - <widget class="QWidget" name="General" > - <layout class="QGridLayout" > - <item row="0" column="0" > - <widget class="QLabel" name="label_4" > - <property name="text" > + <widget class="QWidget" name="General"> + <layout class="QGridLayout"> + <item row="0" column="0"> + <widget class="QLabel" name="label_4"> + <property name="text"> <string>Default View</string> </property> </widget> </item> - <item row="0" column="1" colspan="2" > - <widget class="QComboBox" name="DefaultViewType" /> + <item row="0" column="1" colspan="2"> + <widget class="QComboBox" name="DefaultViewType"/> </item> - <item row="1" column="0" > - <widget class="QLabel" name="label" > - <property name="text" > + <item row="1" column="0"> + <widget class="QLabel" name="label"> + <property name="text"> <string>Heart-Beat Interval</string> </property> </widget> </item> - <item row="1" column="1" > - <widget class="QLineEdit" name="HeartBeatTimeout" > - <property name="toolTip" > - <string><html><p>Set the interval in <b>minutes</b> after which the client sends a heart beat message to the server to avoid connection termination due to inactivity. <b>0</b> means no heartbeats.</p></html></string> + <item row="1" column="1"> + <widget class="QLineEdit" name="HeartBeatTimeout"> + <property name="toolTip"> + <string><html><p>Set the interval in <b>minutes</b> after which the client sends a heart beat message to the server to avoid connection termination due to inactivity. <b>0</b> means no heartbeats.</p></html></string> </property> - <property name="statusTip" > - <string><html><p>Set the interval in <b>minutes</b> after which the client sends a heart beat message to the server to avoid connection termination due to inactivity. <b>0</b> means no heartbeats.</p></html></string> + <property name="statusTip"> + <string><html><p>Set the interval in <b>minutes</b> after which the client sends a heart beat message to the server to avoid connection termination due to inactivity. <b>0</b> means no heartbeats.</p></html></string> </property> - <property name="whatsThis" > - <string><html><p>Set the interval in <b>minutes</b> after which the client sends a heart beat message to the server to avoid connection termination due to inactivity. <b>0</b> means no heartbeats.</p></html></string> + <property name="whatsThis"> + <string><html><p>Set the interval in <b>minutes</b> after which the client sends a heart beat message to the server to avoid connection termination due to inactivity. <b>0</b> means no heartbeats.</p></html></string> </property> </widget> </item> - <item row="1" column="2" > - <widget class="QLabel" name="label_2" > - <property name="sizePolicy" > - <sizepolicy vsizetype="Fixed" hsizetype="Fixed" > + <item row="1" column="2"> + <widget class="QLabel" name="label_2"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="text" > + <property name="text"> <string>mins</string> </property> </widget> </item> - <item row="2" column="0" > - <widget class="QLabel" name="label_3" > - <property name="text" > + <item row="2" column="0"> + <widget class="QLabel" name="label_3"> + <property name="text"> <string>Auto Accept</string> </property> </widget> </item> - <item row="2" column="1" > - <widget class="QCheckBox" name="AutoAccept" > - <property name="text" > + <item row="2" column="1"> + <widget class="QCheckBox" name="AutoAccept"> + <property name="text"> <string/> </property> </widget> </item> - <item row="3" column="0" > - <widget class="QLabel" name="label_5" > - <property name="text" > + <item row="3" column="0"> + <widget class="QLabel" name="label_5"> + <property name="text"> <string>Crash recovery</string> </property> </widget> </item> - <item row="3" column="1" > - <widget class="QCheckBox" name="CrashRecovery" > - <property name="text" > + <item row="3" column="1"> + <widget class="QCheckBox" name="CrashRecovery"> + <property name="text"> <string/> </property> </widget> </item> - <item row="4" column="0" colspan="3" > + <item row="4" column="0" colspan="3"> <spacer> - <property name="orientation" > + <property name="orientation"> <enum>Qt::Vertical</enum> </property> - <property name="sizeHint" > + <property name="sizeHint" stdset="0"> <size> <width>364</width> <height>157</height> @@ -121,132 +107,133 @@ </item> </layout> </widget> - <widget class="QWidget" name="Colors" > - <layout class="QVBoxLayout" > + <widget class="QWidget" name="Colors"> + <layout class="QVBoxLayout"> <item> - <widget class="QTextEdit" name="textEdit" > - <property name="enabled" > + <widget class="QTextEdit" name="textEdit"> + <property name="enabled"> <bool>false</bool> </property> - <property name="readOnly" > + <property name="readOnly"> <bool>true</bool> </property> - <property name="html" > - <string><html><head><meta name="qrichtext" content="1" /><style type="text/css"> + <property name="html"> + <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Helvetica'; font-size:9pt;">These are color categories. When assigning colors to objects, one can select one of these catergories. In that case if color is changed in this dialog, then all colors assigned to the same category are updated automatically.</p></body></html></string> +</style></head><body style=" font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Helvetica'; font-size:9pt;">These are color categories. When assigning colors to objects, one can select one of these catergories. In that case if color is changed in this dialog, then all colors assigned to the same category are updated automatically.</span></p></body></html></string> </property> - <property name="acceptRichText" > + <property name="acceptRichText"> <bool>false</bool> </property> </widget> </item> <item> - <widget class="pqColorChooserButton" name="ForegroundColor" > - <property name="sizePolicy" > - <sizepolicy vsizetype="Fixed" hsizetype="Minimum" > + <widget class="pqColorChooserButton" name="ForegroundColor"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="text" > + <property name="text"> <string>Foreground Color</string> </property> </widget> </item> <item> - <widget class="pqColorChooserButton" name="BackgroundColor" > - <property name="sizePolicy" > - <sizepolicy vsizetype="Fixed" hsizetype="Minimum" > + <widget class="pqColorChooserButton" name="BackgroundColor"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="text" > + <property name="text"> <string>Background Color</string> </property> </widget> </item> <item> - <widget class="pqColorChooserButton" name="SurfaceColor" > - <property name="sizePolicy" > - <sizepolicy vsizetype="Fixed" hsizetype="Minimum" > + <widget class="pqColorChooserButton" name="SurfaceColor"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="text" > + <property name="text"> <string>Surface Color</string> </property> </widget> </item> <item> - <widget class="pqColorChooserButton" name="TextAnnotationColor" > - <property name="sizePolicy" > - <sizepolicy vsizetype="Fixed" hsizetype="Minimum" > + <widget class="pqColorChooserButton" name="TextAnnotationColor"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="text" > + <property name="text"> <string>Text Color</string> </property> </widget> </item> <item> - <widget class="pqColorChooserButton" name="SelectionColor" > - <property name="sizePolicy" > - <sizepolicy vsizetype="Fixed" hsizetype="Minimum" > + <widget class="pqColorChooserButton" name="SelectionColor"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="text" > + <property name="text"> <string>Selection Color</string> </property> </widget> </item> <item> - <widget class="pqColorChooserButton" name="EdgeColor" > - <property name="sizePolicy" > - <sizepolicy vsizetype="Fixed" hsizetype="Minimum" > + <widget class="pqColorChooserButton" name="EdgeColor"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="text" > + <property name="text"> <string>Edge Color</string> </property> </widget> </item> <item> - <layout class="QHBoxLayout" > + <layout class="QHBoxLayout"> <item> - <widget class="QToolButton" name="Palette" > - <property name="text" > + <widget class="QToolButton" name="Palette"> + <property name="text"> <string>Choose Palette</string> </property> - <property name="popupMode" > + <property name="popupMode"> <enum>QToolButton::MenuButtonPopup</enum> </property> - <property name="toolButtonStyle" > + <property name="toolButtonStyle"> <enum>Qt::ToolButtonTextBesideIcon</enum> </property> - <property name="autoRaise" > + <property name="autoRaise"> <bool>false</bool> </property> - <property name="arrowType" > + <property name="arrowType"> <enum>Qt::NoArrow</enum> </property> </widget> </item> <item> <spacer> - <property name="orientation" > + <property name="orientation"> <enum>Qt::Horizontal</enum> </property> - <property name="sizeHint" > + <property name="sizeHint" stdset="0"> <size> <width>53</width> <height>28</height> @@ -255,8 +242,8 @@ </spacer> </item> <item> - <widget class="QPushButton" name="ResetColorsToDefault" > - <property name="text" > + <widget class="QPushButton" name="ResetColorsToDefault"> + <property name="text"> <string>Reset to Default</string> </property> </widget> @@ -265,10 +252,10 @@ </item> <item> <spacer> - <property name="orientation" > + <property name="orientation"> <enum>Qt::Vertical</enum> </property> - <property name="sizeHint" > + <property name="sizeHint" stdset="0"> <size> <width>364</width> <height>16</height> @@ -278,53 +265,53 @@ </item> </layout> </widget> - <widget class="QWidget" name="Animation" > - <layout class="QGridLayout" > - <item row="0" column="0" colspan="2" > - <widget class="QCheckBox" name="AnimationCacheGeometry" > - <property name="toolTip" > + <widget class="QWidget" name="Animation"> + <layout class="QGridLayout"> + <item row="0" column="0" colspan="2"> + <widget class="QCheckBox" name="AnimationCacheGeometry"> + <property name="toolTip"> <string>Cache geometry during playback.</string> </property> - <property name="text" > + <property name="text"> <string>Cache Geometry</string> </property> - <property name="checked" > + <property name="checked"> <bool>true</bool> </property> </widget> </item> - <item row="1" column="0" > - <widget class="QLabel" name="AnimationCacheLimitLabel" > - <property name="toolTip" > - <string><html>Set the cache limit (in KBs) per node. If while playing animations, the cache size on any node goes beyond this threshold, caching will automatically be disabled.</html></string> + <item row="1" column="0"> + <widget class="QLabel" name="AnimationCacheLimitLabel"> + <property name="toolTip"> + <string><html>Set the cache limit (in KBs) per node. If while playing animations, the cache size on any node goes beyond this threshold, caching will automatically be disabled.</html></string> </property> - <property name="text" > + <property name="text"> <string>Cache Limit (in KBs)</string> </property> </widget> </item> - <item row="1" column="1" > - <widget class="QSpinBox" name="AnimationCacheLimit" > - <property name="toolTip" > - <string><html>Set the cache limit (in KBs) per node. If while playing animations, the cache size on any node goes beyond this threshold, caching will automatically be disabled.</html></string> + <item row="1" column="1"> + <widget class="QSpinBox" name="AnimationCacheLimit"> + <property name="toolTip"> + <string><html>Set the cache limit (in KBs) per node. If while playing animations, the cache size on any node goes beyond this threshold, caching will automatically be disabled.</html></string> </property> - <property name="minimum" > + <property name="minimum"> <number>10</number> </property> - <property name="maximum" > + <property name="maximum"> <number>999999999</number> </property> - <property name="singleStep" > + <property name="singleStep"> <number>100</number> </property> </widget> </item> - <item row="2" column="0" colspan="2" > + <item row="2" column="0" colspan="2"> <spacer> - <property name="orientation" > + <property name="orientation"> <enum>Qt::Vertical</enum> </property> - <property name="sizeHint" > + <property name="sizeHint" stdset="0"> <size> <width>358</width> <height>101</height> @@ -334,6 +321,96 @@ </item> </layout> </widget> + <widget class="QWidget" name="Charts"> + <layout class="QGridLayout"> + <item row="0" column="0"> + <layout class="QGridLayout"> + <property name="spacing"> + <number>2</number> + </property> + <item row="0" column="0" colspan="2"> + <widget class="QLabel" name="label_6"> + <property name="text"> + <string>Hidden Series</string> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="QPushButton" name="ChartNewHiddenSeries"> + <property name="toolTip"> + <string>Add a regular expression to the hidden series list.</string> + </property> + <property name="text"> + <string>New</string> + </property> + </widget> + </item> + <item row="2" column="1"> + <widget class="QPushButton" name="ChartDeleteHiddenSeries"> + <property name="toolTip"> + <string>Remove the selected regular expression from the hidden series list.</string> + </property> + <property name="text"> + <string>Delete</string> + </property> + </widget> + </item> + <item row="3" column="1"> + <spacer name="verticalSpacer"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>118</height> + </size> + </property> + </spacer> + </item> + <item row="1" column="0" rowspan="4"> + <widget class="QListWidget" name="ChartHiddenSeries"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> + <horstretch>1</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="toolTip"> + <string>By default, all series in a data set are initially shown in a chart except those with names that match the regular expressions in this list.</string> + </property> + <property name="selectionMode"> + <enum>QAbstractItemView::ExtendedSelection</enum> + </property> + </widget> + </item> + <item row="4" column="1"> + <widget class="QPushButton" name="ChartResetHiddenSeries"> + <property name="toolTip"> + <string>Reset the hidden series list to the defaults that come with ParaView.</string> + </property> + <property name="text"> + <string>Reset to Default</string> + </property> + </widget> + </item> + </layout> + </item> + <item row="1" column="0"> + <spacer name="verticalSpacer_2"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>116</height> + </size> + </property> + </spacer> + </item> + </layout> + </widget> </widget> </item> </layout> @@ -348,19 +425,19 @@ <resources/> <connections/> <designerdata> - <property name="gridDeltaX" > + <property name="gridDeltaX"> <number>2</number> </property> - <property name="gridDeltaY" > + <property name="gridDeltaY"> <number>2</number> </property> - <property name="gridSnapX" > + <property name="gridSnapX"> <bool>true</bool> </property> - <property name="gridSnapY" > + <property name="gridSnapY"> <bool>true</bool> </property> - <property name="gridVisible" > + <property name="gridVisible"> <bool>true</bool> </property> </designerdata> Index: Qt/Core/pqChartRepresentation.cxx =================================================================== RCS file: /cvsroot/ParaView3/ParaView3/Qt/Core/pqChartRepresentation.cxx,v retrieving revision 1.4 diff -u -r1.4 pqChartRepresentation.cxx --- Qt/Core/pqChartRepresentation.cxx 1 May 2009 17:11:46 -0000 1.4 +++ Qt/Core/pqChartRepresentation.cxx 29 Jul 2009 22:32:47 -0000 @@ -31,12 +31,15 @@ ========================================================================*/ #include "pqChartRepresentation.h" +#include "pqApplicationCore.h" +#include "pqSettings.h" #include "pqSMAdaptor.h" #include "vtkSMDataRepresentationProxy.h" #include "vtkSMPropertyHelper.h" #include "vtkSMProxy.h" #include <QString> +#include <QStringList> #include <QRegExp> //----------------------------------------------------------------------------- @@ -102,40 +105,24 @@ vtkSMPropertyHelper(proxy, "UseIndexForXAxis").Set(0); } - // * Turn off Y-series that don't make much sense to show by default. + // * Turn off Y-series that don't make much sense to show by default if (proxy->GetProperty("SeriesVisibility")) { vtkSMPropertyHelper helper(proxy, "SeriesVisibility"); foreach (QVariant varray, series_arrays) { QString array = varray.toString(); - if (!y_array.isNull() && array != y_array) + if (!y_array.isNull() && (array != y_array)) { // when y_array is set, the only visible array is the y-array. helper.SetStatus(array.toAscii().data(), 0); } - else if (array.contains(QRegExp("\\(\\d+\\)$"))) + else if (!x_array.isNull() && (array == x_array)) { - // by default only "vector magnitudes" are plotted, not the components. + // No point in plotting the series used as the x-array. helper.SetStatus(array.toAscii().data(), 0); } - else if (array == "vtkValidPointMask") - { - helper.SetStatus(array.toAscii().data(), 0); - } - else if (array == "arc_length") - { - helper.SetStatus(array.toAscii().data(), 0); - } - else if (array.contains(QRegExp("^Points"))) - { - helper.SetStatus(array.toAscii().data(), 0); - } - else if (array == "Time") - { - helper.SetStatus(array.toAscii().data(), 0); - } - else if (array.contains(QRegExp("^Pedigree"))) + else if (this->queryHideSeries(array)) { helper.SetStatus(array.toAscii().data(), 0); } @@ -145,3 +132,50 @@ proxy->UpdateVTKObjects(); } + +//----------------------------------------------------------------------------- +void pqChartRepresentation::setHiddenSeriesSetting(QStringList list) +{ + pqSettings *settings = pqApplicationCore::instance()->settings(); + settings->setValue("Charting/HiddenSeries", list); +} + +QStringList pqChartRepresentation::getHiddenSeriesSetting() +{ + pqSettings *settings = pqApplicationCore::instance()->settings(); + QVariant hiddenSeries = settings->value("Charting/HiddenSeries", + pqChartRepresentation::defaultHiddenSeriesSetting()); + return hiddenSeries.toStringList(); +} + +QStringList pqChartRepresentation::defaultHiddenSeriesSetting() +{ + QStringList hiddenSeries; + + // Arrays of special meaning that typically are not plotted. + hiddenSeries << "Time"; + hiddenSeries << "arc_length"; + hiddenSeries << "Points.*"; + hiddenSeries << "vtkValidPointMask"; + hiddenSeries << "Pedigree.*"; + + // Typical arrays of types that have no need to be plotted. + hiddenSeries << "ObjectId"; + hiddenSeries << "FileId"; + + // Show only the vector magnitudes. Hide the components. + hiddenSeries << ".*\\(\\d+\\)"; + + return hiddenSeries; +} + +//----------------------------------------------------------------------------- +bool pqChartRepresentation::queryHideSeries(QString array) +{ + foreach (QString hideExpr, pqChartRepresentation::getHiddenSeriesSetting()) + { + if (QRegExp(hideExpr).exactMatch(array)) return true; + } + + return false; +} Index: Qt/Core/pqChartRepresentation.h =================================================================== RCS file: /cvsroot/ParaView3/ParaView3/Qt/Core/pqChartRepresentation.h,v retrieving revision 1.1 diff -u -r1.1 pqChartRepresentation.h --- Qt/Core/pqChartRepresentation.h 1 May 2009 15:16:55 -0000 1.1 +++ Qt/Core/pqChartRepresentation.h 29 Jul 2009 22:32:47 -0000 @@ -57,6 +57,16 @@ /// of the proxy and sets them to default values. virtual void setDefaultPropertyValues(); + /// Get/set the application setting that is a list of regular expressions to + /// match chart series that should not initially be visible. + static void setHiddenSeriesSetting(QStringList list); + static QStringList getHiddenSeriesSetting(); + static QStringList defaultHiddenSeriesSetting(); + + /// Convenience method that determines if a series of the given name should + /// be hidden by default. + static bool queryHideSeries(QString array); + private: pqChartRepresentation(const pqChartRepresentation&); // Not implemented. void operator=(const pqChartRepresentation&); // Not implemented. | ||||||||
Relationships | |
Relationships |
Notes | |
(0017006) Ken Moreland (manager) 2009-07-29 11:05 |
I agree. I also wonder if there should be a user-configurable option to edit the list of plot series to turn off by default. |
(0017015) Ken Moreland (manager) 2009-07-29 18:35 |
I've just uploaded a patch that fixes this problem. In addition, it adds a panel to the Application Settings that allows a user to edit the "hidden series" list. You should still continue to raise bugs if you think a variable name should always be in this list, but this gives users an workaround while waiting for us slow developers to implement the requested change. I won't have a chance to upload this patch in over a week, so I am going to throw it over to Utkarsh. Utkarsh is the one who would have to move it over to the 3.6 branch anyway. |
(0017031) Utkarsh Ayachit (administrator) 2009-07-31 10:22 |
Committed to CVS head. Will commit to 3.6 branch once any dashboard issues, if any, clear up. /cvsroot/ParaView3/ParaView3/Qt/Components/pqApplicationOptions.cxx,v <-- Qt/Components/pqApplicationOptions.cxx new revision: 1.13; previous revision: 1.12 /cvsroot/ParaView3/ParaView3/Qt/Components/pqApplicationOptions.h,v <-- Qt/Components/pqApplicationOptions.h new revision: 1.5; previous revision: 1.4 /cvsroot/ParaView3/ParaView3/Qt/Components/Resources/UI/pqApplicationOptions.ui,v <-- Qt/Components/Resources/UI/pqApplicationOptions.ui new revision: 1.11; previous revision: 1.10 cvs commit: [14:21:12] waiting for cvsuser's lock in /cvsroot/ParaView3/ParaView3/Qt/Core cvs commit: [14:21:42] obtained lock in /cvsroot/ParaView3/ParaView3/Qt/Core /cvsroot/ParaView3/ParaView3/Qt/Core/pqChartRepresentation.cxx,v <-- Qt/Core/pqChartRepresentation.cxx new revision: 1.5; previous revision: 1.4 /cvsroot/ParaView3/ParaView3/Qt/Core/pqChartRepresentation.h,v <-- Qt/Core/pqChartRepresentation.h new revision: 1.2; previous revision: 1.1 |
(0017059) Utkarsh Ayachit (administrator) 2009-08-04 15:53 |
Committed to 3.6 /cvsroot/ParaView3/ParaView3/Qt/Core/pqChartRepresentation.cxx,v <-- Qt/Core/pqChartRepresentation.cxx new revision: 1.4.2.1; previous revision: 1.4 /cvsroot/ParaView3/ParaView3/Qt/Core/pqChartRepresentation.h,v <-- Qt/Core/pqChartRepresentation.h new revision: 1.1.2.1; previous revision: 1.1 |
(0017126) Alan Scott (manager) 2009-08-13 22:32 |
Most excellent! Tested local server, XP. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2009-07-28 21:03 | Alan Scott | New Issue | |
2009-07-29 11:05 | Ken Moreland | Note Added: 0017006 | |
2009-07-29 15:43 | Ken Moreland | Status | backlog => tabled |
2009-07-29 15:43 | Ken Moreland | Assigned To | => Ken Moreland |
2009-07-29 18:33 | Ken Moreland | File Added: ChartHiddenSeries.patch | |
2009-07-29 18:35 | Ken Moreland | Note Added: 0017015 | |
2009-07-29 18:36 | Ken Moreland | Assigned To | Ken Moreland => Utkarsh Ayachit |
2009-07-31 10:22 | Utkarsh Ayachit | Note Added: 0017031 | |
2009-08-04 15:53 | Utkarsh Ayachit | Note Added: 0017059 | |
2009-08-04 15:53 | Utkarsh Ayachit | Status | tabled => @80@ |
2009-08-04 15:53 | Utkarsh Ayachit | Fixed in Version | => 3.6.2 |
2009-08-04 15:53 | Utkarsh Ayachit | Resolution | open => fixed |
2009-08-13 22:32 | Alan Scott | Note Added: 0017126 | |
2009-08-13 22:32 | Alan Scott | Status | @80@ => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |