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

Method dirStatusColor

syncthingmodel/syncthingdirectorymodel.cpp:512–538  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

510}
511
512QVariant SyncthingDirectoryModel::dirStatusColor(const SyncthingDir &dir) const
513{
514 if (dir.paused) {
515 return QVariant();
516 }
517 if (dir.isUnshared()) {
518 return Colors::orange(m_brightColors);
519 }
520 switch (dir.status) {
521 case SyncthingDirStatus::Unknown:
522 break;
523 case SyncthingDirStatus::Idle:
524 return Colors::green(m_brightColors);
525 case SyncthingDirStatus::WaitingToScan:
526 case SyncthingDirStatus::WaitingToSync:
527 case SyncthingDirStatus::WaitingToClean:
528 return Colors::orange(m_brightColors);
529 case SyncthingDirStatus::Scanning:
530 case SyncthingDirStatus::PreparingToSync:
531 case SyncthingDirStatus::Synchronizing:
532 case SyncthingDirStatus::Cleaning:
533 return Colors::blue(m_brightColors);
534 case SyncthingDirStatus::OutOfSync:
535 return Colors::red(m_brightColors);
536 }
537 return QVariant();
538}
539
540void SyncthingDirectoryModel::updateRowCount()
541{

Callers

nothing calls this directly

Calls 5

orangeFunction · 0.85
greenFunction · 0.85
blueFunction · 0.85
redFunction · 0.85
isUnsharedMethod · 0.80

Tested by

no test coverage detected