Source: /app/hbasic/hbasic/runtime_lib/interpreter/exec_form.h


Annotated List
Files
Globals
Hierarchy
Index
/* **************************************************************************
 File: form_exec.h
 Desc: Main form used at runtime of the interpreter.
 ----------------------------------------------------------------------------
	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 form_exec : Main form used at runtime of the interpreter.
*/

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

#ifndef FORMEXEC_H
#define FORMEXEC_H

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

#define RTF_TYPE_FW 1
#define RTF_TYPE_FMW 2
#define RTF_TYPE_MDI 3

class QPixmap;
/**
 * Special install of a toolbar button used with the HBasic interpreter.
 */

class HbToolButton : public QToolButton
{
public:
	short tb_entry_id;

	HbToolButton( QWidget *parent, QPixmap *pic_ptr, short entry_id );
};

/* ############################################################ */
/**
 * Main runtime form widget 
 */

class FormWidget : public QMainWindow
{
Q_OBJECT

public:
	long gui_length;
	short current_x;
	short current_y;
	RT_FORM_DESC *form_desc_ptr;
	short resize_active;

public:
	FormWidget( QWidget *parent, RT_FORM_DESC *rtptr, short use_mdi );
	~FormWidget( void );
	char *setProperties( RTGUI_HEADER *comp_ptr );
	void createGuiComponent( QWidget *wgt_parent, RTGUI_HEADER *parent_comp_ptr );
	void findDbcursorComponent( RTGUI_HEADER *parent_comp_ptr );
	char *findPropertyValue( RTGUI_HEADER *comp_ptr, char *prop_name );
//    void rt_create_button( QWidget *parent, GUI_HEADER *child );
//    void rt_button_set_property( GUI_HEADER *hguiptr);

	void printInteger( HB_INT_TYPE number );
	void printLong( HB_LONG_TYPE number );
	void printDouble( HB_DOUBLE_TYPE number );
	void printString( QString *str );

protected:
	short form_type;

private:
	void createGuiComponents( QWidget *wgt_parent, RTGUI_HEADER *parent_comp_ptr );
	bool eventFilter( QObject *sender, QEvent *evt);
	void connectSignalEvents( RTGUI_HEADER *sub_comp );
	void resizeEvent( QResizeEvent *evt );
	void resizeComponents( RTGUI_HEADER *gui_ptr, int xdiff, int ydiff );
	void setupMenuBar( char *menu_desc );
	void setupToolBar( char *tb_desc );

private slots:
	void slotMenuActivated( int selected_id );
	void slotToolbarActivated( void );

private:
	/* Main content widget */
	QWidget *main_widget;

	/* Database component. */

	RTGUI_HEADER *db_comp;
};

#endif


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