| 283 | } |
| 284 | |
| 285 | void Agent::UpdateImage() |
| 286 | { |
| 287 | QString v = "v1"; |
| 288 | if (GlobalClient->settings->data.GraphVersion == "Version 2") |
| 289 | v = "v2"; |
| 290 | if (GlobalClient->settings->data.GraphVersion == "Version 3") |
| 291 | v = "v3"; |
| 292 | |
| 293 | if (data.Os == OS_WINDOWS) { |
| 294 | if (data.Elevated) { |
| 295 | this->iconOs = QIcon(":/icons/os_win_red"); |
| 296 | this->imageActive = QImage(":/graph/"+v+"/win_red"); |
| 297 | } |
| 298 | else { |
| 299 | this->iconOs = QIcon(":/icons/os_win_blue"); |
| 300 | this->imageActive = QImage(":/graph/"+v+"/win_blue"); |
| 301 | } |
| 302 | this->imageInactive = QImage(":/graph/"+v+"/win_grey"); |
| 303 | } |
| 304 | else if (data.Os == OS_LINUX) { |
| 305 | if (data.Elevated) { |
| 306 | this->iconOs = QIcon(":/icons/os_linux_red"); |
| 307 | this->imageActive = QImage(":/graph/"+v+"/linux_red"); |
| 308 | } else { |
| 309 | this->iconOs = QIcon(":/icons/os_linux_blue"); |
| 310 | this->imageActive = QImage(":/graph/"+v+"/linux_blue"); |
| 311 | } |
| 312 | this->imageInactive = QImage(":/graph/"+v+"/linux_grey"); |
| 313 | } |
| 314 | else if (data.Os == OS_MAC) { |
| 315 | if (data.Elevated) { |
| 316 | this->iconOs = QIcon(":/icons/os_mac_red"); |
| 317 | this->imageActive = QImage(":/graph/"+v+"/mac_red"); |
| 318 | } else { |
| 319 | this->iconOs = QIcon(":/icons/os_mac_blue"); |
| 320 | this->imageActive = QImage(":/graph/"+v+"/mac_blue"); |
| 321 | } |
| 322 | this->imageInactive = QImage(":/graph/"+v+"/mac_grey"); |
| 323 | } |
| 324 | else { |
| 325 | if (data.Elevated) { |
| 326 | this->imageActive = QImage(":/graph/"+v+"/unknown_red"); |
| 327 | } |
| 328 | else { |
| 329 | this->imageActive = QImage(":/graph/"+v+"/unknown_blue"); |
| 330 | } |
| 331 | this->imageInactive = QImage(":/graph/"+v+"/unknown_grey"); |
| 332 | } |
| 333 | |
| 334 | if (this->data.Mark == "") |
| 335 | this->graphImage = this->imageActive; |
| 336 | else |
| 337 | this->graphImage = this->imageInactive; |
| 338 | } |
| 339 | |
| 340 | /// TASK |
| 341 |
no outgoing calls
no test coverage detected