Source: /app/hbasic/hbasic/packages/hbasic_dbaccess/hbasic_dbaccess.h
|
|
|
|
#ifndef DBACCESS_H
#define DBACCESS_H
#include
#include
#include
#include
class QString;
class QSqlForm;
class QSqlCursor;
class QDataBrowser;
class QPushButton;
#include "../../src/hbdatabase.h"
class ConnectWidget;
#define TABLE_MOD_NOBUFFER 0
#define TABLE_MOD_UPDATE 1
#define TABLE_MOD_INSERT 2
/* ------------------------------------------------------------------ */
class DBConnection : public QObject
{
Q_OBJECT
public:
DBConnection( void );
HBDatabase *db_control;
private:
QWidget *wgt_ptr;
public slots:
void setdriver( QString *driver_name );
void setDBHost( QString *hostname );
void connect( QString *dbname, QString *user, QString *password );
};
/* ------------------------------------------------------------------ */
class DBCursor : public QObject
{
Q_OBJECT
public:
DBCursor( void );
private:
QWidget *wgt_ptr;
QSqlCursor *query_cursor;
QSqlRecord *insert_buffer;
QString *table_name;
short buffer_created;
short valid_datarow;
public slots:
void addnew( void );
void update( void );
/* delete is reserved function */
void row_delete( void );
QVariant *getvalue( QString *column_name );
void setvalue( QString *column_name, QVariant *vptr );
void seek( int newposint );
void movelast( void );
void movenext( void );
void movefirst( void );
void moveprev( void );
int eof( void );
void open( DBConnection *db_conn, QString *table_name );
};
#endif
Generated by: root on linux on Sun Jul 13 18:06:35 2003, using kdoc 2.0a54. |