mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
defined PROJECT_NAME_ROLE
This commit is contained in:
parent
2921bc6c46
commit
fd7438c2ac
2 changed files with 6 additions and 1 deletions
|
|
@ -1,5 +1,6 @@
|
|||
__all__ = (
|
||||
"IDENTIFIER_ROLE",
|
||||
"PROJECT_NAME_ROLE",
|
||||
|
||||
"HierarchyView",
|
||||
|
||||
|
|
@ -20,7 +21,8 @@ __all__ = (
|
|||
|
||||
|
||||
from .constants import (
|
||||
IDENTIFIER_ROLE
|
||||
IDENTIFIER_ROLE,
|
||||
PROJECT_NAME_ROLE
|
||||
)
|
||||
from .widgets import CreateProjectDialog
|
||||
from .view import HierarchyView
|
||||
|
|
|
|||
|
|
@ -17,6 +17,9 @@ ITEM_TYPE_ROLE = QtCore.Qt.UserRole + 5
|
|||
# Item has opened editor (per column)
|
||||
EDITOR_OPENED_ROLE = QtCore.Qt.UserRole + 6
|
||||
|
||||
# Role for project model
|
||||
PROJECT_NAME_ROLE = QtCore.Qt.UserRole + 7
|
||||
|
||||
# Allowed symbols for any name
|
||||
NAME_ALLOWED_SYMBOLS = "a-zA-Z0-9_"
|
||||
NAME_REGEX = re.compile("^[" + NAME_ALLOWED_SYMBOLS + "]*$")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue