diff --git a/.gitignore b/.gitignore index 3f847f6..713813d 100644 Binary files a/.gitignore and b/.gitignore differ diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..0c5b445 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,465 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { + "associatedIndex": 1 +} + + + + + + + { + "keyToString": { + "ModuleVcsDetector.initialDetectionPerformed": "true", + "Python.fix_imports.executor": "Run", + "Python.main.executor": "Run", + "RunOnceActivity.ShowReadmeOnStart": "true", + "RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager.252": "true", + "RunOnceActivity.git.unshallow": "true", + "RunOnceActivity.typescript.service.memoryLimit.init": "true", + "ai.playground.ignore.import.keys.banner.in.settings": "true", + "git-widget-placeholder": "dev-ui", + "ignore.virus.scanning.warn.message": "true", + "nodejs_package_manager_path": "npm", + "vue.rearranger.settings.migration": "true" + } +} + + + + + + + + + + 1781083136733 + + + + + + + + + + + + + \ No newline at end of file diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 30e523e..0000000 --- a/LICENSE +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) 2026 Vic - -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. diff --git a/README.md b/README.md deleted file mode 100644 index e51182d..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# HelioParser - -Как jHelioViewer, только проще функционал - мне интересно было просто смотреть фотки Солнца со спутников, и сравнивать с моими фотографиями \ No newline at end of file diff --git a/fix_imports.py b/fix_imports.py new file mode 100644 index 0000000..7089352 --- /dev/null +++ b/fix_imports.py @@ -0,0 +1,64 @@ +import os +import re + + +def fix_pyside6_syntax(filepath): + """Исправляет устаревший синтаксис PySide6""" + with open(filepath, 'r', encoding='utf-8') as f: + content = f.read() + + # Замены + replacements = [ + (r'Qt\.Horizontal', 'Qt.Orientation.Horizontal'), + (r'Qt\.Vertical', 'Qt.Orientation.Vertical'), + (r'Qt\.LeftButton', 'Qt.MouseButton.LeftButton'), + (r'Qt\.RightButton', 'Qt.MouseButton.RightButton'), + (r'Qt\.MiddleButton', 'Qt.MouseButton.MiddleButton'), + (r'self\.RenderHint\.', 'QPainter.RenderHint.'), + (r'Qt\.KeepAspectRatio', 'Qt.AspectRatioMode.KeepAspectRatio'), + (r'Qt\.IgnoreAspectRatio', 'Qt.AspectRatioMode.IgnoreAspectRatio'), + (r'Qt\.ScrollBarAsNeeded', 'Qt.ScrollBarPolicy.ScrollBarAsNeeded'), + (r'Qt\.ScrollBarAlwaysOff', 'Qt.ScrollBarPolicy.ScrollBarAlwaysOff'), + (r'Qt\.ScrollBarAlwaysOn', 'Qt.ScrollBarPolicy.ScrollBarAlwaysOn'), + (r'Qt\.black', 'Qt.GlobalColor.black'), + (r'Qt\.white', 'Qt.GlobalColor.white'), + (r'Qt\.red', 'Qt.GlobalColor.red'), + (r'Qt\.green', 'Qt.GlobalColor.green'), + (r'Qt\.blue', 'Qt.GlobalColor.blue'), + (r'Qt\.yellow', 'Qt.GlobalColor.yellow'), + (r'Qt\.gray', 'Qt.GlobalColor.gray'), + (r'Qt\.darkGray', 'Qt.GlobalColor.darkGray'), + (r'Qt\.lightGray', 'Qt.GlobalColor.lightGray'), + (r'Qt\.transparent', 'Qt.GlobalColor.transparent'), + ] + + for old, new in replacements: + content = re.sub(old, new, content) + + # Добавляем импорт QPainter если нужно + if 'QPainter' not in content and any('RenderHint' in content for _ in []): + if 'from PySide6.QtGui import' in content: + content = content.replace( + 'from PySide6.QtGui import', + 'from PySide6.QtGui import QPainter, ' + ) + else: + content = 'from PySide6.QtGui import QPainter\n' + content + + with open(filepath, 'w', encoding='utf-8') as f: + f.write(content) + + print(f"Fixed: {filepath}") + + +# Проходим по всем файлам +for root, dirs, files in os.walk('.'): + for file in files: + if file.endswith('.py'): + filepath = os.path.join(root, file) + try: + fix_pyside6_syntax(filepath) + except Exception as e: + print(f"Error fixing {filepath}: {e}") + +print("Done!") \ No newline at end of file diff --git a/icon-raw.png b/icon-raw.png deleted file mode 100644 index 513bfae..0000000 Binary files a/icon-raw.png and /dev/null differ diff --git a/main.exe b/main.exe new file mode 100644 index 0000000..2ff3134 Binary files /dev/null and b/main.exe differ diff --git a/main.py b/main.py new file mode 100644 index 0000000..e81ba14 --- /dev/null +++ b/main.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python3 +""" +Helioviewer Solar Viewer - Профессиональное приложение для просмотра снимков Солнца +""" + +import sys +import os +from pathlib import Path + +# Добавляем путь к модулям +sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) + +from PySide6.QtWidgets import QApplication +from PySide6.QtCore import Qt +from controllers.app_controller import AppController + + +def main(): + """Точка входа в приложение""" + # Включаем High DPI поддержку + QApplication.setHighDpiScaleFactorRoundingPolicy( + Qt.HighDpiScaleFactorRoundingPolicy.PassThrough + ) + + app = QApplication(sys.argv) + app.setApplicationName("Helioviewer Solar Viewer") + app.setOrganizationName("SolarViewer") + + # Устанавливаем темную тему через QSS + app.setStyle("Fusion") + + # Создаем контроллер (он создаст модель и представление) + controller = AppController() + + # Показываем главное окно + controller.show_main_window() + + sys.exit(app.exec()) + + +# ИСПРАВЛЕНО: было if __name__ "__main__": , правильно: +if __name__ == "__main__": + main() \ No newline at end of file