mirror of
https://github.com/marcriera/ddgo-converter.git
synced 2025-05-15 03:17:05 +02:00
Finish basic UI, add type detection
This commit is contained in:
parent
5a8522d05a
commit
25ba4cdbc0
6 changed files with 45 additions and 12 deletions
|
@ -17,9 +17,12 @@ class GamepadModel(QAbstractTableModel):
|
|||
case 1:
|
||||
return self.gamepads[index.row()].name
|
||||
case 2:
|
||||
return self.get_gamepad_hash(index)
|
||||
case _:
|
||||
return None
|
||||
if self.gamepads[index.row()].type == Gamepad.GamepadType.UNKNOWN:
|
||||
return "Not configured"
|
||||
else:
|
||||
return "Configured"
|
||||
elif role == Qt.TextAlignmentRole and index.column() != 1:
|
||||
return Qt.AlignCenter
|
||||
|
||||
def rowCount(self, index):
|
||||
return len(self.gamepads)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue