MoleditPy-linux 2.3.2__tar.gz → 2.3.3__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.
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/PKG-INFO +1 -1
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/pyproject.toml +1 -1
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/MoleditPy_linux.egg-info/PKG-INFO +1 -1
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/constants.py +1 -1
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/main_window_edit_actions.py +4 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/main_window_main_init.py +5 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/plugin_interface.py +10 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/plugin_manager.py +17 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/LICENSE +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/README.md +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/setup.cfg +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/MoleditPy_linux.egg-info/SOURCES.txt +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/MoleditPy_linux.egg-info/dependency_links.txt +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/MoleditPy_linux.egg-info/entry_points.txt +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/MoleditPy_linux.egg-info/requires.txt +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/MoleditPy_linux.egg-info/top_level.txt +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/__init__.py +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/__main__.py +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/main.py +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/__init__.py +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/about_dialog.py +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/align_plane_dialog.py +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/alignment_dialog.py +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/analysis_window.py +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/angle_dialog.py +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/assets/file_icon.ico +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/assets/icon.icns +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/assets/icon.ico +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/assets/icon.png +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/atom_item.py +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/bond_item.py +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/bond_length_dialog.py +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/calculation_worker.py +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/color_settings_dialog.py +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/constrained_optimization_dialog.py +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/custom_interactor_style.py +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/custom_qt_interactor.py +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/dialog3_d_picking_mixin.py +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/dihedral_dialog.py +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/main_window.py +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/main_window_app_state.py +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/main_window_compute.py +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/main_window_dialog_manager.py +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/main_window_edit_3d.py +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/main_window_export.py +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/main_window_molecular_parsers.py +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/main_window_project_io.py +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/main_window_string_importers.py +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/main_window_ui_manager.py +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/main_window_view_3d.py +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/main_window_view_loaders.py +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/mirror_dialog.py +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/molecular_data.py +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/molecule_scene.py +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/move_group_dialog.py +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/periodic_table_dialog.py +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/planarize_dialog.py +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/plugin_manager_window.py +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/settings_dialog.py +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/template_preview_item.py +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/template_preview_view.py +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/translation_dialog.py +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/user_template_dialog.py +0 -0
- {moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/zoomable_view.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: MoleditPy-linux
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.3
|
|
4
4
|
Summary: A cross-platform, simple, and intuitive molecular structure editor built in Python. It allows 2D molecular drawing and 3D structure visualization. It supports exporting structure files for input to DFT calculation software.
|
|
5
5
|
Author-email: HiroYokoyama <titech.yoko.hiro@gmail.com>
|
|
6
6
|
License: GNU GENERAL PUBLIC LICENSE
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: MoleditPy-linux
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.3
|
|
4
4
|
Summary: A cross-platform, simple, and intuitive molecular structure editor built in Python. It allows 2D molecular drawing and 3D structure visualization. It supports exporting structure files for input to DFT calculation software.
|
|
5
5
|
Author-email: HiroYokoyama <titech.yoko.hiro@gmail.com>
|
|
6
6
|
License: GNU GENERAL PUBLIC LICENSE
|
|
@@ -641,6 +641,10 @@ class MainWindowEditActions(object):
|
|
|
641
641
|
# アプリケーションのイベントループを強制的に処理し、画面の再描画を確実に行う
|
|
642
642
|
QApplication.processEvents()
|
|
643
643
|
|
|
644
|
+
# Call plugin document reset handlers
|
|
645
|
+
if hasattr(self, 'plugin_manager') and self.plugin_manager:
|
|
646
|
+
self.plugin_manager.invoke_document_reset_handlers()
|
|
647
|
+
|
|
644
648
|
self.statusBar().showMessage("Cleared all data.")
|
|
645
649
|
|
|
646
650
|
|
{moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/main_window_main_init.py
RENAMED
|
@@ -1851,6 +1851,11 @@ class MainWindowMainInit(object):
|
|
|
1851
1851
|
action_text = text if text else parts[-1]
|
|
1852
1852
|
action = QAction(action_text, self)
|
|
1853
1853
|
action.triggered.connect(callback)
|
|
1854
|
+
|
|
1855
|
+
# Apply shortcut if provided
|
|
1856
|
+
if action_def.get('shortcut'):
|
|
1857
|
+
action.setShortcut(QKeySequence(action_def['shortcut']))
|
|
1858
|
+
|
|
1854
1859
|
action.setData(PLUGIN_ACTION_TAG) # TAG THE ACTION
|
|
1855
1860
|
current_menu.addAction(action)
|
|
1856
1861
|
|
{moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/plugin_interface.py
RENAMED
|
@@ -168,6 +168,16 @@ class PluginContext:
|
|
|
168
168
|
"""
|
|
169
169
|
self._manager.register_3d_style(self._plugin_name, style_name, callback)
|
|
170
170
|
|
|
171
|
+
def register_document_reset_handler(self, callback: Callable[[], None]):
|
|
172
|
+
"""
|
|
173
|
+
Register a callback to be called when a new document is created (File→New).
|
|
174
|
+
|
|
175
|
+
Args:
|
|
176
|
+
callback: Function with no arguments that resets plugin state.
|
|
177
|
+
"""
|
|
178
|
+
self._manager.register_document_reset_handler(self._plugin_name, callback)
|
|
179
|
+
|
|
180
|
+
|
|
171
181
|
|
|
172
182
|
|
|
173
183
|
|
{moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/plugin_manager.py
RENAMED
|
@@ -51,6 +51,7 @@ class PluginManager:
|
|
|
51
51
|
self.save_handlers = {}
|
|
52
52
|
self.load_handlers = {}
|
|
53
53
|
self.custom_3d_styles = {} # style_name -> {'plugin': name, 'callback': func}
|
|
54
|
+
self.document_reset_handlers = [] # List of callbacks to call on new document
|
|
54
55
|
|
|
55
56
|
def get_main_window(self):
|
|
56
57
|
return self.main_window
|
|
@@ -182,6 +183,7 @@ class PluginManager:
|
|
|
182
183
|
self.save_handlers = {}
|
|
183
184
|
self.load_handlers = {}
|
|
184
185
|
self.custom_3d_styles = {}
|
|
186
|
+
self.document_reset_handlers = []
|
|
185
187
|
|
|
186
188
|
if not os.path.exists(self.plugin_dir):
|
|
187
189
|
return []
|
|
@@ -378,6 +380,21 @@ class PluginManager:
|
|
|
378
380
|
self.custom_3d_styles[style_name] = {
|
|
379
381
|
'plugin': plugin_name, 'callback': callback
|
|
380
382
|
}
|
|
383
|
+
|
|
384
|
+
def register_document_reset_handler(self, plugin_name, callback):
|
|
385
|
+
"""Register callback to be invoked when a new document is created."""
|
|
386
|
+
self.document_reset_handlers.append({
|
|
387
|
+
'plugin': plugin_name,
|
|
388
|
+
'callback': callback
|
|
389
|
+
})
|
|
390
|
+
|
|
391
|
+
def invoke_document_reset_handlers(self):
|
|
392
|
+
"""Call all registered document reset handlers."""
|
|
393
|
+
for handler in self.document_reset_handlers:
|
|
394
|
+
try:
|
|
395
|
+
handler['callback']()
|
|
396
|
+
except Exception as e:
|
|
397
|
+
print(f"Error in document reset handler for {handler['plugin']}: {e}")
|
|
381
398
|
|
|
382
399
|
def get_plugin_info_safe(self, file_path):
|
|
383
400
|
"""Extracts plugin metadata using AST parsing (safe, no execution)."""
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/MoleditPy_linux.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/MoleditPy_linux.egg-info/entry_points.txt
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
|
{moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/align_plane_dialog.py
RENAMED
|
File without changes
|
{moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/alignment_dialog.py
RENAMED
|
File without changes
|
{moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/analysis_window.py
RENAMED
|
File without changes
|
|
File without changes
|
{moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/assets/file_icon.ico
RENAMED
|
File without changes
|
{moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/assets/icon.icns
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/bond_length_dialog.py
RENAMED
|
File without changes
|
{moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/calculation_worker.py
RENAMED
|
File without changes
|
{moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/color_settings_dialog.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/custom_qt_interactor.py
RENAMED
|
File without changes
|
|
File without changes
|
{moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/dihedral_dialog.py
RENAMED
|
File without changes
|
|
File without changes
|
{moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/main_window_app_state.py
RENAMED
|
File without changes
|
{moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/main_window_compute.py
RENAMED
|
File without changes
|
|
File without changes
|
{moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/main_window_edit_3d.py
RENAMED
|
File without changes
|
{moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/main_window_export.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/main_window_view_3d.py
RENAMED
|
File without changes
|
|
File without changes
|
{moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/mirror_dialog.py
RENAMED
|
File without changes
|
{moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/molecular_data.py
RENAMED
|
File without changes
|
{moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/molecule_scene.py
RENAMED
|
File without changes
|
{moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/move_group_dialog.py
RENAMED
|
File without changes
|
{moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/periodic_table_dialog.py
RENAMED
|
File without changes
|
{moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/planarize_dialog.py
RENAMED
|
File without changes
|
{moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/plugin_manager_window.py
RENAMED
|
File without changes
|
{moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/settings_dialog.py
RENAMED
|
File without changes
|
{moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/template_preview_item.py
RENAMED
|
File without changes
|
{moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/template_preview_view.py
RENAMED
|
File without changes
|
{moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/translation_dialog.py
RENAMED
|
File without changes
|
{moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/user_template_dialog.py
RENAMED
|
File without changes
|
{moleditpy_linux-2.3.2 → moleditpy_linux-2.3.3}/src/moleditpy_linux/modules/zoomable_view.py
RENAMED
|
File without changes
|