def generateWidget( self, idGDT, ContainerOfData ):
self.idGDT = idGDT
self.ContainerOfData = ContainerOfData
self.lineEdit = QtGui.QLineEdit()
if self.Mask <> None:
self.lineEdit.setInputMask(self.Mask)
if self.Dictionary == None:
self.lineEdit.setText('text')
self.text = 'text'
else:
NumberOfObjects = self.getNumberOfObjects()
if NumberOfObjects > len(self.Dictionary)-1:
NumberOfObjects = len(self.Dictionary)-1
self.lineEdit.setText(self.Dictionary[NumberOfObjects])
self.text = self.Dictionary[NumberOfObjects]
self.lineEdit.textChanged.connect(self.valueChanged)
self.ContainerOfData.textName = self.text.strip()
return GDTDialog_hbox(self.Text,self.lineEdit)
python类QLineEdit()的实例源码
def __init__(self, parent=None):
QtGui.QDialog.__init__(self, parent)
self.setWindowTitle(u'Add new category')
#
self.categoryName = QtGui.QLineEdit('')
self.categoryName.setStyleSheet('background-color:#FFF;')
self.categoryDescription = QtGui.QTextEdit('')
# buttons
buttons = QtGui.QDialogButtonBox()
buttons.setOrientation(QtCore.Qt.Vertical)
buttons.addButton("Cancel", QtGui.QDialogButtonBox.RejectRole)
buttons.addButton("Add", QtGui.QDialogButtonBox.AcceptRole)
self.connect(buttons, QtCore.SIGNAL("accepted()"), self, QtCore.SLOT("accept()"))
self.connect(buttons, QtCore.SIGNAL("rejected()"), self, QtCore.SLOT("reject()"))
#
lay = QtGui.QGridLayout(self)
lay.addWidget(QtGui.QLabel(u'Name'), 0, 0, 1, 1)
lay.addWidget(self.categoryName, 0, 1, 1, 1)
lay.addWidget(QtGui.QLabel(u'Desctiption'), 1, 0, 1, 1, QtCore.Qt.AlignTop)
lay.addWidget(self.categoryDescription, 1, 1, 1, 1)
lay.addWidget(buttons, 0, 2, 2, 1, QtCore.Qt.AlignCenter)
lay.setRowStretch(1, 10)
def __init__(self, filename=None, parent=None):
dialogMAIN_FORM.__init__(self, parent)
self.databaseType = "razen"
###
self.generateLayers()
self.spisWarstw.sortItems(1)
#
self.razenBiblioteki = QtGui.QLineEdit('')
if PCBconf.supSoftware[self.databaseType]['libPath'] != "":
self.razenBiblioteki.setText(PCBconf.supSoftware[self.databaseType]['libPath'])
lay = QtGui.QHBoxLayout()
lay.addWidget(QtGui.QLabel('Library'))
lay.addWidget(self.razenBiblioteki)
self.lay.addLayout(lay, 12, 0, 1, 6)
def check_state(self, *args, **kwargs):
"""
Update the background color of a QLineEdit object based on whether the
input is valid.
"""
sender = self.sender()
validator = sender.validator()
state = validator.validate(sender.text(), 0)[0]
if state == QtGui.QValidator.Acceptable:
color = 'none' # normal background color
elif state == QtGui.QValidator.Intermediate:
color = '#fff79a' # yellow
else:
color = '#f6989d' # red
sender.setStyleSheet('QLineEdit { background-color: %s }' % color)
def get_wavelength_region(self):
try:
wl_lower = float(self.text_lower_wl.text())
except ValueError:
wl_lower = None
self.text_lower_wl.setStyleSheet(\
'QLineEdit { background-color: %s }' % '#f6989d') #red
else:
self.text_lower_wl.setStyleSheet(\
'QLineEdit { background-color: %s }' % 'none')
try:
wl_upper = float(self.text_upper_wl.text())
except ValueError:
wl_upper = None
self.text_upper_wl.setStyleSheet(\
'QLineEdit { background-color: %s }' % '#f6989d') #red
else:
self.text_upper_wl.setStyleSheet(\
'QLineEdit { background-color: %s }' % 'none')
if wl_lower is None or wl_upper is None: return None
if wl_lower >= wl_upper: return None
return (wl_lower, wl_upper)
def _check_lineedit_state(self, *args, **kwargs):
"""
Update the background color of a QLineEdit object based on whether the
input is valid.
"""
# TODO: Implement from
# http://stackoverflow.com/questions/27159575/pyside-modifying-widget-colour-at-runtime-without-overwriting-stylesheet
sender = self.sender()
validator = sender.validator()
state = validator.validate(sender.text(), 0)[0]
if state == QtGui.QValidator.Acceptable:
color = 'none' # normal background color
elif state == QtGui.QValidator.Intermediate:
color = '#fff79a' # yellow
else:
color = '#f6989d' # red
sender.setStyleSheet('QLineEdit { background-color: %s }' % color)
return None
def check_state(self, *args, **kwargs):
"""
Update the background color of a QLineEdit object based on whether the
input is valid.
"""
# TODO: Implement from
# http://stackoverflow.com/questions/27159575/pyside-modifying-widget-colour-at-runtime-without-overwriting-stylesheet
sender = self.sender()
validator = sender.validator()
state = validator.validate(sender.text(), 0)[0]
if state == QtGui.QValidator.Acceptable:
color = 'none' # normal background color
elif state == QtGui.QValidator.Intermediate:
color = '#fff79a' # yellow
else:
color = '#f6989d' # red
sender.setStyleSheet('QLineEdit { background-color: %s }' % color)
def check_lineedit_state(self, *args, **kwargs):
"""
Update the background color of a QLineEdit object based on whether the
input is valid.
"""
sender = self.sender()
state = sender.validator().validate(sender.text(), 0)[0]
color = {
QtGui.QValidator.Acceptable: 'none', # Normal background
QtGui.QValidator.Intermediate: "#FFF79A", # Yellow
}.get(state, "#F6989D") # Red
sender.setStyleSheet("QLineEdit {{ background-color: {} }}".format(color))
return None
def __init__(self, parent=None, win=None, element="", info=()):
super(RenameDialog, self).__init__(parent)
self.sourceWin = parent
self.info = info
self.element = element
title = "Rename: " + element
self.setWindowTitle(title)
layout = QtGui.QGridLayout()
question = QtGui.QLabel("Please enter new name:")
layout.addWidget(question, 0, 0)
self.lineEdit = QtGui.QLineEdit()
layout.addWidget(self.lineEdit, 0, 1)
self.buttonOK = QtGui.QPushButton("OK", self)
layout.addWidget(self.buttonOK, 1, 1)
self.buttonCancel = QtGui.QPushButton("Cancel", self)
layout.addWidget(self.buttonCancel, 1, 0)
self.lineEdit.setText(self.element)
self.setLayout(layout)
self.buttonCancel.clicked.connect(self.cancelClicked)
self.buttonOK.clicked.connect(self.okClicked)
def __init__(self, parent=None, win=None, xrefs=None, headers=["Origin", "Method"]):
super(XrefListView, self).__init__(parent)
self.parent = parent
self.mainwin = win
self.xrefs = xrefs
self.headers = headers
self.setMinimumSize(600, 400)
self.filterPatternLineEdit = QtGui.QLineEdit()
self.filterPatternLabel = QtGui.QLabel("&Filter origin pattern:")
self.filterPatternLabel.setBuddy(self.filterPatternLineEdit)
self.filterPatternLineEdit.textChanged.connect(self.filterRegExpChanged)
self.xrefwindow = XrefValueWindow(self, win, self.xrefs, self.headers)
sourceLayout = QtGui.QVBoxLayout()
sourceLayout.addWidget(self.xrefwindow)
sourceLayout.addWidget(self.filterPatternLabel)
sourceLayout.addWidget(self.filterPatternLineEdit)
self.setLayout(sourceLayout)
def __init__(self, parent=None, win=None, session=None):
super(StringsWindow, self).__init__(parent)
self.mainwin = win
self.session = session
self.title = "Strings"
self.filterPatternLineEdit = QtGui.QLineEdit()
self.filterPatternLabel = QtGui.QLabel("&Filter string pattern:")
self.filterPatternLabel.setBuddy(self.filterPatternLineEdit)
self.filterPatternLineEdit.textChanged.connect(self.filterRegExpChanged)
self.stringswindow = StringsValueWindow(self, win, session)
sourceLayout = QtGui.QVBoxLayout()
sourceLayout.addWidget(self.stringswindow)
sourceLayout.addWidget(self.filterPatternLabel)
sourceLayout.addWidget(self.filterPatternLineEdit)
self.setLayout(sourceLayout)
def __init__(self, parent=None, win=None, element="", info=()):
super(RenameDialog, self).__init__(parent)
self.sourceWin = parent
self.info = info
self.element = element
title = "Rename: " + element
self.setWindowTitle(title)
layout = QtGui.QGridLayout()
question = QtGui.QLabel("Please enter new name:")
layout.addWidget(question, 0, 0)
self.lineEdit = QtGui.QLineEdit()
layout.addWidget(self.lineEdit, 0, 1)
self.buttonOK = QtGui.QPushButton("OK", self)
layout.addWidget(self.buttonOK, 1, 1)
self.buttonCancel = QtGui.QPushButton("Cancel", self)
layout.addWidget(self.buttonCancel, 1, 0)
self.lineEdit.setText(self.element)
self.setLayout(layout)
self.buttonCancel.clicked.connect(self.cancelClicked)
self.buttonOK.clicked.connect(self.okClicked)
def __init__(self, parent=None, win=None, xrefs=None, headers=["Origin", "Method"]):
super(XrefListView, self).__init__(parent)
self.parent = parent
self.mainwin = win
self.xrefs = xrefs
self.headers = headers
self.setMinimumSize(600, 400)
self.filterPatternLineEdit = QtGui.QLineEdit()
self.filterPatternLabel = QtGui.QLabel("&Filter origin pattern:")
self.filterPatternLabel.setBuddy(self.filterPatternLineEdit)
self.filterPatternLineEdit.textChanged.connect(self.filterRegExpChanged)
self.xrefwindow = XrefValueWindow(self, win, self.xrefs, self.headers)
sourceLayout = QtGui.QVBoxLayout()
sourceLayout.addWidget(self.xrefwindow)
sourceLayout.addWidget(self.filterPatternLabel)
sourceLayout.addWidget(self.filterPatternLineEdit)
self.setLayout(sourceLayout)
def create_text_input_setting(self, name):
hlayout = QtGui.QHBoxLayout()
setting = self.get_setting(name)
text = QtGui.QLineEdit()
text.setValidator(Validator(setting.filter, setting.filter_action))
text.setObjectName(setting.name)
text.textChanged.connect(self.call_with_object('setting_changed',
text, setting))
if setting.value:
text.setText(str(setting.value))
text.setStatusTip(setting.description)
text.setToolTip(setting.description)
hlayout.addWidget(text)
return hlayout
def createNodeMenu(self):
menuEntry = QtGui.QGraphicsWidget()
menuEntryLayout = QtGui.QHBoxLayout()
menuEntry.setLayout(menuEntryLayout)
menuEntry.setGeometry(0,0,100,100)
menuEntryTextField = QtGui.QLineEdit()
menuEntryLayout.addWidget(menuEntryTextField)
menu = QtGui.QMenu("Create Node")
menu.addAction("Node1")
menu.addAction("Node2")
menu.popup(QtGui.QCursor.pos())
menu.setZValue(100000)
print "Menu"
def __init__(self):
super(HeaderParameterPanel,self).__init__()
layout = QtGui.QHBoxLayout()
self.setLayout(layout)
self.nodeTypeLabel = QtGui.QLabel("<NodeDefaultType>")
self.nodeNameField = QtGui.QLineEdit("<NodeDefaultName>")
self.lockButton = QtGui.QPushButton("L")
self.editInterfaceButton = QtGui.QPushButton("G")
layout.addWidget(self.nodeTypeLabel)
layout.addWidget(self.nodeNameField)
layout.addWidget(self.lockButton)
layout.addWidget(self.editInterfaceButton)
# This is the graphical aspect of the ParameterTemplate
def __init__(self, parent=None, win=None, element="", info=()):
super(RenameDialog, self).__init__(parent)
self.sourceWin = parent
self.info = info
self.element = element
title = "Rename: " + element
self.setWindowTitle(title)
layout = QtGui.QGridLayout()
question = QtGui.QLabel("Please enter new name:")
layout.addWidget(question, 0, 0)
self.lineEdit = QtGui.QLineEdit()
layout.addWidget(self.lineEdit, 0, 1)
self.buttonOK = QtGui.QPushButton("OK", self)
layout.addWidget(self.buttonOK, 1, 1)
self.buttonCancel = QtGui.QPushButton("Cancel", self)
layout.addWidget(self.buttonCancel, 1, 0)
self.lineEdit.setText(self.element)
self.setLayout(layout)
self.buttonCancel.clicked.connect(self.cancelClicked)
self.buttonOK.clicked.connect(self.okClicked)
def __init__(self, parent=None, win=None, element="", info=()):
super(RenameDialog, self).__init__(parent)
self.sourceWin = parent
self.info = info
self.element = element
title = "Rename: " + element
self.setWindowTitle(title)
layout = QtGui.QGridLayout()
question = QtGui.QLabel("Please enter new name:")
layout.addWidget(question, 0, 0)
self.lineEdit = QtGui.QLineEdit()
layout.addWidget(self.lineEdit, 0, 1)
self.buttonOK = QtGui.QPushButton("OK", self)
layout.addWidget(self.buttonOK, 1, 1)
self.buttonCancel = QtGui.QPushButton("Cancel", self)
layout.addWidget(self.buttonCancel, 1, 0)
self.lineEdit.setText(self.element)
self.setLayout(layout)
self.buttonCancel.clicked.connect(self.cancelClicked)
self.buttonOK.clicked.connect(self.okClicked)
def __init__(self,orientation,parent=None):
super(MetaHeaderView, self).__init__(orientation,parent)
self.setMovable(True)
self.setClickable(True)
# This block sets up the edit line by making setting the parent
# to the Headers Viewport.
self.line = QtGui.QLineEdit(parent=self.viewport()) #Create
self.line.setAlignment(QtCore.Qt.AlignTop) # Set the Alignmnet
self.line.setHidden(True) # Hide it till its needed
# This is needed because I am having a werid issue that I believe has
# to do with it losing focus after editing is done.
self.line.blockSignals(True)
self.sectionedit = 0
# Connects to double click
self.sectionDoubleClicked.connect(self.editHeader)
self.line.editingFinished.connect(self.doneEditing)
def dialog(fn):
w=QtGui.QWidget()
box = QtGui.QVBoxLayout()
w.setLayout(box)
w.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint)
l=QtGui.QLabel("Path to Image" )
box.addWidget(l)
w.anz = QtGui.QLineEdit()
w.anz.setText(fn)
box.addWidget(w.anz)
loff=QtGui.QLabel("Offset Border" )
box.addWidget(loff)
w.off = QtGui.QLineEdit()
w.off.setText("100")
box.addWidget(w.off)
w.rotpos=QtGui.QCheckBox("Rot +90")
box.addWidget(w.rotpos)
w.rotneg=QtGui.QCheckBox("Rot -90")
box.addWidget(w.rotneg)
w.rot180=QtGui.QCheckBox("Rot 180")
box.addWidget(w.rot180)
w.r=QtGui.QPushButton("run")
box.addWidget(w.r)
w.r.pressed.connect(lambda :runw(w))
w.show()
return w
def testme():
layout='''
VerticalLayoutTab:
id:'main'
QtGui.QLabel:
setText:"*** N U R B S E D I T O R ***"
VerticalLayout:
HorizontalLayout:
QtGui.QLabel:
setText: "huhuwas 1 3"
QtGui.QLabel:
setText: "huhuwas 2 3"
QtGui.QLabel:
setText: "huhuwas 3 3"
HorizontalLayout:
QtGui.QLabel:
setText:"Action "
QtGui.QPushButton:
setText: "Run Action"
VerticalLayout:
QtGui.QLineEdit:
setText:"edit Axample"
QtGui.QLineEdit:
setText:"edit B"
QtGui.QLineEdit:
setText:"horizel "
HorizontalLayout:
QtGui.QLineEdit:
setText:"AA"
QtGui.QLineEdit:
setText:"BB"
'''
miki=Miki()
#app.root=miki
miki.parse2(layout)
miki.run(layout)
def setupUi(self):
self.setAutoFillBackground(True)
hLayout = QtGui.QHBoxLayout(self)
self.setLayout(hLayout)
self.taskNameWidget = QtGui.QLineEdit(self.task.name)
self.priorityWidget = PriorityWidget()
self.priorityWidget.setValue(self.task.priority)
self.statusWidget = StatusWidgetBar()
self.statusWidget.setCurrentIndex(self.task.status)
self.deleteWidget = DeleteWidget('delete')
hLayout.addWidget(self.taskNameWidget)
hLayout.addWidget(self.priorityWidget)
hLayout.addWidget(self.statusWidget)
hLayout.addWidget(self.deleteWidget)
def lineEdit(self):
"""Drawing the Line editor for the purpose of manualling entering the edge threshold"""
self.Lineditor = QtGui.QLineEdit()
self.Lineditor.setText(str(self.EdgeSliderValue))
self.Lineditor.returnPressed.connect(self.LineEditChanged)
self.EdgeWeight.connect(self.EdgeSliderForGraph.setValue)
def __init__(self, categoryID, parent=None):
QtGui.QDialog.__init__(self, parent)
self.setWindowTitle(u'Update category')
self.categoryID = categoryID
categoryData = readCategories()[self.categoryID]
#
self.categoryName = QtGui.QLineEdit('')
self.categoryName.setStyleSheet('background-color:#FFF;')
self.categoryName.setText(categoryData[0])
self.categoryDescription = QtGui.QTextEdit('')
self.categoryDescription.setText(categoryData[1])
# buttons
buttons = QtGui.QDialogButtonBox()
buttons.setOrientation(QtCore.Qt.Vertical)
buttons.addButton("Cancel", QtGui.QDialogButtonBox.RejectRole)
buttons.addButton("Update", QtGui.QDialogButtonBox.AcceptRole)
self.connect(buttons, QtCore.SIGNAL("accepted()"), self, QtCore.SLOT("accept()"))
self.connect(buttons, QtCore.SIGNAL("rejected()"), self, QtCore.SLOT("reject()"))
#
lay = QtGui.QGridLayout(self)
lay.addWidget(QtGui.QLabel(u'Name'), 0, 0, 1, 1)
lay.addWidget(self.categoryName, 0, 1, 1, 1)
lay.addWidget(QtGui.QLabel(u'Desctiption'), 1, 0, 1, 1, QtCore.Qt.AlignTop)
lay.addWidget(self.categoryDescription, 1, 1, 1, 1)
lay.addWidget(buttons, 0, 2, 2, 1, QtCore.Qt.AlignCenter)
lay.setRowStretch(1, 10)
def __init__(self, parent=None):
QtGui.QDialog.__init__(self, parent)
self.setWindowTitle("Convert old database to a new format")
self.setMinimumWidth(500)
# stary plik z modelami
self.oldFilePath = QtGui.QLineEdit(os.path.join(__currentPath__, "param.py"))
# nowy plik z modelami
self.newFilePath = QtGui.QLineEdit(os.path.join(__currentPath__, "data/dane.cfg"))
#
self.pominDuplikaty = QtGui.QCheckBox(u"Skip duplicates")
self.pominDuplikaty.setChecked(True)
self.pominDuplikaty.setDisabled(True)
#
self.removeOld = QtGui.QCheckBox(u"Remove old database")
self.removeOld.setChecked(True)
# przyciski
buttons = QtGui.QDialogButtonBox()
buttons.addButton("Cancel", QtGui.QDialogButtonBox.RejectRole)
buttons.addButton("Convert", QtGui.QDialogButtonBox.AcceptRole)
self.connect(buttons, QtCore.SIGNAL("accepted()"), self.konwertuj)
self.connect(buttons, QtCore.SIGNAL("rejected()"), self, QtCore.SLOT("reject()"))
#
self.mainLayout = QtGui.QGridLayout(self)
#self.mainLayout.setContentsMargins(0, 0, 0, 0)
self.mainLayout.addWidget(QtGui.QLabel(u"Old database"), 0, 0, 1, 1)
self.mainLayout.addWidget(self.oldFilePath, 0, 1, 1, 1)
self.mainLayout.addWidget(QtGui.QLabel(u"New database"), 1, 0, 1, 1)
self.mainLayout.addWidget(self.newFilePath, 1, 1, 1, 1)
self.mainLayout.addWidget(self.pominDuplikaty, 3, 0, 1, 2)
self.mainLayout.addWidget(self.removeOld, 4, 0, 1, 2)
self.mainLayout.addWidget(buttons, 5, 1, 1, 1, QtCore.Qt.AlignRight)
self.mainLayout.setRowStretch(6, 10)
def create_text_input_with_file_setting(self, name):
hlayout = QtGui.QHBoxLayout()
setting = self.get_setting(name)
text = QtGui.QLineEdit()
text.setObjectName(setting.name)
button = QtGui.QPushButton('...')
button.setMaximumWidth(30)
button.setMaximumHeight(26)
button.clicked.connect(self.call_with_object('get_file', button,
text, setting))
if setting.value:
text.setText(setting.value)
text.setStatusTip(setting.description)
text.setToolTip(setting.description)
text.textChanged.connect(self.call_with_object('setting_changed',
text, setting))
hlayout.addWidget(text)
hlayout.addWidget(button)
return hlayout
def create_text_input_with_folder_setting(self, name):
hlayout = QtGui.QHBoxLayout()
setting = self.get_setting(name)
text = QtGui.QLineEdit()
text.setObjectName(setting.name)
button = QtGui.QPushButton('...')
button.setMaximumWidth(30)
button.setMaximumHeight(26)
button.clicked.connect(self.call_with_object('get_folder', button,
text, setting))
if setting.value:
text.setText(setting.value)
text.setStatusTip(setting.description)
text.setToolTip(setting.description)
text.textChanged.connect(self.call_with_object('setting_changed',
text, setting))
hlayout.addWidget(text)
hlayout.addWidget(button)
return hlayout
def setupUi(self, LineEditDialog):
LineEditDialog.setObjectName("LineEditDialog")
LineEditDialog.resize(294, 112)
self.verticalLayoutWidget = QtGui.QWidget(LineEditDialog)
self.verticalLayoutWidget.setGeometry(QtCore.QRect(10, 10, 271, 91))
self.verticalLayoutWidget.setObjectName("verticalLayoutWidget")
self.verticalLayout = QtGui.QVBoxLayout(self.verticalLayoutWidget)
self.verticalLayout.setContentsMargins(0, 0, 0, 0)
self.verticalLayout.setObjectName("verticalLayout")
self.gridLayout = QtGui.QGridLayout()
self.gridLayout.setObjectName("gridLayout")
self.label = QtGui.QLabel(self.verticalLayoutWidget)
self.label.setObjectName("label")
self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
self.lineEdit = QtGui.QLineEdit(self.verticalLayoutWidget)
self.lineEdit.setObjectName("lineEdit")
self.gridLayout.addWidget(self.lineEdit, 0, 1, 1, 1)
self.verticalLayout.addLayout(self.gridLayout)
self.buttonBox = QtGui.QDialogButtonBox(self.verticalLayoutWidget)
self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
self.buttonBox.setObjectName("buttonBox")
self.verticalLayout.addWidget(self.buttonBox)
self.retranslateUi(LineEditDialog)
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("accepted()"), LineEditDialog.accept)
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("rejected()"), LineEditDialog.reject)
QtCore.QMetaObject.connectSlotsByName(LineEditDialog)
def elementForm(self):
self.elementFormWidget = QtGui.QWidget()
self.elementFormLayout = QtGui.QGridLayout()
self.elementFormWidget.setLayout(self.elementFormLayout)
self.showList=QtGui.QComboBox()
self.sqList=QtGui.QComboBox()
self.shotList=QtGui.QComboBox()
self.taskList=QtGui.QComboBox()
self.userFilterLabel = QtGui.QLabel("User Filter")
self.userFilter = QtGui.QLineEdit(str(os.getenv("USER")))
self.renderList = QtGui.QListWidget()
self.renderList.setSelectionMode(QtGui.QAbstractItemView.MultiSelection)
self.generateList()
self.backButton=QtGui.QPushButton("Back")
self.nextButton=QtGui.QPushButton("Next")
self.elementFormLayout.addWidget(self.showList,4,0)
self.elementFormLayout.addWidget(self.sqList,4,1)
self.elementFormLayout.addWidget(self.shotList,4,2)
self.elementFormLayout.addWidget(self.taskList,4,3)
self.elementFormLayout.addWidget(self.userFilterLabel,7,0)
self.elementFormLayout.addWidget(self.userFilter,7,1,1,3)
self.elementFormLayout.addWidget(self.renderList,6,0,1,4)
def initUI(self):
self._layout = QtGui.QGridLayout(None)
self.setLayout(self._layout)
self._layout.setContentsMargins(0,5,0,5)
self._layout.setSpacing(0)
self._topBar = QtGui.QFrame()
self._topBarLayout = QtGui.QHBoxLayout(self._topBar)
self._refreshProgression = QtGui.QProgressBar()
self._refreshProgression.setMinimum(0)
self._refreshProgression.setMaximum(100)
self._refreshProgression.setValue(10)
self._refreshButton = QtGui.QPushButton("Refresh")
self._filterLabel = QtGui.QLabel("Filter :")
self._filterField = QtGui.QLineEdit()
self._topBarLayout.addWidget(self._refreshProgression)
self._topBarLayout.addWidget(self._refreshButton)
self._topBarLayout.addWidget(self._filterLabel)
self._topBarLayout.addWidget(self._filterField)
self.generateJobList()
self._layout.addWidget(self._topBar)
self._layout.addWidget(self._jobList)
self._autoRefresh = JobListAutoRefresh(self,self._refreshProgression)
#autoRefresh.run()
self._refreshButton.clicked.connect(self.startRefresh)