| 105 | } |
| 106 | |
| 107 | void GoToFlowWidget::updateConfig(QSettings *settings) |
| 108 | { |
| 109 | toolBar->updateOptions(); |
| 110 | |
| 111 | Performance performance = medium; |
| 112 | switch (settings->value(PERFORMANCE).toInt()) { |
| 113 | case 0: |
| 114 | performance = low; |
| 115 | break; |
| 116 | case 1: |
| 117 | performance = medium; |
| 118 | break; |
| 119 | case 2: |
| 120 | performance = high; |
| 121 | break; |
| 122 | case 3: |
| 123 | performance = ultraHigh; |
| 124 | break; |
| 125 | } |
| 126 | |
| 127 | imageSize = Configuration::getConfiguration().getGotoSlideSize(); |
| 128 | resize(5 * imageSize.width(), toolBar->height() + imageSize.height() * 1.7); |
| 129 | updateSize(); |
| 130 | |
| 131 | flow->setPerformance(performance); |
| 132 | |
| 133 | switch (settings->value(FLOW_TYPE_GL).toInt()) { |
| 134 | case FlowType::CoverFlowLike: |
| 135 | flow->setPreset(presetYACReaderFlowClassicConfig); |
| 136 | break; |
| 137 | case FlowType::Strip: |
| 138 | flow->setPreset(presetYACReaderFlowStripeConfig); |
| 139 | break; |
| 140 | case FlowType::StripOverlapped: |
| 141 | flow->setPreset(presetYACReaderFlowOverlappedStripeConfig); |
| 142 | break; |
| 143 | case FlowType::Modern: |
| 144 | flow->setPreset(defaultYACReaderFlowConfig); |
| 145 | break; |
| 146 | case FlowType::Roulette: |
| 147 | flow->setPreset(pressetYACReaderFlowDownConfig); |
| 148 | break; |
| 149 | case FlowType::Custom: |
| 150 | flow->setCF_RX(settings->value(X_ROTATION).toInt()); |
| 151 | flow->setCF_Y(settings->value(Y_POSITION).toInt()); |
| 152 | flow->setX_Distance(settings->value(COVER_DISTANCE).toInt()); |
| 153 | flow->setCenter_Distance(settings->value(CENTRAL_DISTANCE).toInt()); |
| 154 | flow->setCF_Z(settings->value(ZOOM_LEVEL).toInt()); |
| 155 | flow->setY_Distance(settings->value(Y_COVER_OFFSET).toInt()); |
| 156 | flow->setZ_Distance(settings->value(Z_COVER_OFFSET).toInt()); |
| 157 | flow->setRotation(settings->value(COVER_ROTATION).toInt()); |
| 158 | flow->setFadeOutDist(settings->value(FADE_OUT_DIST).toInt()); |
| 159 | flow->setLightStrenght(settings->value(LIGHT_STRENGTH).toInt()); |
| 160 | flow->setMaxAngle(settings->value(MAX_ANGLE).toInt()); |
| 161 | break; |
| 162 | } |
| 163 | if (Configuration::getConfiguration().getQuickNaviMode()) |
| 164 | flow->setFadeOutDist(20); |
nothing calls this directly
no test coverage detected