Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cuesubmit group layout #1282

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 20 additions & 10 deletions cuesubmit/cuesubmit/ui/SettingsWidgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ class BaseSettingsWidget(QtWidgets.QWidget):
def __init__(self, parent=None):
super(BaseSettingsWidget, self).__init__(parent)
self.mainLayout = QtWidgets.QVBoxLayout()
self.groupBox = QtWidgets.QGroupBox('options')
self.groupLayout = QtWidgets.QVBoxLayout()
self.groupBox.setLayout(self.groupLayout)
self.groupBox.setStyleSheet(Widgets.Style.GROUP_BOX)
self.mainLayout.addWidget(self.groupBox)
self.setLayout(self.mainLayout)
self.mainLayout.setContentsMargins(0, 0, 0, 0)

Expand All @@ -53,17 +58,18 @@ class InMayaSettings(BaseSettingsWidget):
# pylint: disable=keyword-arg-before-vararg,unused-argument
def __init__(self, cameras=None, filename=None, parent=None, *args, **kwargs):
super(InMayaSettings, self).__init__(parent=parent)
self.groupBox.setTitle('Maya options')
self.mayaFileInput = Widgets.CueLabelLineEdit('Maya File:', filename)
self.cameraSelector = Widgets.CueSelectPulldown('Render Cameras', options=cameras)
self.selectorLayout = QtWidgets.QHBoxLayout()
self.setupUi()

def setupUi(self):
"""Creates the Maya-specific widget layout."""
self.mainLayout.addWidget(self.mayaFileInput)
self.groupLayout.addWidget(self.mayaFileInput)
self.selectorLayout.addWidget(self.cameraSelector)
self.selectorLayout.addSpacerItem(Widgets.CueSpacerItem(Widgets.SpacerTypes.HORIZONTAL))
self.mainLayout.addLayout(self.selectorLayout)
self.groupLayout.addLayout(self.selectorLayout)

def setCommandData(self, commandData):
self.mayaFileInput.setText(commandData.get('mayaFile', ''))
Expand All @@ -82,13 +88,14 @@ class BaseMayaSettings(BaseSettingsWidget):
# pylint: disable=keyword-arg-before-vararg,unused-argument
def __init__(self, parent=None, *args, **kwargs):
super(BaseMayaSettings, self).__init__(parent=parent)
self.groupBox.setTitle('Maya options')
self.mayaFileInput = Widgets.CueLabelLineEdit('Maya File:')
self.setupUi()
self.setupConnections()

def setupUi(self):
"""Creates the widget layout with a single input for the path to the Maya scene."""
self.mainLayout.addWidget(self.mayaFileInput)
self.groupLayout.addWidget(self.mayaFileInput)

def setupConnections(self):
"""Sets up widget signals."""
Expand All @@ -109,6 +116,7 @@ class InNukeSettings(BaseSettingsWidget):
# pylint: disable=keyword-arg-before-vararg,unused-argument
def __init__(self, writeNodes=None, filename=None, parent=None, *args, **kwargs):
super(InNukeSettings, self).__init__(parent=parent)
self.groupBox.setTitle('Nuke options')
self.fileInput = Widgets.CueLabelLineEdit('Nuke File:', filename)
self.writeNodeSelector = Widgets.CueSelectPulldown('Write Nodes:', emptyText='[All]',
options=writeNodes)
Expand All @@ -117,10 +125,10 @@ def __init__(self, writeNodes=None, filename=None, parent=None, *args, **kwargs)

def setupUi(self):
"""Creates the Nuke-specific widget layout."""
self.mainLayout.addWidget(self.fileInput)
self.groupLayout.addWidget(self.fileInput)
self.selectorLayout.addWidget(self.writeNodeSelector)
self.selectorLayout.addSpacerItem(Widgets.CueSpacerItem(Widgets.SpacerTypes.HORIZONTAL))
self.mainLayout.addLayout(self.selectorLayout)
self.groupLayout.addLayout(self.selectorLayout)

