read window size, position etc. from registry
| 1081 | |
| 1082 | //read window size, position etc. from registry |
| 1083 | void MainWindow::readSettings() |
| 1084 | { |
| 1085 | QSettings qsettings( "simon", "normalmapgenerator" ); |
| 1086 | |
| 1087 | qsettings.beginGroup( "mainwindow" ); |
| 1088 | |
| 1089 | restoreGeometry(qsettings.value( "geometry", saveGeometry() ).toByteArray()); |
| 1090 | restoreState(qsettings.value( "savestate", saveState() ).toByteArray()); |
| 1091 | move(qsettings.value( "pos", pos() ).toPoint()); |
| 1092 | resize(qsettings.value( "size", size() ).toSize()); |
| 1093 | |
| 1094 | if ( qsettings.value( "maximized", isMaximized() ).toBool() ) |
| 1095 | showMaximized(); |
| 1096 | |
| 1097 | // Custom UI colors |
| 1098 | if(qsettings.contains("use_custom_ui_colors")) |
| 1099 | useCustomUiColors = qsettings.value("use_custom_ui_colors").toBool(); |
| 1100 | if(qsettings.contains("ui_color_main")) |
| 1101 | uiColorMain.setRgba(qsettings.value("ui_color_main").toUInt()); |
| 1102 | if(qsettings.contains("ui_color_text")) |
| 1103 | uiColorText.setRgba(qsettings.value("ui_color_text").toUInt()); |
| 1104 | if(qsettings.contains("ui_color_graphicsview")) |
| 1105 | uiColorGraphicsView.setRgba(qsettings.value("ui_color_graphicsview").toUInt()); |
| 1106 | |
| 1107 | qsettings.endGroup(); |
| 1108 | } |
| 1109 | |
| 1110 | |
| 1111 | void MainWindow::setUiColors() { |
nothing calls this directly
no outgoing calls
no test coverage detected