@@ -160,7 +160,8 @@ def __set_image_layout(self) -> None: |
160 | 160 |
|
161 | 161 | # Avoid circular import |
162 | 162 | # pylint: disable=import-outside-toplevel |
163 | | - from plotpy.panels.csection.cswidget import XCrossSection, YCrossSection |
| 163 | + from plotpy.panels.csection.cswidget import (XCrossSection, |
| 164 | + YCrossSection) |
164 | 165 |
|
165 | 166 | self.ycsw = YCrossSection( |
166 | 167 | self, |
@@ -430,6 +431,30 @@ def add_widget_to_grid_layout( |
430 | 431 | class AbstractPlotDialogWindow(abc.ABC): |
431 | 432 | """Abstract base class for plot dialog and plot window""" |
432 | 433 |
|
| 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 | + |
433 | 458 | @abc.abstractmethod |
434 | 459 | def setup_widget( |
435 | 460 | self, |
@@ -911,6 +936,22 @@ def __init__( |
911 | 936 | self.addToolBar(self.toolbar) |
912 | 937 | self.auto_tools = auto_tools |
913 | 938 |
|
| 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 | + |
914 | 955 | def finalize_configuration(self) -> None: |
915 | 956 | """Configure plot manager and register all tools""" |
916 | 957 | self.subplotwidget.add_panels_to_manager() |
|