Commit 96d12672 authored by Luke Campagnola's avatar Luke Campagnola
Browse files

Added 3D examples to menu

parent d2d812c8
...@@ -10,17 +10,23 @@ from collections import OrderedDict ...@@ -10,17 +10,23 @@ from collections import OrderedDict
examples = OrderedDict([ examples = OrderedDict([
('Command-line usage', 'CLIexample.py'), ('Command-line usage', 'CLIexample.py'),
('Basic Plotting', 'Plotting.py'), ('Basic Plotting', 'Plotting.py'),
('ImageView', 'ImageView.py'),
('ParameterTree', '../parametertree'),
('GraphicsItems', OrderedDict([ ('GraphicsItems', OrderedDict([
('Scatter Plot', 'ScatterPlot.py'),
#('PlotItem', 'PlotItem.py'), #('PlotItem', 'PlotItem.py'),
('ImageItem - video', 'ImageItem.py'), ('ImageItem - video', 'ImageItem.py'),
('ImageItem - draw', 'Draw.py'), ('ImageItem - draw', 'Draw.py'),
('Region-of-Interest', 'ROItypes.py'), ('Region-of-Interest', 'ROItypes.py'),
('GraphicsLayout', 'GraphicsLayout.py'), ('GraphicsLayout', 'GraphicsLayout.py'),
('Scatter Plot', 'ScatterPlot.py'),
('Text Item', 'text.py'), ('Text Item', 'text.py'),
('ViewBox', 'ViewBox.py'),
('Linked Views', 'linkedViews.py'), ('Linked Views', 'linkedViews.py'),
('Arrow', 'Arrow.py'), ('Arrow', 'Arrow.py'),
('ViewBox', 'ViewBox.py'),
])),
('3D Graphics', OrderedDict([
('Volumetric', 'GLVolumeItem.py'),
('Isosurface', 'GLMeshItem.py'),
])), ])),
('Widgets', OrderedDict([ ('Widgets', OrderedDict([
('PlotWidget', 'PlotWidget.py'), ('PlotWidget', 'PlotWidget.py'),
...@@ -34,10 +40,9 @@ examples = OrderedDict([ ...@@ -34,10 +40,9 @@ examples = OrderedDict([
#('VerticalLabel', '../widgets/VerticalLabel.py'), #('VerticalLabel', '../widgets/VerticalLabel.py'),
('JoystickButton', '../widgets/JoystickButton.py'), ('JoystickButton', '../widgets/JoystickButton.py'),
])), ])),
('ImageView', 'ImageView.py'),
('GraphicsScene', 'GraphicsScene.py'), ('GraphicsScene', 'GraphicsScene.py'),
('Flowcharts', 'Flowchart.py'), ('Flowcharts', 'Flowchart.py'),
('ParameterTree', '../parametertree'),
#('Canvas', '../canvas'), #('Canvas', '../canvas'),
#('MultiPlotWidget', 'MultiPlotWidget.py'), #('MultiPlotWidget', 'MultiPlotWidget.py'),
]) ])
...@@ -93,6 +98,8 @@ class ExampleLoader(QtGui.QMainWindow): ...@@ -93,6 +98,8 @@ class ExampleLoader(QtGui.QMainWindow):
if fn is None: if fn is None:
self.ui.codeView.clear() self.ui.codeView.clear()
return return
if os.path.isdir(fn):
fn = os.path.join(fn, '__main__.py')
text = open(fn).read() text = open(fn).read()
self.ui.codeView.setPlainText(text) self.ui.codeView.setPlainText(text)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment