GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — SyncPlotWindow: added methods get_toolbar/manager · PlotPyStack/PlotPy@b8f6423

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • plotpy/plot
    • plotwidget.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎plotpy/plot/plotwidget.py‎

Copy file name to clipboardExpand all lines: plotpy/plot/plotwidget.py
+42-1Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,8 @@ def __set_image_layout(self) -> None:
160160

161161
# Avoid circular import
162162
# pylint: disable=import-outside-toplevel
163-
from plotpy.panels.csection.cswidget import XCrossSection, YCrossSection
163+
from plotpy.panels.csection.cswidget import (XCrossSection,
164+
YCrossSection)
164165

165166
self.ycsw = YCrossSection(
166167
self,
@@ -430,6 +431,30 @@ def add_widget_to_grid_layout(
430431
class AbstractPlotDialogWindow(abc.ABC):
431432
"""Abstract base class for plot dialog and plot window"""
432433

434+
@abc.abstractmethod
435+
def get_plot(self) -> BasePlot | None:
436+
"""Return the plot object
437+
438+
Returns:
439+
BasePlot: The plot object
440+
"""
441+
442+
@abc.abstractmethod
443+
def get_toolbar(self) -> QW.QToolBar:
444+
"""Return main toolbar
445+
446+
Returns:
447+
The plot widget main toolbar
448+
"""
449+
450+
@abc.abstractmethod
451+
def get_manager(self) -> PlotManager:
452+
"""Return the plot manager
453+
454+
Returns:
455+
The plot widget manager
456+
"""
457+
433458
@abc.abstractmethod
434459
def setup_widget(
435460
self,
@@ -911,6 +936,22 @@ def __init__(
911936
self.addToolBar(self.toolbar)
912937
self.auto_tools = auto_tools
913938

939+
def get_toolbar(self) -> QW.QToolBar:
940+
"""Return main toolbar
941+
942+
Returns:
943+
The plot widget main toolbar
944+
"""
945+
return self.toolbar
946+
947+
def get_manager(self) -> PlotManager:
948+
"""Return the plot manager
949+
950+
Returns:
951+
The plot widget manager
952+
"""
953+
return self.manager
954+
914955
def finalize_configuration(self) -> None:
915956
"""Configure plot manager and register all tools"""
916957
self.subplotwidget.add_panels_to_manager()

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.