mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-26 13:52:15 +01:00
added functions creating SettingsToolBtn objects
This commit is contained in:
parent
5a5285e18a
commit
1b05dbbf52
1 changed files with 32 additions and 0 deletions
|
|
@ -1,5 +1,7 @@
|
|||
from Qt import QtCore
|
||||
|
||||
from .widgets import SettingsToolBtn
|
||||
|
||||
# Offset of value change trigger in ms
|
||||
VALUE_CHANGE_OFFSET_MS = 300
|
||||
|
||||
|
|
@ -16,3 +18,33 @@ def create_deffered_value_change_timer(callback):
|
|||
timer.setInterval(VALUE_CHANGE_OFFSET_MS)
|
||||
timer.timeout.connect(callback)
|
||||
return timer
|
||||
|
||||
|
||||
def create_add_btn(parent):
|
||||
add_btn = SettingsToolBtn("add", parent)
|
||||
add_btn.setFocusPolicy(QtCore.Qt.ClickFocus)
|
||||
return add_btn
|
||||
|
||||
|
||||
def create_remove_btn(parent):
|
||||
remove_btn = SettingsToolBtn("remove", parent)
|
||||
remove_btn.setFocusPolicy(QtCore.Qt.ClickFocus)
|
||||
return remove_btn
|
||||
|
||||
|
||||
def create_up_btn(parent):
|
||||
remove_btn = SettingsToolBtn("up", parent)
|
||||
remove_btn.setFocusPolicy(QtCore.Qt.ClickFocus)
|
||||
return remove_btn
|
||||
|
||||
|
||||
def create_down_btn(parent):
|
||||
add_btn = SettingsToolBtn("down", parent)
|
||||
add_btn.setFocusPolicy(QtCore.Qt.ClickFocus)
|
||||
return add_btn
|
||||
|
||||
|
||||
def create_confirm_btn(parent):
|
||||
remove_btn = SettingsToolBtn("confirm", parent)
|
||||
remove_btn.setFocusPolicy(QtCore.Qt.ClickFocus)
|
||||
return remove_btn
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue