Source: /app/hbasic/hbasic/runtime_lib/compiler/rt_database.h


Annotated List
Files
Globals
Hierarchy
Index

class QDataBrowser;
class QSqlCursor;
class QString;
class QWidget;
class QSqlForm;
class QPushButton;
class QSqlDatabase;

#include 

class HBDatabase
{
public:
	HBDatabase( void );

	/**
	 * Create a connection to a QT database description.
	 */

	short connectDatabase( void );

	/*
	 * Close current database connection.
	 */

	void closeConnection( void );

public:
	QString *db_host;
	QString *db_driver;
	QString *db_name;
	QString *db_desc;
	QString *db_login_user;
	QString *db_login_pw;
	QSqlDatabase *qt_db_desc;   /* pointer to qt database description widget. */
};

class DBCursorForm : public QWidget
{
	Q_OBJECT

	Q_PROPERTY( QString DB_TABLE READ getDbTable WRITE setDbTable )

private:
	QDataBrowser *db_browse;
	QSqlCursor *sql_cursor;
	QString *table_name;
	QWidget *wgt_ptr;
	HBDatabase *db_control;

public:
	DBCursorForm( QWidget *parent );
	void resizeEvent( QResizeEvent *evt );
	void initDataBrowser( QWidget *wgt );
	QSqlForm *form_ptr;

private:
	QPushButton *btn_first;
	QPushButton *btn_previous;
	QPushButton *btn_next;
	QPushButton *btn_last;

	QPushButton *btn_add;
	QPushButton *btn_delete;

	QString prop_db_table;

private slots:
	void slotBtnFirstClicked( void );
	void slotBtnPreviousClicked( void );
	void slotBtnNextClicked( void );
	void slotBtnLastClicked( void );
	void slotBtnAddClicked( void );
	void slotBtnDeleteClicked( void );

public slots:
	/* Property db_table */
	QString getDbTable( void ) const;
	void setDbTable( const QString & );
};

/*-------------------------------------------------------------------------- */

class ColumnEditor : public QLineEdit
{
	Q_OBJECT

	Q_PROPERTY( QString DB_COLUMN READ getDbColumn WRITE setDbColumn )

public:
	ColumnEditor( QWidget *parent );

private:
	QString prop_db_column;

public slots:
	/* Property db_table */
	QString getDbColumn( void ) const;
	void setDbColumn( const QString & );
};



Generated by: root on linux on Sun Jul 13 18:06:35 2003, using kdoc 2.0a54.