Commit 5519be4bc609c71676c269f286156d064242696c

Authored by 김태훈
1 parent 96d66d37e8
Exists in master and in 2 other branches fhd, fhd-demo

변수명 변경

Showing 1 changed file with 13 additions and 13 deletions   Show diff stats
app/gui/oven_control/slider.cpp
... ... @@ -193,7 +193,7 @@ void Slider::mouseReleaseEvent(QMouseEvent */*event*/)
193 193 void Slider::paintEvent(QPaintEvent */*event*/)
194 194 {
195 195 QPainter painter(this);
196   - painter.drawPixmap(groovePoint, groove);
  196 + painter.drawPixmap(grooveLeftTop, groove);
197 197  
198 198 QPen tickPen(QColor(71, 71, 71));
199 199 tickPen.setWidth(2);
... ... @@ -202,36 +202,36 @@ void Slider::paintEvent(QPaintEvent */*event*/)
202 202 if (tickInterval)
203 203 for (int tick = minimum_; tick <= maximum_; tick += tickInterval)
204 204 {
205   - int x = subPoint.x() + calcSubLength(tick);
206   - painter.drawLine(x, groovePoint.y() + 22, x, groovePoint.y() + 28);
  205 + int x = subLeftTop.x() + calcSubLength(tick);
  206 + painter.drawLine(x, grooveLeftTop.y() + 22, x, grooveLeftTop.y() + 28);
207 207 }
208 208 else
209 209 foreach (int tick, ticks)
210 210 {
211   - int x = subPoint.x() + calcSubLength(tick);
212   - painter.drawLine(x, groovePoint.y() + 22, x, groovePoint.y() + 28);
  211 + int x = subLeftTop.x() + calcSubLength(tick);
  212 + painter.drawLine(x, grooveLeftTop.y() + 22, x, grooveLeftTop.y() + 28);
213 213 }
214 214  
215 215 if (bigTickInterval)
216 216 for (int tick = minimum_; tick <= maximum_; tick += bigTickInterval)
217 217 {
218   - int x = subPoint.x() + calcSubLength(tick);
219   - painter.drawLine(x, groovePoint.y() + 22, x, groovePoint.y() + 33);
  218 + int x = subLeftTop.x() + calcSubLength(tick);
  219 + painter.drawLine(x, grooveLeftTop.y() + 22, x, grooveLeftTop.y() + 33);
220 220 }
221 221 else
222 222 foreach (int tick, bigTicks)
223 223 {
224   - int x = subPoint.x() + calcSubLength(tick);
225   - painter.drawLine(x, groovePoint.y() + 22, x, groovePoint.y() + 33);
  224 + int x = subLeftTop.x() + calcSubLength(tick);
  225 + painter.drawLine(x, grooveLeftTop.y() + 22, x, grooveLeftTop.y() + 33);
226 226 }
227 227  
228 228 if (subVisible_)
229 229 {
230 230 int subLength = calcSubLength(sliderPosition_);
231 231 if (subLength > 0)
232   - painter.drawPixmap(subPoint, sub, QRect(0, 0, subLength, sub.height()));
  232 + painter.drawPixmap(subLeftTop, sub, QRect(0, 0, subLength, sub.height()));
233 233  
234   - QPoint handlePoint(subPoint.x() + subLength - handle.width() / 2, (height() - handle.height()) / 2);
  234 + QPoint handlePoint(subLeftTop.x() + subLength - handle.width() / 2, (height() - handle.height()) / 2);
235 235 painter.drawPixmap(handlePoint, handle);
236 236 }
237 237 }
... ... @@ -258,8 +258,8 @@ void Slider::updatePixmapPosition()
258 258 minSliderX = (width() - sub.width()) / 2;
259 259 maxSliderX = width() - minSliderX;
260 260  
261   - groovePoint = QPoint((width() - groove.width()) / 2, (height() - groove.height()) / 2);
262   - subPoint = QPoint((width() - sub.width()) / 2, (height() - sub.height()) / 2);
  261 + grooveLeftTop = QPoint((width() - groove.width()) / 2, (height() - groove.height()) / 2);
  262 + subLeftTop = QPoint((width() - sub.width()) / 2, (height() - sub.height()) / 2);
263 263 }
264 264  
265 265 void Slider::setValue(int value)
... ...