def setCommandData(self, commandData):
self.fileInput.setText(commandData.get('nukeFile', ''))
Expand All @@ -139,13 +147,14 @@ class BaseNukeSettings(BaseSettingsWidget):
# pylint: disable=keyword-arg-before-vararg,unused-argument
def __init__(self, parent=None, *args, **kwargs):
super(BaseNukeSettings, self).__init__(parent=parent)
self.groupBox.setTitle('Nuke options')
self.fileInput = Widgets.CueLabelLineEdit('Nuke File:')
self.setupUi()
self.setupConnections()

def setupUi(self):
"""Creates the widget layout with a single input for the path to the Nuke script."""
self.mainLayout.addWidget(self.fileInput)
self.groupLayout.addWidget(self.fileInput)

def setupConnections(self):
"""Sets up widget signals."""
Expand All @@ -166,15 +175,15 @@ class ShellSettings(BaseSettingsWidget):
# pylint: disable=keyword-arg-before-vararg,unused-argument
def __init__(self, parent=None, *args, **kwargs):
super(ShellSettings, self).__init__(parent=parent)

self.groupBox.setTitle('Shell options')
self.commandTextBox = Command.CueCommandWidget()

self.setupUi()
self.setupConnections()

def setupUi(self):
"""Creates the widget layout with a single input for the shell command."""
self.mainLayout.addWidget(self.commandTextBox)
self.groupLayout.addWidget(self.commandTextBox)

def setupConnections(self):
"""Sets up widget signals."""
Expand All @@ -193,6 +202,7 @@ class BaseBlenderSettings(BaseSettingsWidget):
# pylint: disable=keyword-arg-before-vararg,unused-argument
def __init__(self, parent=None, *args, **kwargs):
super(BaseBlenderSettings, self).__init__(parent=parent)
self.groupBox.setTitle('Blender options')
self.fileInput = Widgets.CueLabelLineEdit('Blender File:')
self.outputPath = Widgets.CueLabelLineEdit(
'Output Path (Optional):',
Expand All @@ -207,8 +217,8 @@ def __init__(self, parent=None, *args, **kwargs):

def setupUi(self):
"""Creates the Blender-specific widget layout."""
self.mainLayout.addWidget(self.fileInput)
self.mainLayout.addLayout(self.outputLayout)
self.groupLayout.addWidget(self.fileInput)
self.groupLayout.addLayout(self.outputLayout)
self.outputLayout.addWidget(self.outputPath)
self.outputLayout.addWidget(self.outputSelector)

Expand Down
8 changes: 8 additions & 0 deletions cuesubmit/cuesubmit/ui/Style.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,14 @@
}
"""

GROUP_BOX = """
QGroupBox {
border: 3px solid rgb(30, 40, 50);
border-radius: 6px;
font-size: 8pt;
}
"""

SEPARATOR_LINE = 'border: 1px solid rgb(20, 30, 40)'

TEXT = 'background-color: rgb(40, 50, 60); color: rgb(250, 250, 250); font-weight: regular;'
Expand Down
5 changes: 3 additions & 2 deletions cuesubmit/cuesubmit/ui/Submit.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,6 @@ def setupUi(self):
self.scrollingLayout.addSpacerItem(Widgets.CueSpacerItem(Widgets.SpacerTypes.VERTICAL))
self.scrollingLayout.addWidget(Widgets.CueLabelLine('Layer Info'))
self.layerInfoLayout.addWidget(self.layerNameInput)
self.settingsLayout.addWidget(self.settingsWidget)
self.layerInfoLayout.addLayout(self.settingsLayout)
self.layerInfoLayout.addSpacerItem(Widgets.CueSpacerItem(Widgets.SpacerTypes.VERTICAL))
self.layerInfoLayout.addWidget(self.frameBox)

Expand All @@ -282,6 +280,9 @@ def setupUi(self):
self.layerInfoLayout.addLayout(self.coresLayout)
self.scrollingLayout.addLayout(self.layerInfoLayout)

self.settingsLayout.addWidget(self.settingsWidget)
self.layerInfoLayout.addLayout(self.settingsLayout)

self.scrollingLayout.addSpacerItem(Widgets.CueSpacerItem(Widgets.SpacerTypes.VERTICAL))
self.scrollingLayout.addWidget(Widgets.CueLabelLine('Submission Details'))

Expand Down