mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
use PlaceholderLineEdit where placeholder is set
This commit is contained in:
parent
ed2d062bf5
commit
611c9bb792
13 changed files with 42 additions and 18 deletions
|
|
@ -4,7 +4,10 @@ from Qt import QtWidgets, QtCore
|
|||
from avalon import api, io, pipeline
|
||||
|
||||
from openpype import style
|
||||
from openpype.tools.utils import lib
|
||||
from openpype.tools.utils import (
|
||||
lib,
|
||||
PlaceholderLineEdit
|
||||
)
|
||||
from openpype.tools.utils.assets_widget import MultiSelectAssetsWidget
|
||||
|
||||
from .widgets import (
|
||||
|
|
@ -517,7 +520,7 @@ class SubsetGroupingDialog(QtWidgets.QDialog):
|
|||
self.subsets = parent._subsets_widget
|
||||
self.asset_ids = parent.data["state"]["assetIds"]
|
||||
|
||||
name = QtWidgets.QLineEdit()
|
||||
name = PlaceholderLineEdit(self)
|
||||
name.setPlaceholderText("Remain blank to ungroup..")
|
||||
|
||||
# Menu for pre-defined subset groups
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ from openpype.lib import (
|
|||
PROJECT_NAME_REGEX
|
||||
)
|
||||
from openpype.style import load_stylesheet
|
||||
from openpype.tools.utils import PlaceholderLineEdit
|
||||
from avalon.api import AvalonMongoDB
|
||||
|
||||
from Qt import QtWidgets, QtCore
|
||||
|
|
@ -345,7 +346,7 @@ class ConfirmProjectDeletion(QtWidgets.QDialog):
|
|||
|
||||
question_label = QtWidgets.QLabel("<b>Are you sure?</b>", self)
|
||||
|
||||
confirm_input = QtWidgets.QLineEdit(self)
|
||||
confirm_input = PlaceholderLineEdit(self)
|
||||
confirm_input.setPlaceholderText("Type \"Delete\" to confirm...")
|
||||
|
||||
cancel_btn = _SameSizeBtns("Cancel", self)
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ from avalon.vendor import qtawesome
|
|||
|
||||
from openpype.widgets.attribute_defs import create_widget_for_attr_def
|
||||
from openpype.tools.flickcharm import FlickCharm
|
||||
from openpype.tools.utils import PlaceholderLineEdit
|
||||
from openpype.pipeline.create import SUBSET_NAME_ALLOWED_SYMBOLS
|
||||
from .models import (
|
||||
AssetsHierarchyModel,
|
||||
|
|
@ -396,7 +397,7 @@ class AssetsDialog(QtWidgets.QDialog):
|
|||
proxy_model.setSourceModel(model)
|
||||
proxy_model.setFilterCaseSensitivity(QtCore.Qt.CaseInsensitive)
|
||||
|
||||
filter_input = QtWidgets.QLineEdit(self)
|
||||
filter_input = PlaceholderLineEdit(self)
|
||||
filter_input.setPlaceholderText("Filter assets..")
|
||||
|
||||
asset_view = QtWidgets.QTreeView(self)
|
||||
|
|
@ -934,7 +935,7 @@ class TasksCombobox(QtWidgets.QComboBox):
|
|||
self.set_selected_items(self._origin_value)
|
||||
|
||||
|
||||
class VariantInputWidget(QtWidgets.QLineEdit):
|
||||
class VariantInputWidget(PlaceholderLineEdit):
|
||||
"""Input widget for variant."""
|
||||
value_changed = QtCore.Signal()
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ from openpype import (
|
|||
resources,
|
||||
style
|
||||
)
|
||||
|
||||
from openpype.tools.utils import PlaceholderLineEdit
|
||||
from .control import PublisherController
|
||||
from .widgets import (
|
||||
BorderedLabelWidget,
|
||||
|
|
@ -131,7 +131,7 @@ class PublisherWindow(QtWidgets.QDialog):
|
|||
subset_content_layout.addWidget(subset_attributes_wrap, 7)
|
||||
|
||||
# Footer
|
||||
comment_input = QtWidgets.QLineEdit(subset_frame)
|
||||
comment_input = PlaceholderLineEdit(subset_frame)
|
||||
comment_input.setObjectName("PublishCommentInput")
|
||||
comment_input.setPlaceholderText(
|
||||
"Attach a comment to your publish"
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ from .widgets import (
|
|||
ExpandingWidget
|
||||
)
|
||||
from openpype.tools.settings import CHILD_OFFSET
|
||||
from openpype.tools.utils import PlaceholderLineEdit
|
||||
|
||||
|
||||
class AppVariantWidget(QtWidgets.QWidget):
|
||||
|
|
@ -45,7 +46,7 @@ class AppVariantWidget(QtWidgets.QWidget):
|
|||
content_layout.addWidget(warn_label)
|
||||
return
|
||||
|
||||
executable_input_widget = QtWidgets.QLineEdit(content_widget)
|
||||
executable_input_widget = PlaceholderLineEdit(content_widget)
|
||||
executable_input_widget.setPlaceholderText(self.exec_placeholder)
|
||||
content_layout.addWidget(executable_input_widget)
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import getpass
|
|||
from Qt import QtWidgets, QtCore
|
||||
from openpype.lib import is_admin_password_required
|
||||
from openpype.widgets import PasswordDialog
|
||||
from openpype.tools.utils import PlaceholderLineEdit
|
||||
|
||||
|
||||
class LocalGeneralWidgets(QtWidgets.QWidget):
|
||||
|
|
@ -11,7 +12,7 @@ class LocalGeneralWidgets(QtWidgets.QWidget):
|
|||
|
||||
self._loading_local_settings = False
|
||||
|
||||
username_input = QtWidgets.QLineEdit(self)
|
||||
username_input = PlaceholderLineEdit(self)
|
||||
username_input.setPlaceholderText(getpass.getuser())
|
||||
|
||||
is_admin_input = QtWidgets.QCheckBox(self)
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ from Qt import QtWidgets
|
|||
from pymongo.errors import ServerSelectionTimeoutError
|
||||
|
||||
from openpype.api import change_openpype_mongo_url
|
||||
from openpype.tools.utils import PlaceholderLineEdit
|
||||
|
||||
|
||||
class OpenPypeMongoWidget(QtWidgets.QWidget):
|
||||
|
|
@ -25,7 +26,7 @@ class OpenPypeMongoWidget(QtWidgets.QWidget):
|
|||
mongo_url_label = QtWidgets.QLabel("OpenPype Mongo URL", self)
|
||||
|
||||
# Input
|
||||
mongo_url_input = QtWidgets.QLineEdit(self)
|
||||
mongo_url_input = PlaceholderLineEdit(self)
|
||||
mongo_url_input.setPlaceholderText("< OpenPype Mongo URL >")
|
||||
mongo_url_input.setText(os.environ["OPENPYPE_MONGO"])
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import platform
|
|||
import copy
|
||||
from Qt import QtWidgets, QtCore, QtGui
|
||||
from openpype.tools.settings.settings import ProjectListWidget
|
||||
from openpype.tools.utils import PlaceholderLineEdit
|
||||
from openpype.settings.constants import (
|
||||
PROJECT_ANATOMY_KEY,
|
||||
DEFAULT_PROJECT_KEY
|
||||
|
|
@ -45,7 +46,7 @@ class DynamicInputItem(QtCore.QObject):
|
|||
parent
|
||||
):
|
||||
super(DynamicInputItem, self).__init__()
|
||||
input_widget = QtWidgets.QLineEdit(parent)
|
||||
input_widget = PlaceholderLineEdit(parent)
|
||||
|
||||
settings_value = input_def.get("value")
|
||||
placeholder = input_def.get("placeholder")
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ from openpype.tools.utils.widgets import ImageButton
|
|||
from openpype.tools.utils.lib import paint_image_with_color
|
||||
|
||||
from openpype.widgets.nice_checkbox import NiceCheckbox
|
||||
from openpype.tools.utils import PlaceholderLineEdit
|
||||
from openpype.settings.lib import get_system_settings
|
||||
from .images import (
|
||||
get_pixmap,
|
||||
|
|
@ -24,7 +25,7 @@ from .constants import (
|
|||
)
|
||||
|
||||
|
||||
class SettingsLineEdit(QtWidgets.QLineEdit):
|
||||
class SettingsLineEdit(PlaceholderLineEdit):
|
||||
focused_in = QtCore.Signal()
|
||||
|
||||
def focusInEvent(self, event):
|
||||
|
|
|
|||
|
|
@ -1,8 +1,12 @@
|
|||
import contextlib
|
||||
from Qt import QtWidgets, QtCore
|
||||
from . import RecursiveSortFilterProxyModel, AssetModel
|
||||
|
||||
from openpype.tools.utils import PlaceholderLineEdit
|
||||
|
||||
from avalon.vendor import qtawesome
|
||||
from avalon import style
|
||||
|
||||
from . import RecursiveSortFilterProxyModel, AssetModel
|
||||
from . import TasksTemplateModel, DeselectableTreeView
|
||||
from . import _iter_model_rows
|
||||
|
||||
|
|
@ -165,7 +169,7 @@ class AssetWidget(QtWidgets.QWidget):
|
|||
refresh = QtWidgets.QPushButton(icon, "")
|
||||
refresh.setToolTip("Refresh items")
|
||||
|
||||
filter = QtWidgets.QLineEdit()
|
||||
filter = PlaceholderLineEdit()
|
||||
filter.textChanged.connect(proxy.setFilterFixedString)
|
||||
filter.setPlaceholderText("Filter assets..")
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ from avalon import api
|
|||
from avalon.vendor import qtawesome
|
||||
|
||||
from openpype import style
|
||||
from openpype.tools.utils import PlaceholderLineEdit
|
||||
from openpype.tools.utils.lib import (
|
||||
iter_model_rows,
|
||||
qt_app_context
|
||||
|
|
@ -44,7 +45,7 @@ class SubsetManagerWindow(QtWidgets.QDialog):
|
|||
header_widget = QtWidgets.QWidget(left_side_widget)
|
||||
|
||||
# Filter input
|
||||
filter_input = QtWidgets.QLineEdit(header_widget)
|
||||
filter_input = PlaceholderLineEdit(header_widget)
|
||||
filter_input.setPlaceholderText("Filter subsets..")
|
||||
|
||||
# Refresh button
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
from .widgets import (
|
||||
PlaceholderLineEdit,
|
||||
)
|
||||
|
||||
|
||||
__all__ = (
|
||||
"PlaceholderLineEdit",
|
||||
)
|
||||
|
|
@ -15,6 +15,7 @@ from openpype.tools.utils.lib import (
|
|||
schedule,
|
||||
qt_app_context
|
||||
)
|
||||
from openpype.tools.utils import PlaceholderLineEdit
|
||||
from openpype.tools.utils.assets_widget import SingleSelectAssetsWidget
|
||||
from openpype.tools.utils.tasks_widget import TasksWidget
|
||||
from openpype.tools.utils.delegates import PrettyTimeDelegate
|
||||
|
|
@ -139,7 +140,7 @@ class NameWindow(QtWidgets.QDialog):
|
|||
preview_label = QtWidgets.QLabel("Preview filename", inputs_widget)
|
||||
|
||||
# Subversion input
|
||||
subversion_input = QtWidgets.QLineEdit(inputs_widget)
|
||||
subversion_input = PlaceholderLineEdit(inputs_widget)
|
||||
subversion_input.setPlaceholderText("Will be part of filename.")
|
||||
|
||||
# Extensions combobox
|
||||
|
|
@ -394,9 +395,9 @@ class FilesWidget(QtWidgets.QWidget):
|
|||
files_view.setColumnWidth(0, 330)
|
||||
|
||||
# Filtering input
|
||||
filter_input = QtWidgets.QLineEdit(self)
|
||||
filter_input.textChanged.connect(proxy_model.setFilterFixedString)
|
||||
filter_input = PlaceholderLineEdit(self)
|
||||
filter_input.setPlaceholderText("Filter files..")
|
||||
filter_input.textChanged.connect(proxy_model.setFilterFixedString)
|
||||
|
||||
# Home Page
|
||||
# Build buttons widget for files widget
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue