1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | void PasswordStrength::setStrenghtString(const int sS) { if ( m_sS == sS ){ return; }else{ if(sS <= 20 ){ m_strenghtString = "Extreamly Weak"; m_sS = sS; }else if (sS >= 20 && sS <= 40){ m_strenghtString = "Weak"; m_sS = sS; }else if (sS >= 41 && sS <= 60 ){ m_strenghtString = "OK"; m_sS = sS; }else if (sS >= 61 && sS <= 80){ m_strenghtString = "Good"; m_sS = sS; }else if (sS >= 85){ m_strenghtString = "Great"; m_sS = sS; } m_sS = sS; emit strenghtStringChanged(); } } |