Add dedicated control for relative movements.
ClosedPublic

Authored by rizzitello on May 16 2017, 1:55 AM.

Details

Summary

Replace Radioboxes for Absolute and Relative mode selection with the printerhost position visual controller

Diff Detail

Repository
R232 AtCore
Branch
betterMove
Lint
No Linters Available
Unit
No Unit Test Coverage
rizzitello created this revision.May 16 2017, 1:55 AM
rizzitello updated this revision to Diff 14578.May 16 2017, 1:58 AM
  • removed qDebug in axis control slot
rizzitello updated this revision to Diff 14579.May 16 2017, 2:14 AM
  • Remove the remaining code for the radioBoxes.
patrickelectric requested changes to this revision.May 22 2017, 1:16 PM

Can I finish my review this night ?

testclient/mainwindow.cpp
571–576

space between brackets

This revision now requires changes to proceed.May 22 2017, 1:16 PM
rizzitello updated this revision to Diff 14783.May 23 2017, 9:42 PM
rizzitello edited edge metadata.
  • Added Lays Printerhost Position Visual Controller.
  • Replace Radioboxes for Absolute and Relative mode selection with the printerhost position
rizzitello marked an inline comment as done.May 23 2017, 9:45 PM
  • Added Lays Printerhost Position Visual Controller.
  • Replace Radioboxes for Absolute and Relative mode selection with the printerhost position
  • Make lable placement more dynamic to be more forgiving on various dpis
rizzitello updated this revision to Diff 14955.May 29 2017, 9:08 PM
  • Added Lays Printerhost Position Visual Controller.
  • Replace Radioboxes for Absolute and Relative mode selection with the printerhost position
  • Make label placement more dynamic to be more forgiving on various dpis
  • rebase to master
patrickelectric requested changes to this revision.Jun 4 2017, 1:00 PM
patrickelectric added inline comments.
testclient/mainwindow.cpp
56

AxisControlDockWidget

testclient/widgets/printerhostpositionvisualcontroller.h
1 ↗(On Diff #14955)

The name of file should be the same of class.

This revision now requires changes to proceed.Jun 4 2017, 1:00 PM
rizzitello updated this revision to Diff 15139.Jun 4 2017, 7:09 PM
rizzitello edited edge metadata.
  • Rename printerhostpositionvisualcontroller to axiscontrol
patrickelectric requested changes to this revision.Jun 6 2017, 3:15 AM
patrickelectric added inline comments.
testclient/mainwindow.cpp
462

space

testclient/widgets/axiscontrol.cpp
25

What is this and where is this information ?

26

QPalette

30

Why Z is size * -1 ?/
should It be parent.z + 1 ?

35

/*event*/

44

QPalette

128

can be done in only one line

This revision now requires changes to proceed.Jun 6 2017, 3:15 AM
laysrodrigues added inline comments.Jun 6 2017, 2:46 PM
testclient/widgets/axiscontrol.cpp
26

This will be changed when I find a good pallet for this control. Also, the most part of this widget was doing of Tomaz, not me. The only change that I did was the build of the Z axis.

30

This is a math that Tomaz did, ask him =D

35

Didn't understand.

rizzitello updated this revision to Diff 15234.Jun 6 2017, 10:58 PM
rizzitello edited edge metadata.
rizzitello marked 2 inline comments as done.
  • Respect the system palette
rizzitello updated this revision to Diff 15235.Jun 6 2017, 11:30 PM
  • Respect the system palette
laysrodrigues accepted this revision.Jun 7 2017, 1:25 AM
testclient/widgets/axiscontrol.cpp
39

(QGraphicsSceneMouseEvent* /*event*/)
And remove Q_UNUSED

88

Space between comments and functions.

103

Why this is here and not a function ?

rizzitello updated this revision to Diff 15268.Jun 8 2017, 12:30 AM
rizzitello marked an inline comment as done.
  • Remove unneeded includes of QList and QResizeEvent and The unused event varibles
rizzitello added inline comments.Jun 8 2017, 12:31 AM
testclient/widgets/axiscontrol.cpp
88

style script is run before every commit

103

I can't speak for @tcanabrava , but I would say its there because its only done once at creation and since its not called more then that there is really no reason to put it in a function . Doing so makes the readability a bit harder because you have to stop reading there and go find the tiny function read that then go back to where you were .

128

Sytle script "corrects" it to what you see

laysrodrigues accepted this revision.Jun 8 2017, 1:32 PM

Any more questions on this?

rizzitello updated this revision to Diff 15316.Jun 9 2017, 7:58 PM
  • Added Lays Printerhost Position Visual Controller.
  • Replace Radioboxes for Absolute and Relative mode selection with the printerhost position
  • Make label placement more dynamic to be more forgiving on various dpis
  • Rename printerhostpositionvisualcontroller to axiscontrol
  • Respect the system palette
  • Remove unneeded includes of QList and QResizeEvent and The unused event varibles
  • rename dockWidgetContents_5 to moveDockContents

Is there any more changes in this revision??? If not, let's close it.

patrickelectric accepted this revision.Jun 15 2017, 11:10 PM
patrickelectric added inline comments.
testclient/widgets/axiscontrol.cpp
103

line 120-123.
createRect in two places.

128

I think that style script don't do a good work with new c++.

This revision is now accepted and ready to land.Jun 15 2017, 11:10 PM