Atcore: Add more qml calls
AbandonedPublic

Authored by patrickelectric on Jan 16 2018, 11:53 PM.

Details

Summary

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>

Diff Detail

Repository
R232 AtCore
Branch
qml
Lint
No Linters Available
Unit
No Unit Test Coverage
patrickelectric requested review of this revision.Jan 16 2018, 11:53 PM
patrickelectric created this revision.
rizzitello requested changes to this revision.Jan 17 2018, 12:10 AM
rizzitello added inline comments.
src/atcore.h
132

Already exposed as a QPROPERTY portSpeeds

184

make QPROPERTY?

This revision now requires changes to proceed.Jan 17 2018, 12:10 AM
src/atcore.h
132

With this and QPROPERTY you can use portSpeeds() and portSpeeds.

184

We don't have extruderCountChanged signal.

rizzitello added inline comments.Jan 17 2018, 12:18 AM
src/atcore.h
132

I think you only get to have one either the function is part of a property or its invokable.

184

Not required to have a write since this is a const

Sith comments

src/atcore.h
132

QPROPERTY don't make sense if you only have a read, moving to function make more sense.

laysrodrigues accepted this revision.Jan 18 2018, 5:29 PM
rizzitello added inline comments.Jan 19 2018, 2:40 PM
src/atcore.h
132

according to http://doc.qt.io/qt-5/properties.html

The only required item for a QPROPERTY is READ.
I suggest we also look to adding CONSTANT to varibles where it makes sence.

The presence of the CONSTANT attibute indicates that the property value is constant. For a given object instance, the READ method of a constant property must return the same value every time it is called. This constant value may be different for different instances of the object. A constant property cannot have a WRITE method or a NOTIFY signal

^describes portSpeed perfectly .

tcanabrava added inline comments.Jan 20 2018, 3:42 PM
src/atcore.h
132

unless there's a signal that will send the current port. if the value is *static* it doesn't matter.

184

if you change the printer, does the exturderCount *can* change?
if so, this is wrong.

@rizzitello I think that this need more love from our part.

rizzitello added inline comments.Mar 3 2018, 3:11 PM
src/atcore.h
184

Yes the extruder count is updated on connect to a printer. So if you connect to a printer with a different number of extruders it should change.