Source: /app/hbasic/hbasic/help_window/help_window.h


Annotated List
Files
Globals
Hierarchy
Index
/***************************************************************************
 File: help_window.h
 Desc: This is the HelpWindow widget for the HBasic application.
       It is based on the browser example from the QT examples.
 ----------------------------------------------------------------------------
	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.    */
/* ----------------------------------------------------------------------- */
/* CHelpTreeEntry : entry in list view to display contents.                */
/* HelpWindow : main help_window window.                                   */
/* ....................................................................... */

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

#ifndef HELPWINDOW_H
#define HELPWINDOW_H

#include 
#include 
#include 
#include 
#include 
#include 

class QComboBox;
class QPopupMenu;
class QSplitter;
class QFile;

#define HTREE_FOLDER 1
#define HTREE_ENTRY 2
#define HTREE_ROOT 3

class CHelpTreeEntry : public QListViewItem
{
public:
	CHelpTreeEntry( QListView *parent, QString root_text );
	CHelpTreeEntry( QListViewItem *parent, CHelpTreeEntry *after,
		QString text, QString destination, short type );

	void setOpen( bool o );
	QString *select_html;

private:
	void setup( void );

	short entry_type;
};

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

class HelpWindow : public QMainWindow
{
	Q_OBJECT
public:
	HelpWindow( const QString& home_,  const QString& path, QWidget* parent = 0, const char *name=0 );
	~HelpWindow();

private slots:
	void setBackwardAvailable( bool );
	void setForwardAvailable( bool );
	void slotDoubleClicked( QListViewItem *new_select );
	void new_selection( QListViewItem *new_select );

	void textChanged();
	void about();
	void aboutQt();
	void openFile();
	void newWindow();
	void print();

	void pathSelected( const QString & );
	void histChosen( int );
	void bookmChosen( int );
	void addBookmark();
    
private:
	void readHistory();
	void readBookmarks();
	void createSelectTree( void );
	void readDocuLines( QFile *f, QListViewItem *hte_parent );

	QTextBrowser* browser;
	QSplitter *split_window;
	QComboBox *pathCombo;
	int backwardId, forwardId;
	QString selectedURL;
	QStringList history, bookmarks;
	QMap mHistory, mBookmarks;
	QPopupMenu *hist, *bookm;
};

#endif



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