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


Annotated List
Files
Globals
Hierarchy
Index
/* **************************************************************************
 File: query_designer.h
 Desc: 
 ----------------------------------------------------------------------------
	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 QueryDesigner : Edit database queries.
 */
/* ----------------------------------------------------------------------- */
/* Changelog: Description of important changes within this file.           */
/*            Please report with date, maintainer and change description.  */
/* ----------------------------------------------------------------------- */

#ifndef QUERY_H
#define QUERY_H

#include 
#include 

#include 
#include 
#include 
#include 
#include 

class DbDesign;
class QSplitter;
class QPushButton;
class QLineEdit;
class QLabel;
class QFrame;
class QueryDesigner;
class QueryEditorWgt;
class QueryEditWidget;
class QComboBox;

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

class QueryDefine;
class QueryDesigner;
class HBQueryDesc;
class DbDesign;

/****************************************************************
**
** Execute a query and show the result in a ScrollView
**
****************************************************************/

/**
 * Edit widget for the query editor.
 */

class QueryEditWidget : public QTable
{
Q_OBJECT

public:
	QueryEditWidget(QWidget* parent, HBQueryDesc *query_ptr );
	void setEditorColumns( HBQueryDesc *new_query_desc );

	/* Used to fix problem in event handling. */
	/* Store last changes before execut starts. */

	void checkEditMode( void );
	void setColumnLabel( short query_type );
	void setColumnHeader( void );

	short selected_column;

private:
	HBQueryDesc *query_desc_ptr;

	void createFunctionCombo( int row, int sort_type );

protected slots:
	void slotCbToggled( bool new_state );
	void slotColumnLeft( void );
	void slotColumnRight( void );
	void slotDeleteColumn( void );
	void slotCellChanged( int row, int column );
	void slotValueChanged( int row, int column );
	void slotFunctionTextChanged( const QString & new_text );
};

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

/**
 * Main editor widget for the query editor.
 */

class QueryDesigner : public CWindowListChild
{
	Q_OBJECT

public:
	DbDesign *db_design_wgt;

	QueryDesigner( QWidget *parent, HBQueryDesc *new_query_desc, short edit_mode );
	void resizeEvent( QResizeEvent *evt );
	void queryColumnChanged( void );

private:
	QPushButton *btn_ok;
	QPushButton *btn_exec;
	QPushButton *btn_add_table;
	QPushButton *btn_create_sql;

	QComboBox *cb_query_type;
	QFrame *top_border;

	QPushButton *btn_left;
	QPushButton *btn_right;
	QPushButton *btn_delete;
	QPushButton *btn_del_conn;
	
	QSplitter *split_screen;
	QLineEdit *le_table_name;
	QLabel *lab_table_name;

	QueryEditWidget *query_edit;
	HBQueryDesc *query_desc;


private slots:
	void slotExec( void );
	void slotQuit( void );
	void slotDeleteConnect( void );
	void slotCreateSql( void );
	void slotTypeChanged( int new_query_type );
};

#endif


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