Skip to content

Commit

Permalink
Merge pull request #1047 from vasole/silx_2
Browse files Browse the repository at this point in the history
[GUI] Add compatibility with silx 2
  • Loading branch information
vasole authored Nov 10, 2023
2 parents 0974e47 + e7c0ff5 commit d9b7e85
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
3 changes: 2 additions & 1 deletion PyMca5/PyMcaGui/plotting/SilxMaskImageWidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@

import silx
from silx.gui.plot import PlotWidget
from silx.gui.plot import PlotActions
from PyMca5.PyMcaGui.plotting import SilxPlotActions as PlotActions

from silx.gui.plot import PlotToolButtons
from silx.gui.plot.MaskToolsWidget import MaskToolsWidget, MaskToolsDockWidget
from silx.gui.plot.AlphaSlider import NamedImageAlphaSlider
Expand Down
35 changes: 35 additions & 0 deletions PyMca5/PyMcaGui/plotting/SilxPlotActions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#/*##########################################################################
# Copyright (C) 2023 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
#############################################################################*/
__author__ = "V.A. Sole - ESRF Data Analysis"
__contact__ = "[email protected]"
__license__ = "MIT"
__copyright__ = "European Synchrotron Radiation Facility, Grenoble, France"

__doc__ = """Silx 1.x and 2.x compatibility layer"""

try:
from silx.gui.plot.PlotActions import *
except ImportError:
from silx.gui.plot.actions.control import *
from silx.gui.plot.actions.io import *
from silx.gui.plot.actions.histogram import PixelIntensitiesHistoAction

0 comments on commit d9b7e85

Please sign in to comment.