mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Added inherited object of MimeData to carry model index list
p4#: 20926
This commit is contained in:
@@ -61,14 +61,16 @@ class PdmUiEditorAttribute;
|
||||
#define CAF_PDM_HEADER_INIT \
|
||||
public: \
|
||||
virtual QString classKeyword() { return classKeywordStatic(); } \
|
||||
static QString classKeywordStatic()
|
||||
static QString classKeywordStatic(); \
|
||||
static bool Error_You_forgot_to_add_the_macro_CAF_PDM_HEADER_INIT_and_or_CAF_PDM_SOURCE_INIT_to_your_cpp_file_for_this_class()
|
||||
|
||||
/// CAF_PDM_SOURCE_INIT associates the file keyword used for storage with the class and initializes the factory
|
||||
/// Place this in the cpp file, preferably above the constructor
|
||||
|
||||
#define CAF_PDM_SOURCE_INIT(ClassName, keyword) \
|
||||
bool ClassName::Error_You_forgot_to_add_the_macro_CAF_PDM_HEADER_INIT_and_or_CAF_PDM_SOURCE_INIT_to_your_cpp_file_for_this_class() { return false;} \
|
||||
QString ClassName::classKeywordStatic() { assert(PdmObject::isValidXmlElementName(keyword)); return keyword; } \
|
||||
static bool PDM_OBJECT_STRING_CONCATENATE(pdm_object_factory_init_, __LINE__) = caf::PdmObjectFactory::instance()->registerCreator<ClassName>()
|
||||
static bool PDM_OBJECT_STRING_CONCATENATE(pdm_object_factory_init_, __LINE__) = caf::PdmObjectFactory::instance()->registerCreator<ClassName>()
|
||||
|
||||
/// InitObject sets up the user interface related information for the object
|
||||
/// Placed in the constructor of your PdmObject
|
||||
@@ -86,6 +88,8 @@ public: \
|
||||
|
||||
#define CAF_PDM_InitField(field, keyword, default, uiName, iconResourceName, toolTip, whatsThis) \
|
||||
{ \
|
||||
static bool chekingThePresenceOfHeaderAndSourceInitMacros = Error_You_forgot_to_add_the_macro_CAF_PDM_HEADER_INIT_and_or_CAF_PDM_SOURCE_INIT_to_your_cpp_file_for_this_class(); \
|
||||
\
|
||||
static caf::PdmUiItemInfo objDescr(uiName, QIcon(QString(iconResourceName)), toolTip, whatsThis); \
|
||||
addField(field, keyword, default, &objDescr); \
|
||||
}
|
||||
@@ -94,6 +98,8 @@ public: \
|
||||
|
||||
#define CAF_PDM_InitFieldNoDefault(field, keyword, uiName, iconResourceName, toolTip, whatsThis) \
|
||||
{ \
|
||||
static bool chekingThePresenceOfHeaderAndSourceInitMacros = Error_You_forgot_to_add_the_macro_CAF_PDM_HEADER_INIT_and_or_CAF_PDM_SOURCE_INIT_to_your_cpp_file_for_this_class(); \
|
||||
\
|
||||
static caf::PdmUiItemInfo objDescr(uiName, QIcon(QString(iconResourceName)), toolTip, whatsThis); \
|
||||
addFieldNoDefault(field, keyword, &objDescr); \
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user