Source: /app/hbasic/hbasic/gui_db_access/sql_designer.h


Annotated List
Files
Globals
Hierarchy
Index
/* **************************************************************************
 File: sql_designer.h
 Desc: Design SQL statements for the database.
 ----------------------------------------------------------------------------
	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 SQLDesigner : window to set up sql statements that may be
    executed to query or change database tables.
*/

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

#ifndef SQLDESIGN_H
#define SQLDESIGN_H

#include 
#include 

#include 
#include 
#include 

#include "../src/window_list.h"
#include "../src/structs.h"

class QTextEdit;
class QListViewItem;
class QTabWidget;
class QListView;
class QLineEdit;
class QFrame;
class HBSqlStatement;

/* *************************************************************** */

class SQLDesigner : public CWindowListChild
{
	Q_OBJECT

public:
	QTextEdit *sql_design_wgt;

/** 
	Create a new SQLDesigner window.
	@param parent Parent widget when creating the designer window.
	@param new_query_desc First query selected for editing. 
*/
	SQLDesigner( QWidget *parent, HBSqlStatement *new_query_desc );
	void resizeEvent( QResizeEvent *evt );

private:              /* properties */
	QTabWidget *tab_listinfo;
	QFrame *table_frame;
	QListView *lv_queries;
	QListView *lv_tables;
	QListView *lv_columns;

	QLineEdit *le_stmt_name;
	QLineEdit *le_stmt_desc;

	QPushButton *btn_ok;
	QPushButton *btn_add;
	QPushButton *btn_exec;
	QPushButton *btn_delete;
	
	HBDbTable *current_table;
	HBSqlStatement *current_statement;

	int statement_changed;

private:             /* methods */
	void showTableList( void );
	void showTableColumnList( void );
	void showQueryList( void );
	void saveLastStatement( void );
	void createNewStatement( void );

private slots:	
	void slotOk( void );
	void slotAdd( void );
	void slotExec( void );
	void slotDelete( void );
	void slotNameChanged( const QString & new_name );
	void slotDescChanged( const QString & new_desc );
	void slotQueryTextChanged();
	void slotTableSelected( QListViewItem *new_table );
	void slotQuerySelected( QListViewItem *new_query );
};

#endif


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