DumontEXE 0.0.1
cmcFieldDef.h
00001 /* ***************************************************************************
00002 **
00003 ** Copyright (C) 2007 Lorimark Solutions, LLC. All rights reserved.
00004 **
00005 ** This file is part of the DumontEXE Scripting Extension Kit
00006 **
00007 ** This file may be used under the terms of the GNU General Public
00008 ** License version 2.0 as published by the Free Software Foundation
00009 ** and appearing in the file LICENSE.GPL included in the packaging of
00010 ** this file.  Please review the following information to ensure GNU
00011 ** General Public Licensing requirements will be met:
00012 ** http://dumont.showoff-db.org/opensource.html
00013 **
00014 ** If you are unsure which license is appropriate for your use, please
00015 ** review the following information:
00016 ** http://dumont.showoff-db.org/licensing.html 
00017 ** or contact the sales department at sales@lorimarksolutions.com.
00018 **
00019 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00020 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00021 **
00022 ** author: Mark Petryk ~ Lorimark Solutions, LLC
00023 ** **************************************************************************/
00024 
00025 #ifndef CDA_FIELD_DEF_H_422FD07F_0597_4cbb_A034_9AE85166472E
00026 #define CDA_FIELD_DEF_H_422FD07F_0597_4cbb_A034_9AE85166472E
00027 
00028 #include <QStringList>
00029 
00030 #include "cmcObject.h"
00031 
00032 namespace cmcDatabaseApi {
00033 
00034 class cmcApplication;
00035 class cmcCategoryDef;
00036 class cmcFieldDefs;
00037 
00038 /*!
00039 ** \brief Field Definition
00040 **
00041 **
00042 */
00043 class cmcFieldDef:
00044   public cmcObject
00045 {
00046   Q_OBJECT
00047   Q_PROPERTY( long    index            READ index                                    DESIGNABLE true  SCRIPTABLE true  STORED true                          )
00048   Q_PROPERTY( long    typeCode         READ typeCode                                 DESIGNABLE true  SCRIPTABLE true  STORED true                          )
00049   Q_PROPERTY( QString typeName         READ typeName                                 DESIGNABLE true  SCRIPTABLE true  STORED true                          )
00050   Q_PROPERTY( bool    isShared         READ isShared                                 DESIGNABLE true  SCRIPTABLE true  STORED true                          )
00051   Q_PROPERTY( bool    isMandatory      READ isMandatory                              DESIGNABLE true  SCRIPTABLE true  STORED true                          )
00052   Q_PROPERTY( bool    isRecurring      READ isRecurring                              DESIGNABLE true  SCRIPTABLE true  STORED true                          )
00053   Q_PROPERTY( bool    isSelection      READ isSelection                              DESIGNABLE true  SCRIPTABLE true  STORED true                          )
00054   Q_PROPERTY( long    maxChars         READ maxChars                                 DESIGNABLE true  SCRIPTABLE true  STORED true                          )
00055   Q_PROPERTY( QString defaultString    READ defaultString                            DESIGNABLE true  SCRIPTABLE true  STORED true                          )
00056   public:
00057 
00058     /*!
00059     ** \brief Copy Constructor \n
00060     **
00061     */
00062     cmcFieldDef( const cmcFieldDef & copy );
00063 
00064     /*!
00065     ** \brief Standard Constructor \n
00066     **
00067     ** 
00068     **
00069     */
00070     cmcFieldDef( const QString & fieldName, cmcApplication * application, cmcFieldDefs * parent );
00071 
00072     /*!
00073     ** \brief Primary Destructor \n
00074     **
00075     ** This destructor handles cleanup of the object.
00076     **
00077     */
00078     virtual ~cmcFieldDef();
00079 
00080     /*!
00081     ** \brief Field Type Codes \n
00082     **
00083     ** These are the field type codes as provided by the API
00084     **
00085     */
00086     enum cmcFieldTypeCodes
00087     {
00088       /*! 0 ~ regular text field. */
00089       ft_text             = 0,
00090 
00091       /*! 1 ~ numeric field */
00092       ft_number           = 1,
00093 
00094       /*! 2 ~ date field (format MM/DD/YYYY) */
00095       ft_date             = 2,
00096 
00097       /*! 3 ~ telephone field (regular text field) */
00098       ft_telephone        = 3,
00099 
00100       /*! 7 ~ check box */
00101       ft_checkBox         = 7,
00102 
00103       /*! 11 ~ name (key) field */
00104       ft_name             = 11,
00105 
00106       /*! 12 ~ data file reference */
00107       ft_dataFile         = 12,
00108 
00109       /*! 13 ~ bitmap (.bmp) image  */
00110       ft_image            = 13,
00111 
00112       /*! 14 ~ time value (format HH:MM:SS) */
00113       ft_time             = 14,
00114 
00115       /*! 15 ~ excel field reference */
00116       ft_excelCell        = 15,
00117 
00118       /*! 20 ~ calculated field */
00119       ft_calculation      = 20,
00120 
00121       /*! 21 ~ numeric automatic sequence */
00122       ft_sequence         = 21,
00123 
00124       /*! 22 ~ selection (combo box) */
00125       ft_selection        = 22,
00126 
00127       /*! 23 ~ name@website.domain */
00128       ft_eMailAddress     = 23,
00129 
00130       /*! 24 ~ url address */
00131       ft_internetAddress  = 24
00132     };
00133 
00134     cmcFieldDefs * fieldDefs();
00135 
00136     cmcCategoryDef * categoryDef();
00137 
00138     QStringList stringList();
00139 
00140   public slots:
00141 
00142     QString categoryName();
00143 
00144     QString fieldName();
00145 
00146     /*!
00147     ** \brief Field Definition String \n
00148     **
00149     **
00150     */
00151     QString string();
00152 
00153     /*!
00154     ** \brief Field Type \n
00155     **
00156     **
00157     */
00158     long typeCode();
00159 
00160     /*!
00161     ** \brief Field Type Name \n
00162     **
00163     */
00164     QString typeName();
00165 
00166     /*!
00167     ** \brief Get the field IsShared flag \n
00168     **
00169     ** The isShared value is a component of the field definition() as it is
00170     **  accessed through the DDE conversation module.
00171     **
00172     */
00173     bool isShared();
00174 
00175     /*!
00176     ** \brief Get the field IsMandatory flag \n
00177     **
00178     ** The isMandatory value is a component of the field definition() as it is
00179     **  accessed through the DDE conversation module.
00180     **
00181     */
00182     bool isMandatory();
00183 
00184     /*!
00185     ** \brief Get the field IsRecurring flag \n
00186     **
00187     ** The isRecurring value is a component of the field definition() as it is
00188     **  accessed through the DDE conversation module.
00189     **
00190     */
00191     bool isRecurring();
00192 
00193     /*!
00194     ** \brief Get the field IsSelection flag \n
00195     **
00196     ** The isSelection value is a component of the field definition() as it is
00197     **  accessed through the DDE conversation module.
00198     **
00199     */
00200     bool isSelection();
00201 
00202     /*!
00203     ** \brief Get the field MaxCharacters value \n
00204     **
00205     ** The maxChars value is a component of the field definition() as it is
00206     **  accessed through the DDE conversation module.
00207     **
00208     */
00209     long maxChars();
00210 
00211     /*!
00212     ** \brief Get the field DefaultString value \n
00213     **
00214     ** The default value is a component of the field definition() as it is
00215     **  accessed through the DDE conversation module.
00216     **
00217     ** \par vbScript Example:
00218     ** \code
00219     ** msgbox "the default value is: " & dfrm.Field("Address").defaultString
00220     ** \endcode
00221     **
00222     */
00223     QString defaultString();
00224 
00225   signals:
00226 
00227   protected:
00228 
00229   private:
00230 
00231     QStringList m_stringList;
00232 
00233 }; // endclass cmcFieldDef
00234 
00235 } // namespace cmcDatabaseApi
00236 
00237 #endif // #ifndef CDA_FIELD_DEF_H
00238 
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties




~ ~ ~ ~ ~ ~
Source Code without Comments is like a Cranberry Garland
without the berries. Comment your Code!
 
Commence Database User Support Group Forum
http://newsgroup.showoff-db.org/
~ ~ ~ ~ ~ ~
Author: Mark Petryk
Lorimark Solutions, LLC
mark@lorimarksolutions.com