Ananas Library 0.9.5
airegister.h
1/****************************************************************************
2** $Id: airegister.h,v 1.29 2007/02/08 07:04:40 app Exp $
3**
4** Header file of the Information Register of Ananas
5** Engine applications
6**
7** Created : 20031201
8**
9** Copyright (C) 2003-2004 Leader InfoTech. All rights reserved.
10**
11** This file is part of the Library of the Ananas
12** automation accounting system.
13**
14** This file may be distributed and/or modified under the terms of the
15** GNU General Public License version 2 as published by the Free Software
16** Foundation and appearing in the file LICENSE.GPL included in the
17** packaging of this file.
18**
19** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
20** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
21**
22** See http://www.leaderit.ru/page=ananas or email sales@leaderit.ru
23** See http://www.leaderit.ru/gpl/ for GPL licensing information.
24**
25** Contact org@leaderit.ru if any conditions of this licensing are
26** not clear to you.
27**
28**********************************************************************/
29
30#ifndef AIREGISTER_H
31#define AIREGISTER_H
32#include <qvaluelist.h>
33#include <qstringlist.h>
34#include <qvariant.h>
35#include <qdatetime.h>
36#include "acfg.h"
37#include "aobject.h"
38
39class aDatabase;
40
41class aDocJournal;
42
43class aDocument;
44
45
46
61class ANANAS_EXPORT aIRegister :public aObject
62{
63 Q_OBJECT
64public:
65 aIRegister(aCfgItem registerItem, aDatabase * adb = 0);
66 aIRegister( const QString & name, aDatabase * adb = 0, const QString & type = "InfoRegister.");
67 virtual ~aIRegister();
68// ERR_Code initObject(aDatabase * adb);
69 virtual ERR_Code initObject();
70 virtual bool deleteDocument( aDocument * doc );
71 virtual bool deleteTable( Q_ULLONG iddt );
72public slots:
73 virtual int SetDocument( aDocument * doc );
74 virtual aDocument * GetDocument();
75 virtual int SetTable( const QString & tblname );
76 virtual int New();
77 virtual int Select( const QString &from, const QString & to);
78 virtual int Select( QDateTime from, QDateTime to );
79 virtual int SelectByDoc();
80 virtual QVariant Value( const QString & name, const QString &tableName = "" );
81
82 virtual int SetFilter( const QString & fieldName, const QVariant & value );
83 virtual bool Next();
84 virtual bool Prev();
85 virtual bool First();
86 virtual bool Last();
87protected:
88 bool docseted, tableseted;
89 QString tname;
90 aDocument * nowDoc;
91};
92
93#endif// AIREGISTER_H
Definition adatabase.h:78
Definition adocjournal.h:59
Definition adocument.h:63
Definition airegister.h:62
Definition aobject.h:64
virtual bool First(const QString &tableName="")
Перемещает указатель на первую запись SQL таблицы.
Definition aobject.cpp:1065
virtual int New()
Add new object record in database.
Definition aobject.cpp:625
virtual int SetFilter(const QString &valname, const QVariant &value)
Задает фильтр записей/объектов
Definition aobject.cpp:1178
virtual bool Next(const QString &tableName="")
Перемещает указатель на следующую запись SQL таблицы.
Definition aobject.cpp:1040
virtual ERR_Code initObject()
Init object after create.
Definition aobject.cpp:253
virtual bool Prev(const QString &tableName="")
Перемещает указатель на предыдующую запись SQL таблицы.
Definition aobject.cpp:1052
virtual QVariant Value(const QString &name, const QString &tableName="")
Return field value of the primary object database table.
Definition aobject.cpp:475
virtual bool Last(const QString &tableName="")
Перемещает указатель на последнюю запись SQL таблицы.
Definition aobject.cpp:1078