mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
Qt5->Qt6: Replace QT_ENUMS with pyqtEnum.
part of CURA-8591
This commit is contained in:
parent
32b52c6166
commit
7021ff0b67
3 changed files with 10 additions and 10 deletions
|
|
@ -1,6 +1,6 @@
|
|||
# Copyright (c) 2021 Ultimaker B.V.
|
||||
# Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import enum
|
||||
import os
|
||||
import sys
|
||||
import tempfile
|
||||
|
|
@ -8,7 +8,7 @@ import time
|
|||
from typing import cast, TYPE_CHECKING, Optional, Callable, List, Any, Dict
|
||||
|
||||
import numpy
|
||||
from PyQt6.QtCore import QObject, QTimer, QUrl, pyqtSignal, pyqtProperty, QEvent, Q_ENUMS
|
||||
from PyQt6.QtCore import QObject, QTimer, QUrl, pyqtSignal, pyqtProperty, QEvent, pyqtEnum
|
||||
from PyQt6.QtGui import QColor, QIcon
|
||||
from PyQt6.QtQml import qmlRegisterUncreatableType, qmlRegisterSingletonType, qmlRegisterType
|
||||
from PyQt6.QtWidgets import QMessageBox
|
||||
|
|
@ -133,7 +133,7 @@ class CuraApplication(QtApplication):
|
|||
|
||||
Created = False
|
||||
|
||||
class ResourceTypes:
|
||||
class ResourceTypes(enum.IntEnum):
|
||||
QmlFiles = Resources.UserType + 1
|
||||
Firmware = Resources.UserType + 2
|
||||
QualityInstanceContainer = Resources.UserType + 3
|
||||
|
|
@ -147,7 +147,7 @@ class CuraApplication(QtApplication):
|
|||
SettingVisibilityPreset = Resources.UserType + 11
|
||||
IntentInstanceContainer = Resources.UserType + 12
|
||||
|
||||
Q_ENUMS(ResourceTypes)
|
||||
pyqtEnum(ResourceTypes)
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(name = ApplicationMetadata.CuraAppName,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue