Skip to content

v0.2.0

Latest
Compare
Choose a tag to compare
@HuaiminNotSleepYet HuaiminNotSleepYet released this 26 Sep 11:39

NOTE: This version does not compile on msvc.

  • BREAKING: N_ID_PROPERTY is now used similarly to Q_PROPERTY.
// Before:
N_ID_PROPERTY(bool, enabled, N_GETTER(isEnabled), N_SETTER(setEnabled), N_NO_NOTIFY)
// After:
N_ID_PROPERTY(bool, enabled, N_READ isEnabled N_WRITE setEnabled)
  • Add a series of N_BUILDER_SETTERX macros to simplify writing Builder’s property.
// Before:
S& layout(QLayout* l)        { t->setLayout(l)        ; return self(); }
S& minimumSize(int w, int h) { t->setMinimumSize(w, h); return self(); }
// After:
N_BUILDER_SETTER1(layout     , setLayout     )
N_BUILDER_SETTER2(minimumSize, setMinimumSize)
  • Helper method as_id,as_builder,id_of,builder_of.