MCPcopy Create free account
hub / github.com/CalcProgrammer1/OpenRGB / data

Method data

qt/DetectorTableModel.cpp:48–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46}
47
48QVariant DetectorTableModel::data(const QModelIndex& index, int role) const
49{
50 switch(role)
51 {
52 /*-----------------------------------------------------*\
53 | Column 0 is the detector name, 1 is the enable flag |
54 \*-----------------------------------------------------*/
55 case Qt::DisplayRole:
56 switch(index.column())
57 {
58 case 0:
59 return detectors[index.row()].key.c_str();
60 case 1:
61 return detectors[index.row()].value;
62 }
63 return QVariant();
64
65 case Qt::CheckStateRole:
66 switch(index.column())
67 {
68 case 1:
69 return 2 * detectors[index.row()].value;
70 }
71 return QVariant();
72 }
73 return QVariant();
74}
75
76bool DetectorTableModel::setData(const QModelIndex& index, const QVariant& value, int role)
77{

Callers 15

EncryptMethod · 0.80
DeviceUpdateModeMethod · 0.80
SendMagicMethod · 0.80
SendColorsMethod · 0.80
SetLEDsMethod · 0.80
DeviceUpdateLEDsMethod · 0.80
DeviceUpdateModeMethod · 0.80
DeviceUpdateModeMethod · 0.80
DeviceUpdateLEDsMethod · 0.80
SetupZonesMethod · 0.80
SetupZonesMethod · 0.80
SetupZonesMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected