QCommenceCategoryDef Class Reference

Category Definiton Object. More...

#include <QCommenceDB.h>

Inheritance diagram for QCommenceCategoryDef:

Inheritance graph

List of all members.

Public Slots

QString name (void)
 Category Name.
QString categoryName (void)
 Category Name.
QString catName (void)
 Return a specially modified categoryName.
QString string (void)
 Category Definition String.
long maxItems (void)
 Maximum number of Items.
bool isShared (void)
 Category 'Is Shared' flag.
bool duplicatesAllowed (void)
 Category 'Allows Duplicates' flag.
bool hasClarifyField (void)
 Category 'has clarify' information.
bool hasVarField (void)
 Category 'has var' field.
bool hasCmcIDField (void)
 Return TRUE if this category has a cmcID field.
bool hasGuidField (void)
 Return TRUE if this category has a guid field.
QString keyFieldName (void)
 Return the category Key Field Name.
QString cfyFieldName (void)
 Return the category Clarify field name.
QString cfySeparator (void)
 Clarify Seperator.
QString varFieldName (void)
 Return the category Var field name.
QString guidFieldName ()
 GUID Field Name.
bool hasThidField ()
 Has a THID field.
QString thidFieldName ()
 THID Field Name.
bool isPublished (void)
 Return if the category is published or not.
QString comment (void)
 Return the category Comment.
QString documentation (void)
QCommenceFieldDefsfieldDefs (void)
 Field Definition Collection.
QCommenceConnectionDefsconnectionDefs (void)
 Connection Defintion Collection.
QCommenceFormDefs * formDefs (void)
 Form Definition Collection.
QCommenceViewDefs * viewDefs (void)
 View Definition Collection.

Public Member Functions

 QCommenceCategoryDef (void)
 QCommenceCategoryDef (const QCommenceCategoryDef &copy)
 Copy Constructor.
 QCommenceCategoryDef (QString i_name, QCommenceCategoryDefs *i_parent)
 Standard Constructor.
virtual ~QCommenceCategoryDef ()
 Standard Destructor.
QCommenceCategoryDefscategoryDefs (void)
QCommenceDatabaseDB (void)
QDomElement de (void)
QDomElement toXml (QDomDocument &doc, QDomNode &parent)
 Load a QDomElement for this field.

Private Attributes

QString m_definition
QPointer< QCommenceDatabasem_db

Detailed Description

Category Definiton Object.


Definition at line 1460 of file QCommenceDB.h.

Constructor & Destructor Documentation

QCommenceCategoryDef::QCommenceCategoryDef ( void   )  [inline]

Definition at line 1466 of file QCommenceDB.h.

QCommenceCategoryDef::QCommenceCategoryDef ( const QCommenceCategoryDef copy  )  [inline]

Copy Constructor.

Definition at line 1476 of file QCommenceDB.h.

QCommenceCategoryDef::QCommenceCategoryDef ( QString  i_name,
QCommenceCategoryDefs i_parent 
) [inline]

Standard Constructor.

Definition at line 1486 of file QCommenceDB.h.

virtual QCommenceCategoryDef::~QCommenceCategoryDef (  )  [inline, virtual]

Standard Destructor.

Definition at line 1501 of file QCommenceDB.h.

Member Function Documentation

QCommenceCategoryDefs * QCommenceCategoryDef::categoryDefs ( void   ) 

Definition at line 2562 of file QCommenceDB.cpp.

QString QCommenceCategoryDef::categoryName ( void   )  [inline, slot]

Category Name.

This is an overloaded function of name(). It is provided for convenience because many of the other objects in the system refer to the 'categoryName' and having a consistent interface makes the objects easier to work with.

Definition at line 1537 of file QCommenceDB.h.

QString QCommenceCategoryDef::catName ( void   )  [slot]

Return a specially modified categoryName.

This returns a specially modified category name. This method is designed to be used by the keyFieldName, cfyFieldName and varFieldName functions. When applied, this function will return the following results:

                                               (typical)             (typical)
  category name      -  simplified result     Clarify Field         Var Field
 -------------------   -------------------   -------------------   ---------------------
  Person                person                personCfy             personVar
  Company               company               companyCfy            companyVar
  Calendar              calendar              calendarCfy           calendarVar
  New Opportunity       newOpportunity        newOpportunityCfy     newOpportunityVar
  Test Category         testCategory          testCategoryCfy       testCategoryVar
  A Category Name       aCategoryName         aCategoryNameCfy      aCategoryNameVar
There are some specific advantages for using names formatted thusly. For instance if drag-and-drop is being employed on the calendar, then it is important to carefully structure your field names so that fields that are identically named between, say, People and Calendar are fields you WANT identically named. Because, if you drag a person from a People report on to a calendar, then a new calendar item will be created, and all identical fields and connections will be copied from the People category item to the Calendar category item. This is fine for fields you want automatically copied, but it is rather problemmatic for fields you don't want copied such as ID fields and VAR fields and what-not. Using the catNameKey/catNameCfy/catNameVar field naming convention prevents this sort of automatic copying for these critical internal fields.

Definition at line 2534 of file QCommenceDB.cpp.

QString QCommenceCategoryDef::cfyFieldName ( void   )  [slot]

Return the category Clarify field name.

This returns the category Clarify field name. Note that categories are not required to have a clarify field - it's just a good idear, especially if the category allows duplicates, and in those cases the clarify field should certainly be set to something that allows one item to be distinguished from another.

The return value of this function will depend on a couple of conditions. Even if an actual, defined, clarify field does not exist for this category, it will attempt to find a possible clarify field by looking for the following fields in the following order:

  • -Defined Clarify Field-
  • "Clarify"
  • "catNameCfy"
For instance, first the category is checked for an actual defined clarify field. If one is not found, then the field "Clarify" is searched for in the list of fields. If that field is not found, then the special "catNameCfy" field is searched for in the list of fields. The "catNameCfy" field is a special field that is developed from a composite of the category name plus the three letter extension "Cfy" using the catName() function.

vbScript Example:
 dim ddll: set ddll = createObject("DumontDLL")
 dim dfrm: set dfrm = ddll.Form(Form)
 dim oCFN:     oCFN = dfrm.cfyFieldName
 msgbox "Field " & oCFN & " is " & dfrm.Field(oCFN).Value

Definition at line 2620 of file QCommenceDB.cpp.

QString QCommenceCategoryDef::cfySeparator ( void   )  [slot]

Clarify Seperator.

If this category has a clarify field defined, then this value will indicate the clarify field seperator. This value is used when building 'clarified item' connections and settings.

Definition at line 2695 of file QCommenceDB.cpp.

QString QCommenceCategoryDef::comment ( void   )  [slot]

Return the category Comment.

The category comment is an entity that comes from the databaseDef.xml file.

Definition at line 2806 of file QCommenceDB.cpp.

QCommenceConnectionDefs * QCommenceCategoryDef::connectionDefs ( void   )  [slot]

Connection Defintion Collection.

This returns the connection definition Collection.

Definition at line 2718 of file QCommenceDB.cpp.

QCommenceDatabase * QCommenceCategoryDef::DB ( void   ) 

Definition at line 2567 of file QCommenceDB.cpp.

QDomElement QCommenceCategoryDef::de ( void   ) 

Definition at line 2751 of file QCommenceDB.cpp.

QString QCommenceCategoryDef::documentation ( void   )  [slot]

Definition at line 2811 of file QCommenceDB.cpp.

bool QCommenceCategoryDef::duplicatesAllowed ( void   )  [slot]

Category 'Allows Duplicates' flag.

This indicates TRUE if the category allows duplicates or FALSE if not.

Definition at line 2594 of file QCommenceDB.cpp.

QCommenceFieldDefs * QCommenceCategoryDef::fieldDefs ( void   )  [slot]

Field Definition Collection.

This returns the field definition Collection.

Definition at line 2705 of file QCommenceDB.cpp.

QCommenceFormDefs * QCommenceCategoryDef::formDefs ( void   )  [slot]

Form Definition Collection.

Definition at line 2826 of file QCommenceDB.cpp.

QString QCommenceCategoryDef::guidFieldName (  )  [slot]

GUID Field Name.

Definition at line 2642 of file QCommenceDB.cpp.

bool QCommenceCategoryDef::hasClarifyField ( void   )  [slot]

Category 'has clarify' information.

This indicates TRUE if the cateogy has clarify field information or FALSE if not.

Definition at line 2601 of file QCommenceDB.cpp.

bool QCommenceCategoryDef::hasCmcIDField ( void   )  [slot]

Return TRUE if this category has a cmcID field.

Definition at line 2689 of file QCommenceDB.cpp.

bool QCommenceCategoryDef::hasGuidField ( void   )  [slot]

Return TRUE if this category has a guid field.

