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