Ananas Library 0.9.5
wdbfield.h
1/****************************************************************************
2** $Id: wdbfield.h,v 1.36 2006/08/23 07:19:30 app Exp $
3**
4** Header file of the field plugin of Ananas
5** Designer and Engine applications
6**
7** Created : 20031201
8**
9** Copyright (C) 2003-2004 Leader InfoTech. All rights reserved.
10** Copyright (C) 2003-2004 Grigory Panov, Yoshkar-Ola.
11**
12** This file is part of the Ananas Plugins of the Ananas
13** automation accounting system.
14**
15** This file may be distributed and/or modified under the terms of the
16** GNU General Public License version 2 as published by the Free Software
17** Foundation and appearing in the file LICENSE.GPL included in the
18** packaging of this file.
19**
20** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
21** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
22**
23** See http://www.leaderit.ru/page=ananas or email sales@leaderit.ru
24** See http://www.leaderit.ru/gpl/ for GPL licensing information.
25**
26** Contact org@leaderit.ru if any conditions of this licensing are
27** not clear to you.
28**
29**********************************************************************/
30
31#ifndef QADBFIELD_H
32#define QADBFIELD_H
33
34#include <qwidget.h>
35#include <qwidgetplugin.h>
36#include <qlabel.h>
37#include <qobjectlist.h>
38#include <qlayout.h>
39#include <qsocket.h>
40#include <qeventloop.h>
41#include "adatabase.h"
42#include "acfg.h"
43#include "wfield.h"
44//#include "addfdialog.h"
45
61class QT_WIDGET_PLUGIN_EXPORT wDBField : public wField
62{
63 Q_OBJECT
64
65 Q_PROPERTY( bool openEditor READ getOpenEditor WRITE setOpenEditor STORED false)
66 Q_PROPERTY( QString FieldName READ getFieldName WRITE setFieldName )
67
68friend class addfdialog;
69
70
71public:
72
73 wDBField( QWidget *parent, WFlags fl );
74 wDBField( QWidget *parent, const char *name, WFlags fl );
75 ~wDBField();
76
77 virtual QDialog* createEditor( QWidget *parent );
78 virtual void initObject( aDatabase *adb );
79 void openEditor();
80 bool getOpenEditor() const { return false; };
81 virtual QString getFieldName() const { return FieldName; };
82 void setOpenEditor(bool b) { if(b) openEditor(); };
83 void setFieldName(QString n);
84protected:
85 QStringList getFields();
86 void init();
87 QValueList<Q_ULLONG> getBindList();
88 void setEditorType(void);
89
90 QString FieldName;
91 QStringList defDisplayFields,defFields,defId;
92
93private:
94 aCfgItem head;
95};
96#endif
Класс для работы с СУБД. Ananas Data Abstraction Layer. Наследует QObject.
Определения adatabase.h:78
void init(aDatabase *adb)
Определения awidget.cpp:165
void setOpenEditor(bool)
Определения awidget.cpp:368
virtual void initObject(aDatabase *adb)
Определения awidget.cpp:187
bool openEditor
Определения wdbfield.h:65
void setFieldName(QString n)
Определения wdbfield.cpp:133
wDBField(QWidget *parent, WFlags fl)
Определения wdbfield.cpp:47
void setEditorType(tEditorType n)
Определения wfield.cpp:324
virtual QDialog * createEditor(QWidget *parent)
Определения wfield.cpp:345
wField(QWidget *parent, const char *name, WFlags fl=0)
Определения wfield.cpp:60