void Battery::setStatus(QString charge) { if (charge != fStatus) { fStatus = charge; emit statusChanged(); emit summaryValueChanged(); } }
void Battery::setLevel(int level) { int changed = 0; if ( fLevel != level ) { fLevel = level; emit levelChanged(); changed++; } if ( changed > 0 ) { emit statusChanged(); emit summaryValueChanged(); } }
void Memory::setMemory(int total, int free) { int changed = 0; if ( fTotal != total ) { fTotal = total; emit totalChanged(total); changed++; } if ( fFree != free ) { fFree = free; emit freeChanged(free); changed++; } if ( changed > 0 ) { emit summaryValueChanged(getSummaryValue()); } }
void Process::setProcList(ProcMap* procMap) { int oldSize = fProcList.size(); ProcList procList = procMap->values(); sort(procList); int startRow; int endRow; diffProcLists(fProcList, procList, startRow, endRow); fProcList = procList; //qDebug() << "diff from " << startRow << " to " << endRow << "\n"; if ( startRow <= endRow ) { emit dataChanged(createIndex(startRow, 0), createIndex(endRow, 0)); } if ( oldSize != fProcList.size() ) { emit summaryValueChanged(); } }
void Battery::setTechnology(QString technology) { fTechnology = technology; emit summaryValueChanged(); emit technologyChanged(); }
void Battery::setHealth(QString f) { fHealth = f; emit summaryValueChanged(); }