<table><tr><td style="">sgerlach added inline comments.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D21575">View Revision</a></tr></table><br /><div><strong>INLINE COMMENTS</strong><div><div style="margin: 6px 0 12px 0;"><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D21575#inline-127153">View Inline</a><span style="color: #4b4d51; font-weight: bold;">TreeModel.cpp:148</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">QVector</span><span style="color: #aa2211"><</span><span class="n">QVariant</span><span style="color: #aa2211">></span> <span class="n">rootData</span><span class="p">;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">foreach</span> <span class="p">(</span><span class="n">QString</span> <span class="n">header</span><span class="p">,</span> <span class="n">headers</span><span class="p">)</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">rootData</span> <span style="color: #aa2211"><<</span> <span class="n">header</span><span class="p">;</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">use range-based loop</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D21575#inline-127154">View Inline</a><span style="color: #4b4d51; font-weight: bold;">TreeModel.cpp:164</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span class="n">QVariant</span> <span class="n">TreeModel</span><span style="color: #aa2211">::</span><span class="n">treeData</span><span class="p">(</span><span style="color: #aa4000">const</span> <span style="color: #aa4000">int</span> <span class="n">row</span><span class="p">,</span> <span style="color: #aa4000">const</span> <span style="color: #aa4000">int</span> <span class="n">column</span><span class="p">,</span> <span style="color: #aa4000">const</span> <span class="n">QModelIndex</span><span style="color: #aa2211">&</span> <span class="n">parent</span><span class="p">,</span> <span style="color: #aa4000">const</span> <span style="color: #aa4000">int</span> <span class="n">role</span><span class="p">)</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">QModelIndex</span> <span class="n">currentIndex</span> <span style="color: #aa2211">=</span> <span class="n">index</span><span class="p">(</span><span class="n">row</span><span class="p">,</span> <span class="n">column</span><span class="p">,</span> <span class="n">parent</span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">return</span> <span style="color: #004012">data</span><span class="p">(</span><span class="n">currentIndex</span><span class="p">,</span> <span class="n">role</span><span class="p">);</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">indentation?</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D21575#inline-127157">View Inline</a><span style="color: #4b4d51; font-weight: bold;">Worksheet.cpp:839</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">CartesianPlot</span><span style="color: #aa2211">*</span> <span class="n">sender</span> <span style="color: #aa2211">=</span> <span style="color: #aa4000">dynamic_cast</span><span style="color: #aa2211"><</span><span class="n">CartesianPlot</span><span style="color: #aa2211">*></span><span class="p">(</span><span class="n">QObject</span><span style="color: #aa2211">::</span><span class="n">sender</span><span class="p">());</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">auto* sender = ...</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D21575#inline-127155">View Inline</a><span style="color: #4b4d51; font-weight: bold;">Worksheet.cpp:861</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">CartesianPlot</span><span style="color: #aa2211">*</span> <span class="n">plot</span> <span style="color: #aa2211">=</span> <span style="color: #aa4000">dynamic_cast</span><span style="color: #aa2211"><</span><span class="n">CartesianPlot</span><span style="color: #aa2211">*></span><span class="p">(</span><span class="n">getPlot</span><span class="p">(</span><span class="n">i</span><span class="p">));</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">if</span> <span class="p">(</span><span style="color: #aa2211">!</span><span class="n">plot</span> <span style="color: #aa2211">||</span> <span style="color: #aa2211">!</span><span class="n">plot</span><span style="color: #aa2211">-></span><span class="n">isVisible</span><span class="p">())</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">auto* plot = ...</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D21575#inline-127158">View Inline</a><span style="color: #4b4d51; font-weight: bold;">Worksheet.cpp:985</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span style="color: #aa4000">void</span> <span class="n">Worksheet</span><span style="color: #aa2211">::</span><span class="n">curveDataChanged</span><span class="p">(</span><span style="color: #aa4000">const</span> <span class="n">XYCurve</span><span style="color: #aa2211">*</span> <span class="n">curve</span><span class="p">)</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">CartesianPlot</span><span style="color: #aa2211">*</span> <span class="n">plot</span> <span style="color: #aa2211">=</span> <span style="color: #aa4000">dynamic_cast</span><span style="color: #aa2211"><</span><span class="n">CartesianPlot</span><span style="color: #aa2211">*></span><span class="p">(</span><span class="n">QObject</span><span style="color: #aa2211">::</span><span class="n">sender</span><span class="p">());</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">if</span> <span class="p">(</span><span style="color: #aa2211">!</span><span class="n">plot</span><span class="p">)</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">auto*</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D21575#inline-127159">View Inline</a><span style="color: #4b4d51; font-weight: bold;">Worksheet.cpp:1024</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span style="color: #aa4000">void</span> <span class="n">Worksheet</span><span style="color: #aa2211">::</span><span class="n">curveAdded</span><span class="p">(</span><span style="color: #aa4000">const</span> <span class="n">XYCurve</span><span style="color: #aa2211">*</span> <span class="n">curve</span><span class="p">)</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">CartesianPlot</span><span style="color: #aa2211">*</span> <span class="n">plot</span> <span style="color: #aa2211">=</span> <span style="color: #aa4000">dynamic_cast</span><span style="color: #aa2211"><</span><span class="n">CartesianPlot</span><span style="color: #aa2211">*></span><span class="p">(</span><span class="n">QObject</span><span style="color: #aa2211">::</span><span class="n">sender</span><span class="p">());</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">if</span> <span class="p">(</span><span style="color: #aa2211">!</span><span class="n">plot</span><span class="p">)</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">auto*</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D21575#inline-127160">View Inline</a><span style="color: #4b4d51; font-weight: bold;">Worksheet.cpp:1068</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="n">CartesianPlot</span><span style="color: #aa2211">*</span> <span class="n">plot</span> <span style="color: #aa2211">=</span> <span style="color: #aa4000">dynamic_cast</span><span style="color: #aa2211"><</span><span class="n">CartesianPlot</span><span style="color: #aa2211">*></span><span class="p">(</span><span class="n">QObject</span><span style="color: #aa2211">::</span><span class="n">sender</span><span class="p">());</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">if</span> <span class="p">(</span><span style="color: #aa2211">!</span><span class="n">plot</span><span class="p">)</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">auto*</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D21575#inline-127161">View Inline</a><span style="color: #4b4d51; font-weight: bold;">CartesianCoordinateSystem.cpp:609</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="bright"></span><span style="color: #aa4000"><span class="bright">if</span></span><span class="bright"> </span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span class="n"><span class="bright">noPageClipping</span></span><span class="bright"> </span><span style="color: #aa2211"><span class="bright">||</span></span><span class="bright"> </span><span class="n"><span class="bright">pageRect</span></span><span class="bright"></span><span class="p"><span class="bright">.</span></span><span class="bright"></span><span class="n"><span class="bright">contains</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span class="n"><span class="bright">p</span>oint<span class="bright"></span></span><span class="bright"></span><span class="p"><span class="bright">))</span></span><span class="bright"> </span><span class="p"><span class="bright">{</span></span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="bright"></span><span style="color: #aa4000"><span class="bright">double</span></span><span class="bright"> </span><span class="n"><span class="bright">x</span></span><span class="bright"> </span><span style="color: #aa2211"><span class="bright">=</span></span><span class="bright"> </span><span class="n"><span class="bright">p</span>oint<span class="bright"></span></span><span class="bright"></span><span class="p"><span class="bright">.</span></span><span class="bright"></span><span class="n"><span class="bright">x</span></span><span class="bright"></span><span class="p"><span class="bright">();</span></span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">double</span> <span class="n">y</span> <span style="color: #aa2211">=</span> <span class="n">point</span><span class="p">.</span><span class="n">y</span><span class="p">();</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">if</span> <span class="p">(</span><span class="n">limit</span><span class="p">)</span> <span class="p">{</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">define temp vars for pageRect.x() and pageRect.y() too?</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D21575#inline-127162">View Inline</a><span style="color: #4b4d51; font-weight: bold;">CartesianPlot.cpp:2575</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="bright"> </span><span class="n"><span class="bright">m_selectionStart</span></span><span class="bright"></span><span class="p"><span class="bright">.</span></span><span class="bright"></span><span class="n"><span class="bright">setX</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span class="n"><span class="bright">event</span></span><span class="bright"></span><span style="color: #aa2211"><span class="bright">-></span></span><span class="bright"></span><span class="n"><span class="bright">pos</span></span><span class="bright"></span><span class="p"><span class="bright">().</span></span><span class="bright"></span><span class="n"><span class="bright">x</span></span><span class="bright"></span><span class="p"><span class="bright">())</span>;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="bright"> </span><span class="n"><span class="bright">m_selectionStart</span></span><span class="bright"></span><span class="p"><span class="bright">.</span></span><span class="bright"></span><span class="n"><span class="bright">setY</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span class="n"><span class="bright">dataRect</span></span><span class="bright"></span><span class="p"><span class="bright">.</span></span><span class="bright"></span><span class="n"><span class="bright">height</span></span><span class="bright"></span><span class="p"><span class="bright">()</span></span><span class="bright"></span><span style="color: #aa2211"><span class="bright">/</span></span><span class="bright"></span><span style="color: #601200"><span class="bright">2</span></span><span class="bright"></span><span class="p"><span class="bright">)</span>;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="bright"></span><span class="p"><span class="bright">}</span></span><span class="bright"> </span><span style="color: #aa4000"><span class="bright">else</span></span><span class="bright"> </span><span style="color: #004012"><span class="bright">if</span></span><span class="bright"> </span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span class="n"><span class="bright">mouseMode</span></span><span class="bright"> </span><span style="color: #aa2211"><span class="bright">==</span></span><span class="bright"> </span><span class="n"><span class="bright">CartesianPlot</span></span><span class="bright"></span><span style="color: #aa2211"><span class="bright">::</span></span><span class="bright"></span><span class="n"><span class="bright">ZoomYSelectionMode</span></span><span class="p">)</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="bright"></span><span style="color: #aa4000"><span class="bright">double</span></span><span class="bright"> </span><span class="n"><span class="bright">cursorPenWidth2</span></span><span class="bright"> </span><span style="color: #aa2211"><span class="bright">=</span></span><span class="bright"> </span><span class="n"><span class="bright">cursorPen</span></span><span class="bright"></span><span class="p"><span class="bright">.</span></span><span class="bright"></span><span class="n"><span class="bright">width</span></span><span class="bright"></span><span class="p"><span class="bright">()</span></span><span class="bright"></span><span style="color: #aa2211"><span class="bright">/</span></span><span class="bright"></span><span style="color: #601200"><span class="bright">2</span></span><span class="p">;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="bright"></span><span class="n"><span class="bright">cursorPenWidth2</span></span><span class="bright"> </span><span style="color: #aa2211"><span class="bright">=</span></span><span class="bright"> </span><span class="n"><span class="bright">cursorPenWidth2</span></span><span class="bright"> </span><span style="color: #aa2211"><span class="bright"><</span></span><span class="bright"> </span><span style="color: #601200"><span class="bright">10</span></span><span class="bright"> </span><span style="color: #aa2211"><span class="bright">?</span></span><span class="bright"> </span><span style="color: #601200"><span class="bright">10</span></span><span class="bright"> </span><span style="color: #aa2211"><span class="bright">:</span></span><span class="bright"> </span><span class="n"><span class="bright">cursorPenWidth2</span></span><span class="p">;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="bright"></span><span style="color: #aa4000"><span class="bright">if</span></span><span class="bright"> </span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span class="n"><span class="bright">cursor0Enable</span></span><span class="bright"> </span><span style="color: #aa2211"><span class="bright">&&</span></span><span class="bright"> </span><span class="n"><span class="bright">abs</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span class="n"><span class="bright">event</span></span><span class="bright"></span><span style="color: #aa2211"><span class="bright">-></span></span><span class="bright"></span><span class="n"><span class="bright">pos</span></span><span class="bright"></span><span class="p"><span class="bright">().</span></span><span class="bright"></span><span class="n"><span class="bright">x</span></span><span class="bright"></span><span class="p"><span class="bright">()</span></span><span class="bright"></span><span style="color: #aa2211"><span class="bright">-</span></span><span class="bright"></span><span class="n"><span class="bright">cSystem</span></span><span class="bright"></span><span style="color: #aa2211"><span class="bright">-></span></span><span class="bright"></span><span class="n"><span class="bright">mapLogicalToScene</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span class="n"><span class="bright">QPointF</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span class="n"><span class="bright">cursor0Pos</span></span><span class="bright"></span><span class="p"><span class="bright">.</span></span><span class="bright"></span><span class="n"><span class="bright">x</span></span><span class="bright"></span><span class="p"><span class="bright">(),</span></span><span class="bright"></span><span class="n"><span class="bright">yMin</span></span><span class="bright"></span><span class="p"><span class="bright">)).</span></span><span class="bright"></span><span class="n"><span class="bright">x</span></span><span class="bright"></span><span class="p"><span class="bright">())</span></span><span class="bright"> </span><span style="color: #aa2211"><span class="bright"><</span></span><span class="bright"> </span><span class="n"><span class="bright">cursorPenWidth2</span></span><span class="p">)</span> <span class="p">{</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">same as<br />
if (cursorPenWidth2 < 10) cursorPenWidth2 = 10;</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D21575#inline-127163">View Inline</a><span style="color: #4b4d51; font-weight: bold;">CartesianPlot.cpp:2689</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span style="color: #aa4000">if</span> <span class="p">(<span class="bright"></span></span><span class="bright"></span><span class="n"><span class="bright">mouseMode</span></span><span class="bright"> </span><span style="color: #aa2211"><span class="bright">==</span></span><span class="bright"> </span><span class="n"><span class="bright">CartesianPlot</span></span><span class="bright"></span><span style="color: #aa2211"><span class="bright">::</span></span><span class="bright"></span><span class="n"><span class="bright">ZoomSelectionMode</span></span><span class="p">)</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="bright"></span><span class="n"><span class="bright">m_selectionEnd</span></span><span class="bright"> </span><span style="color: #aa2211"><span class="bright">=</span></span><span class="bright"> </span><span class="n"><span class="bright">event</span></span><span class="bright"></span><span style="color: #aa2211"><span class="bright">-></span></span><span class="bright"></span><span class="n"><span class="bright">pos</span></span><span class="bright"></span><span class="p"><span class="bright">(</span>);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="bright"></span><span class="n"><span class="bright">QPointF</span></span><span class="bright"> </span><span class="n"><span class="bright">logicalEnd</span></span><span class="bright"> </span><span style="color: #aa2211"><span class="bright">=</span></span><span class="bright"> </span><span class="n"><span class="bright">cSystem</span></span><span class="bright"></span><span style="color: #aa2211"><span class="bright">-></span></span><span class="bright"></span><span class="n"><span class="bright">mapSceneToLogical</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span class="n"><span class="bright">m_selectionEnd</span></span><span class="bright"></span><span class="p"><span class="bright">)</span>;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span style="color: #aa4000">if</span> <span class="p">(</span><span class="n">xRangeFormat</span> <span style="color: #aa2211">==</span> <span class="n">CartesianPlot</span><span style="color: #aa2211">::</span><span class="n">Numeric</span><span class="p">)</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="n">info</span> <span style="color: #aa2211">=</span> <span class="n">QString</span><span style="color: #aa2211">::</span><span class="n">fromUtf8</span><span class="p">(</span><span style="color: #766510">"Δx="</span><span class="p">)</span> <span style="color: #aa2211">+</span> <span class="n">QString</span><span style="color: #aa2211">::</span><span class="n">number</span><span class="p">(</span><span class="n">logicalEnd</span><span class="p">.</span><span class="n">x</span><span class="p">()</span><span style="color: #aa2211">-</span><span class="n">logicalStart</span><span class="p">.</span><span class="n">x</span><span class="p">());</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span style="color: #aa4000">else</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="n">info</span> <span style="color: #aa2211">=</span> <span class="n">i18n</span><span class="p">(</span><span style="color: #766510">"from x=%1 to x=%2"</span><span class="p">,</span> <span class="n">QDateTime</span><span style="color: #aa2211">::</span><span class="n">fromMSecsSinceEpoch</span><span class="p">(</span><span class="n">logicalStart</span><span class="p">.</span><span class="n">x</span><span class="p">()).</span><span class="n">toString</span><span class="p">(</span><span class="n">xRangeDateTimeFormat</span><span class="p">),</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="n">QDateTime</span><span style="color: #aa2211">::</span><span class="n">fromMSecsSinceEpoch</span><span class="p">(</span><span class="n">logicalEnd</span><span class="p">.</span><span class="n">x</span><span class="p">()).</span><span class="n">toString</span><span class="p">(</span><span class="n">xRangeDateTimeFormat</span><span class="p">));</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="n">info</span> <span style="color: #aa2211">+=</span> <span class="n">QLatin1String</span><span class="p">(</span><span style="color: #766510">", "</span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span style="color: #aa4000">if</span> <span class="p">(</span><span class="n">yRangeFormat</span> <span style="color: #aa2211">==</span> <span class="n">CartesianPlot</span><span style="color: #aa2211">::</span><span class="n">Numeric</span><span class="p">)</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="n">info</span> <span style="color: #aa2211">+=</span> <span class="n">QString</span><span style="color: #aa2211">::</span><span class="n">fromUtf8</span><span class="p">(</span><span style="color: #766510">"Δy="</span><span class="p">)</span> <span style="color: #aa2211">+</span> <span class="n">QString</span><span style="color: #aa2211">::</span><span class="n">number</span><span class="p">(</span><span class="n">logicalEnd</span><span class="p">.</span><span class="n">y</span><span class="p">()</span><span style="color: #aa2211">-</span><span class="n">logicalStart</span><span class="p">.</span><span class="n">y</span><span class="p">());</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span style="color: #aa4000">else</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="n">info</span> <span style="color: #aa2211">+=</span> <span class="n">i18n</span><span class="p">(</span><span style="color: #766510">"from y=%1 to y=%2"</span><span class="p">,</span> <span class="n">QDateTime</span><span style="color: #aa2211">::</span><span class="n">fromMSecsSinceEpoch</span><span class="p">(</span><span class="n">logicalStart</span><span class="p">.</span><span class="n">y</span><span class="p">()).</span><span class="n">toString</span><span class="p">(</span><span class="n">xRangeDateTimeFormat</span><span class="p">),</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="n">QDateTime</span><span style="color: #aa2211">::</span><span class="n">fromMSecsSinceEpoch</span><span class="p">(</span><span class="n">logicalEnd</span><span class="p">.</span><span class="n">y</span><span class="p">()).</span><span class="n">toString</span><span class="p">(</span><span class="n">xRangeDateTimeFormat</span><span class="p">));</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="p">}</span> <span style="color: #aa4000">else</span> <span style="color: #aa4000">if</span> <span class="p">(</span><span class="n">mouseMode</span> <span style="color: #aa2211">==</span> <span class="n">CartesianPlot</span><span style="color: #aa2211">::</span><span class="n">ZoomXSelectionMode</span><span class="p">)</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="n">m_selectionEnd</span><span class="p">.</span><span class="n">setX</span><span class="p">(</span><span class="n">event</span><span style="color: #aa2211">-></span><span class="n">pos</span><span class="p">().</span><span class="n">x</span><span class="p">());</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="n">m_selectionEnd</span><span class="p">.</span><span class="n">setY</span><span class="p">(</span><span style="color: #aa2211">-</span><span class="n">dataRect</span><span class="p">.</span><span class="n">height</span><span class="p">()</span><span style="color: #aa2211">/</span><span style="color: #601200">2</span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="n">QPointF</span> <span class="n">logicalEnd</span> <span style="color: #aa2211">=</span> <span class="n">cSystem</span><span style="color: #aa2211">-></span><span class="n">mapSceneToLogical</span><span class="p">(</span><span class="n">m_selectionEnd</span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span style="color: #aa4000">if</span> <span class="p">(</span><span class="n">xRangeFormat</span> <span style="color: #aa2211">==</span> <span class="n">CartesianPlot</span><span style="color: #aa2211">::</span><span class="n">Numeric</span><span class="p">)</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="n">info</span> <span style="color: #aa2211">=</span> <span class="n">QString</span><span style="color: #aa2211">::</span><span class="n">fromUtf8</span><span class="p">(</span><span style="color: #766510">"Δx="</span><span class="p">)</span> <span style="color: #aa2211">+</span> <span class="n">QString</span><span style="color: #aa2211">::</span><span class="n">number</span><span class="p">(</span><span class="n">logicalEnd</span><span class="p">.</span><span class="n">x</span><span class="p">()</span><span style="color: #aa2211">-</span><span class="n">logicalStart</span><span class="p">.</span><span class="n">x</span><span class="p">());</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span style="color: #aa4000">else</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="n">info</span> <span style="color: #aa2211">=</span> <span class="n">i18n</span><span class="p">(</span><span style="color: #766510">"from x=%1 to x=%2"</span><span class="p">,</span> <span class="n">QDateTime</span><span style="color: #aa2211">::</span><span class="n">fromMSecsSinceEpoch</span><span class="p">(</span><span class="n">logicalStart</span><span class="p">.</span><span class="n">x</span><span class="p">()).</span><span class="n">toString</span><span class="p">(</span><span class="n">xRangeDateTimeFormat</span><span class="p">),</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="n">QDateTime</span><span style="color: #aa2211">::</span><span class="n">fromMSecsSinceEpoch</span><span class="p">(</span><span class="n">logicalEnd</span><span class="p">.</span><span class="n">x</span><span class="p">()).</span><span class="n">toString</span><span class="p">(</span><span class="n">xRangeDateTimeFormat</span><span class="p">));</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="p">}</span> <span style="color: #aa4000">else</span> <span style="color: #aa4000">if</span> <span class="p">(</span><span class="n">mouseMode</span> <span style="color: #aa2211">==</span> <span class="n">CartesianPlot</span><span style="color: #aa2211">::</span><span class="n">ZoomYSelectionMode</span><span class="p">)</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="n">m_selectionEnd</span><span class="p">.</span><span class="n">setX</span><span class="p">(</span><span class="n">dataRect</span><span class="p">.</span><span class="n">width</span><span class="p">()</span><span style="color: #aa2211">/</span><span style="color: #601200">2</span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="n">m_selectionEnd</span><span class="p">.</span><span class="n">setY</span><span class="p">(</span><span class="n">event</span><span style="color: #aa2211">-></span><span class="n">pos</span><span class="p">().</span><span class="n">y</span><span class="p">());</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="n">QPointF</span> <span class="n">logicalEnd</span> <span style="color: #aa2211">=</span> <span class="n">cSystem</span><span style="color: #aa2211">-></span><span class="n">mapSceneToLogical</span><span class="p">(</span><span class="n">m_selectionEnd</span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span style="color: #aa4000">if</span> <span class="p">(</span><span class="n">yRangeFormat</span> <span style="color: #aa2211">==</span> <span class="n">CartesianPlot</span><span style="color: #aa2211">::</span><span class="n">Numeric</span><span class="p">)</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="n">info</span> <span style="color: #aa2211">=</span> <span class="n">QString</span><span style="color: #aa2211">::</span><span class="n">fromUtf8</span><span class="p">(</span><span style="color: #766510">"Δy="</span><span class="p">)</span> <span style="color: #aa2211">+</span> <span class="n">QString</span><span style="color: #aa2211">::</span><span class="n">number</span><span class="p">(</span><span class="n">logicalEnd</span><span class="p">.</span><span class="n">y</span><span class="p">()</span><span style="color: #aa2211">-</span><span class="n">logicalStart</span><span class="p">.</span><span class="n">y</span><span class="p">());</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span style="color: #aa4000">else</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="n">info</span> <span style="color: #aa2211">=</span> <span class="n">i18n</span><span class="p">(</span><span style="color: #766510">"from y=%1 to y=%2"</span><span class="p">,</span> <span class="n">QDateTime</span><span style="color: #aa2211">::</span><span class="n">fromMSecsSinceEpoch</span><span class="p">(</span><span class="n">logicalStart</span><span class="p">.</span><span class="n">y</span><span class="p">()).</span><span class="n">toString</span><span class="p">(</span><span class="n">xRangeDateTimeFormat</span><span class="p">),</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="n">QDateTime</span><span style="color: #aa2211">::</span><span class="n">fromMSecsSinceEpoch</span><span class="p">(</span><span class="n">logicalEnd</span><span class="p">.</span><span class="n">y</span><span class="p">()).</span><span class="n">toString</span><span class="p">(</span><span class="n">xRangeDateTimeFormat</span><span class="p">));</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">if</span> <span class="p">(<span class="bright"></span></span><span class="bright"></span><span style="color: #aa2211"><span class="bright">!</span></span><span class="bright"></span><span class="n"><span class="bright">boundingRect</span></span><span class="bright"></span><span class="p"><span class="bright">().</span></span><span class="bright"></span><span class="n"><span class="bright">contains</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span class="n"><span class="bright">event</span></span><span class="bright"></span><span style="color: #aa2211"><span class="bright">-></span></span><span class="bright"></span><span class="n"><span class="bright">pos</span></span><span class="bright"></span><span class="p"><span class="bright">())</span>)</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="bright"></span><span class="n"><span class="bright">q</span></span><span class="bright"></span><span style="color: #aa2211"><span class="bright">-></span></span><span class="bright"></span><span class="n"><span class="bright">info</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span style="color: #766510"><span class="bright">"Not inside bounding rect"</span></span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="bright"></span><span style="color: #aa4000"><span class="bright">return</span></span><span class="p">;</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">translation?</p></div></div></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R262 LabPlot</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D21575">https://phabricator.kde.org/D21575</a></div></div><br /><div><strong>To: </strong>Murmele, asemke<br /><strong>Cc: </strong>sgerlach, kde-edu, narvaez, apol<br /></div>