DumontEXE 0.0.1
cmcCda.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_CDA_H_422FD07F_0597_4cbb_A034_9AE85166472E
00026 #define CDA_CDA_H_422FD07F_0597_4cbb_A034_9AE85166472E
00027 
00028 class QSettings;
00029 
00030 #include <QAbstractItemModel>
00031 #include <QModelIndex>
00032 
00033 #include "cmcObject.h"
00034 #include "cmcCdaItem.h"
00035 
00036 namespace cmcDatabaseApi {
00037 
00038 /*!
00039 ** \brief Commence Database API
00040 **
00041 **
00042 */
00043 class cmcCda:
00044   public cmcObject
00045 //  public QAbstractItemModel
00046 {
00047   Q_OBJECT
00048   public:
00049 
00050     cmcCda( const cmcCda & copy );
00051 
00052     cmcCda( QObject * parent = NULL );
00053 
00054     cmcCda( cmcApplication * app );
00055 
00056     virtual ~cmcCda();
00057 
00058     void init();
00059 
00060     cmcApplication * app();
00061 
00062   public slots:
00063 
00064     /*!
00065     ** \brief CommenceDatabaseApi version reference
00066     **
00067     ** This returns the specific version number associated with this instance of the Commence
00068     **  Database API module.  The return value is a string and takes the form of
00069     **  major.minor.revision.build.
00070     **
00071     */
00072     virtual QString version();
00073 
00074     /*!
00075     ** \brief CDA basename
00076     **
00077     ** This returns the base name of the CDA subsystem.  This usually defaults to
00078     **  "~cda"
00079     **
00080     */
00081     virtual QString objName();
00082 
00083     virtual QString dirName();
00084 
00085     virtual QString datName();
00086 
00087     virtual QString catName();
00088 
00089     virtual QString frmName();
00090 
00091     virtual QString iniName();
00092 
00093     virtual QString datFile();
00094 
00095     /*!
00096     ** \brief Cmc Database Api Ready
00097     **
00098     ** This function indicates true/false if the application is CommenceDatabaseApi ready.
00099     **  What this means, is; is there a category within this application called "~cda" which
00100     **  is designated as the cateogory for all Database Api activity, and does that
00101     **  category also contain a form called "~cda".  If these conditions are true then the
00102     **  API will use this category to manage the persistence of all API extended-objects.
00103     **
00104     ** \image html Application.cdaReady.png
00105     **
00106     ** The detail form "~cda" is a special form that is used to contain the Application Definition
00107     **  xml content.  A detail form is used to carry this file because a Item memo field
00108     **  can contain only 32000 bytes of text.  Often the Application Definition xml file size 
00109     **  is much larger than 32K and cannot be stored in a memo field.  Therefore, the contents 
00110     **  of this definition file are "checked-in" to this special detail form, and then the
00111     **  form is automatically synced around the workgroup, causing all clients to receive
00112     **  the latest extended database definitions.
00113     **
00114     */
00115     virtual bool ready();
00116 
00117     QSettings * settings();
00118 
00119     virtual cmcCdaItem * rootItem();
00120 
00121 
00122     /*
00123     ** model interfaces
00124     **
00125     **
00126     */
00127 
00128 //    virtual QModelIndex cmcCda::index( int row, int column, const QModelIndex & parent = QModelIndex() ) const;
00129 //    virtual QModelIndex parent( const QModelIndex & ) const;
00130 //    virtual int rowCount( const QModelIndex & ) const;
00131 //    virtual int columnCount( const QModelIndex & ) const;
00132 //    virtual QVariant data( const QModelIndex &, int ) const;
00133 
00134 
00135   signals:
00136 
00137   protected:
00138 
00139   private:
00140 
00141     /*!
00142     ** \brief Cache if the CDA is ready
00143     **
00144     */
00145     bool m_cdaReadyChecked;
00146     bool m_cdaReady;
00147 
00148     /*!
00149     ** \brief Reference to .ini object
00150     **
00151     */
00152     QPointer<QSettings> m_ini;
00153 
00154     QPointer<cmcCdaItem> m_rootItem;
00155 
00156 }; // endclass cmcField:
00157 
00158 } // endnamespace cmcDatabaseApi
00159 
00160 #endif // #ifndef CDA_FIELD_H
00161 
 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