MoleditPy-linux 1.16.4__py3-none-any.whl → 1.17.1__py3-none-any.whl
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.
- moleditpy_linux/__init__.py +13 -0
- moleditpy_linux/__main__.py +1 -1
- moleditpy_linux/main.py +1 -1
- moleditpy_linux/modules/__init__.py +12 -0
- moleditpy_linux/modules/about_dialog.py +13 -1
- moleditpy_linux/modules/align_plane_dialog.py +12 -0
- moleditpy_linux/modules/alignment_dialog.py +12 -0
- moleditpy_linux/modules/analysis_window.py +12 -0
- moleditpy_linux/modules/angle_dialog.py +12 -0
- moleditpy_linux/modules/atom_item.py +12 -0
- moleditpy_linux/modules/bond_item.py +12 -0
- moleditpy_linux/modules/bond_length_dialog.py +12 -0
- moleditpy_linux/modules/calculation_worker.py +12 -0
- moleditpy_linux/modules/color_settings_dialog.py +12 -0
- moleditpy_linux/modules/constants.py +13 -1
- moleditpy_linux/modules/constrained_optimization_dialog.py +12 -0
- moleditpy_linux/modules/custom_interactor_style.py +12 -0
- moleditpy_linux/modules/custom_qt_interactor.py +11 -1
- moleditpy_linux/modules/dialog3_d_picking_mixin.py +12 -0
- moleditpy_linux/modules/dihedral_dialog.py +12 -0
- moleditpy_linux/modules/main_window.py +1 -1
- moleditpy_linux/modules/main_window_app_state.py +9 -0
- moleditpy_linux/modules/main_window_compute.py +9 -0
- moleditpy_linux/modules/main_window_dialog_manager.py +10 -0
- moleditpy_linux/modules/main_window_edit_3d.py +9 -0
- moleditpy_linux/modules/main_window_edit_actions.py +10 -0
- moleditpy_linux/modules/main_window_export.py +9 -0
- moleditpy_linux/modules/main_window_main_init.py +9 -0
- moleditpy_linux/modules/main_window_molecular_parsers.py +10 -0
- moleditpy_linux/modules/main_window_project_io.py +9 -0
- moleditpy_linux/modules/main_window_string_importers.py +9 -0
- moleditpy_linux/modules/main_window_ui_manager.py +9 -0
- moleditpy_linux/modules/main_window_view_3d.py +9 -0
- moleditpy_linux/modules/main_window_view_loaders.py +9 -0
- moleditpy_linux/modules/mirror_dialog.py +12 -0
- moleditpy_linux/modules/molecular_data.py +12 -0
- moleditpy_linux/modules/molecule_scene.py +12 -0
- moleditpy_linux/modules/move_group_dialog.py +12 -0
- moleditpy_linux/modules/periodic_table_dialog.py +12 -0
- moleditpy_linux/modules/planarize_dialog.py +12 -0
- moleditpy_linux/modules/settings_dialog.py +12 -0
- moleditpy_linux/modules/template_preview_item.py +12 -0
- moleditpy_linux/modules/template_preview_view.py +12 -0
- moleditpy_linux/modules/translation_dialog.py +12 -0
- moleditpy_linux/modules/user_template_dialog.py +12 -0
- moleditpy_linux/modules/zoomable_view.py +33 -2
- moleditpy_linux-1.17.1.dist-info/METADATA +935 -0
- moleditpy_linux-1.17.1.dist-info/RECORD +55 -0
- moleditpy_linux-1.17.1.dist-info/licenses/LICENSE +674 -0
- moleditpy_linux-1.16.4.dist-info/METADATA +0 -258
- moleditpy_linux-1.16.4.dist-info/RECORD +0 -54
- {moleditpy_linux-1.16.4.dist-info → moleditpy_linux-1.17.1.dist-info}/WHEEL +0 -0
- {moleditpy_linux-1.16.4.dist-info → moleditpy_linux-1.17.1.dist-info}/entry_points.txt +0 -0
- {moleditpy_linux-1.16.4.dist-info → moleditpy_linux-1.17.1.dist-info}/top_level.txt +0 -0
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
|
|
4
|
+
"""
|
|
5
|
+
MoleditPy — A Python-based molecular editing software
|
|
6
|
+
|
|
7
|
+
Author: Hiromichi Yokoyama
|
|
8
|
+
License: GPL-3.0 license
|
|
9
|
+
Repo: https://github.com/HiroYokoyama/python_molecular_editor
|
|
10
|
+
DOI: 10.5281/zenodo.17268532
|
|
11
|
+
"""
|
|
12
|
+
|
|
1
13
|
from PyQt6.QtWidgets import (
|
|
2
14
|
QDialog, QVBoxLayout, QLabel, QHBoxLayout, QPushButton, QMessageBox
|
|
3
15
|
)
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
|
|
4
|
+
"""
|
|
5
|
+
MoleditPy — A Python-based molecular editing software
|
|
6
|
+
|
|
7
|
+
Author: Hiromichi Yokoyama
|
|
8
|
+
License: GPL-3.0 license
|
|
9
|
+
Repo: https://github.com/HiroYokoyama/python_molecular_editor
|
|
10
|
+
DOI: 10.5281/zenodo.17268532
|
|
11
|
+
"""
|
|
12
|
+
|
|
1
13
|
from PyQt6.QtWidgets import (
|
|
2
14
|
QDialog, QVBoxLayout, QTabWidget, QWidget, QFormLayout, QPushButton, QHBoxLayout,
|
|
3
15
|
QCheckBox, QComboBox, QLabel, QColorDialog, QSlider, QFrame, QMessageBox
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
|
|
4
|
+
"""
|
|
5
|
+
MoleditPy — A Python-based molecular editing software
|
|
6
|
+
|
|
7
|
+
Author: Hiromichi Yokoyama
|
|
8
|
+
License: GPL-3.0 license
|
|
9
|
+
Repo: https://github.com/HiroYokoyama/python_molecular_editor
|
|
10
|
+
DOI: 10.5281/zenodo.17268532
|
|
11
|
+
"""
|
|
12
|
+
|
|
1
13
|
from PyQt6.QtWidgets import (
|
|
2
14
|
QGraphicsItem
|
|
3
15
|
)
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
|
|
4
|
+
"""
|
|
5
|
+
MoleditPy — A Python-based molecular editing software
|
|
6
|
+
|
|
7
|
+
Author: Hiromichi Yokoyama
|
|
8
|
+
License: GPL-3.0 license
|
|
9
|
+
Repo: https://github.com/HiroYokoyama/python_molecular_editor
|
|
10
|
+
DOI: 10.5281/zenodo.17268532
|
|
11
|
+
"""
|
|
12
|
+
|
|
1
13
|
from PyQt6.QtWidgets import QGraphicsView
|
|
2
14
|
|
|
3
15
|
from PyQt6.QtCore import Qt, QTimer
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
|
|
4
|
+
"""
|
|
5
|
+
MoleditPy — A Python-based molecular editing software
|
|
6
|
+
|
|
7
|
+
Author: Hiromichi Yokoyama
|
|
8
|
+
License: GPL-3.0 license
|
|
9
|
+
Repo: https://github.com/HiroYokoyama/python_molecular_editor
|
|
10
|
+
DOI: 10.5281/zenodo.17268532
|
|
11
|
+
"""
|
|
12
|
+
|
|
1
13
|
from PyQt6.QtWidgets import (
|
|
2
14
|
QDialog, QVBoxLayout, QLabel, QGridLayout, QLineEdit, QCheckBox, QPushButton, QHBoxLayout
|
|
3
15
|
)
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
|
|
4
|
+
"""
|
|
5
|
+
MoleditPy — A Python-based molecular editing software
|
|
6
|
+
|
|
7
|
+
Author: Hiromichi Yokoyama
|
|
8
|
+
License: GPL-3.0 license
|
|
9
|
+
Repo: https://github.com/HiroYokoyama/python_molecular_editor
|
|
10
|
+
DOI: 10.5281/zenodo.17268532
|
|
11
|
+
"""
|
|
12
|
+
|
|
1
13
|
from PyQt6.QtWidgets import (
|
|
2
14
|
QDialog, QVBoxLayout, QLabel, QWidget, QGridLayout, QScrollArea,
|
|
3
15
|
QHBoxLayout, QPushButton, QGraphicsScene, QInputDialog, QMessageBox
|
|
@@ -1,11 +1,22 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
|
|
4
|
+
"""
|
|
5
|
+
MoleditPy — A Python-based molecular editing software
|
|
6
|
+
|
|
7
|
+
Author: Hiromichi Yokoyama
|
|
8
|
+
License: GPL-3.0 license
|
|
9
|
+
Repo: https://github.com/HiroYokoyama/python_molecular_editor
|
|
10
|
+
DOI: 10.5281/zenodo.17268532
|
|
11
|
+
"""
|
|
12
|
+
|
|
1
13
|
from PyQt6.QtWidgets import (
|
|
2
14
|
QGraphicsView
|
|
3
15
|
)
|
|
4
16
|
|
|
5
17
|
|
|
6
|
-
|
|
7
18
|
from PyQt6.QtCore import (
|
|
8
|
-
Qt, QPointF
|
|
19
|
+
Qt, QPointF, QEvent
|
|
9
20
|
)
|
|
10
21
|
|
|
11
22
|
class ZoomableView(QGraphicsView):
|
|
@@ -96,3 +107,23 @@ class ZoomableView(QGraphicsView):
|
|
|
96
107
|
event.accept()
|
|
97
108
|
else:
|
|
98
109
|
super().mouseReleaseEvent(event)
|
|
110
|
+
|
|
111
|
+
def viewportEvent(self, event):
|
|
112
|
+
""" Macのトラックパッドなどのネイティブジェスチャー(ピンチ)に対応 """
|
|
113
|
+
if event.type() == QEvent.Type.NativeGesture:
|
|
114
|
+
# ピンチズーム(ZoomNativeGesture)の場合
|
|
115
|
+
if event.gestureType() == Qt.NativeGestureType.ZoomNativeGesture:
|
|
116
|
+
# event.value() は拡大縮小の倍率差分を返します
|
|
117
|
+
# 例: 拡大時は正の値、縮小時は負の値
|
|
118
|
+
factor = 1.0 + event.value()
|
|
119
|
+
|
|
120
|
+
# 既存の最大・最小スケール制限を考慮する場合(オプション)
|
|
121
|
+
current_scale = self.transform().m11()
|
|
122
|
+
min_scale, max_scale = 0.05, 20.0
|
|
123
|
+
|
|
124
|
+
# 制限内であればスケールを適用
|
|
125
|
+
# (厳密に制限を守るならif文でガードしますが、最小実装としては以下で動作します)
|
|
126
|
+
self.scale(factor, factor)
|
|
127
|
+
return True
|
|
128
|
+
|
|
129
|
+
return super().viewportEvent(event)
|