From 058a5541b9e09ea7ffa7e4809b87f2a08c60d1b2 Mon Sep 17 00:00:00 2001
From: Paul McCarthy <pauld.mccarthy@gmail.com>
Date: Fri, 4 Jul 2014 17:16:12 +0100
Subject: [PATCH] Tweaked views/controls package namespaces a bit.

---
 fsl/fslview/controls/__init__.py | 19 +++++++++++++++++++
 fsl/fslview/fslviewframe.py      | 27 ++++++++++++---------------
 fsl/fslview/views/__init__.py    | 17 +++++++++++++++++
 3 files changed, 48 insertions(+), 15 deletions(-)

diff --git a/fsl/fslview/controls/__init__.py b/fsl/fslview/controls/__init__.py
index e69de29bb..1a0b4e61b 100644
--- a/fsl/fslview/controls/__init__.py
+++ b/fsl/fslview/controls/__init__.py
@@ -0,0 +1,19 @@
+#!/usr/bin/env python
+#
+# __init__.py - This package contains a collection of wx.Panel subclasses
+#               which provide some sort of interface for controlling
+#               aspects of the image display.
+#
+# Author: Paul McCarthy <pauldmccarthy@gmail.com>
+#
+"""This package contains a collection of :class:`wx.Panel` subclasses which
+provide some sort of interface for controlling aspects of the image display.
+"""
+
+import locationpanel
+import imagelistpanel
+import imagedisplaypanel
+
+LocationPanel     = locationpanel    .LocationPanel
+ImageListPanel    = imagelistpanel   .ImageListPanel
+ImageDisplayPanel = imagedisplaypanel.ImageDisplayPanel
diff --git a/fsl/fslview/fslviewframe.py b/fsl/fslview/fslviewframe.py
index be5a29a7b..a6d77e1de 100644
--- a/fsl/fslview/fslviewframe.py
+++ b/fsl/fslview/fslviewframe.py
@@ -16,12 +16,9 @@ import wx.aui as aui
 
 import props
 
-import fsl.fslview.views.orthopanel           as orthopanel
-import fsl.fslview.views.lightboxpanel        as lightboxpanel
-import fsl.fslview.controls.locationpanel     as locationpanel
-import fsl.fslview.controls.imagelistpanel    as imagelistpanel
-import fsl.fslview.controls.imagedisplaypanel as imagedisplaypanel 
-import fsl.fslview.strings                    as strings
+import fsl.fslview.views    as views
+import fsl.fslview.controls as controls
+import fsl.fslview.strings  as strings
 
 class FSLViewFrame(wx.Frame):
     """A frame which implements a 3D image viewer.
@@ -223,9 +220,9 @@ class FSLViewFrame(wx.Frame):
         to the central :class:`~wx.aui.AuiNotebook` widget.
         """
 
-        panel = orthopanel.OrthoPanel(self._centrePane,
-                                      self._imageList,
-                                      glContext=self._glContext)
+        panel = views.OrthoPanel(self._centrePane,
+                                 self._imageList,
+                                 glContext=self._glContext)
 
         if self._glContext is None:
             self._glContext = panel.xcanvas.glContext
@@ -239,9 +236,9 @@ class FSLViewFrame(wx.Frame):
         display to the central :class:`~wx.aui.AuiNotebook` widget.
         """ 
 
-        panel = lightboxpanel.LightBoxPanel(self._centrePane,
-                                            self._imageList,
-                                            glContext=self._glContext)
+        panel = views.LightBoxPanel(self._centrePane,
+                                    self._imageList,
+                                    glContext=self._glContext)
         
         if self._glContext is None:
             self._glContext = panel.canvas.glContext
@@ -279,7 +276,7 @@ class FSLViewFrame(wx.Frame):
         widget to this panel (defaults to the bottom, according to the
         :class:`wx.aui.AuiManager`).
         """
-        panel = imagedisplaypanel.ImageDisplayPanel(self, self._imageList)
+        panel = controls.ImageDisplayPanel(self, self._imageList)
         self._addControlPanel(panel, strings.imageDisplayTitle)
 
 
@@ -289,7 +286,7 @@ class FSLViewFrame(wx.Frame):
         widget to this panel (defaults to the bottom, according to the
         :class:`wx.aui.AuiManager`).
         """ 
-        panel = imagelistpanel.ImageListPanel(self, self._imageList)
+        panel = controls.ImageListPanel(self, self._imageList)
         self._addControlPanel(panel, strings.imageListTitle)
 
 
@@ -298,7 +295,7 @@ class FSLViewFrame(wx.Frame):
         widget to this panel (defaults to the bottom, according to the
         :class:`wx.aui.AuiManager`).
         """ 
-        panel = locationpanel.LocationPanel(self, self._imageList)
+        panel = controls.LocationPanel(self, self._imageList)
         self._addControlPanel(panel, strings.locationTitle)
     
 
diff --git a/fsl/fslview/views/__init__.py b/fsl/fslview/views/__init__.py
index e69de29bb..86062b802 100644
--- a/fsl/fslview/views/__init__.py
+++ b/fsl/fslview/views/__init__.py
@@ -0,0 +1,17 @@
+#!/usr/bin/env python
+#
+# __init__.py - This package contains a collection of wx.Panel subclasses
+#               which provide a view of an image collection.
+#
+# Author: Paul McCarthy <pauldmccarthy@gmail.com>
+#
+"""This package contains a collection of :class:`wx.Panel` subclasses
+which provide a view of an image collection (see
+:class:`~fsl.data.fslimage.ImageList`).
+"""
+
+import orthopanel
+import lightboxpanel
+
+OrthoPanel    = orthopanel   .OrthoPanel
+LightBoxPanel = lightboxpanel.LightBoxPanel
-- 
GitLab