00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef SOQT
00024 #ifdef _WIN32
00025 #define MAX_DIMENSION 0x7fffffff // = max int32
00026 #else
00027 #define MAX_DIMENSION 65535 // = max unsigned short
00028 #endif
00029 #else
00030 #define MAX_DIMENSION 32767 // = max short
00031 #endif
00032
00033 #define FIELD_SENSOR(field) \
00034 SoFieldSensor* SO__CONCAT(field, Sensor)
00035
00036 #define SENSOR(field) \
00037 SO__CONCAT(field, Sensor)
00038
00039 #define SO_DG_HEADER(className) \
00040 SO_KIT_HEADER(className)
00041
00042 #define SO_DG_SOURCE(className) \
00043 SO_KIT_SOURCE(className)
00044
00045 #define SO_DG_CONSTRUCTOR(className) \
00046 SO_KIT_CONSTRUCTOR(className)
00047
00048 #define SO_DG_ADD_FIELD(fieldName, defValue) \
00049 SO_KIT_ADD_FIELD(fieldName, defValue)
00050
00051 #define SO_DG_ADD_CATALOG_ENTRY(partName, partClassName, nullByDefault, parentName, rightName, isPublicPart) \
00052 SO_KIT_ADD_CATALOG_ENTRY(partName, partClassName, nullByDefault, parentName, rightName, isPublicPart)
00053
00054 #define SO_DG_DEFINE_ENUM_VALUE(field, value) \
00055 SO_KIT_DEFINE_ENUM_VALUE(field, value)
00056
00057 #define SO_DG_SET_SF_ENUM_TYPE(field, typeStruct) \
00058 SO_KIT_SET_SF_ENUM_TYPE(field, typeStruct)
00059
00060 #define SO_DG_CATALOG_ENTRY_HEADER(resource) \
00061 SO_KIT_CATALOG_ENTRY_HEADER(resource)
00062
00063 #define SO_DG_INIT_INSTANCE() \
00064 SO_KIT_INIT_INSTANCE()
00065
00066 #define SO__DG_INIT_CLASS(className, parentPrintClass, parentClass) \
00067 SO__KIT_INIT_CLASS(className, parentPrintClass, parentClass)
00068
00069 #define SO_DG_INIT_CLASS(className, parentClass, parentPrintClass) \
00070 SO_KIT_INIT_CLASS(className, parentClass, parentPrintClass)
00071
00072 #define SO__DG_EXIT_CLASS(className) \
00073 SO__KIT_EXIT_CLASS(className)
00074
00075 #define SO_DG_EXIT_CLASS(className) \
00076 SO__KIT_EXIT_CLASS(className)
00077
00078 #define ATTACH_FIELD(field) \
00079 if (SO__CONCAT(field, Sensor) && SO__CONCAT(field, Sensor)->getAttachedField() != &field) \
00080 SO__CONCAT(field, Sensor)->attach(&field)
00081
00082 #define DETACH_FIELD(field) \
00083 if (SO__CONCAT(field, Sensor) && SO__CONCAT(field, Sensor)->getAttachedField()) \
00084 SO__CONCAT(field, Sensor)->detach()
00085
00086 #define ADD_FIELD_SENSOR(field) \
00087 SO__CONCAT(field, Sensor) = NULL
00088
00089 #define DELETE_FIELD_SENSOR(field) \
00090 if (SO__CONCAT(field, Sensor)) \
00091 delete SO__CONCAT(field, Sensor)
00092
00093 #define INIT_FIELD_SENSOR(field) \
00094 if (SO__CONCAT(field, Sensor) == NULL) { \
00095 SO__CONCAT(field, Sensor) = new SoFieldSensor(fieldChangedCB, this); \
00096 SO__CONCAT(field, Sensor)->setPriority(0); \
00097 ATTACH_FIELD(field); }
00098
00099 #ifndef SOQT
00100 #ifdef _WIN32
00101 #define DG_FONT HFONT
00102 #else
00103 #define DG_FONT char*
00104 #endif
00105 #else
00106 #define DG_FONT QFont
00107 #endif
00108
00109
00110
00111
00112