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


Annotated List
Files
Globals
Hierarchy
Index
/* **************************************************************************
 File: report_designer.h
 Desc: Dialog to create or edit database reports.
 ----------------------------------------------------------------------------
	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.    */
/* ----------------------------------------------------------------------- */

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

#ifndef REPORT_DESIGN_H
#define REPORT_DESIGN_H

#include 
#include 

#include 
#include 
#include 

class DbDesign;
class QFrame;
class QLabel;
class QListView;
class QPushButton;
class QLineEdit;
class QListViewItem;
class CReportEditor;
class CReportPreviewWidget;
class QTabWidget;
class QTabBar;
class ReportDefine;
class CReportPart;
class QSqlCursor;
class QSqlRecord;
class CReportDocument;

#include "qpainter.h"
#include "qwidget.h"
#include "qscrollview.h"

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

/* Types of display mode. */

#define DMODE_EDIT 1
#define DMODE_PREVIEW 2

/**************************************************************** */
/**
 * @short Editor widget for database reports.
 *
 * Class CReportDesigner : Dialog to create or edit database reports.
 * This widget computes the contents of a report to display it on 
 * the screen or print it. 
 */

class ReportDesigner : public CWindowListChild
{
	Q_OBJECT

public:
	short select_type;
	QString *selected_column;

	/* Structure that describes selected table */
	HBDbTable *selected_table_desc;

public:
	ReportDesigner( QWidget *parent, CReportDocument *new_query_desc, short display_mode );
	~ReportDesigner( void );
	void resizeEvent( QResizeEvent *evt );

private:
	short display_mode;
	int fullpage_preview;

	void focusInEvent( QFocusEvent *e );
	void getTableDescPtr( void );
	void redrawResizedContents( double factor );

	/* Select edit- or preview mode in tab widget */
	QLabel *la_percent;
	QPushButton *btn_size_inc;
	QPushButton *btn_size_dec;
	QLineEdit *le_magnify;
	QLineEdit *le_table_name;
	CReportDocument *report_desc;
	CReportEditor *rep_editor;
	CReportPreviewWidget *rep_preview_widget;

	QFrame *rep_fcn_select;
	QPushButton *btn_print;
	QPushButton *btn_select_select;
	QPushButton *btn_select_field;
	QPushButton *btn_select_line;
	QPushButton *btn_select_frame;
	QPushButton *btn_select_image;
	QPushButton *btn_select_table;
	QPushButton *btn_edit_mode;
	QPushButton *btn_preview_mode;
	QPushButton *btn_xpreview_mode;

private:    /* methods */
	void showReportContents( void );

private slots:
	void slotSizeInc( void );
	void slotSizeDec( void );
	void slotPrint( void );

	void slotSelectSelect( void );
	void slotSelectField( void );
	void slotSelectLine( void );
	void slotSelectFrame( void );
	void slotSelectImage( void );
	void slotEditMode( void );
	void slotSelectDbTable( void );
	void slotPreviewMode( void );
	void slotXPreviewMode( void );
};

#endif



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