| 15 | MessageBox::~MessageBox() {} |
| 16 | |
| 17 | void MessageBox::setIcon(Icon icon) |
| 18 | { |
| 19 | QString styleSheet; |
| 20 | switch (icon) { |
| 21 | case QMessageBox::Information: |
| 22 | styleSheet = "QMessageBox QLabel#qt_msgbox_label { color: #0099CC; }"; |
| 23 | break; |
| 24 | case QMessageBox::Warning: |
| 25 | styleSheet = "QMessageBox QLabel#qt_msgbox_label { color: #E6A23C; }"; |
| 26 | break; |
| 27 | case QMessageBox::Critical: |
| 28 | styleSheet = "QMessageBox QLabel#qt_msgbox_label { color: #F56C6C; }"; |
| 29 | break; |
| 30 | case QMessageBox::Question: |
| 31 | styleSheet = "QMessageBox QLabel#qt_msgbox_label { color: #409EFF; }"; |
| 32 | break; |
| 33 | default: |
| 34 | styleSheet = ""; |
| 35 | break; |
| 36 | } |
| 37 | this->setStyleSheet(styleSheet); |
| 38 | QMessageBox::setIcon(icon); |
| 39 | } |
no outgoing calls
no test coverage detected