| 101 | //----------------- |
| 102 | |
| 103 | void ProtocolItemLayer::SetProgress(int progress, QString text){ |
| 104 | QString str = QString::number(progress) + "%" + text; |
| 105 | |
| 106 | if (progress == 100) |
| 107 | _progress_label->setStyleSheet("color:green;"); |
| 108 | else |
| 109 | _progress_label->setStyleSheet("color:red;"); |
| 110 | |
| 111 | if (progress >= 0) |
| 112 | _progress_label->setText(str); |
| 113 | else |
| 114 | _progress_label->setText(""); |
| 115 | } |
| 116 | |
| 117 | void ProtocolItemLayer::ResetStyle(){ |
| 118 | QString iconPath = GetIconPath(); |