DumontEXE 0.0.1
cmcApplicationsModel.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_APPLICATIONS_MODEL_H_422FD07F_0597_4cbb_A034_9AE85166472E
00026 #define CDA_APPLICATIONS_MODEL_H_422FD07F_0597_4cbb_A034_9AE85166472E
00027 
00028 #include <QAbstractItemModel>
00029 #include <QModelIndex>
00030 #include <QPointer>
00031 
00032 #include "cmcApplications.h"
00033 
00034 namespace cmcDatabaseApi {
00035 
00036 /*!
00037 ** \brief Make Reference to a Commence object
00038 **
00039 ** This Commence Object Node is an object that 'points' to 
00040 **  a regular cmcObject object.  This is an important mediary
00041 **  between a Commence object and the model, because this
00042 **  object provides a notification link between the commence
00043 **  objects and the model.  If the commence item "goes away"
00044 **  for instance, this object will be notified, and it can,
00045 **  in turn, notify the model.
00046 **
00047 */
00048 class cmcObjectNode:
00049   public QObject
00050 {
00051   Q_OBJECT
00052   public:
00053 
00054     cmcObjectNode( cmcObject * i_cmcObject, QObject * parent ):
00055       QObject(parent)
00056     {
00057       obj = i_cmcObject;
00058     }
00059 
00060     virtual ~cmcObjectNode() {}
00061 
00062   QPointer<cmcObject> obj;
00063 
00064 
00065   public slots:
00066 
00067 
00068 
00069 };
00070 
00071 
00072 // class cmcApplicationModelItem:
00073 //   public QModelIndex
00074 // {
00075 //   Q_OBJECT
00076 //   public:
00077 //   public slots:
00078 //   signals:
00079 //   protected:
00080 //   private:
00081 // };
00082 
00083 /*!
00084 ** \brief Applications Model
00085 **
00086 **
00087 */
00088 class cmcApplicationsModel:
00089   public QAbstractItemModel
00090 {
00091   Q_OBJECT
00092   public:
00093 
00094     cmcApplicationsModel( const cmcApplicationsModel & copy );
00095 
00096     cmcApplicationsModel(void);
00097 
00098     /*!
00099     ** \brief Primary Destructor
00100     **
00101     ** This destructor handles cleanup of the object.
00102     **
00103     */
00104     virtual ~cmcApplicationsModel();
00105 
00106     QModelIndex index( int row, int col, const QModelIndex & parent = QModelIndex() ) const;
00107 
00108     QModelIndex parent( const QModelIndex & child ) const;
00109 
00110     int rowCount( const QModelIndex & parent = QModelIndex() ) const;
00111 
00112     int columnCount( const QModelIndex & parent = QModelIndex() ) const;
00113 
00114     QVariant data( const QModelIndex & index, int role = Qt::DisplayRole ) const;
00115 
00116     QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const;
00117 
00118     Qt::ItemFlags flags( const QModelIndex & index) const;
00119 
00120     bool setData( const QModelIndex & index, const QVariant & value, int role );
00121 
00122 
00123   public slots:
00124 
00125     void applicationsChanged(void);
00126 
00127   signals:
00128 
00129   protected:
00130 
00131     QObject * objectPointerFromIndex( const QModelIndex & index ) const;
00132 
00133   private:
00134 
00135 }; // endclass cmcApplicationsModel
00136 
00137 } // namespace cmcDatabaseApi
00138 
00139 #endif // #ifndef CDA_APPLICATIONS_MODEL_H
 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