QMainWindow(parent),
_pAppC(0),
_simplePipeline(),
- _autoApply(true)
+ _autoApply(true),
+ _filterMenu(0)
{
_mainWindow.setupUi(this);
_autoApply = _mainWindow.actionAuto_apply->isChecked();
void PLMainWindow::finishUISetup()
{
_pAppC = PVViewer_Core::GetPVApplication();
- PVViewer_GUIElements * pvgui = PVViewer_GUIElements::GetInstance(this);
- QWidget * wprop = pvgui->getPropertiesPanel();
- QWidget * wpipe = pvgui->getPipelineBrowserWidget();
+ _pvgui = PVViewer_GUIElements::GetInstance(this);
+
+ QWidget * wprop = _pvgui->getPropertiesPanel();
+ QWidget * wpipe = _pvgui->getPipelineBrowserWidget();
wprop->setParent(_mainWindow.propFrame);
_mainWindow.verticalLayoutProp->addWidget(wprop);
wpipe->setParent(_mainWindow.pipelineFrame);
_mainWindow.verticalLayoutPipe->addWidget(wpipe);
- PVViewer_GUIElements * pvge = PVViewer_GUIElements::GetInstance(this);
-// pvge->setToolBarVisible(false);
-
// In this mockup, we play on the parent widget visibility (a QFrame), so show these:
- pvge->getPipelineBrowserWidget()->show();
- pvge->getPropertiesPanel()->show();
+ _pvgui->getPipelineBrowserWidget()->show();
+ _pvgui->getPropertiesPanel()->show();
// and hide these:
_mainWindow.propFrame->hide();
_mainWindow.pipelineFrame->hide();
-// pvge->setToolBarEnabled(false);
-// pvge->setToolBarVisible(false);
+// _pvgui->setToolBarEnabled(false);
+// _pvgui->setToolBarVisible(false);
}
isChecked ? _mainWindow.pipelineFrame->show() : _mainWindow.pipelineFrame->hide();
}
+void PLMainWindow::onBuildFilterMenu()
+{
+ if(_filterMenu == 0)
+ {
+ _filterMenu = _pvgui->getFiltersMenu();
+// _filterMenu = new QMenu();
+ _filterMenu->setTitle("Filters");
+ this->menuBar()->addMenu(_filterMenu);
+ }
+ else
+ QMessageBox::warning(this, "Warning", "Filter menu already added!");
+}
+
void PLMainWindow::addTab()
{
int c = _mainWindow.tabWidget->count();
// Connect buttons
QObject::connect(newTab, SIGNAL(onInsertSingleView(PLViewTab *)), this, SLOT(insertSingleView(PLViewTab *)));
QObject::connect(newTab, SIGNAL(onInsertMultiView(PLViewTab *)), this, SLOT(insertMultiView(PLViewTab *)));
+ QObject::connect(newTab, SIGNAL(onInsertSpreadsheetView(PLViewTab *)), this, SLOT(insertSpreadsheetView(PLViewTab *)));
}
void PLMainWindow::deleteTab()
pqActiveObjects::instance().setActiveView(pqview);
}
+void PLMainWindow::insertSpreadsheetView(PLViewTab * tab)
+{
+ // Create a new view proxy on the server
+ pqObjectBuilder* builder = _pAppC->getObjectBuilder();
+ pqServer* active_serv = pqActiveObjects::instance().activeServer();
+
+ std::cout << "About to create spreadsheet view ..." << std::endl;
+ pqView * pqview = builder->createView(QString("SpreadSheetView"), active_serv);
+ std::cout << "Created: " << pqview << "!" << std::endl;
+
+ // Retrieve its widget and pass it to the Qt tab:
+ QWidget* viewWidget = pqview->widget();
+
+// QWidget* viewWidget = new QPushButton("toto");
+ tab->hideAndReplace(viewWidget, pqview);
+
+ pqActiveObjects::instance().setActiveView(pqview);
+}
+
+
void PLMainWindow::insertMultiView(PLViewTab * tab)
{
// Retrieve TabbedMultiView and see if it is already attached to someone:
}
}
-
void PLMainWindow::doShrink()
{
if(!_simplePipeline.isEmpty())
--- /dev/null
+<ParaViewFilters>
+ <Category name="Common" menu_label="&Common" preserve_order="1"
+ show_in_toolbar="1">
+ <Proxy group="filters" name="Calculator" icon=":/pqWidgets/Icons/pqCalculator24.png"/>
+ <Proxy group="filters" name="Contour" icon=":/pqWidgets/Icons/pqIsosurface24.png"/>
+ <Proxy group="filters" name="Clip" icon=":/pqWidgets/Icons/pqClip24.png"/>
+ <Proxy group="filters" name="Cut" icon=":/pqWidgets/Icons/pqSlice24.png"/>
+ <Proxy group="filters" name="Threshold" icon=":/pqWidgets/Icons/pqThreshold24.png"/>
+ <Proxy group="filters" name="ExtractGrid" icon=":/pqWidgets/Icons/pqExtractGrid24.png"/>
+ <Proxy group="filters" name="Glyph" icon=":/pqWidgets/Icons/pqGlyph24.png"/>
+ <Proxy group="filters" name="StreamTracer" icon=":/pqWidgets/Icons/pqStreamTracer24.png"/>
+ <Proxy group="filters" name="WarpVector" icon=":/pqWidgets/Icons/pqWarp24.png"/>
+ <Proxy group="filters" name="GroupDataSets" icon=":/pqWidgets/Icons/pqGroup24.png"/>
+ <Proxy group="filters" name="ExtractHierarchicalLevel" icon=":/pqWidgets/Icons/pqGroupExtract24.png"/>
+ </Category>
+
+ <Category name="CosmoTools" menu_label="&CosmoTools" show_in_toolbar="0">
+ <Proxy group="filters" name="ANLHaloFinder" />
+ <Proxy group="filters" name="ANLSubhaloFinder" />
+ <Proxy group="filters" name="LANLHaloFinder" />
+ <Proxy group="filters" name="MinkowskiFilter" />
+ <Proxy group="filters" name="PMergeConnected" />
+ </Category>
+
+ <Category name="DataAnalysis" menu_label="&Data Analysis" show_in_toolbar="1" hide_for_tests="1">
+ <Proxy group="filters" name="Calculator"
+ icon=":/pqWidgets/Icons/pqCalculator24.png" omit_from_toolbar="1"/>
+ <Proxy group="filters" name="ExtractSelection"
+ icon=":/pqWidgets/Icons/pqExtractSelection24.png" />
+ <Proxy group="filters" name="ExtractSelectionOverTime"
+ icon=":/pqWidgets/Icons/pqPlotSelectionOverTime24.png" />
+ <Proxy group="filters" name="ExtractHistogram"
+ icon=":/pqWidgets/Icons/pqHistogram24.png" omit_from_toolbar="1"/>
+ <Proxy group="filters" name="IntegrateAttributes" omit_from_toolbar="1"/>
+ <Proxy group="filters" name="ExtractFieldDataOverTime"
+ icon=":/pqWidgets/Icons/pqPlotGlobalOverTime24.png" />
+ <Proxy group="filters" name="ProbeLine"
+ icon=":/pqWidgets/Icons/pqPlotOverLine24.png" />
+ <Proxy group="filters" name="ProbePoint"
+ icon=":/pqWidgets/Icons/pqProbeLocation24.png" />
+ <Proxy group="filters" name="PlotAttributes" omit_from_toolbar="1"/>
+ <Proxy group="filters" name="PlotOnSortedLines" omit_from_toolbar="1"/>
+ <Proxy group="filters" name="PlotOnIntersectionCurves" omit_from_toolbar="1"/>
+ <Proxy group="filters" name="ProgrammableFilter"
+ icon=":/pqWidgets/Icons/pqProgrammableFilter24.png" omit_from_toolbar="1"/>
+ <Proxy group="filters" name="TransposeTable" omit_from_toolbar="1"/>
+ <Proxy group="filters" name="ComputeQuartiles"
+ icon=":/pqWidgets/Icons/pqBoxChart16.png" omit_from_toolbar="1"/>
+ <Proxy group="filters" name="ExtractBagPlots"
+ icon=":/pqWidgets/Icons/pqFunctionalBagChart16.png" omit_from_toolbar="1"/>
+ <Proxy group="filters" name="ExtractLocation" omit_from_toolbar="1" />
+ </Category>
+
+ <Category name="Statistics" menu_label="&Statistics">
+ <Proxy group="filters" name="ContingencyStatistics"/>
+ <Proxy group="filters" name="DescriptiveStatistics"/>
+ <Proxy group="filters" name="KMeans"/>
+ <Proxy group="filters" name="MulticorrelativeStatistics"/>
+ <Proxy group="filters" name="PCAStatistics"/>
+ </Category>
+
+ <Category name="Temporal" menu_label="&Temporal">
+ <Proxy group="filters" name="ParticleTracer" />
+ <Proxy group="filters" name="ParticlePath" />
+ <Proxy group="filters" name="StreakLine" />
+ <Proxy group="filters" name="TemporalCache" />
+ <Proxy group="filters" name="TemporalInterpolator" />
+ <Proxy group="filters" name="TemporalSnapToTimeStep" />
+ <Proxy group="filters" name="TemporalShiftScale" />
+ <Proxy group="filters" name="TemporalStatistics" />
+ <Proxy group="filters" name="TimeToTextConvertor" />
+ </Category>
+
+ <Category name="Material Analysis" menu_label="&Material Analysis">
+ <Proxy group="filters" name="MaterialInterfaceFilter" />
+ <Proxy group="filters" name="IntersectFragments" />
+ </Category>
+
+ <Category name="CTH" menu_label="&CTH">
+ <Proxy group="filters" name="CTHFragmentConnect"/>
+ <Proxy group="filters" name="CTHFragmentIntersect"/>
+ <Proxy group="filters" name="CTHPart" />
+ <Proxy group="filters" name="NonOverlappingLevelIdScalars" />
+ <Proxy group="filters" name="MaterialInterfaceFilter" />
+ <Proxy group="filters" name="AMRDualClip" />
+ <Proxy group="filters" name="AMRDualContour" />
+ <Proxy group="filters" name="AMRConnectivity" />
+ <Proxy group="filters" name="AMRFragmentIntegration" />
+ <Proxy group="filters" name="AMRFragmentsFilter"/>
+ <Proxy group="filters" name="ExtractHierarchicalLevel" />
+ <Proxy group="filters" name="ExtractHierarchicalDataSets" />
+ </Category>
+
+ <Category name="AMR" menu_label="&AMR">
+ <Proxy group="filters" name="AMRDualMeshExtractor" />
+ <Proxy group="filters" name="AMRResampleFilter" />
+ <Proxy group="filters" name="AMRSlice" />
+ <Proxy group="filters" name="AMRToMultiBlock" />
+ <Proxy group="filters" name="AMRCutPlane" />
+ <Proxy group="filters" name="OverlappingLevelIdScalars" />
+ <Proxy group="filters" name="ExtractHierarchicalLevel" />
+ <Proxy group="filters" name="ExtractHierarchicalDataSets" />
+ </Category>
+
+ <Category name="Quadrature Points" menu_label="&Quadrature Points">
+ <Proxy group="filters" name="QuadraturePointInterpolator" />
+ <Proxy group="filters" name="QuadraturePointsGenerator" />
+ <Proxy group="filters" name="QuadraturePointStatistics" />
+ <Proxy group="filters" name="QuadratureSchemeDictionaryGenerator" />
+ </Category>
+
+ <Category name="Annotation" menu_label="Annotation">
+ <Proxy group="filters" name="AnnotateGlobalData" />
+ <Proxy group="filters" name="AnnotateAttributeData" />
+ <Proxy group="filters" name="PythonAnnotation" />
+ <Proxy group="filters" name="TimeToTextConvertor" />
+ <Proxy group="filters" name="DataSetRegionSurfaceFilter" />
+ <Proxy group="filters" name="EnvironmentAnnotation" />
+ </Category>
+
+ <Proxy group="filters" name="AddFieldArrays" />
+ <Proxy group="filters" name="ImageDataToAMR" />
+ <Proxy group="filters" name="UniformGridPartitioner" />
+ <Proxy group="filters" name="Append" />
+ <Proxy group="filters" name="AppendAttributes" />
+ <Proxy group="filters" name="AppendPolyData" />
+ <Proxy group="filters" name="AngularPeriodicFilter" />
+ <Proxy group="filters" name="ArbitrarySourceStreamTracer" />
+ <Proxy group="filters" name="BlockIdScalars" />
+ <Proxy group="filters" name="RandomAttributeGenerator" />
+ <Proxy group="filters" name="BrownianPoints" />
+ <Proxy group="filters" name="Calculator" />
+ <Proxy group="filters" name="CellCenters" />
+ <Proxy group="filters" name="CellDataToPointData" />
+ <Proxy group="filters" name="CellDerivatives"/>
+ <Proxy group="filters" name="CleanPolyData" />
+ <Proxy group="filters" name="CleanUnstructuredGrid" />
+ <Proxy group="filters" name="CleanUnstructuredGridCells" />
+ <Proxy group="filters" name="Clip" />
+ <Proxy group="filters" name="ClipClosedSurface" />
+ <Proxy group="filters" name="Contour" />
+ <Proxy group="filters" name="Curvatures" />
+ <Proxy group="filters" name="Cut" />
+ <Proxy group="filters" name="CutEverything" />
+ <Proxy group="filters" name="D3" />
+ <Proxy group="filters" name="DataSetSurfaceFilter" />
+ <Proxy group="filters" name="DataSetRegionSurfaceFilter" />
+ <Proxy group="filters" name="DataSetTriangleFilter" />
+ <Proxy group="filters" name="DecimatePro" />
+ <Proxy group="filters" name="Delaunay2D" />
+ <Proxy group="filters" name="Delaunay3D" />
+ <Proxy group="filters" name="ElevationFilter" />
+ <Proxy group="filters" name="ExtractBlock" />
+ <Proxy group="filters" name="ExtractComponent" />
+ <Proxy group="filters" name="ExtractEdges" />
+ <Proxy group="filters" name="ExtractGeometry" />
+ <Proxy group="filters" name="ExtractGrid" />
+ <Proxy group="filters" name="ExtractHistogram" />
+ <Proxy group="filters" name="ExtractSelection" />
+ <Proxy group="filters" name="ExtractSelectionOverTime" />
+ <Proxy group="filters" name="FeatureEdges" />
+ <Proxy group="filters" name="FFTSelectionOverTime" />
+ <Proxy group="filters" name="GaussianSplatter"/>
+ <Proxy group="filters" name="GenerateIdScalars"/>
+ <Proxy group="filters" name="Glyph" />
+ <Proxy group="filters" name="GlyphWithCustomSource" />
+ <Proxy group="filters" name="Gradient" />
+ <Proxy group="filters" name="GridConnectivity" />
+ <Proxy group="filters" name="GroupDataSets" />
+ <Proxy group="filters" name="ImageDataToAMR" />
+ <Proxy group="filters" name="ImageDataToPointSet" />
+ <Proxy group="filters" name="IntegrateAttributes" />
+ <Proxy group="filters" name="IntegrateFlowThroughSurface" />
+ <Proxy group="filters" name="LegacyGlyph" />
+ <!-- <Proxy group="filters" name="LevelIdScalars" /> -->
+ <Proxy group="filters" name="LinearExtrusionFilter" />
+ <Proxy group="filters" name="LoopSubdivisionFilter" />
+ <Proxy group="filters" name="MaskPoints" />
+ <Proxy group="filters" name="Median" />
+ <Proxy group="filters" name="MergeBlocks" />
+ <Proxy group="filters" name="MeshQuality" />
+ <Proxy group="filters" name="OctreeDepthLimit" />
+ <Proxy group="filters" name="OctreeDepthScalars" />
+ <Proxy group="filters" name="OutlineCornerFilter" />
+ <Proxy group="filters" name="OutlineFilter" />
+ <Proxy group="filters" name="ParticlePathLines" />
+ <Proxy group="filters" name="ParticleTracer" />
+ <Proxy group="filters" name="PassArrays" />
+ <Proxy group="filters" name="PlotAttributes" />
+ <Proxy group="filters" name="PlotOnIntersectionCurves" />
+ <Proxy group="filters" name="PlotOnSortedLines" />
+ <Proxy group="filters" name="PointDataToCellData" />
+ <Proxy group="filters" name="PolyDataNormals" />
+ <Proxy group="filters" name="Probe" />
+ <Proxy group="filters" name="ImageResampling" />
+ <Proxy group="filters" name="ProbeLine" />
+ <Proxy group="filters" name="ProbePoint" />
+ <Proxy group="filters" name="ProcessIdScalars" />
+ <Proxy group="filters" name="ProgrammableFilter" />
+ <Proxy group="filters" name="PVConnectivityFilter" />
+ <Proxy group="filters" name="PythonCalculator" />
+ <Proxy group="filters" name="PythonExtractSelection" />
+
+ <Proxy group="filters" name="QuadricClustering" />
+ <Proxy group="filters" name="RectilinearGridConnectivity" />
+ <Proxy group="filters" name="RectilinearGridToPointSet" />
+ <Proxy group="filters" name="ReflectionFilter" />
+ <Proxy group="filters" name="RibbonFilter" />
+ <Proxy group="filters" name="RotationalExtrusionFilter" />
+ <Proxy group="filters" name="ScatterPlot"/>
+ <Proxy group="filters" name="ShrinkFilter" />
+ <Proxy group="filters" name="SmoothPolyDataFilter" />
+ <Proxy group="filters" name="StreamTracer" />
+ <Proxy group="filters" name="Stripper" />
+ <Proxy group="filters" name="StructuredGridOutlineFilter" />
+ <Proxy group="filters" name="Subdivide" />
+ <Proxy group="filters" name="SurfaceVectors" />
+ <Proxy group="filters" name="TemporalCache" />
+ <Proxy group="filters" name="TemporalInterpolator" />
+ <Proxy group="filters" name="TemporalSnapToTimeStep" />
+ <Proxy group="filters" name="TemporalShiftScale" />
+ <Proxy group="filters" name="TemporalStatistics" />
+ <Proxy group="filters" name="TensorGlyph" />
+ <Proxy group="filters" name="TessellatorFilter" />
+ <Proxy group="filters" name="TextureMapToCylinder" />
+ <Proxy group="filters" name="TextureMapToPlane" />
+ <Proxy group="filters" name="TextureMapToSphere" />
+ <Proxy group="filters" name="Threshold" />
+ <Proxy group="filters" name="TransformFilter" />
+ <Proxy group="filters" name="TriangleFilter" />
+ <Proxy group="filters" name="TubeFilter" />
+ <Proxy group="filters" name="UnstructuredGradient" />
+ <Proxy group="filters" name="WarpScalar" />
+ <Proxy group="filters" name="WarpVector" />
+ <Proxy group="filters" name="YoungsMaterialInterface"/>
+ <Proxy group="filters" name="NormalGlyphs" />
+ <Proxy group="filters" name="TableToPolyData" />
+ <Proxy group="filters" name="TableToStructuredGrid" />
+ <Proxy group="filters" name="IsoVolume" />
+
+ <Proxy group="filters" name="GenericClip" />
+ <Proxy group="filters" name="GenericContour" />
+ <Proxy group="filters" name="GenericCut" />
+ <Proxy group="filters" name="GenericStreamTracer" />
+ <Proxy group="filters" name="GenericGeometryFilter" />
+ <Proxy group="filters" name="SliceAlongPolyLine" />
+</ParaViewFilters>