Show install status of targets.

pull/15/head
Jussi Pakkanen 11 years ago
parent 03da2ef2b1
commit 8d9b3063d3
  1. 12
      mesongui.py

@ -97,7 +97,11 @@ class TargetModel(QAbstractItemModel):
typename = 'static library'
else:
typename = 'unknown'
self.targets.append((name, typename, num_sources))
if target.should_install():
installed = 'Yes'
else:
installed = 'No'
self.targets.append((name, typename, installed, num_sources))
def flags(self, index):
return PyQt5.QtCore.Qt.ItemIsSelectable | PyQt5.QtCore.Qt.ItemIsEnabled
@ -108,13 +112,15 @@ class TargetModel(QAbstractItemModel):
return len(self.targets)
def columnCount(self, index):
return 3
return 4
def headerData(self, section, orientation, role):
if role != PyQt5.QtCore.Qt.DisplayRole:
return QVariant()
if section == 2:
if section == 3:
return QVariant('Source files')
if section == 2:
return QVariant('Installed')
if section == 1:
return QVariant('Type')
return QVariant('Name')

Loading…
Cancel
Save