Interface¶
Contains the main GUI elements for PySeus. Format and tool specific GUI elements are defined in format and tool modules respectively.
Styling can be controlled in the Qt stylesheet under ui/style_dark.qss.
Main Window¶
-
class
pyseus.ui.MainWindow(app)¶ Class representing the main window for PySeus.
Create a menu item.
-
app= None¶ Reference to the main application object.
-
console= None¶ Reference to the console sidebar widget.
-
info= None¶ Reference to the info sidebar widget.
-
meta= None¶ Reference to the meta sidebar widget.
-
resizeEvent(event)¶ Keep the viewport centered and adjust zoom on window resize.
Setup the menu bar. Items in the Evaluate menu are created in the setup_menu function of tool classes.
-
show_status(message)¶ Display message in the status bar.
-
thumbs= None¶ Reference to the thumbs widget.
-
view= None¶ Reference to the view widget.
View Widget¶
-
class
pyseus.ui.ViewWidget(app)¶ Widget providing an interactive viewport.
-
last_position= None¶ The last position, from which mouse events were processed.
-
mouseMoveEvent(event)¶ Handle pan, window and RoI functionality on mouse move.
-
mouseMoveEvent_over_image(event)¶ Handle value display functionality on mouse move over the image. Call mouseMoveEvent for pan, window and RoI functionality.
-
mousePressEvent(event)¶ Handle pan and window functionality on mouse button down.
-
mousePressEvent_over_image(event)¶ Handle RoI functionality on mouse button down over the image. Hands off contorl to mousePressEvent when appropriate.
-
mouseReleaseEvent(event)¶ Handle RoI functionality on mouse button up.
-
mouseReleaseEvent_over_image(event)¶ Call mouseReleaseEvent on mouse button up for RoI functionality.
-
mouse_action= None¶ The current action on mouse move. Can be ROI, WINDOW or PAN.
-
set(pixmap)¶ Display the image in pixmap.
-
wheelEvent(event)¶ Handle scroll wheel events in the viewport. Scroll - Change current slice up or down. Alt+Scroll - Change current scan up or down. Strg+Scroll - Zoom the current image in or out.
-
zoom(factor, relative=True)¶ Set the zoom level for the displayed image.
By default, the new zoom factor will be relative to the current zoom factor. If relative is set to False, factor will be used as the new zoom factor.
-
zoom_factor= None¶ The current zoom factor of the image.
-
zoom_fit()¶ Zoom the displayed image to fit the available viewport.
-
Thumbnails Widget¶
Sidebar Widgets¶
-
class
pyseus.ui.main.SidebarHeading(text='', first=False)¶ Widget for sidebar separators and headings.
File Info Widget¶
-
class
pyseus.ui.InfoWidget(app)¶ The widget for file info. Displays path, scan ID and slice index.
-
minimumSizeHint()¶ Return widget size to ensure unifrom sidebar width.
-
update_path(path)¶ Update the displayed path.
-
update_scan(scan)¶ Update the displayed scan ID.
-
update_slice(current, slices)¶ Update the displayed slice index.
-
Metadata Widget¶
-
class
pyseus.ui.MetaWidget(app)¶ The widget for metadata display.
-
minimumSizeHint()¶ Return widget size to ensure unifrom sidebar width.
-
update_meta(data, more=True)¶ Set the displayed metadata; if more is True, display a button to show all metadata.
-
-
class
pyseus.ui.meta.MetaWindow(app, data)¶ Window for displaying metadata.