DumontEXE 0.0.1
cmcItemField.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_ITEM_FIELD_H_422FD07F_0597_4cbb_A034_9AE85166472E
00026 #define CDA_ITEM_FIELD_H_422FD07F_0597_4cbb_A034_9AE85166472E
00027 
00028 #include <QDate>
00029 #include <QTime>
00030 #include <QPointer>
00031 
00032 #include "cmcApi.h"
00033 #include "cmcField.h"
00034 #include "cmcItem.h"
00035 #include "cmcRowSet.h"
00036 
00037 namespace cmcDatabaseApi {
00038 
00039 class cmcRowSet;
00040 class cmcFieldDef;
00041 class cmcItem;
00042 
00043 /*!
00044 ** \brief Form Field
00045 **
00046 **
00047 */
00048 class cmcItemField:
00049   public cmcField
00050 {
00051   Q_OBJECT
00052   public:
00053 
00054     cmcItemField( const cmcItemField & copy );
00055 
00056     cmcItemField
00057     (
00058       const QString & fieldName,
00059       cmcApplication * application,
00060       cmcItem * parentItem
00061     );
00062 
00063     virtual ~cmcItemField();
00064 
00065     bool ok();
00066 
00067   public slots:
00068 
00069     /*!
00070     ** \brief 
00071     **
00072     **
00073     */
00074     cmcItem * item();
00075 
00076     cmcRowSet * rowset();
00077 
00078     long row();
00079 
00080     /*!
00081     ** \brief Field Text Label (passthru)
00082     **
00083     ** This returns the 'Label' of the Form field.  This is a passthrough function
00084     **  that transfers control directly to the Commence Form.Field object and
00085     **  therefore returns the same data as the standard Form.Field("Name").Label call.
00086     **
00087     ** \par vbScript example:
00088     ** \code
00089     ** msgbox dfrm.Field("calendarKey").Label
00090     ** \endcode
00091     **
00092     ** \note This value is cached so that repeated lookups do not make repeated
00093     **  calls into the Commence API.
00094     **
00095     */
00096     virtual QString label();
00097 
00098     /*!
00099     ** \brief Get Field Text Value (passthru)
00100     **
00101     ** This returns the 'Value' of the Form field.  This is a passthrough function
00102     **  that transfers control directly to the Commence Form.Field object and
00103     **  therefore returns the same data as the standard Form.Field("Name").Value
00104     **  call.
00105     **
00106     ** \par vbScript example:
00107     ** \code
00108     ** msgbox dfrm.Field("calendarKey").Value
00109     ** \endcode
00110     **
00111     */
00112     virtual QString value();
00113 
00114     /*!
00115     ** \brief Set Field Text Value
00116     **
00117     ** This sets the 'Value' of the Form field.  This is a passthrough function
00118     **  that transfers control directly to the Commence Form.Field object and
00119     **  therefore sets the same data as the standard Form.Field("FieldName").Value = "xyz"
00120     **  call.
00121     **
00122     ** \note This function also tests the new value against the current value, and if
00123     **        there is no change then no updates will be performed on the database.
00124     **        This can help reduce the number of updates the database has to sync
00125     **        around the workgroup in the event no real data is changing on the field.
00126     **        This is particularily useful when scripted-updates are occuring on 
00127     **        various text-type-memo fields that the user doesn't update, but the script
00128     **        updates automatically.  The script can just update the field value 
00129     **        blindly and if there is an actual data field change, then, and only then
00130     **        will that change be written to the commence field, thus reducing the amount
00131     **        of data that has to get synced around the workgroup.
00132     **
00133     ** \par vbScript example:
00134     ** \code
00135     ** dfrm.Field("calendarKey").Value = "new value"
00136     ** \endcode
00137     **
00138     */
00139     virtual void value( QString value );
00140 
00141     virtual void value( bool value );
00142 
00143   signals:
00144 
00145   protected:
00146 
00147   private:
00148 
00149 }; // endclass cmcItemField:
00150 
00151 } // endnamespace cmcDatabaseApi
00152 
00153 #endif // #ifndef CDA_FIELD_H
00154 
 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