From 96d126722340c0084bd3ba9896fc1765dd26bf14 Mon Sep 17 00:00:00 2001 From: Luke Campagnola <> Date: Sat, 24 Mar 2012 12:32:53 -0400 Subject: [PATCH] Added 3D examples to menu --- examples/__main__.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/examples/__main__.py b/examples/__main__.py index cdfabab2..11c9785d 100644 --- a/examples/__main__.py +++ b/examples/__main__.py @@ -10,17 +10,23 @@ from collections import OrderedDict examples = OrderedDict([ ('Command-line usage', 'CLIexample.py'), ('Basic Plotting', 'Plotting.py'), + ('ImageView', 'ImageView.py'), + ('ParameterTree', '../parametertree'), ('GraphicsItems', OrderedDict([ + ('Scatter Plot', 'ScatterPlot.py'), #('PlotItem', 'PlotItem.py'), ('ImageItem - video', 'ImageItem.py'), ('ImageItem - draw', 'Draw.py'), ('Region-of-Interest', 'ROItypes.py'), ('GraphicsLayout', 'GraphicsLayout.py'), - ('Scatter Plot', 'ScatterPlot.py'), ('Text Item', 'text.py'), - ('ViewBox', 'ViewBox.py'), ('Linked Views', 'linkedViews.py'), ('Arrow', 'Arrow.py'), + ('ViewBox', 'ViewBox.py'), + ])), + ('3D Graphics', OrderedDict([ + ('Volumetric', 'GLVolumeItem.py'), + ('Isosurface', 'GLMeshItem.py'), ])), ('Widgets', OrderedDict([ ('PlotWidget', 'PlotWidget.py'), @@ -34,10 +40,9 @@ examples = OrderedDict([ #('VerticalLabel', '../widgets/VerticalLabel.py'), ('JoystickButton', '../widgets/JoystickButton.py'), ])), - ('ImageView', 'ImageView.py'), + ('GraphicsScene', 'GraphicsScene.py'), ('Flowcharts', 'Flowchart.py'), - ('ParameterTree', '../parametertree'), #('Canvas', '../canvas'), #('MultiPlotWidget', 'MultiPlotWidget.py'), ]) @@ -93,6 +98,8 @@ class ExampleLoader(QtGui.QMainWindow): if fn is None: self.ui.codeView.clear() return + if os.path.isdir(fn): + fn = os.path.join(fn, '__main__.py') text = open(fn).read() self.ui.codeView.setPlainText(text)