template<class C, class T>
class uiObjBodyImpl< C, T >
Default (Template) implementation of uiObjectBody.
Any uiObjectBody must implement thiswidget_() and uiObjHandle() and must also implement some QWidget methods. These are implemented using the pre-processor, because it is difficult to templatize for all cases since some Qt objects need a specific constructor. However, most QWidgets just need a parent and a name and then this template implementation can be used.
#define mHANDLE_OBJ uiObject_or_child_class, default O
#define mQWIDGET_BODY Widget_or_child_class, default T
#define mQWIDGET_BASE QWidget
#include "i_uiobjqtbody.h"
The macro's mQWIDGET_BODY and mQWIDGET_BASE are undef'ed in "i_uiobjqtbody.h"
The "i_uiobjqtbody.h" header file uses no multiple-inclusion protection and implements the following methods:
virtual void setFont(
const QFont &font );
virtual void polish();
protected:
It also declares a protected member handle_, of type mHANDLE_OBJ&, which must be initialized in any constructor of objects using "i_uiobjqtbody.h"