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 
39 class aDatabase;
40 
41 class aDocJournal;
42 
43 class aDocument;
44 
45 
46 
61 class ANANAS_EXPORT aIRegister :public aObject
62 {
63  Q_OBJECT
64 public:
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 );
72 public 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();
87 protected:
88  bool docseted, tableseted;
89  QString tname;
90  aDocument * nowDoc;
91 };
92 
93 #endif// AIREGISTER_H
Определяет программный интерфейс для работы с бизнес объектами типа Документ и их атрибутами...
Definition: adocument.h:62
virtual bool Last(const QString &tableName="")
Перемещает указатель на последнюю запись SQL таблицы.
Definition: aobject.cpp:1078
virtual ERR_Code initObject()
Инициализирует объект при его создании.
Definition: aobject.cpp:253
virtual bool Prev(const QString &tableName="")
Перемещает указатель на предыдующую запись SQL таблицы.
Definition: aobject.cpp:1052
virtual bool First(const QString &tableName="")
Перемещает указатель на первую запись SQL таблицы.
Definition: aobject.cpp:1065
virtual int New()
Add new object record in database.
Definition: aobject.cpp:625
Определяет программный интерфейс управления общим (системным) журналом документов. Наследует aObject.
Definition: adocjournal.h:58
Класс для работы с СУБД. Ananas Data Abstraction Layer. Наследует QObject.
Definition: adatabase.h:77
virtual QVariant Value(const QString &name, const QString &tableName="")
Return field value of the primary object database table.
Definition: aobject.cpp:475
Базовый класс для невизуальных классов (моделей в терминологии MVC) Ананаса, которым необходим доступ...
Definition: aobject.h:63
virtual int SetFilter(const QString &valname, const QVariant &value)
Задает фильтр записей/объектов
Definition: aobject.cpp:1178
virtual bool Next(const QString &tableName="")
Перемещает указатель на следующую запись SQL таблицы.
Definition: aobject.cpp:1040
Класс aIRegister определяет программный интерфейс Информационных регистров.
Definition: airegister.h:61