Update UI

This commit is contained in:
Tim Bentley 2009-10-02 15:19:36 +01:00
parent 6c3fd8b096
commit e25c9937c7

View File

@ -89,16 +89,20 @@ class PluginForm(QtGui.QDialog):
item2 = QtGui.QTableWidgetItem(plugin.version) item2 = QtGui.QTableWidgetItem(plugin.version)
item2.setTextAlignment(QtCore.Qt.AlignVCenter) item2.setTextAlignment(QtCore.Qt.AlignVCenter)
item2.setFlags(QtCore.Qt.ItemIsSelectable) item2.setFlags(QtCore.Qt.ItemIsSelectable)
if plugin.status == PluginStatus.Active:
item3 = QtGui.QTableWidgetItem(
translate(u'PluginForm', u'Active'))
else:
item3 = QtGui.QTableWidgetItem(
translate(u'PluginForm', u'Inactive'))
item3.setTextAlignment(QtCore.Qt.AlignVCenter)
item3.setFlags(QtCore.Qt.ItemIsSelectable)
self.PluginViewList.setItem(row, 0, item1) self.PluginViewList.setItem(row, 0, item1)
self.PluginViewList.setItem(row, 1, item2) self.PluginViewList.setItem(row, 1, item2)
if plugin.can_be_disabled():
combo = QtGui.QComboBox()
self.PluginViewList.setCellWidget(row, 2, combo)
combo.addItem(translate(u'PluginForm', u'Active'))
combo.addItem(translate(u'PluginForm', u'Inactive'))
# if plugin.status == PluginStatus.Active:
self.PluginViewList.setRowHeight(row, 25)
else:
item3 = QtGui.QTableWidgetItem(
translate(u'PluginForm', u'Active'))
item3.setTextAlignment(QtCore.Qt.AlignVCenter)
item3.setFlags(QtCore.Qt.ItemIsSelectable)
self.PluginViewList.setItem(row, 2, item3) self.PluginViewList.setItem(row, 2, item3)
self.PluginViewList.setRowHeight(row, 15) self.PluginViewList.setRowHeight(row, 15)