Definition at line 2732 of file QCommenceDB.cpp.

bool QCommenceCategoryDef::hasThidField (  )  [slot]

Has a THID field.

Definition at line 2684 of file QCommenceDB.cpp.

bool QCommenceCategoryDef::hasVarField ( void   )  [slot]

Category 'has var' field.

Definition at line 2608 of file QCommenceDB.cpp.

bool QCommenceCategoryDef::isPublished ( void   )  [slot]

Return if the category is published or not.

Published categories are those that are included in XML export/import files.

Definition at line 2816 of file QCommenceDB.cpp.

bool QCommenceCategoryDef::isShared ( void   )  [slot]

Category 'Is Shared' flag.

This indicates TRUE if the category is shared or FALSE if not.

Definition at line 2587 of file QCommenceDB.cpp.

QString QCommenceCategoryDef::keyFieldName ( void   )  [slot]

Return the category Key Field Name.

This is a short-hand function for getting the keyFieldName on the Form. Every category always has a keyField - also known as the 'Name' field, and this function returns that field that IS the Name field.

vbScript Example:
 dim ddll: set ddll = createObject("DumontDLL")
 dim dfrm: set dfrm = ddll.Form(Form)
 dim oKFN:     oKFN = dfrm.keyFieldName
 msgbox "Field " & oKFN & " is " & dfrm.Field(oKFN).Value
See also:
keyField, cfyField, varField

Definition at line 2613 of file QCommenceDB.cpp.

long QCommenceCategoryDef::maxItems ( void   )  [slot]

Maximum number of Items.

This value always returns 500,000 since that is the upper limit of the Commence category item count.

Definition at line 2582 of file QCommenceDB.cpp.

QString QCommenceCategoryDef::name ( void   )  [inline, slot]

Category Name.

Definition at line 1527 of file QCommenceDB.h.

QString QCommenceCategoryDef::string ( void   )  [slot]

Category Definition String.

This is the category definition string as returned by the DDE call to to [GetCategoryDefinition(CategoryName)]. This string is delimited by vbCrLf.

This value gets cached on first call, meaning if the category definition changes after this call (unlikely), then this value will be invalid.

Definition at line 2575 of file QCommenceDB.cpp.

QString QCommenceCategoryDef::thidFieldName (  )  [slot]

THID Field Name.

Definition at line 2662 of file QCommenceDB.cpp.

QDomElement QCommenceCategoryDef::toXml ( QDomDocument &  doc,
QDomNode &  parent 

Load a QDomElement for this field.

Definition at line 2771 of file QCommenceDB.cpp.

QString QCommenceCategoryDef::varFieldName ( void   )  [slot]

Return the category Var field name.

This returns the category Var field name. This Var field is that special field that is used to extend the 100-field limit of the Commence categories. This field should ALWAYS be a Memo type field so that a long, multi-line text value can be placed on it.

Dumont assumes the 'name' of this field is a programmed construct of the category name followed by the 'Var' extension. For instance, if the category name is "Calendar", then the var field name would be "calendarVar". If the category name is "Person", then the var field name would be "personVar". And, if the category name is "Rolodex Files", then the var field name would be "rolodexFilesVar". The purpose for this naming convention (besides being consistent) is to prevent field values from one category var field propagating to the var field of another category on a drag/drop operation. For instance, if a person were to be dragged to the calendar, the entire contents of the var field would be dragged along with that item if both the calendar and person categories had their var field defined as "Var". Therefore, var field names are distinguished for each category by name.

vbScript Example:
 dim ddll: set ddll = createObject("DumontDLL")
 dim dfrm: set dfrm = ddll.Form(Form)
 dim oVFN:     oVFN = dfrm.varFieldName
 msgbox "Field " & oVFN & " is " & dfrm.Field(oVFN).Value

Definition at line 2700 of file QCommenceDB.cpp.

QCommenceViewDefs * QCommenceCategoryDef::viewDefs ( void   )  [slot]

View Definition Collection.

Definition at line 2821 of file QCommenceDB.cpp.

Member Data Documentation

Definition at line 1812 of file QCommenceDB.h.

Definition at line 1810 of file QCommenceDB.h.

The documentation for this class was generated from the following files:

~ ~ ~ ~ ~ ~
Source Code without Comments is like a Cranberry Garland
without the berries. Comment your Code!
Commence Database User Support Group Forum
~ ~ ~ ~ ~ ~
Author: Mark Petryk
Lorimark Solutions, LLC