[gluon] GluonObject API addition proposal

[ Thread Index | Date Index | More lists.tuxfamily.org/gluon Archives ]


Hi

  In concordance with the soft freeze announcement, and after having gained no 
inconsiderable amount of gray hairs thinking about this problem, i would like 
to add the following functions to the public API of GluonCore::GluonObject:

void setPropertyRange(const QString& property, qreal min, qreal max);
qreal propertyRangeMin(const QString& property) const;
qreal propertyRangeMax(const QString& property) const;
void removePropertyRange(const QString& property);

void setPropertyStep(const QString& property, qreal step);
qreal propertyStep(const QString& property) const;
void removePropertyStep(const QString& property);

  The functionality hiding behind these function are that which will allow us 
to provide nice looking sliders (or dials, pending some work by Morten 
Justesen) rather than spin boxes for editing numerical values: The first part 
for managing the minimum and maximum, and the second part setting the steps on 
the slider/dial. All functions will be marked as Q_INVOKABLE to allow scripts 
to provide this as well.
  In case anybody can come up with a better, cleaner way of providing this 
functionality, please do! i have spent a few hours trying to work out a 
cleaner way of doing it, but failed.

-- 
...Dan // Leinir..
http://leinir.dk/

                          Co-
                            existence
                          or no
                            existence

                          - Piet Hein

---
+----------------------------------------------+
Gluon is a high-level game development library for the KDE desktop enviornment.
http://gluon.tuxfamily.org/
http://gitorious.org/gluon



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/