Source: /app/hbasic/hbasic/src/debug_widget2.h


Annotated List
Files
Globals
Hierarchy
Index
/* **************************************************************************
 File: debug_widget2.h
 Desc: Subwindow to display variable values in debug mode
 ----------------------------------------------------------------------------
	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 CDebugWindow2  Widget to display variable values
 */

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

#ifndef DBG2WIDGET_H
#define DBG2WIDGET_H

#include "defines.h"
#include "structs.h"
#include 
#include "window_list.h"

class QSplitter;
class QMultiLineEdit;
class QPushButton;
class QListViewItem;

#define SHOW_NO_VARIABLES 0
#define SHOW_GLOBAL_VAR 1
#define SHOW_SLOCAL_VAR 2
#define SHOW_FLOCAL_VAR 4
#define SHOW_CALLSTACK 8
#define SHOW_VARIABLE_WINDOW 0x10
#define SHOW_PROJECT_WINDOW 0x20

class CValueListItem : QListViewItem
{
public:
	CValueListItem( QListView *l, QString text, VAR_DESC *new_var_ptr );

	/* Pointer to variable description and variable value. */
	VAR_DESC *var_desc_ptr;
	void *var_address;

private:
	short var_type;
};

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

class CValueListWidget : public QListView
{
Q_OBJECT

public:
	CValueListWidget( QWidget *parent, short new_list_type );

private:
	short list_view_type;
	void contentsMouseDoubleClickEvent( QMouseEvent *evt );
};

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

/**
 * Widget to display variable values at debug-time.
 */

class CDebugWidget2 : public CWindowListChild
{
Q_OBJECT

public:
	CDebugWidget2( QWidget *parent );

	void resizeEvent( QResizeEvent *evt );
	void showVariableValues( void );

private:
	short variables_visible;
	QList watched_variables;
	QPushButton *btn_run;
	QPushButton *btn_stop;
	QPushButton *btn_show_all;
	QPushButton *btn_show_global;
	QPushButton *btn_show_modul;
	QPushButton *btn_show_sub;
	QPushButton *btn_show_project;

	QPushButton *btn_in_out;
	QPushButton *btn_new_var;
	QPushButton *btn_del_var;
	QSplitter *sp_variables;  /* Splitter to separate between variable window and watches. */
	CValueListWidget *lv_current_var;
	CValueListWidget *lv_watches;
	QMultiLineEdit *ml_call_stack;

	void setVariableValue( QListViewItem *lv_entry, VAR_DESC *var_desc_ptr );
	void showWatchedVariables( void );
	void show_all_global_vars( void );
	void show_all_modul_vars( void );
	void showUserdefSubvalues( QListViewItem *lv_entry, VAR_DESC *var_desc_ptr, UTYPE_DESC *first_member );
	void show_all_sublocal_vars( void );

private slots:
	void slotShowGlobalVar( void );
	void slotShowAllVar( void );
	void slotShowModulVar( void );
	void slotShowSublocalVar( void );
	void slotNewVar( void );
	void slotDeleteVar( void );
	void slotShowProject( void );
	void slotRightMousePressed( QListViewItem *new_popup_item, const QPoint &pos, int num);

};

#endif

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