Add timer to control the emit change target temp
ClosedPublic

Authored by laysrodrigues on Aug 14 2018, 1:24 PM.

Details

Summary

Add timer to control the emit change target temp

In every event on the thermo dial is emitted
to the printer the change of the target temps,
that can give us bad behaviors. So we are
using a QTimer with single shot to manage
those events.

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

Diff Detail

Repository
R231 Atelier
Branch
bug_bed_heat
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 1835
Build 1853: arc lint + arc unit
laysrodrigues requested review of this revision.Aug 14 2018, 1:24 PM
laysrodrigues created this revision.
rizzitello requested changes to this revision.EditedAug 14 2018, 1:41 PM

This breaks the cursor that provides the user hint they can type into the control. So you need some of that code in the focus out event. Im not at a machine so im not able to fully test its
The following should remain in the event

 m_cursorTimer->stop();
 m_paintCursor = false;
update(); 
event-> accept();

It also seams that it maybe possible to block the emit by the user trying to change focus to fast . (havent tested not at my machine)

This revision now requires changes to proceed.Aug 14 2018, 1:41 PM

Get focus out back

laysrodrigues retitled this revision from Remove focus out event from thermo dial to Add timer to control the emit change target temp.Aug 14 2018, 2:40 PM
laysrodrigues edited the summary of this revision. (Show Details)
rizzitello accepted this revision.Aug 14 2018, 8:13 PM

Seams to work just fine now.

This revision is now accepted and ready to land.Aug 14 2018, 8:13 PM
tcanabrava accepted this revision.Aug 15 2018, 8:06 AM