{"id":217203,"date":"2014-03-31T12:37:02","date_gmt":"2014-03-31T08:37:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=217203"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=217203","title":{"rendered":"<span class=\"post_title\">Properties framework \u0434\u043b\u044f Qt<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/6ec\/eab\/92e\/6eceab92ec49c71c2409f4a9fd1b6ba5.png\"\/><\/p>\n<h5>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430<\/h5>\n<p>  \u0412 Qt \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0449\u044c \u2014 Q_PROPERTY, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u043a \u043b\u044e\u0431\u043e\u043c\u0443 QObject \u043a\u043b\u0430\u0441\u0441\u0443. \u041d\u043e \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438\u043c\u0438 \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e.<\/p>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 (\u0438\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c) \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c (\u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u0438\u0430\u043b\u043e\u0433 \u0441\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430). \u041f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u0442\u0430\u043a\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u0447\u0442\u0438 \u043b\u044e\u0431\u0430\u044f \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043d\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430, \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0439 \u0433\u0440\u0430\u0444\u0438\u043a\u0438, Visual Studio \u0432 \u043a\u043e\u043d\u0446\u0435 \u043a\u043e\u043d\u0446\u043e\u0432.<br \/>  <a name=\"habracut\"><\/a><\/p>\n<p>  \u0418\u0442\u0430\u043a, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u00ab\u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c\u00bb. \u041b\u043e\u0433\u0438\u0447\u043d\u043e \u0438\u043c\u0435\u0442\u044c \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c, \u0432\u0435\u0434\u044c \u0438\u043d\u0430\u0447\u0435 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0434\u0438\u0430\u043b\u043e\u0433 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438. Q_PROPERTY \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043d\u0435\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u0432\u0438\u0434\u0436\u0435\u0442\u0430 \u0434\u043b\u044f \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Q_PROPERTY. \u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0432\u044b \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435\u0441\u044c \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u043c \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u043c \u0434\u043b\u044f \u044d\u0442\u0438\u0445 \u0446\u0435\u043b\u0435\u0439, \u0442\u043e \u043d\u0430\u0440\u044f\u0434\u0443 \u0441 \u0432\u0430\u0448\u0438\u043c\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438, \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 (\u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c objectName). \u0414\u0430\u043b\u0435\u0435, Q_PROPERTY \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438 (\u0438\u043d\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0441\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430); \u043d\u0435\u0442 description (\u0442\u0435\u043a\u0441\u0442\u043e\u0432\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430, \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u044e\u0449\u0430\u044f \u0434\u0430\u043d\u043d\u043e\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e); \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u0432\u0438\u0434\u0430 Q_PROPERTY \u0432 GUI (\u0434\u043b\u044f \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f usability).<\/p>\n<p>  \u0414\u043b\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430 \u0438\u043d\u043e\u0433\u0434\u0430 \u0443\u0434\u043e\u0431\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438, \u043a\u0430\u043a \u0441 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c, \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u043c\u0438 \u043e\u0442 \u043e\u0431\u044a\u0435\u043a\u0442\u0430-\u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430. \u0418\u0445 \u0442\u043e\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043a\u0443\u0434\u0430-\u0442\u043e, \u043d\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u044f \u0432\u0435\u0441\u044c \u043e\u0431\u044a\u0435\u043a\u0442-\u0432\u043b\u0430\u0434\u0435\u043b\u0435\u0446 \u0446\u0435\u043b\u0438\u043a\u043e\u043c, \u0438\u043b\u0438 \u0434\u0430\u0436\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u043f\u043e\u0434\u0433\u0440\u0443\u043f\u043f\u0443 \u0441\u0432\u043e\u0439\u0441\u0442\u0432.<\/p>\n<h5>\u0420\u0435\u0448\u0435\u043d\u0438\u0435<\/h5>\n<p>  \u041f\u044b\u0442\u0430\u044f\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0443\u0434\u043e\u0431\u043d\u044b\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430, \u044f \u0441\u043e\u0437\u0434\u0430\u043b \u043f\u0440\u043e\u0435\u043a\u0442 <a href=\"https:\/\/github.com\/lexxmark\/QtnProperty\">QtnProperty<\/a>. \u0414\u0430\u043b\u0435\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u0447\u0435\u043c \u0445\u043e\u0440\u043e\u0448 \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u043a\u0430\u043a \u044d\u0442\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f.<br \/>  \u041f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0447\u0430\u0441\u0442\u0435\u0439:  <\/p>\n<ul>\n<li><b>QtnPropertyCore<\/b> \u2014 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0441 \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438, \u043d\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u043c\u0438 \u0441 GUI<\/li>\n<li><b>QtnPropertyWidget<\/b> \u2014 \u0432\u0438\u0434\u0436\u0435\u0442\u044b \u0434\u043b\u044f \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0432\u043e\u0439\u0441\u0442\u0432, \u043f\u043b\u044e\u0441 \u0434\u0435\u043b\u0435\u0433\u0430\u0442\u044b \u0434\u043b\u044f \u043a\u0430\u0441\u0442\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u0432\u0438\u0434\u0430 \u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0441\u0432\u043e\u0439\u0441\u0442\u0432<\/li>\n<li><b>QtnPEG<\/b> \u2014 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 (\u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435 moc \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0443), \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0421++ \u043a\u043b\u0430\u0441\u0441 \u043d\u0430\u0431\u043e\u0440\u0430 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 PropertySet \u0438\u0437 *.pef \u0444\u0430\u0439\u043b\u0430 (\u044d\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0432\u043e\u0439\u0441\u0442\u0432, \u043f\u043e \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0443 \u043f\u043e\u0434\u043e\u0431\u0435\u043d QML)<\/li>\n<li><b>QtnPropertyTests<\/b> \u2014 \u0442\u0435\u0441\u0442\u044b \u0434\u043b\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 <b>QtnPropertyCore<\/b><\/li>\n<li><b>QtnPropertyDemo<\/b> \u2014 \u0434\u0435\u043c\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0433\u0434\u0435 \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <b>QtnPropertyWidget<\/b>, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0438\u0437 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0438 \u0437\u0430\u0434\u0430\u0432\u0430\u044f \u0442\u0435\u043a\u0441\u0442 \u0432 \u0432\u0438\u0434\u0435 \u0441\u0442\u0440\u043e\u043a \u00abSuperProperty.SubProperty = value\u00bb<\/li>\n<\/ul>\n<p>  <\/p>\n<h5>QtnPropertyCore<\/h5>\n<p>  \u041f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e, \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0434\u0432\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u0430 <i>QtnProperty<\/i> \u0438 <i>QtnPropertySet<\/i>. \u041f\u0435\u0440\u0432\u044b\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0431\u0430\u0437\u043e\u0432\u044b\u043c \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0442\u0438\u043f\u043e\u0432 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <i>QtnPropertyBool<\/i> \u0438\u043b\u0438 <i>QtnPropertyFloat<\/i>), \u0430 \u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0433\u0440\u0443\u043f\u043f\u0443 \u0441\u0432\u043e\u0439\u0441\u0442\u0432. \u0418 <i>QtnProperty<\/i> \u0438 <i>QtnPropertySet<\/i> \u0438\u043c\u0435\u044e\u0442 \u043e\u0431\u0449\u0435\u0433\u043e \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f <i>QtnPropertyBase<\/i>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439, \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0442\u043e\u043c\u043a\u043e\u043c QObject. \u0412 <i>QtnPropertyBase<\/i> \u043a\u043b\u0430\u0441\u0441\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e \u0432\u0441\u0451, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u043e\u0431\u0449\u0435\u0433\u043e \u043c\u0435\u0436\u0434\u0443 <i>QtnProperty<\/i> \u0438 <i>QtnPropertySet<\/i>:  <\/p>\n<ol>\n<li>QString <b>name<\/b> \u2014 \u0438\u043c\u044f property \u0438\u043b\u0438 propertyset (\u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 objectName)<\/li>\n<li>QString <b>description<\/b> \u2014 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u0441\u044f \u0432 \u043d\u0438\u0436\u043d\u0435\u0439 \u043f\u0430\u043d\u0435\u043b\u0438 <i>QtnPropertyWidget<\/i><\/li>\n<li>qint32 <b>id<\/b> \u2014 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 ID \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0441\u0440\u0435\u0434\u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0432 \u0433\u0440\u0443\u043f\u043f\u0435 (\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0438 \u0432 \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u043c \u0432\u0438\u0434\u0435)<\/li>\n<li>QtnPropertyState <b>state<\/b> \u2014 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 QtnPropertyStateImmutable \u2014 \u043d\u0435\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u0438\u043b\u0438 QtnPropertyStateInvisible \u2014 \u043d\u0435\u0432\u0438\u0434\u0438\u043c\u043e\u0435)<\/li>\n<li><b>load\/save<\/b> \u2014 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435\/\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0447\u0435\u0440\u0435\u0437 QDataStream<\/li>\n<li><b>fromStr\/toStr<\/b> \u2014 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0438\u0437\/\u0432 QString<\/li>\n<li><b>fromVariant\/toVariant<\/b> \u2014 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0438\u0437\/\u0432 QVariant<\/li>\n<li><b>propertyWillChange<\/b> \u2014 \u0441\u0438\u0433\u043d\u0430\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043f\u0435\u0440\u0435\u0434 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 (\u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u043e \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0430\u0442\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u2014 name, description, id, state \u0438 \u0442.\u043f.)<\/li>\n<li><b>propertyDidChange<\/b> \u2014 \u0441\u0438\u0433\u043d\u0430\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u0441\u043b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 (\u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u043d propertyWillChange)<\/li>\n<\/ol>\n<p>  <i>QtnPropertySet<\/i> \u043a\u043b\u0430\u0441\u0441 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0435\u0449\u0435 \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u0438 \u043c\u0435\u0442\u043e\u0434\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043d\u0438\u043c\u0438. \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0433\u043e) \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0434\u0432\u0430 \u043a\u043b\u0430\u0441\u0441\u0430 (<i>QtnPropertyInt<\/i> \u0438 <i>QtnPropertyIntCallback<\/i>). \u041f\u0435\u0440\u0432\u044b\u0439 \u0445\u0440\u0430\u043d\u0438\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 \u043a\u043b\u0430\u0441\u0441\u0435, \u0430 \u0432\u0442\u043e\u0440\u043e\u0439 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<br \/>  \u0412\u043e\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0432\u043e\u0439\u0441\u0442\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u043c\u043e\u0434\u0443\u043b\u0435 <b>QtnPropertyCore<\/b>:  <\/p>\n<ol>\n<li><i>QtnPropertyBool <\/i> \u2014 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0431\u0443\u043b\u0435\u0432\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/li>\n<li><i>QtnPropertyInt <\/i> \u2014 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u043d\u0430\u043a\u043e\u0432\u043e\u0435 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/li>\n<li><i>QtnPropertyUInt <\/i> \u2014 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0431\u0435\u0437\u0437\u043d\u0430\u043a\u043e\u0432\u043e\u0435 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/li>\n<li><i>QtnPropertyFloat <\/i> \u2014 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0442\u043e\u0447\u043a\u043e\u0439.<\/li>\n<li><i>QtnPropertyDouble <\/i> \u2014 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u0432\u043e\u0439\u043d\u043e\u0439 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438.<\/li>\n<li><i>QtnPropertyEnum <\/i> \u2014 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f.<\/li>\n<li><i>QtnPropertyEnumFlags <\/i> \u2014 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0438\u0437 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f.<\/li>\n<li><i>QtnPropertyQString <\/i> \u2014 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/li>\n<li><i>QtnPropertyQPoint <\/i> \u2014 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 QPoint.<\/li>\n<li><i>QtnPropertyQSize<\/i> \u2014 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 QSize.<\/li>\n<li><i>QtnPropertyQRect<\/i> \u2014 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 QRect.<\/li>\n<li><i>QtnPropertyQFont<\/i> \u2014 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 QFont.<\/li>\n<li><i>QtnPropertyQColor<\/i> \u2014 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 QColor.<\/li>\n<\/ol>\n<p>  \u0412\u0441\u0435 \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 (<i>QtnPropertyInt<\/i>, <i>QtnPropertyUInt<\/i>, <i>QtnPropertyFloat<\/i>, <i>QtnPropertyDouble<\/i>) \u0438\u043c\u0435\u044e\u0442 \u0442\u0440\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u0430:  <\/p>\n<ol>\n<li>minValue \u2014 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/li>\n<li>maxValue \u2014 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/li>\n<li>stepValue \u2014 \u0448\u0430\u0433 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/li>\n<\/ol>\n<p>  <\/p>\n<h5>QtnPropertyWidget<\/h5>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u043c\u043e\u0434\u0443\u043b\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u0441\u044f \u0434\u0432\u0430 \u0432\u0438\u0434\u0436\u0435\u0442\u0430 \u0438 \u0434\u0435\u043b\u0435\u0433\u0430\u0442\u044b \u0441\u0432\u043e\u0439\u0441\u0442\u0432.<br \/>  \u041a\u043b\u0430\u0441\u0441 <i>QtnPropertyView<\/i> \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0434\u0440\u0435\u0432\u043e\u0432\u0438\u0434\u043d\u044b\u0439 \u0432\u0438\u0434\u0436\u0435\u0442 \u0434\u043b\u044f \u043d\u0430\u0431\u043e\u0440\u0430 \u0441\u0432\u043e\u0439\u0441\u0442\u0432.<br \/>  \u041a\u043b\u0430\u0441\u0441 <i>QtnPropertyWidget<\/i> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043e\u0441\u0442\u0430\u0432\u043d\u044b\u043c \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 <i>QtnPropertyView<\/i> \u0438 QLabel \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043d\u0438\u0436\u043d\u0435\u0439 \u043f\u0430\u043d\u0435\u043b\u0438.<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/9b7\/b72\/7ef\/9b7b727ef4c041bf50f487d12bf392ea.png\"\/><br \/>  \u0427\u0442\u043e \u0431\u044b \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0432\u0438\u0434 \u0438\u043b\u0438 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430, \u0431\u044b\u043b\u0438 \u0432\u0432\u0435\u0434\u0435\u043d\u044b \u0434\u0435\u043b\u0435\u0433\u0430\u0442\u044b. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f <i>QtnPropertyBool<\/i> \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0434\u0432\u0430 \u0434\u0435\u043b\u0435\u0433\u0430\u0442\u0430: <i>QtnPropertyDelegateBoolCheck<\/i> \u0438 <i>QtnPropertyDelegateBoolCombobox<\/i>. \u041f\u0435\u0440\u0432\u044b\u0439 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 checkbox, \u0430 \u0432\u0442\u043e\u0440\u043e\u0439 \u2014 combobox \u0441 \u0434\u0432\u0443\u043c\u044f \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 (\u0434\u043b\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 true \u0438 false). \u041c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u0434\u0435\u043b\u0435\u0433\u0430\u0442\u044b \u0438 \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u0445 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0445, \u0442\u043e\u0433\u0434\u0430 \u0432\u0441\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0431\u0443\u0434\u0443\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u043e\u0432\u043e\u0433\u043e \u0434\u0435\u043b\u0435\u0433\u0430\u0442\u0430. \u0418\u043d\u043e\u0433\u0434\u0430 \u043b\u0435\u0433\u0447\u0435 \u0438 \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0442\u0438\u043f \u0434\u0435\u043b\u0435\u0433\u0430\u0442\u0430, \u0447\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u0442\u0438\u043f \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043f\u0443\u0442\u0438 \u043a \u0444\u0430\u0439\u043b\u0443 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e \u0447\u0435\u0440\u0435\u0437 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0434\u0435\u043b\u0435\u0433\u0430\u0442 <i>QtnPropertyDelegateQStringFile<\/i> \u0434\u043b\u044f <i>QtnPropertyQString<\/i>. <\/p>\n<h5>\u041a\u0430\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f<\/h5>\n<p>  \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043d\u0430\u0431\u043e\u0440 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u0434\u043b\u044f \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430.<br \/>  \u0412\u043e\u0442 \u0447\u0442\u043e \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e.<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/58a\/acc\/bc5\/58aaccbc51ad1cf6ad54a50a38732b5d.png\"\/><br \/>  \u0410 \u0432\u043e\u0442 \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0443, \u0447\u0442\u043e \u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u0430\u043a\u043e\u0439 property set:  <\/p>\n<pre><code class=\"cpp\">    QtnPropertySet* textProperties = new QtnPropertySet(owner);      QtnPropertyBool* enableWrapping = new enableWrapping(textProperties);     enableWrapping-&gt;setName(tr(&quot;enableWrapping&quot;));     enableWrapping-&gt;setDescription(tr(&quot;Enable\/disable text wrapping&quot;));     enableWrapping-&gt;setValue(true);      QtnPropertyQColor* textColor = new QtnPropertyQColor(textProperties);     textColor-&gt;setName(tr(&quot;textColor&quot;));     textColor-&gt;setDescription(tr(&quot;Foreground text color&quot;));     textColor-&gt;setValue(QColor(0, 0, 0));      QtnPropertySet* Tabulation = new QtnPropertySet(textProperties)     Tabulation-&gt;setName(tr(&quot;Tabulation&quot;));     Tabulation-&gt;setDescription(tr(&quot;Tabulation settings&quot;));      QtnPropertyBool* replaceWithSpaces = new QtnPropertyBool(Tabulation);     replaceWithSpaces-&gt;setName(tr(&quot;replaceWithSpaces&quot;);     replaceWithSpaces-&gt;setDescription(tr(&quot;Automatically replace tabs with spaces&quot;));     replaceWithSpaces-&gt;setValue(false);      QtnPropertyUInt* tabSize = new QtnPropertyUInt(Tabulation);     tabSize-&gt;setName(tr(&quot;tabSize&quot;));     tabSize-&gt;setDescription(tr(&quot;Number of spaces to be placed.&quot;));     tabSize-&gt;setState(QtnPropertyStateImmutable);     tabSize-&gt;setValue(4);     tabSize-&gt;setMinValue(1);     tabSize-&gt;setMaxValue(10);      \/\/ \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0441\u0438\u0433\u043d\u0430\u043b\u0430 propertyDidChange     auto lambda =  [tabSize, replaceWithSpaces](const QtnPropertyBase* changedProperty,                              const QtnPropertyBase* firedProperty,                              QtnPropertyChangeReason reason) {         \/\/ \u0435\u0441\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u043e\u0441\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435         if (reason & QtnPropertyChangeReasonValue)         {             if (*replaceWithSpaces)                 \/\/ \u0434\u0435\u043b\u0430\u0435\u043c tabSize \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u043c                 tabSize-&gt;removeState(QtnPropertyStateImmutable);             else                 \/\/ \u0434\u0435\u043b\u0430\u0435\u043c tabSize \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u043c                 tabSize-&gt;addState(QtnPropertyStateImmutable);     };     QObject::connect(replaceWithSpaces, &QtnProperty::propertyDidChange, lambda);      \/\/ \u0438 \u0435\u0449\u0435 \u043a\u043e\u0434 \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0434\u0435\u043b\u0435\u0433\u0430\u0442\u0430 replaceWithSpaces     ... <\/code><\/pre>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043e\u0431\u043b\u0435\u0433\u0447\u0438\u0442\u044c \u0436\u0438\u0437\u043d\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430\u043c (\u0438\u043b\u0438 \u0434\u0430\u0436\u0435 \u0434\u0430\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043d\u0435-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430\u043c) \u0431\u044b\u043b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043a\u043e\u0434\u043e-\u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 <b>QtnPEG<\/b>.<br \/>  \u0412\u043e\u0442 \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432 Text.pef \u0444\u0430\u0439\u043b\u0435:  <\/p>\n<pre><code class=\"cpp\">property_set Text {     Bool enableWrapping     {         description = &quot;Enable\/disable text wrapping&quot;;         value = true;     }      QColor textColor     {         description = &quot;Foreground text color&quot;;         value = QColor(0, 0, 0);     }      property_set Tabs Tabulation     {         description = &quot;Tabulation settings&quot;;         Bool replaceWithSpaces         {             description = &quot;Automatically replace tabs with spaces&quot;;             value = false;              \/\/ \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0434\u0435\u043b\u0435\u0433\u0430\u0442             delegate ComboBox             {                 \/\/  \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0435\u043c \u0442\u0435\u043a\u0441\u0442 \u0434\u043b\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f true                 labelTrue = &quot;On&quot;;                 \/\/  \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0435\u043c \u0442\u0435\u043a\u0441\u0442 \u0434\u043b\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f false                 labelFalse = &quot;Off&quot;;             }              \/\/ \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043a\u043e\u0434 \u0441\u043b\u043e\u0442\u0430 \u0434\u043b\u044f \u0441\u0438\u0433\u043d\u0430\u043b\u0430 replaceWithSpaces.propertyDidChange             slot propertyDidChange             {                 tabSize.switchState(QtnPropertyStateImmutable, !replaceWithSpaces);             }         }          UInt tabSize         {             description = &quot;Number of spaces to be placed.&quot;;             state = QtnPropertyStateImmutable;             value = 4;         }     } } <\/code><\/pre>\n<p>  \u0414\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0438 \u043b\u0430\u043a\u043e\u043d\u0438\u0447\u043d\u043e. <b>QtnPEG<\/b> \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0434\u0432\u0430 \u0444\u0430\u0439\u043b\u0430: Text.peg.h \u0438 Text.peg.cpp, \u0433\u0434\u0435 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0434\u0432\u0430 \u043a\u043b\u0430\u0441\u0441\u0430. <i>QtnPropertySetText<\/i> \u0438 <i>QtnPropertySetTabs<\/i> \u2014 \u043a\u043b\u0430\u0441\u0441\u044b \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a\u0438 \u043e\u0442 <i>QtnPropertySet<\/i>.<br \/>  \u0412 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u0430\u0445 \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u044e \u043f\u043e\u0434\u0441\u0432\u043e\u0439\u0441\u0442\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f <i>QtnPropertySetText<\/i>:  <\/p>\n<pre><code class=\"cpp\">    \/\/ start children declarations     QtnPropertyBool& enableWrapping;     QtnPropertyQColor& textColor;     QtnPropertySetTabs& Tabulation;     \/\/ end children declarations <\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u0432 C++ \u043a\u043e\u0434\u0435 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u044d\u0442\u0438\u043c \u043a\u043b\u0430\u0441\u0441\u043e\u043c, \u043a\u0430\u043a \u0441\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439 \u0441 \u043f\u043e\u043b\u044f\u043c\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:  <\/p>\n<pre><code class=\"cpp\">void doSomething(const QtnPropertySetText& textParams, QString& text) {     if (textParams.Tabulation.replaceWithSpaces)     {         QString spaces(QChar::Space, textParams.Tabulation.tabSize);         text.replace(QChar::Tabulation, spaces);     }  } <\/code><\/pre>\n<p>  <\/p>\n<h5>\u0418\u0442\u043e\u0433<\/h5>\n<p>  \u041d\u0430\u0434\u0435\u044e\u0441\u044c \u044f \u0441\u043c\u043e\u0433 \u0434\u0430\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e \u043c\u043e\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435.<br \/>  \u0411\u0443\u0434\u0443 \u0440\u0430\u0434, \u0435\u0441\u043b\u0438 \u043a\u043e\u043c\u0443-\u0442\u043e \u043e\u043d \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0442\u0430\u043c, \u0433\u0434\u0435 \u0435\u0441\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c GUI \u0434\u043b\u044f \u0432\u0441\u0435\u0433\u043e \u0438 \u0432\u0441\u044f \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u043e. \u0415\u0441\u043b\u0438, \u043f\u043e \u0432\u0430\u0448\u0435\u043c\u0443 \u043c\u043d\u0435\u043d\u0438\u044e, \u0434\u043b\u044f \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f <a href=\"https:\/\/github.com\/lexxmark\/QtnProperty\"><b>QtnProperty<\/b><\/a> \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u043f\u0440\u043e\u0448\u0443 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c.    \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/217203\/\"> http:\/\/habrahabr.ru\/post\/217203\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/6ec\/eab\/92e\/6eceab92ec49c71c2409f4a9fd1b6ba5.png\"\/><\/p>\n<h5>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430<\/h5>\n<p>  \u0412 Qt \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0449\u044c \u2014 Q_PROPERTY, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u043a \u043b\u044e\u0431\u043e\u043c\u0443 QObject \u043a\u043b\u0430\u0441\u0441\u0443. \u041d\u043e \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438\u043c\u0438 \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e.<\/p>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 (\u0438\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c) \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c (\u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u0438\u0430\u043b\u043e\u0433 \u0441\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430). \u041f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u0442\u0430\u043a\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u0447\u0442\u0438 \u043b\u044e\u0431\u0430\u044f \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043d\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430, \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0439 \u0433\u0440\u0430\u0444\u0438\u043a\u0438, Visual Studio \u0432 \u043a\u043e\u043d\u0446\u0435 \u043a\u043e\u043d\u0446\u043e\u0432.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-217203","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/217203","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=217203"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/217203\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=217203"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=217203"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=217203"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}