mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 08:54:53 +01:00
added reset button
This commit is contained in:
parent
c54608a751
commit
0e2ff510f2
1 changed files with 14 additions and 2 deletions
|
|
@ -16,7 +16,14 @@ class PublisherWindow(QtWidgets.QWidget):
|
|||
main_frame = QtWidgets.QWidget(self)
|
||||
|
||||
# Header
|
||||
context_label = QtWidgets.QLabel(main_frame)
|
||||
header_widget = QtWidgets.QWidget(main_frame)
|
||||
context_label = QtWidgets.QLabel(header_widget)
|
||||
reset_btn = QtWidgets.QPushButton("Reset", header_widget)
|
||||
|
||||
header_layout = QtWidgets.QHBoxLayout(header_widget)
|
||||
header_layout.setContentsMargins(0, 0, 0, 0)
|
||||
header_layout.addWidget(context_label, 1)
|
||||
header_layout.addWidget(reset_btn, 0)
|
||||
|
||||
# Content
|
||||
content_widget = QtWidgets.QWidget(main_frame)
|
||||
|
|
@ -52,7 +59,7 @@ class PublisherWindow(QtWidgets.QWidget):
|
|||
|
||||
# Main frame
|
||||
main_frame_layout = QtWidgets.QVBoxLayout(main_frame)
|
||||
main_frame_layout.addWidget(context_label, 0)
|
||||
main_frame_layout.addWidget(header_widget, 0)
|
||||
main_frame_layout.addWidget(content_widget, 1)
|
||||
main_frame_layout.addWidget(footer_widget, 0)
|
||||
|
||||
|
|
@ -60,6 +67,8 @@ class PublisherWindow(QtWidgets.QWidget):
|
|||
main_layout = QtWidgets.QHBoxLayout(self)
|
||||
main_layout.addWidget(main_frame)
|
||||
|
||||
reset_btn.clicked.connect(self._on_reset_clicked)
|
||||
|
||||
create_btn.clicked.connect(self._on_create_clicked)
|
||||
validate_btn.clicked.connect(self._on_validate_clicked)
|
||||
publish_btn.clicked.connect(self._on_publish_clicked)
|
||||
|
|
@ -95,6 +104,9 @@ class PublisherWindow(QtWidgets.QWidget):
|
|||
def set_context_label(self, label):
|
||||
self.context_label.setText(label)
|
||||
|
||||
def _on_reset_clicked(self):
|
||||
self.reset()
|
||||
|
||||
def _on_create_clicked(self):
|
||||
print("Creation!!!")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue