pyqttoolkit 0.7.31__tar.gz → 0.7.33__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/PKG-INFO +1 -1
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/_version.py +3 -3
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/models/span.py +36 -31
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/plot/matplotlib/base.py +73 -24
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit.egg-info/PKG-INFO +1 -1
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/MANIFEST.in +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/README.md +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/__init__.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/application/__init__.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/application/application.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/application/garbage_collector.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/colors/__init__.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/config/__init__.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/config/base.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/config/composite.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/config/default.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/config/environment.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/config/multi_json_file.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/config/with_signal.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/config/with_value_changed.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/data/__init__.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/data/bits.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/data/cache.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/data/interval.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/data/names.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/datetime/__init__.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/datetime/datetime.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/datetime/qdatetime.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/dependencies/__init__.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/errors/__init__.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/filesystem/__init__.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/logs/__init__.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/metadata/__init__.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/metadata/dataframe_metadata_manager.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/metadata/dict_metadata_manager.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/metadata/id_generator.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/metadata/metadata_manager_base.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/models/__init__.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/models/code_text.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/models/dataframetable.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/models/dictpropertytree.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/models/dicttable.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/models/json_text.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/models/list_model.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/models/module.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/models/roles.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/models/series_data.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/models/validation.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/modules/__init__.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/modules/events/__init__.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/modules/events/add_signal.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/modules/events/module_opening.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/modules/events/rejectable.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/modules/launcher_config.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/modules/module.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/properties/__init__.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/properties/auto.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/properties/throttled.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/scripting/__init__.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/scripting/script_context.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/scripting/script_runner.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/scripting/script_template.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/services/__init__.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/services/autosave.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/services/email.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/services/event_registry.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/services/file_dialog.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/services/hotkey_manager.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/services/link_manager.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/services/message_board.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/services/module_service.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/services/object_converter.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/services/project_updater.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/services/task_runner.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/services/theme_manager.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/services/tool_window_service.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/viewmanagers/__init__.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/viewmanagers/tool.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/__init__.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/bulk_value_selector.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/check_box.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/code/__init__.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/code/code_edit.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/code/python_syntax.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/combo_box.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/count_selector.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/datetime.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/datetime_range_selector.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/default_text_line_edit.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/delegates.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/dtype_edit.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/editable_combo_box.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/file_selector.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/icon.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/icon_button.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/json_edit.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/labelled.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/layout/__init__.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/layout/collabsible.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/layout/group_box.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/layout/group_panel.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/layout/lines.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/layout/link.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/line_edit.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/linkable.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/list_view.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/main_window.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/metadata_selector.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/modulewindow.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/plot/__init__.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/plot/legend_control.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/plot/matplotlib/__init__.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/plot/matplotlib/colorbar.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/plot/matplotlib/colormap.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/plot/matplotlib/font.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/plot/plot_options.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/plot/plot_toolbar_options.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/plot/size.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/plot/tool_type.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/plot/toolbar.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/popout.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/popup.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/property_tree.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/shrunk_push_button.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/steppable_combo_box.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/styleable.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/table.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/text_edit.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/views/tool_window.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit.egg-info/SOURCES.txt +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit.egg-info/dependency_links.txt +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit.egg-info/requires.txt +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit.egg-info/top_level.txt +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/setup.cfg +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/setup.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/versioneer.py +0 -0
|
@@ -8,11 +8,11 @@ import json
|
|
|
8
8
|
|
|
9
9
|
version_json = '''
|
|
10
10
|
{
|
|
11
|
-
"date": "2024-
|
|
11
|
+
"date": "2024-09-19T13:50:57+0100",
|
|
12
12
|
"dirty": false,
|
|
13
13
|
"error": null,
|
|
14
|
-
"full-revisionid": "
|
|
15
|
-
"version": "0.7.
|
|
14
|
+
"full-revisionid": "2d7b0cb04ba79e391600d50e7a3992a22cb4db0b",
|
|
15
|
+
"version": "0.7.33"
|
|
16
16
|
}
|
|
17
17
|
''' # END VERSION_JSON
|
|
18
18
|
|
|
@@ -1,31 +1,36 @@
|
|
|
1
|
-
# pyqttoolkit
|
|
2
|
-
# Copyright (C) 2018-2019, Simmovation Ltd.
|
|
3
|
-
#
|
|
4
|
-
# This program is free software; you can redistribute it and/or modify
|
|
5
|
-
# it under the terms of the GNU General Public License as published by
|
|
6
|
-
# the Free Software Foundation; either version 3 of the License, or
|
|
7
|
-
# (at your option) any later version.
|
|
8
|
-
#
|
|
9
|
-
# This program is distributed in the hope that it will be useful,
|
|
10
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
-
# GNU General Public License for more details.
|
|
13
|
-
#
|
|
14
|
-
# You should have received a copy of the GNU General Public License
|
|
15
|
-
# along with this program; if not, write to the Free Software Foundation,
|
|
16
|
-
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
17
|
-
from PyQt5.QtCore import QObject
|
|
18
|
-
|
|
19
|
-
class SpanModel(QObject):
|
|
20
|
-
def __init__(self, parent, left, right):
|
|
21
|
-
QObject.__init__(self, parent)
|
|
22
|
-
self._left = left
|
|
23
|
-
self._right = right
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
1
|
+
# pyqttoolkit
|
|
2
|
+
# Copyright (C) 2018-2019, Simmovation Ltd.
|
|
3
|
+
#
|
|
4
|
+
# This program is free software; you can redistribute it and/or modify
|
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
|
6
|
+
# the Free Software Foundation; either version 3 of the License, or
|
|
7
|
+
# (at your option) any later version.
|
|
8
|
+
#
|
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
# GNU General Public License for more details.
|
|
13
|
+
#
|
|
14
|
+
# You should have received a copy of the GNU General Public License
|
|
15
|
+
# along with this program; if not, write to the Free Software Foundation,
|
|
16
|
+
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
17
|
+
from PyQt5.QtCore import QObject
|
|
18
|
+
|
|
19
|
+
class SpanModel(QObject):
|
|
20
|
+
def __init__(self, parent, left, right, radians=False):
|
|
21
|
+
QObject.__init__(self, parent)
|
|
22
|
+
self._left = left
|
|
23
|
+
self._right = right
|
|
24
|
+
self._radians = radians
|
|
25
|
+
|
|
26
|
+
@property
|
|
27
|
+
def left(self):
|
|
28
|
+
return self._left
|
|
29
|
+
|
|
30
|
+
@property
|
|
31
|
+
def right(self):
|
|
32
|
+
return self._right
|
|
33
|
+
|
|
34
|
+
@property
|
|
35
|
+
def radians(self):
|
|
36
|
+
return self._radians
|
|
@@ -29,6 +29,7 @@ from matplotlib.figure import Figure
|
|
|
29
29
|
from matplotlib.widgets import RectangleSelector, SpanSelector
|
|
30
30
|
from mpl_toolkits.axes_grid1 import Size, Divider
|
|
31
31
|
from mpl_toolkits.axes_grid1.mpl_axes import Axes
|
|
32
|
+
from matplotlib.projections.polar import PolarAxes
|
|
32
33
|
|
|
33
34
|
import pandas as pd
|
|
34
35
|
|
|
@@ -53,9 +54,25 @@ def _safe_limits(lower, upper):
|
|
|
53
54
|
upper = _to_finite(upper)
|
|
54
55
|
return min(lower, upper), max(lower, upper)
|
|
55
56
|
|
|
56
|
-
|
|
57
|
+
def _cartesian_polar_selector(base_class):
|
|
58
|
+
class _CartesianPolarSelector(base_class):
|
|
59
|
+
def __init__(self, *args, **kwargs):
|
|
60
|
+
super().__init__(*args, **kwargs)
|
|
61
|
+
self._polar_projection = isinstance(self.ax, PolarAxes)
|
|
62
|
+
|
|
63
|
+
def _get_data(self, event):
|
|
64
|
+
if self._polar_projection:
|
|
65
|
+
xdata = event.xdata + 2 * np.pi if event.xdata < 0 else event.xdata
|
|
66
|
+
ydata = np.clip(event.ydata, *self.ax.get_ybound())
|
|
67
|
+
return xdata, ydata
|
|
68
|
+
else:
|
|
69
|
+
return super()._get_data(event)
|
|
70
|
+
|
|
71
|
+
return _CartesianPolarSelector
|
|
72
|
+
|
|
73
|
+
class _SpanSelector(_cartesian_polar_selector(SpanSelector)):
|
|
57
74
|
def __init__(self, *args, **kwargs):
|
|
58
|
-
|
|
75
|
+
super().__init__(*args, **kwargs)
|
|
59
76
|
self._select_none_handler = None
|
|
60
77
|
self._min_span = 1.0
|
|
61
78
|
|
|
@@ -80,7 +97,7 @@ class _SpanSelector(SpanSelector):
|
|
|
80
97
|
def set_min_span(self, min_span):
|
|
81
98
|
self._min_span = min_span
|
|
82
99
|
|
|
83
|
-
class _RectangleSelector(RectangleSelector):
|
|
100
|
+
class _RectangleSelector(_cartesian_polar_selector(RectangleSelector)):
|
|
84
101
|
def __init__(self, *args, **kwargs):
|
|
85
102
|
super().__init__(*args, **kwargs)
|
|
86
103
|
|
|
@@ -670,11 +687,16 @@ class MatPlotLibBase(QWidget):
|
|
|
670
687
|
self._span.active = True
|
|
671
688
|
self._span_center_mouse_event = self._span_left_mouse_event = self._span_right_mouse_event = None
|
|
672
689
|
|
|
673
|
-
def
|
|
674
|
-
|
|
690
|
+
def _do_update_span_rect(self, span_tool, x_min, x_max):
|
|
691
|
+
if span_tool is None:
|
|
692
|
+
return
|
|
693
|
+
span_tool.rect.set_x(x_min)
|
|
675
694
|
if x_max:
|
|
676
|
-
|
|
677
|
-
|
|
695
|
+
span_tool.rect.set_width(x_max - x_min)
|
|
696
|
+
span_tool.handles.set_data(span_tool.extents)
|
|
697
|
+
|
|
698
|
+
def _update_span_rect(self, x_min, x_max=None):
|
|
699
|
+
self._do_update_span_rect(self._span, x_min, x_max)
|
|
678
700
|
|
|
679
701
|
def _round_to_bin_width(self, x_min, x_max):
|
|
680
702
|
return x_min, x_max
|
|
@@ -847,12 +869,19 @@ class MatPlotLibBase(QWidget):
|
|
|
847
869
|
return
|
|
848
870
|
if hasattr(self.data, 'x_labels'):
|
|
849
871
|
step = self.data.x_tick_interval if hasattr(self.data, 'x_tick_interval') else None
|
|
850
|
-
x_ticks, x_labels = self._get_labels(self.data.x_labels, step, horizontal=True)
|
|
872
|
+
x_ticks, x_labels, x_ticks_rotation = self._get_labels(self.data.x_labels, step, horizontal=True)
|
|
851
873
|
self._axes.set_xticks(x_ticks)
|
|
852
|
-
self.
|
|
874
|
+
if hasattr(self.data, 'x_ticks_rotation'):
|
|
875
|
+
rotation = x_ticks_rotation if np.isnan(self.data.x_ticks_rotation) else self.data.x_ticks_rotation
|
|
876
|
+
self._axes.set_xticklabels(
|
|
877
|
+
x_labels, rotation=rotation, ha='right' if rotation else 'center')
|
|
878
|
+
self._adjust_to_xticklabels_height(x_labels, rotation)
|
|
879
|
+
else:
|
|
880
|
+
self._axes.set_xticklabels(x_labels)
|
|
881
|
+
|
|
853
882
|
if hasattr(self.data, 'y_labels'):
|
|
854
883
|
step = self.data.y_tick_interval if hasattr(self.data, 'y_tick_interval') else None
|
|
855
|
-
y_ticks, y_labels = self._get_labels(self.data.y_labels, step, horizontal=False)
|
|
884
|
+
y_ticks, y_labels, _ = self._get_labels(self.data.y_labels, step, horizontal=False)
|
|
856
885
|
self._axes.set_yticks(y_ticks)
|
|
857
886
|
self._axes.set_yticklabels(y_labels)
|
|
858
887
|
self._adjust_to_yticklabels_width(y_labels)
|
|
@@ -861,28 +890,45 @@ class MatPlotLibBase(QWidget):
|
|
|
861
890
|
sizes = self._divider.get_horizontal()
|
|
862
891
|
ticklabels_font_family = self._axes.yaxis.get_ticklabels()[0].get_family() if labels else None
|
|
863
892
|
ticklabels_font_size = self._axes.yaxis.get_ticklabels()[0].get_size() if labels else None
|
|
864
|
-
width, _ = self.
|
|
865
|
-
labels,
|
|
893
|
+
width, _ = self._get_labels_width_height(
|
|
894
|
+
labels, font_family=ticklabels_font_family, font_size=ticklabels_font_size)
|
|
866
895
|
|
|
867
896
|
ylabel_font_family = self._axes.yaxis.get_label().get_family()
|
|
868
897
|
ylabel_font_size = self._axes.yaxis.get_label().get_size()
|
|
869
|
-
|
|
870
|
-
[self._axes.get_ylabel()],
|
|
898
|
+
y_label_width, _ = self._get_labels_width_height(
|
|
899
|
+
[self._axes.get_ylabel()], font_family=ylabel_font_family, font_size=ylabel_font_size, rotation=90)
|
|
871
900
|
|
|
872
|
-
width += y_label_width + 0.
|
|
901
|
+
width += y_label_width + 0.3 * self._figure.dpi # Need this offset to account for the tick marks and ylabel
|
|
873
902
|
sizes[0] = Size.Fixed(width / self._figure.dpi)
|
|
874
903
|
self._divider.set_horizontal(sizes)
|
|
875
904
|
self.yTickLabelsWidthAdjusted.emit()
|
|
876
905
|
|
|
906
|
+
def _adjust_to_xticklabels_height(self, labels, rotation=None):
|
|
907
|
+
sizes = self._divider.get_vertical()
|
|
908
|
+
ticklabels_font_family = self._axes.xaxis.get_ticklabels()[0].get_family() if labels else None
|
|
909
|
+
ticklabels_font_size = self._axes.xaxis.get_ticklabels()[0].get_size() if labels else None
|
|
910
|
+
_, height = self._get_labels_width_height(
|
|
911
|
+
labels, font_family=ticklabels_font_family, font_size=ticklabels_font_size, rotation=rotation)
|
|
912
|
+
|
|
913
|
+
xlabel_font_family = self._axes.xaxis.get_label().get_family()
|
|
914
|
+
xlabel_font_size = self._axes.xaxis.get_label().get_size()
|
|
915
|
+
_, x_label_height = self._get_labels_width_height(
|
|
916
|
+
[self._axes.get_xlabel()], font_family=xlabel_font_family, font_size=xlabel_font_size)
|
|
917
|
+
|
|
918
|
+
height += x_label_height + 0.2 * self._figure.dpi # Need this offset to account for the tick marks and xlabel
|
|
919
|
+
sizes[0] = Size.Fixed(height / self._figure.dpi)
|
|
920
|
+
self._divider.set_vertical(sizes)
|
|
921
|
+
|
|
877
922
|
def _get_labels(self, labels, step, horizontal=True):
|
|
878
923
|
(x0, x1), (y0, y1) = self._get_xy_extents()
|
|
879
924
|
start, end = (int(x0), int(x1)) if horizontal else (int(y0), int(y1))
|
|
880
925
|
visible_points = end - start
|
|
926
|
+
labels_rotation = None
|
|
927
|
+
axes_bbox = self._axes.get_window_extent(self._figure.canvas.get_renderer()).transformed(self._figure.dpi_scale_trans.inverted())
|
|
928
|
+
plot_size = (axes_bbox.width if horizontal else axes_bbox.height) * self._figure.dpi
|
|
929
|
+
width, height = self._get_labels_width_height(labels)
|
|
930
|
+
size = (width if horizontal else height)
|
|
881
931
|
if not (step and step > 0):
|
|
882
|
-
width, height = self._get_label_width_height(labels, horizontal=horizontal)
|
|
883
|
-
axes_bbox = self._axes.get_window_extent(self._figure.canvas.get_renderer()).transformed(self._figure.dpi_scale_trans.inverted())
|
|
884
|
-
plot_size = (axes_bbox.width if horizontal else axes_bbox.height) * self._figure.dpi
|
|
885
|
-
size = (width if horizontal else height)
|
|
886
932
|
if plot_size == 0 or size == 0:
|
|
887
933
|
n_labels = 16
|
|
888
934
|
else:
|
|
@@ -892,16 +938,18 @@ class MatPlotLibBase(QWidget):
|
|
|
892
938
|
step = int(visible_points / n_labels) + 1
|
|
893
939
|
else:
|
|
894
940
|
step = int(step)
|
|
941
|
+
if horizontal and (visible_points / step) * size > plot_size:
|
|
942
|
+
labels_rotation = 30
|
|
895
943
|
indexes = list(range(len(labels)))
|
|
896
944
|
display_labels = list(labels)
|
|
897
945
|
for i in indexes:
|
|
898
946
|
if i % step:
|
|
899
947
|
display_labels[i] = ''
|
|
900
|
-
return indexes, display_labels
|
|
901
|
-
|
|
902
|
-
def
|
|
948
|
+
return indexes, display_labels, labels_rotation
|
|
949
|
+
|
|
950
|
+
def _get_labels_width_height(self, labels, font_family=None, font_size=None, rotation=None):
|
|
903
951
|
self._cached_label_width_height = self._cached_label_width_height or {}
|
|
904
|
-
cache_key = ''.join([str(i) for i in (
|
|
952
|
+
cache_key = (tuple(labels), ''.join([str(i) for i in (font_family, font_size)]))
|
|
905
953
|
if cache_key not in self._cached_label_width_height:
|
|
906
954
|
font = MatPlotLibFont(font=font_family) if font_family else MatPlotLibFont.default()
|
|
907
955
|
width = 0
|
|
@@ -912,7 +960,8 @@ class MatPlotLibBase(QWidget):
|
|
|
912
960
|
width = max(width, next_width)
|
|
913
961
|
height = max(height, next_height)
|
|
914
962
|
self._cached_label_width_height[cache_key] = width, height
|
|
915
|
-
|
|
963
|
+
width, height = self._cached_label_width_height[cache_key]
|
|
964
|
+
return (abs(width * np.cos(np.radians(rotation))), abs(width * np.sin(np.radians(rotation)) + height)) if rotation is not None else (width, height)
|
|
916
965
|
|
|
917
966
|
def _create_new_axes(self, nx=1, ny=1) -> Axes:
|
|
918
967
|
axes = Axes(self._figure, self._divider.get_position())
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyqttoolkit-0.7.31 → pyqttoolkit-0.7.33}/pyqttoolkit/metadata/dataframe_metadata_manager.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|