From 7021ff0b6777dd25f60f4a16280cc40a4a1086a7 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Tue, 28 Dec 2021 14:59:25 +0100 Subject: Qt5->Qt6: Replace QT_ENUMS with pyqtEnum. part of CURA-8591 --- cura/API/Account.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cura/API') diff --git a/cura/API/Account.py b/cura/API/Account.py index ca4bfe1c32..993e53e539 100644 --- a/cura/API/Account.py +++ b/cura/API/Account.py @@ -1,8 +1,8 @@ # Copyright (c) 2021 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. - +import enum from datetime import datetime -from PyQt6.QtCore import QObject, pyqtSignal, pyqtSlot, pyqtProperty, QTimer, Q_ENUMS +from PyQt6.QtCore import QObject, pyqtSignal, pyqtSlot, pyqtProperty, QTimer, pyqtEnum from typing import Any, Optional, Dict, TYPE_CHECKING, Callable from UM.Logger import Logger @@ -18,7 +18,7 @@ if TYPE_CHECKING: i18n_catalog = i18nCatalog("cura") -class SyncState: +class SyncState(enum.IntEnum): """QML: Cura.AccountSyncState""" SYNCING = 0 SUCCESS = 1 @@ -41,7 +41,7 @@ class Account(QObject): # The interval in which sync services are automatically triggered SYNC_INTERVAL = 60.0 # seconds - Q_ENUMS(SyncState) + pyqtEnum(SyncState) loginStateChanged = pyqtSignal(bool) """Signal emitted when user logged in or out""" -- cgit v1.2.3