Skip to content

Commit

Permalink
Merge pull request #38 from linuxrider/pyqt6
Browse files Browse the repository at this point in the history
Switch to Pyqt6
  • Loading branch information
linuxrider authored Jul 7, 2024
2 parents 0443fa5 + bc3a728 commit 3f63f8e
Show file tree
Hide file tree
Showing 11 changed files with 35 additions and 46 deletions.
8 changes: 4 additions & 4 deletions autotag_metadata/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import time

import yaml
from PyQt5 import QtCore, QtGui, QtWidgets, uic
from PyQt6 import QtCore, QtGui, QtWidgets, uic
from yamllint import linter

from .config import Config
Expand Down Expand Up @@ -94,8 +94,8 @@ def __init__(self, *args, **kwargs):
QtGui.QPixmap(
f"{os.path.abspath(os.path.dirname(__file__))}/autotag_metadata.png"
),
QtGui.QIcon.Selected,
QtGui.QIcon.On,
QtGui.QIcon.Mode.Selected,
QtGui.QIcon.State.On,
)
self.setWindowIcon(icon)

Expand Down Expand Up @@ -490,7 +490,7 @@ def run():
# log_handler = QPlainTextEditLogger()
# logger.addHandler(log_handler)
form.show() # Show the form
app.exec_() # and execute the app
app.exec() # and execute the app


if __name__ == "__main__": # if we're running file directly and not importing it
Expand Down
2 changes: 1 addition & 1 deletion autotag_metadata/file_handling.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# <https://www.gnu.org/licenses/>.
# ********************************************************************

from PyQt5 import QtCore
from PyQt6 import QtCore
from watchdog.events import PatternMatchingEventHandler
from watchdog.observers import Observer

Expand Down
2 changes: 1 addition & 1 deletion autotag_metadata/ui/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

import logging

from PyQt5.QtCore import QObject, pyqtSignal
from PyQt6.QtCore import QObject, pyqtSignal

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion autotag_metadata/ui/mycombobox.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# <https://www.gnu.org/licenses/>.
# ********************************************************************

from PyQt5 import QtCore, QtWidgets
from PyQt6 import QtCore, QtWidgets


class MyComboBox(QtWidgets.QComboBox):
Expand Down
2 changes: 1 addition & 1 deletion autotag_metadata/ui/mylineedit.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# <https://www.gnu.org/licenses/>.
# ********************************************************************

from PyQt5 import QtCore, QtWidgets
from PyQt6 import QtCore, QtWidgets


class MyLineEdit(QtWidgets.QLineEdit):
Expand Down
2 changes: 1 addition & 1 deletion autotag_metadata/ui/template_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import os
from enum import Enum

from PyQt5 import QtWidgets, uic
from PyQt6 import QtWidgets, uic

path = os.path.abspath(__file__)
dir_path = os.path.dirname(path)
Expand Down
4 changes: 2 additions & 2 deletions autotag_metadata/ui/templatetree.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
# ********************************************************************
from collections import deque

from PyQt5.QtGui import QStandardItem, QStandardItemModel
from PyQt5.QtWidgets import QTreeView, QVBoxLayout, QWidget
from PyQt6.QtGui import QStandardItem, QStandardItemModel
from PyQt6.QtWidgets import QTreeView, QVBoxLayout, QWidget


class TemplateTree(QWidget):
Expand Down
32 changes: 14 additions & 18 deletions environment-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,23 @@ channels:
- conda-forge
- defaults
dependencies:
- astropy>=5,<6
- click>=8,<9
- datapackage>=1.15,<2
- desktop-app>=0.3
- dill>=0.3.4,<0.4
- desktop-app
- dill
- jupytext
- mypy>0.93
- mypy
- myst-nb
- myst-parser
- pandas>=2,<3
- pint>=0.18,<1
- pip>=22,<23
- pyinstaller>=5.7.0
- pyqt>=5.15,<6
- pytest>=6.2,<7
- pyyaml>=6,<7
- pip>=24
- pyinstaller>=6.7.0
- pytest
- pyyaml
- ruff
- sphinx
- sphinx_rtd_theme
- toml>0.10
- types-pyyaml>=6.0.0,<6.1.0
- types-toml>=0.10.0,<0.11.0
- watchdog>=2.1,<2.2
- yamllint>=1.26,<2
- toml
- types-pyyaml
- types-toml
- watchdog
- yamllint
- pip:
- pyqt6
21 changes: 8 additions & 13 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,11 @@ channels:
- conda-forge
- defaults
dependencies:
- astropy>=5,<6
- click>=8,<9
- pandas>=2,<3
- pyqt>=5.15,<6
- watchdog>=2.1,<2.2
- dill>=0.3.4,<0.4
- pyyaml>=6,<7
- yamllint>=1.26,<2
- pint>=0.18,<1
- datapackage>=1.15,<2
- pip>22
- toml>0.10
- desktop-app>0.2
- desktop-app
- pip>=24
- pyyaml
- toml
- watchdog
- yamllint
- pip:
- pyqt6
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ readme = "README.md"
requires-python = ">=3.8.0"
dependencies = [
"desktop-app",
"pyqt5",
"pyqt6",
"watchdog",
"pint",
"yamllint",
"toml",
]
Expand Down
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
desktop-app
pint
PyQt5
PyQt6
toml
watchdog
yamllint

0 comments on commit 3f63f8e

Please sign in to comment.