File tree Expand file tree Collapse file tree 2 files changed +22
-21
lines changed
Expand file tree Collapse file tree 2 files changed +22
-21
lines changed Original file line number Diff line number Diff line change 5353
5454import guidata .dataset .qtwidgets as gdq
5555import numpy as np
56+ import plotpy .io
5657from guidata .configtools import get_icon
5758from guidata .dataset import update_dataset
5859from guidata .qthelpers import add_actions , exec_dialog
5960from guidata .widgets .arrayeditor import ArrayEditor
6061from plotpy .plot import PlotDialog
61- from plotpy .tools import (
62- HCursorTool ,
63- LabelTool ,
64- RectangleTool ,
65- SegmentTool ,
66- VCursorTool ,
67- XCursorTool ,
68- )
6962from qtpy import QtCore as QC
7063from qtpy import QtWidgets as QW
7164from qtpy .compat import getopenfilename , getopenfilenames , getsavefilename
@@ -248,14 +241,7 @@ class BaseDataPanel(AbstractPanel):
248241
249242 PANEL_STR = "" # e.g. "Signal Panel"
250243 PARAMCLASS : SignalObj | ImageObj = None # Replaced in child object
251- ANNOTATION_TOOLS = (
252- LabelTool ,
253- VCursorTool ,
254- HCursorTool ,
255- XCursorTool ,
256- SegmentTool ,
257- RectangleTool ,
258- )
244+ ANNOTATION_TOOLS = ()
259245 DIALOGSIZE = (800 , 600 )
260246 # Replaced by the right class in child object:
261247 IO_REGISTRY : SignalIORegistry | ImageIORegistry | None = None
Original file line number Diff line number Diff line change 1111
1212from typing import TYPE_CHECKING
1313
14+ from plotpy .tools import (
15+ HCursorTool ,
16+ HRangeTool ,
17+ LabelTool ,
18+ RectangleTool ,
19+ SegmentTool ,
20+ VCursorTool ,
21+ XCursorTool ,
22+ )
23+
1424from cdl .config import _
1525from cdl .core .gui import roieditor
1626from cdl .core .gui .actionhandler import SignalActionHandler
1727from cdl .core .gui .panel .base import BaseDataPanel
1828from cdl .core .gui .plothandler import SignalPlotHandler
1929from cdl .core .gui .processor .signal import SignalProcessor
2030from cdl .core .io .signal import SignalIORegistry
21- from cdl .core .model .signal import (
22- SignalObj ,
23- create_signal_from_param ,
24- new_signal_param ,
25- )
31+ from cdl .core .model .signal import SignalObj , create_signal_from_param , new_signal_param
2632
2733if TYPE_CHECKING : # pragma: no cover
2834 import guidata .dataset as gds
@@ -38,6 +44,15 @@ class SignalPanel(BaseDataPanel):
3844
3945 PANEL_STR = _ ("Signal panel" )
4046 PARAMCLASS = SignalObj
47+ ANNOTATION_TOOLS = (
48+ LabelTool ,
49+ VCursorTool ,
50+ HCursorTool ,
51+ XCursorTool ,
52+ SegmentTool ,
53+ RectangleTool ,
54+ HRangeTool ,
55+ )
4156 IO_REGISTRY = SignalIORegistry
4257 H5_PREFIX = "DataLab_Sig"
4358 ROIDIALOGCLASS = roieditor .SignalROIEditor
You can’t perform that action at this time.
0 commit comments