MCPcopy Create free account
hub / github.com/Martchus/syncthingtray / devStatusColor

Method devStatusColor

syncthingmodel/syncthingdevicemodel.cpp:453–473  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

451}
452
453QVariant SyncthingDeviceModel::devStatusColor(const SyncthingDev &dev) const
454{
455 if (dev.paused) {
456 return QVariant();
457 }
458 switch (dev.status) {
459 case SyncthingDevStatus::Unknown:
460 break;
461 case SyncthingDevStatus::Disconnected:
462 break;
463 case SyncthingDevStatus::ThisDevice:
464 case SyncthingDevStatus::Idle:
465 return Colors::green(m_brightColors);
466 case SyncthingDevStatus::Synchronizing:
467 return Colors::blue(m_brightColors);
468 case SyncthingDevStatus::OutOfSync:
469 case SyncthingDevStatus::Rejected:
470 return Colors::red(m_brightColors);
471 }
472 return QVariant();
473}
474
475void SyncthingDeviceModel::updateRowCount()
476{

Callers

nothing calls this directly

Calls 3

greenFunction · 0.85
blueFunction · 0.85
redFunction · 0.85

Tested by

no test coverage detected