You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
145 lines
3.8 KiB
145 lines
3.8 KiB
13 years ago
|
// This is the SIP interface definition for TQDataBrowser.
|
||
13 years ago
|
//
|
||
|
// Copyright (c) 2007
|
||
|
// Riverbank Computing Limited <info@riverbankcomputing.co.uk>
|
||
|
//
|
||
13 years ago
|
// This file is part of PyTQt.
|
||
13 years ago
|
//
|
||
13 years ago
|
// This copy of PyTQt is free software; you can redistribute it and/or modify it
|
||
13 years ago
|
// under the terms of the GNU General Public License as published by the Free
|
||
|
// Software Foundation; either version 2, or (at your option) any later
|
||
|
// version.
|
||
|
//
|
||
13 years ago
|
// PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY
|
||
13 years ago
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||
|
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||
|
// details.
|
||
|
//
|
||
|
// You should have received a copy of the GNU General Public License along with
|
||
13 years ago
|
// PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
|
||
13 years ago
|
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||
|
|
||
|
|
||
|
%ExportedDoc
|
||
13 years ago
|
<Sect2><Title>TQDataBrowser (TQt v3+)</Title>
|
||
13 years ago
|
<FuncSynopsis>
|
||
|
<FuncDef>virtual void <Function>del</Function></FuncDef>
|
||
|
<ParamDef></ParamDef>
|
||
|
</FuncSynopsis>
|
||
|
<Para>
|
||
|
This has been renamed <Literal>delOnCursor</Literal> in Python.
|
||
|
</Para>
|
||
|
</Sect2>
|
||
|
%End
|
||
|
|
||
|
|
||
13 years ago
|
class TQDataBrowser : TQWidget
|
||
13 years ago
|
{
|
||
|
%TypeHeaderCode
|
||
13 years ago
|
#include <tqdatabrowser.h>
|
||
13 years ago
|
%End
|
||
|
|
||
|
public:
|
||
13 years ago
|
TQDataBrowser(TQWidget * /TransferThis/ = 0,const char * = 0,WFlags = 0);
|
||
13 years ago
|
|
||
|
enum Boundary {
|
||
|
Unknown,
|
||
|
None,
|
||
|
BeforeBeginning,
|
||
|
Beginning,
|
||
|
End,
|
||
|
AfterEnd
|
||
|
};
|
||
|
|
||
|
Boundary boundary();
|
||
|
void setBoundaryChecking(bool);
|
||
|
bool boundaryChecking() const;
|
||
|
|
||
13 years ago
|
void setSort(const TQSqlIndex &);
|
||
|
void setSort(const TQStringList &);
|
||
|
TQStringList sort() const;
|
||
|
void setFilter(const TQString &);
|
||
|
TQString filter() const;
|
||
13 years ago
|
|
||
13 years ago
|
virtual void setSqlCursor(TQSqlCursor * /GetWrapper/,bool = 0);
|
||
13 years ago
|
%MethodCode
|
||
|
Py_BEGIN_ALLOW_THREADS
|
||
13 years ago
|
sipSelfWasArg ? sipCpp->TQDataBrowser::setSqlCursor(a0, a1) : sipCpp->setSqlCursor(a0, a1);
|
||
13 years ago
|
Py_END_ALLOW_THREADS
|
||
|
|
||
|
// Transfer ownership of the cursor if the autoDelete flag is
|
||
|
// set.
|
||
|
if (a0 && a1)
|
||
|
sipTransferTo(a0Wrapper,sipSelf);
|
||
|
%End
|
||
|
|
||
13 years ago
|
TQSqlCursor* sqlCursor() const;
|
||
|
virtual void setForm(TQSqlForm *);
|
||
|
TQSqlForm* form();
|
||
13 years ago
|
|
||
|
virtual void setConfirmEdits(bool);
|
||
|
virtual void setConfirmInsert(bool);
|
||
|
virtual void setConfirmUpdate(bool);
|
||
|
virtual void setConfirmDelete(bool);
|
||
|
virtual void setConfirmCancels(bool);
|
||
|
bool confirmEdits() const;
|
||
|
bool confirmInsert() const;
|
||
|
bool confirmUpdate() const;
|
||
|
bool confirmDelete() const;
|
||
|
bool confirmCancels() const;
|
||
|
|
||
|
virtual void setReadOnly(bool);
|
||
|
bool isReadOnly() const;
|
||
|
virtual void setAutoEdit(bool);
|
||
|
bool autoEdit() const;
|
||
|
|
||
|
virtual bool seek(int,bool = 0) /ReleaseGIL/;
|
||
|
|
||
|
signals:
|
||
|
void firstRecordAvailable(bool);
|
||
|
void lastRecordAvailable(bool);
|
||
|
void nextRecordAvailable(bool);
|
||
|
void prevRecordAvailable(bool);
|
||
|
|
||
13 years ago
|
void currentChanged(const TQSqlRecord *);
|
||
|
void primeInsert(TQSqlRecord *);
|
||
|
void primeUpdate(TQSqlRecord *);
|
||
|
void primeDelete(TQSqlRecord *);
|
||
|
void beforeInsert(TQSqlRecord *);
|
||
|
void beforeUpdate(TQSqlRecord *);
|
||
|
void beforeDelete(TQSqlRecord *);
|
||
|
void cursorChanged(TQSqlCursor::Mode);
|
||
13 years ago
|
|
||
|
public slots:
|
||
|
virtual void refresh();
|
||
|
|
||
|
virtual void insert() /ReleaseGIL/;
|
||
|
virtual void update() /ReleaseGIL/;
|
||
|
virtual void del() /PyName=delOnCursor, ReleaseGIL/;
|
||
|
|
||
|
virtual void first() /ReleaseGIL/;
|
||
|
virtual void last() /ReleaseGIL/;
|
||
|
virtual void next() /ReleaseGIL/;
|
||
|
virtual void prev() /ReleaseGIL/;
|
||
|
|
||
|
virtual void readFields();
|
||
|
virtual void writeFields();
|
||
|
virtual void clearValues();
|
||
|
|
||
|
void updateBoundary();
|
||
|
|
||
|
protected:
|
||
|
virtual bool insertCurrent() /ReleaseGIL/;
|
||
|
virtual bool updateCurrent() /ReleaseGIL/;
|
||
|
virtual bool deleteCurrent() /ReleaseGIL/;
|
||
|
virtual bool currentEdited();
|
||
|
|
||
13 years ago
|
virtual TQSql::Confirm confirmEdit(TQSql::Op) /ReleaseGIL/;
|
||
|
virtual TQSql::Confirm confirmCancel(TQSql::Op) /ReleaseGIL/;
|
||
13 years ago
|
|
||
13 years ago
|
virtual void handleError(const TQSqlError &) /ReleaseGIL/;
|
||
13 years ago
|
|
||
|
private:
|
||
13 years ago
|
TQDataBrowser(const TQDataBrowser &);
|
||
13 years ago
|
};
|