Diffstat (limited to 'core/settings/light-and-power/calibration.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/settings/light-and-power/calibration.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/core/settings/light-and-power/calibration.cpp b/core/settings/light-and-power/calibration.cpp index 307de1f..6a3360f 100644 --- a/core/settings/light-and-power/calibration.cpp +++ b/core/settings/light-and-power/calibration.cpp | |||
@@ -96,3 +96,3 @@ void Calibration::setStartPoint ( const QPoint &p ) | |||
96 | { | 96 | { |
97 | m_p [0] = p; | 97 | m_p [0] = QPoint ( p. x ( ), m_scale. height ( ) - p. y ( ) - 1 ); |
98 | checkPoints ( ); | 98 | checkPoints ( ); |
@@ -103,3 +103,3 @@ QPoint Calibration::startPoint ( ) const | |||
103 | { | 103 | { |
104 | return m_p [0]; | 104 | return QPoint ( m_p [0]. x ( ), m_scale. height ( ) - m_p [0]. y ( ) - 1 ); |
105 | } | 105 | } |
@@ -108,3 +108,3 @@ void Calibration::setEndPoint ( const QPoint &p ) | |||
108 | { | 108 | { |
109 | m_p [1] = p; | 109 | m_p [1] = QPoint ( p. x ( ), m_scale. height ( ) - p. y ( ) - 1 ); |
110 | checkPoints ( ); | 110 | checkPoints ( ); |
@@ -115,3 +115,3 @@ QPoint Calibration::endPoint ( ) const | |||
115 | { | 115 | { |
116 | return m_p [1]; | 116 | return QPoint ( m_p [1]. x ( ), m_scale. height ( ) - m_p [1]. y ( ) - 1 ); |
117 | } | 117 | } |
@@ -206,8 +206,8 @@ void Calibration::mouseMoveEvent ( QMouseEvent *e ) | |||
206 | if ( i == 0 ) { | 206 | if ( i == 0 ) { |
207 | r |= QRect ( 0, 0, nx [0] - 0 + 1, ny [0] - 0 + 1 ); | 207 | r |= QRect ( 0, ny [0], nx [0] - 0 + 1, 1 ); |
208 | r |= QRect ( 0, 0, ox [0] - 0 + 1, oy [0] - 0 + 1 ); | 208 | r |= QRect ( 0, oy [0], ox [0] - 0 + 1, 1 ); |
209 | } | 209 | } |
210 | else if ( i == 1 ) { | 210 | else if ( i == 1 ) { |
211 | r |= QRect ( nx [1], ny [1], width ( ) - nx [1], height ( ) - ny [1] ); | 211 | r |= QRect ( nx [1], ny [1], width ( ) - nx [1], 1 ); |
212 | r |= QRect ( ox [1], oy [1], width ( ) - ox [1], height ( ) - oy [1] ); | 212 | r |= QRect ( ox [1], oy [1], width ( ) - ox [1], 1 ); |
213 | } | 213 | } |
@@ -255,4 +255,3 @@ void Calibration::paintEvent ( QPaintEvent * ) | |||
255 | 255 | ||
256 | p. drawLine ( BRD, BRD, ex, BRD ); | 256 | p. drawLine ( BRD, ey, ex, ey ); |
257 | p. drawLine ( ex, BRD, ex, ey ); | ||
258 | 257 | ||