New generated static functions

Use this forum to request new features or suggest modifications to existing features

New generated static functions

Postby jimmytaker » Tue Jan 24, 2017 11:07 am

You have the description field, which is great. Now how about adding static functions like the
Code: Select all
static QString column_XX();

but for the descriptions:
Code: Select all
static QString column_desc_XX() { return QObject::tr("Translatable description"); }

And then using those when setting the description of pData:
Code: Select all
pData->setDescription(column_desc_XX());

The translations could be even more useful, if the object is derived from QObject and has the Q_OBJECT macro.
jimmytaker
 
Posts: 19
Joined: Fri Dec 23, 2016 11:04 pm

Re: New generated static functions

Postby qxorm » Mon Jan 30, 2017 8:21 am

Hello,

Thank you for your suggestion !
I think that this kind of feature is useful as you said if your persistent class inherits from QObject.

So I would recommend to use the Javascript engine of QxEntityEditor to customize C++ exports : http://www.qxorm.com/qxorm_en/manual_qx ... #js_engine
I think this js engine is flexible enough to allow you to provide this static methods in your classes.
qxorm
Site Admin
 
Posts: 476
Joined: Mon Apr 12, 2010 7:45 am


Return to QxEntityEditor - Feature request

Who is online

Users browsing this forum: No registered users and 1 guest

cron