subform.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2005 by Tomeu Borras Riera                              *
00003  *   tborras@conetxia.com                                                  *
00004  *   http://www.iglues.org                                                 *
00005  *                                                                         *
00006  *   This program is free software; you can redistribute it and/or modify  *
00007  *   it under the terms of the GNU General Public License as published by  *
00008  *   the Free Software Foundation; either version 2 of the License, or     *
00009  *   (at your option) any later version.                                   *
00010  *                                                                         *
00011  *   This program is distributed in the hope that it will be useful,       *
00012  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00013  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00014  *   GNU General Public License for more details.                          *
00015  *                                                                         *
00016  *   You should have received a copy of the GNU General Public License     *
00017  *   along with this program; if not, write to the                         *
00018  *   Free Software Foundation, Inc.,                                       *
00019  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00020  ***************************************************************************/
00021 
00022 #ifndef SUBFORM_H
00023 #define SUBFORM_H
00024 
00025 #include <Qt>
00026 
00027 #include "postgresiface2.h"
00028 #include "funcaux.h"
00029 #include "qtable2.h"
00030 #include "dbrecord.h"
00031 
00032 
00033 class SHeader {
00034 public:
00035     enum dboptions {DBNone = 0, DBReadOnly = 1, DBNoView = 2, DBNoWrite = 4, DBBlockView = 8};
00036 
00037 protected:
00038     QString m_nomcampo;
00039     QString m_valorcampo;
00040     QString m_nompresentacion;
00041     unsigned int m_restricciones;
00042     DBCampo::dbtype m_tipo;
00043     unsigned int m_options;
00044 
00045 public:
00046     SHeader(QString nom, DBCampo::dbtype typ, int res, int opt, QString nomp = "");
00047     ~SHeader();
00048     int set(QString val);
00049     unsigned int options();
00050     unsigned int restricciones();
00051     DBCampo::dbtype tipo();
00052     QString nompresentacion();
00053     int restrictcampo();
00054     QString nomcampo();
00055 };
00056 
00057 
00058 class SDBRecord: public DBRecord {
00059 public:
00060     SDBRecord(postgresiface2 *con);
00061     ~SDBRecord();
00062     int addDBCampo(QString nom, DBCampo::dbtype typ, int res, QString nomp = "");
00063     void refresh();
00064     virtual int DBsave(QString &);
00065 };
00066 
00067 
00068 class SDBCampo: public QTableWidgetItem2, public DBCampo {
00069 private:
00070     SDBRecord *m_pare;
00071 
00072 public:
00073     SDBRecord *pare();
00074     SDBCampo(SDBRecord *par, postgresiface2 *com, QString nom, dbtype typ, int res, QString nomp = "");
00075     virtual ~SDBCampo();
00076     int addDBCampo(QString nom, DBCampo::dbtype typ, int res, QString nomp = "");
00077     virtual int set(QString val);
00078     void refresh();
00079     virtual bool operator< (const QTableWidgetItem &other);
00080 };
00081 
00082 #endif
00083 

Generated on Sat Dec 15 00:01:23 2007 for BulmaGes by  doxygen 1.5.1