summaryrefslogtreecommitdiff
path: root/qmake/include/private/qsqlmanager_p.h
Unidiff
Diffstat (limited to 'qmake/include/private/qsqlmanager_p.h') (more/less context) (ignore whitespace changes)
-rw-r--r--qmake/include/private/qsqlmanager_p.h159
1 files changed, 159 insertions, 0 deletions
diff --git a/qmake/include/private/qsqlmanager_p.h b/qmake/include/private/qsqlmanager_p.h
new file mode 100644
index 0000000..e5f45b8
--- a/dev/null
+++ b/qmake/include/private/qsqlmanager_p.h
@@ -0,0 +1,159 @@
1/****************************************************************************
2**
3** Definition of QSqlManager class
4**
5** Created : 2000-11-03
6**
7** Copyright (C) 2000 Trolltech AS. All rights reserved.
8**
9** This file is part of the sql module of the Qt GUI Toolkit.
10**
11** This file may be distributed under the terms of the Q Public License
12** as defined by Trolltech AS of Norway and appearing in the file
13** LICENSE.QPL included in the packaging of this file.
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** Licensees holding valid Qt Enterprise Edition licenses may use this
21** file in accordance with the Qt Commercial License Agreement provided
22** with the Software.
23**
24** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
25** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
26**
27** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
28** information about Qt Commercial License Agreements.
29** See http://www.trolltech.com/qpl/ for QPL licensing information.
30** See http://www.trolltech.com/gpl/ for GPL licensing information.
31**
32** Contact info@trolltech.com if any conditions of this licensing are
33** not clear to you.
34**
35**********************************************************************/
36
37#ifndef QSQLMANAGER_P_H
38#define QSQLMANAGER_P_H
39
40//
41// W A R N I N G
42// -------------
43//
44// This file is not part of the Qt API. It exists for the convenience
45// of other Qt classes. This header file may change from version to
46// version without notice, or even be removed.
47//
48// We mean it.
49//
50//
51
52#ifndef QT_H
53#include "qglobal.h"
54#include "qstring.h"
55#include "qstringlist.h"
56#include "qsql.h"
57#include "qsqlerror.h"
58#include "qsqlindex.h"
59#include "qsqlcursor.h"
60#endif // QT_H
61
62#if !defined( QT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
63#define QM_EXPORT_SQL
64#else
65#define QM_EXPORT_SQL Q_EXPORT
66#endif
67
68#ifndef QT_NO_SQL
69
70class QSqlCursor;
71class QSqlForm;
72class QSqlCursorManagerPrivate;
73
74class QM_EXPORT_SQL QSqlCursorManager
75{
76public:
77 QSqlCursorManager();
78 virtual ~QSqlCursorManager();
79
80 virtual void setSort( const QSqlIndex& sort );
81 virtual void setSort( const QStringList& sort );
82 QStringList sort() const;
83 virtual void setFilter( const QString& filter );
84 QString filter() const;
85 virtual void setCursor( QSqlCursor* cursor, bool autoDelete = FALSE );
86 QSqlCursor* cursor() const;
87
88 virtual void setAutoDelete( bool enable );
89 bool autoDelete() const;
90
91 virtual bool refresh();
92 virtual bool findBuffer( const QSqlIndex& idx, int atHint = 0 );
93
94private:
95 QSqlCursorManagerPrivate* d;
96};
97
98#ifndef QT_NO_SQL_FORM
99
100class QSqlFormManagerPrivate;
101
102class QM_EXPORT_SQL QSqlFormManager
103{
104public:
105 QSqlFormManager();
106 virtual ~QSqlFormManager();
107
108 virtual void setForm( QSqlForm* form );
109 QSqlForm* form();
110 virtual void setRecord( QSqlRecord* record );
111 QSqlRecord* record();
112
113 virtual void clearValues();
114 virtual void readFields();
115 virtual void writeFields();
116
117private:
118 QSqlFormManagerPrivate* d;
119};
120
121#endif
122
123class QWidget;
124class QDataManagerPrivate;
125
126class QM_EXPORT_SQL QDataManager
127{
128public:
129 QDataManager();
130 virtual ~QDataManager();
131
132 virtual void setMode( QSql::Op m );
133 QSql::Op mode() const;
134 virtual void setAutoEdit( bool autoEdit );
135 bool autoEdit() const;
136
137 virtual void handleError( QWidget* parent, const QSqlError& error );
138 virtual QSql::Confirm confirmEdit( QWidget* parent, QSql::Op m );
139 virtual QSql::Confirm confirmCancel( QWidget* parent, QSql::Op m );
140
141 virtual void setConfirmEdits( bool confirm );
142 virtual void setConfirmInsert( bool confirm );
143 virtual void setConfirmUpdate( bool confirm );
144 virtual void setConfirmDelete( bool confirm );
145 virtual void setConfirmCancels( bool confirm );
146
147 bool confirmEdits() const;
148 bool confirmInsert() const;
149 bool confirmUpdate() const;
150 bool confirmDelete() const;
151 bool confirmCancels() const;
152
153private:
154 QDataManagerPrivate* d;
155};
156
157
158#endif
159#endif