Source: /app/hbasic/hbasic/packages/hbasic_dbquery/hbasic_dbquery.h


Annotated List
Files
Globals
Hierarchy
Index
/* **************************************************************************
 File: hbasic_dbquery.h
 Desc: Display result of database query in widget.
 ----------------------------------------------------------------------------
	copyright            : (C) 2001 HBasic project (Marcus Engels)
 ***************************************************************************/

/* **************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

/* ----------------------------------------------------------------------- */
/* Classlist: List of classes that will be defined in this source file.    */
/* ----------------------------------------------------------------------- */

/*
  Class viewQueryData : This class displays the output of a SQL query
    in a window.
*/

/* ----------------------------------------------------------------------- */
/* Changelog: Description of important changes within this file.           */
/*            Please report with date, maintainer and change description.  */
/* ----------------------------------------------------------------------- */


#ifndef PCKG_DBQUERY_H
#define PCKG_DBQUERY_H

#include 
#include 

#include 
#include 
#include 
#include 
#include 
#include 

#include "structs.h"

class QLabel;
class QSqlDatabase;
class QSqlRecord;
class QSqlQuery;
class HBQueryDesc;

/**
  Class viewQueryData : This class displays the output of a SQL query
    in a window.
*/

class viewQueryData : public QTable
{
Q_OBJECT

public:
	viewQueryData( QWidget* parent);
	void setQuery( QSqlDatabase *qt_sql_db, QString *new_query_data );

private:
	int column_count;
	int rows_on_screen;

	QSqlQuery *query_desc_ptr;
	QSqlRecord *record_desc;
	QString *query_string;

	void rebuildContents( void );
};

/* ###################################################################### */

/**
 * Main widget to display the result of a database query.
*/

class dlgQueryResult : public QWidget
{
	Q_OBJECT

public:
	dlgQueryResult( QWidget *parent );

	QLabel *lab_header;
	QPushButton *btn_quit;

public slots:
	void setDbConnect( QString *driver, QString *host, QString *dbname );
	void setDbUser( QString *user, QString *password );
	void setQuery( QString *query_text );
	void setHbQuery( HBQueryDesc *new_query );

private:
	short db_is_open;
	QSqlDatabase *qt_db;
	viewQueryData *lv_query_result;
	QString query_string;

	void resizeEvent( QResizeEvent *evt );
};

#endif


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