Ananas Library 0.9.5
wcatalogue.h
1/****************************************************************************
2** $Id: wcatalogue.h,v 1.16 2007/04/27 12:28:55 gr Exp $
3**
4** Header file of the catlogue plugin of Ananas
5** Designer and 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 Ananas Plugins 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 WCATALOGUE_H
31#define WCATALOGUE_H
32#include <qwidgetplugin.h>
33//#include "ananas.h"
34#include "awidget.h"
35
36class QWidget;
37
38#define CATALOGUEFORMMODE_LIST 0 // Elements list
39#define CATALOGUEFORMMODE_ELEMENT 1 // Element form
40#define CATALOGUEFORMMODE_GROUP 2 // Group form
41
42
43class QT_WIDGET_PLUGIN_EXPORT wCatalogue : public aWidget
44{
45 Q_OBJECT
46public:
47 wCatalogue( QWidget *parent = 0, WFlags fl = 0 );
48 virtual ~wCatalogue();
49 bool checkStructure();
50 virtual void initObject( aDatabase *adb );
51 virtual QDialog* createEditor( QWidget *parent );
52 virtual QString displayString();
53 virtual bool isContainer() { return true; };
54 virtual aObject* createDBObject( aCfgItem obj, aDatabase *adb );
55 virtual QToolBar* createToolBar( QMainWindow *parent );
56 void setFormMode( int Mode );
57public slots:
58 virtual ERR_Code Select( Q_ULLONG id );
59 virtual ERR_Code SelectGroup( Q_ULLONG id );
60 void valueChanged( const QVariant & value );
61 //QVariant value( const QString &name );
62 //void setValue( const QString &name, QVariant &value );
63 int select( Q_ULLONG id );
64 Q_ULLONG insert();
65 int update();
66 int markDelete();
67 void selectionChanged(const Q_ULLONG);
68
69private:
70
71 void NewValues();
72signals:
73 void newSelectionFilter(const QString &);
74 void newSelectionGroupId( const Q_ULLONG );
75
76};
77
78
79#endif // WCATALOGUE_H
Класс для работы с СУБД. Ananas Data Abstraction Layer. Наследует QObject.
Определения adatabase.h:78
Базовый класс для невизуальных классов (моделей в терминологии MVC) Ананаса, которым необходим доступ...
Определения aobject.h:64
virtual ERR_Code Select(Q_ULLONG id)
Определения awidget.cpp:665
virtual QDialog * createEditor(QWidget *parent)
Определения awidget.cpp:347
virtual bool checkStructure()
Определения awidget.cpp:302
virtual aObject * createDBObject(aCfgItem obj, aDatabase *)
Определения awidget.cpp:135
aWidget(QWidget *parent=0, const char *name=0, WFlags fl=0)
Определения awidget.cpp:58
virtual QVariant value(const QString &name)
Определения awidget.cpp:779
virtual QToolBar * createToolBar(QMainWindow *parent)
Определения awidget.cpp:152
virtual void initObject(aDatabase *adb)
Определения awidget.cpp:187
void valueChanged(const QVariant &value)
Определения wcatalogue.cpp:127
wCatalogue(QWidget *parent=0, WFlags fl=0)
Определения wcatalogue.cpp:52