mirror of
https://github.com/283375/arcaea-offline-pyside-ui.git
synced 2025-04-19 17:20:17 +00:00
18 lines
385 B
Python
18 lines
385 B
Python
from dataclasses import dataclass
|
|
from typing import Optional
|
|
|
|
from PySide6.QtCore import QCoreApplication
|
|
from PySide6.QtGui import QIcon, QPixmap
|
|
|
|
|
|
@dataclass
|
|
class NavItem:
|
|
id: str
|
|
icon: Optional[QIcon | QPixmap | str] = None
|
|
|
|
def text(self):
|
|
return QCoreApplication.translate("NavItem", f"{self.id}.title")
|
|
|
|
def __hash__(self):
|
|
return hash(self.id)
|