qt5base-lts/examples/widgets/graphicsview
Edward Welbourne 0b822c2209 Examples: use std::atan2 for simper angle calculations
Using std::atan2 gets the right answer directly from dy and dx,
without having to fix up quadrant as we needed to with acos (albeit we
have to negate dy in some cases, to match prior sense of angles).  In
the process, it avoids explicit division, which would be an error when
the line's length is zero.

Change-Id: Ia2923159d38834e08e6f15cbff6766ed419fa804
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-02-23 16:43:35 +00:00
..
anchorlayout Unify license header usage. 2016-03-29 10:20:03 +00:00
basicgraphicslayouts Examples: Replace 'Q_DECL_OVERRIDE' by 'override' 2016-06-15 09:32:30 +00:00
boxes Examples: Remove more redundant virtual specifiers for overriders 2016-11-29 10:06:02 +00:00
chip Fix compilation without QPrinter support 2016-11-23 09:27:56 +00:00
collidingmice Examples: use std::atan2 for simper angle calculations 2017-02-23 16:43:35 +00:00
diagramscene Examples: use std::atan2 for simper angle calculations 2017-02-23 16:43:35 +00:00
dragdroprobot Examples: Remove a redundant virtual specifier for overriders 2016-11-25 22:36:21 +00:00
elasticnodes Examples: use std::atan2 for simper angle calculations 2017-02-23 16:43:35 +00:00
embeddeddialogs Examples: Replace 'Q_DECL_OVERRIDE' by 'override' 2016-06-15 09:32:30 +00:00
flowlayout Examples: Replace 'Q_DECL_OVERRIDE' by 'override' 2016-06-15 09:32:30 +00:00
padnavigator Examples: Replace 'Q_DECL_OVERRIDE' by 'override' 2016-06-15 09:32:30 +00:00
simpleanchorlayout Examples: Replace 'Q_DECL_OVERRIDE' by 'override' 2016-06-15 09:32:30 +00:00
weatheranchorlayout Examples: Remove a redundant virtual specifier for overriders 2016-11-25 22:36:21 +00:00
graphicsview.pro Use qtConfig throughout in qtbase 2016-08-19 04:28:05 +00:00
README Moving .qdoc files under examples/widgets/doc 2012-08-20 12:20:55 +02:00

Qt is provided with a comprehensive canvas through the GraphicsView
classes.

These examples demonstrate the fundamental aspects of canvas programming
with Qt.


Documentation for these examples can be found via the Examples
link in the main Qt documentation.