populse_mia.user_interface.data_viewer package¶
Blabla
Subpackages¶
- populse_mia.user_interface.data_viewer.anatomist package
- populse_mia.user_interface.data_viewer.anatomist_2 package
- Submodules
- populse_mia.user_interface.data_viewer.anatomist_2.anasimpleviewer2 module
- populse_mia.user_interface.data_viewer.anatomist_2.mia_anatomist module
- populse_mia.user_interface.data_viewer.anatomist_2.resources module
- populse_mia.user_interface.data_viewer.anatomist_2.resources_snd_window module
- populse_mia.user_interface.data_viewer.anatomist_2.snd_window module
Submodules¶
populse_mia.user_interface.data_viewer.data_viewer module¶
This module provides an abstract base class for data viewer implemenataions in populse-mia.
Data viewers are supposed to inherit DataViewer
and implement (at
least) its methods. A data viewer is given a project and documents list, and is
thus allowed to access databasing features and documents attributes.
Coding a data viewer¶
A data viewer is identified after its module name, and is currently searched
for as a submodule of populse_mia.user_interface.data_viewer
. The
data viewer module may be implemented as a “regular” module (.py file) or a
package (directory) and should contain at least a
class named MiaViewer
which:
is a Qt
QWidget
(inheritsQWidget
as 1st inheritance as is required by Qt)implements the
DataViewer
API (normally by inheriting it as second inheritance afterQWidget
but this is not technically required if the API is implemented)
- class populse_mia.user_interface.data_viewer.data_viewer.DataViewer[source]¶
Bases:
object
Populse-MIA data viewers abstract base class: it just gives an API to be overloaded by subclasses.
The API is made willingly very simple and limited. Viewers implementations are free to use Populse database features to implement fancy views. The base functions are to register a project and documents list, display or remove given files.
populse_mia.user_interface.data_viewer.data_viewer_tab module¶
Populse-MIA data viewer GUI interface, in the “Data Viewer” tab.
- Contains:
- Class:
DataViewerTab
- class populse_mia.user_interface.data_viewer.data_viewer_tab.DataViewerTab(main_window)[source]¶
Bases:
QWidget
DataViewerTab is the widget in the data viewer tab of Populse-MIA GUI.
A combobox containing the available viewers will always appear. If import of viewers fails, it won’t impact the work of Mia itself. Viewers are put in Qt.QStackedLayout in order to share a same project. A new viewer can be added simply by placing it in the data_viewer directory.
- __init__(main_window)[source]¶
The constructor …
- Parameters:
main_window – an instance of the MainWindow class
- activate_viewer(viewer_name)[source]¶
Activates viewer viewer_name which was selected in the combobox.
- Parameters:
viewer_name – a viewer name (a string)
- change_viewer()[source]¶
Switches to viewer selected in the combobox pass the project from on viewer to the other.
- current_viewer()[source]¶
Return current viewer (selected viewer in combobox) used when user changes from BrowserTab or PipelineManagerTab to DataViewerTab.