| 1196 | } |
| 1197 | |
| 1198 | void MainWindow::restore_dock() |
| 1199 | { |
| 1200 | // default dockwidget size |
| 1201 | AppConfig &app = AppConfig::Instance(); |
| 1202 | QByteArray st = app.frameOptions.windowState; |
| 1203 | if (!st.isEmpty()) |
| 1204 | { |
| 1205 | try |
| 1206 | { |
| 1207 | restoreState(st); |
| 1208 | } |
| 1209 | catch (...) |
| 1210 | { |
| 1211 | MsgBox::Show(NULL, L_S(STR_PAGE_MSG, S_ID(IDS_MSG_RESTORE_WINDOW_ERROR), "restore window status error!")); |
| 1212 | } |
| 1213 | } |
| 1214 | |
| 1215 | // Resotre the dock pannel. |
| 1216 | if (_device_agent->have_instance()) |
| 1217 | _trig_bar->reload(); |
| 1218 | } |
| 1219 | |
| 1220 | bool MainWindow::eventFilter(QObject *object, QEvent *event) |
| 1221 | { |
no test coverage detected