| 1165 | } |
| 1166 | |
| 1167 | void BitcoinGUI::changeEvent(QEvent *e) |
| 1168 | { |
| 1169 | if (e->type() == QEvent::PaletteChange) { |
| 1170 | overviewAction->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/overview"))); |
| 1171 | sendCoinsAction->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/send"))); |
| 1172 | receiveCoinsAction->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/receiving_addresses"))); |
| 1173 | historyAction->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/history"))); |
| 1174 | } |
| 1175 | |
| 1176 | QMainWindow::changeEvent(e); |
| 1177 | |
| 1178 | #ifndef Q_OS_MAC // Ignored on Mac |
| 1179 | if(e->type() == QEvent::WindowStateChange) |
| 1180 | { |
| 1181 | if(clientModel && clientModel->getOptionsModel() && clientModel->getOptionsModel()->getMinimizeToTray()) |
| 1182 | { |
| 1183 | QWindowStateChangeEvent *wsevt = static_cast<QWindowStateChangeEvent*>(e); |
| 1184 | if(!(wsevt->oldState() & Qt::WindowMinimized) && isMinimized()) |
| 1185 | { |
| 1186 | QTimer::singleShot(0, this, &BitcoinGUI::hide); |
| 1187 | e->ignore(); |
| 1188 | } |
| 1189 | else if((wsevt->oldState() & Qt::WindowMinimized) && !isMinimized()) |
| 1190 | { |
| 1191 | QTimer::singleShot(0, this, &BitcoinGUI::show); |
| 1192 | e->ignore(); |
| 1193 | } |
| 1194 | } |
| 1195 | } |
| 1196 | #endif |
| 1197 | } |
| 1198 | |
| 1199 | void BitcoinGUI::closeEvent(QCloseEvent *event) |
| 1200 | { |
nothing calls this directly
no test coverage detected