Hide BedThermo in case of non heated bed
ClosedPublic

Authored by laysrodrigues on Jun 3 2018, 7:12 PM.

Details

Summary

Signed-off-by: Lays Rodrigues <lays.rodrigues@kde.org>

Change layout and add method to hide thermo

  • Added method to hide bedThermo if the user

doesn't have a heated bed.

  • Change the layout to use HBoxLayout instead of

QGridLayout

Signed-off-by: Lays Rodrigues <lays.rodrigues@kde.org>

Hide BedThermo - AtCoreInstance

On AtCoreInstance, get the variable from profile and
hide the widget if necessary.

Signed-off-by: Lays Rodrigues <lays.rodrigues@kde.org>

Diff Detail

Repository
R231 Atelier
Branch
hide_thermo
Lint
No Linters Available
Unit
No Unit Test Coverage
laysrodrigues requested review of this revision.Jun 3 2018, 7:12 PM
laysrodrigues created this revision.
laysrodrigues retitled this revision from Hide BedThermo in case of non heated bed update profiledData to m_profileData to Hide BedThermo in case of non heated bedupdate profiledData to m_profileData.Jun 3 2018, 7:13 PM
laysrodrigues retitled this revision from Hide BedThermo in case of non heated bedupdate profiledData to m_profileData to Hide BedThermo in case of non heated bed.

Looks good but please wire it so that if your connected to a profile and you change it you see the change without needing to connect / disconnect.

We read the profile before connection. We don't have any event that monitor changes on the profile to make updates on the ui. I think that its safer if the use disconnects and connects again to reload the profile, so we can have a little more security on that.

tcanabrava accepted this revision.Jun 3 2018, 7:53 PM
This revision is now accepted and ready to land.Jun 3 2018, 7:53 PM
rizzitello requested changes to this revision.Jun 3 2018, 9:01 PM
rizzitello added inline comments.
src/widgets/bedextruderwidget.cpp
127

lets do setBedThermoHidden (bool hidden)
this will help merge it with D13317 nicer

This revision now requires changes to proceed.Jun 3 2018, 9:01 PM
laysrodrigues added inline comments.Jun 3 2018, 11:15 PM
src/widgets/bedextruderwidget.cpp
127

I don't see how's that is better than my ternary.

rizzitello added a comment.EditedJun 3 2018, 11:23 PM

it allows us to toggle the visibility of the bed thermo . This way I don't have to change it after merging D13317

laysrodrigues planned changes to this revision.Jun 4 2018, 12:06 AM
laysrodrigues marked an inline comment as done.

Sith suggestion

rizzitello added inline comments.Jun 4 2018, 2:34 AM
src/widgets/bedextruderwidget.cpp
127

please follow Qt Convention
setBedThermoHidden(bool hidden)

rizzitello requested changes to this revision.Jun 4 2018, 2:35 AM
rizzitello added inline comments.
src/widgets/bedextruderwidget.h
42

no need to set the value

This revision now requires changes to proceed.Jun 4 2018, 2:35 AM
tcanabrava added inline comments.Jun 4 2018, 12:01 PM
src/widgets/bedextruderwidget.h
42

why a hide should pass a bool?
if you wanna hide things with a bool, "toogleBedThermo(bool show)"

laysrodrigues planned changes to this revision.Jun 4 2018, 12:06 PM
laysrodrigues marked 2 inline comments as done.
laysrodrigues added inline comments.
src/widgets/bedextruderwidget.h
42

that was because the first purpose was to only hide the thermo. I didnt though on update the method name.

laysrodrigues marked an inline comment as done.

Rebase
Tomaz + Sith comments

rizzitello requested changes to this revision.Jun 4 2018, 12:20 PM

please follow Qt Convention
setBedThermoHidden(bool hidden)

This revision now requires changes to proceed.Jun 4 2018, 12:20 PM

Sith comment

rizzitello accepted this revision.Jun 4 2018, 12:33 PM
This revision is now accepted and ready to land.Jun 4 2018, 12:33 PM
laysrodrigues closed this revision.Jun 4 2018, 10:14 PM