DumontEXE 0.0.1
DumontObject.h
00001 #ifndef DUMONTOBJECT_H
00002 #define DUMONTOBJECT_H
00003 
00004 #include <QObject>
00005 
00006 /*!
00007 ** \brief Base Dumont object
00008 **
00009 ** The DumontObject is the base object for everything in the DumontEXE application. 
00010 **  It is virtually identical to the QObject base class with the exception that a
00011 **  few of the properties are published in the 'slots:' section, allowing access
00012 **  to its functionality from vbScript through the COM interface.
00013 **
00014 */
00015 class DumontObject:
00016   public QObject
00017 {
00018   Q_OBJECT
00019   public:
00020 
00021     /*!
00022     ** \brief Copy Constructor
00023     **
00024     */
00025     DumontObject( const DumontObject & copy );
00026 
00027     /*!
00028     ** \brief Default Constructor
00029     **
00030     **
00031     */
00032     DumontObject( QObject * parent = NULL );
00033 
00034     /*!
00035     ** \brief Default Destructor
00036     **
00037     **
00038     */
00039     virtual ~DumontObject();
00040 
00041   public slots:
00042 
00043     /*!
00044     ** \brief Return the name of the object
00045     **
00046     ** This name operator is not the same as the QObject name operator.  This name 
00047     **  represents a name that is assigned to this object for various identification
00048     **  purposes. For instance, in the case of the cmcApplication object, this
00049     **  name value is set to the value of cmcApplication::databaseName().  Then
00050     **  for the DumontROT function, this name value is used in the searching for 
00051     **  cmcApplication object handles.
00052     **
00053     */
00054     virtual QString name() const;
00055 
00056     /*!
00057     ** \brief Set the name of the object
00058     **
00059     ** Set the name of the object in a local string, different from the QObject name 
00060     **  value.  This name is used for general identification of this object.  It is set
00061     **  to the Application.DatabaseName or Form.FieldName as appropriate.
00062     **
00063     */
00064     virtual void setName( const QString & name );
00065 
00066     virtual long instanceCount() const;
00067 
00068   public slots:
00069 
00070   signals:
00071 
00072   protected:
00073 
00074   private:
00075 
00076     /*!
00077     ** \brief 
00078     **
00079     **
00080     */
00081     QString m_name;
00082 
00083     static long s_instanceCount;
00084 
00085 }; // endclass DumontObject
00086 
00087 /*!
00088 ** \brief Dumont Object Collection
00089 **
00090 ** This object is used to contain a collection of other Dumont objects.  It is used for
00091 **  things such as the DumontROT, or for containing fields on a form or cursor.
00092 **
00093 */
00094 class DumontObjects:
00095   public DumontObject
00096 {
00097   Q_OBJECT
00098   public:
00099 
00100     /*!
00101     ** \brief Copy Constructor
00102     **
00103     **
00104     */
00105     DumontObjects( const DumontObjects & copy );
00106 
00107     /*!
00108     ** \brief Basic Constructor
00109     **
00110     */
00111     DumontObjects( QObject * parent = NULL );
00112 
00113     /*
00114     ** \brief Default Destructor
00115     **
00116     */
00117     virtual ~DumontObjects();
00118 
00119   public slots:
00120 
00121     /*!
00122     ** \brief Number of items in the collection
00123     **
00124     **
00125     */
00126     long count(void);
00127 
00128     /*!
00129     ** \brief Add an item to the collection
00130     **
00131     **
00132     */
00133     long add( DumontObject * object );
00134 
00135     /*!
00136     ** \brief Remove an item from the collection
00137     **
00138     */
00139     long remove( DumontObject * object );
00140 
00141     /*!
00142     ** \brief Get an item by index number
00143     **
00144     */
00145     DumontObject * get( const long index );
00146 
00147     /*!
00148     ** \brief Get an item by item name
00149     **
00150     */
00151     DumontObject * get( const QString & name );
00152 
00153     /*!
00154     ** \brief Signal when an object is destroyed.
00155     **
00156     ** This slot is for internal use only.
00157     **
00158     */
00159     void on_objectDestroyed( QObject * object );
00160 
00161   signals:
00162 
00163   protected:
00164 
00165   private:
00166 
00167     /*!
00168     ** \brief the object collection
00169     **
00170     */
00171     QList<DumontObject*> m_objects;
00172 
00173     
00174 
00175 }; // endclass DumontObjects:
00176 
00177 
00178 #endif // #ifndef DUMONTOBJECT_H
00179 
 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