Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

TxqHelpWindow Class Reference

Class to implement a Qt html browswer. More...

#include <TxqHelpWindow.h>

Inheritance diagram for TxqHelpWindow::

QMainWindow List of all members.

Public Methods

 TxqHelpWindow (const QString &home_, const QString &path, QWidget *parent=0, const char *name=0)
 The contstuctor takes the following arguements:. More...

 ~TxqHelpWindow ()
 The destructor. More...

void setMimeSource (QString filetype, QString type="text/plain")
 Set the file type to be able to parse. More...

void start ()
 show the browser and set its source to home. More...

void setEditable (bool e)
 Set the browswer to be editable if true. More...

void enableSaveMenu (bool enable)
 Enable or disable the save menu. More...


Private Slots

void setBackwardAvailable (bool)
 Enable the Backward button. More...

void setForwardAvailable (bool)
 Enable the Forward button. More...

void textChanged ()
 slot used when a new document is needed. More...

void about ()
 slot to print out the about message. More...

void aboutQt ()
 slot used to print the about Qt message. More...

void openFile ()
 slot to open a file and set the browser source. More...

void saveFile ()
 slot to save a file. More...

void newWindow ()
 slot to open a new browswer. More...

void print ()
 slot to print the text. More...

void pathSelected (const QString &)
 slot to set the new path. More...

void histChosen (int)
 slot to set the source to selected history. More...

void bookmChosen (int)
 slot to set the source to selected bookmark. More...

void addBookmark ()
 slot to add a new bookmark. More...


Private Methods

void readHistory ()
 read the history file. More...

void readBookmarks ()
 read the book mark file. More...


Private Attributes

QTextBrowser* browser
 the data member browser. More...

QComboBox* pathCombo
 The path box on the browser. More...

int forwardId
 The forward button id number. More...

int backwardId
 The backward button id number. More...

QString selectedURL
 The URL selected by the user. More...

QDir path
 The directory path. More...

QStringList fileList
 The list of files in the path. More...

QStringList history
 The history list. More...

QStringList bookmarks
 The bookmark list. More...

QMap<int, QString> mHistory
 The map of history and bookmarks. More...

QMap<int, QString> mBookmarks
 The map of history and bookmarks. More...

QPopupMenu* hist
 The menu for history. More...

QPopupMenu* bookm
 The menu for Add bookmark. More...

QString home
 The class data member for home. More...

int saveId
 The save menu id. More...

QPopupMenu* file
 The file menu. More...


Detailed Description

Class to implement a Qt html browswer.

This class is derived work from the qt/examples/helpviewer and is not copyrighted.

Definition at line 63 of file TxqHelpWindow.h.


Constructor & Destructor Documentation

TxqHelpWindow::TxqHelpWindow ( const QString & home_,
const QString & path,
QWidget * parent = 0,
const char * name = 0 )
 

The contstuctor takes the following arguements:.

Parameters:
home_   the home direcotry to start browswer
path   the current directory or path to new directory
parent   the QWidget parent
nm   the name of the QWidget

TxqHelpWindow::~TxqHelpWindow ( )
 

The destructor.


Member Function Documentation

void TxqHelpWindow::about ( ) [private, slot]
 

slot to print out the about message.

void TxqHelpWindow::aboutQt ( ) [private, slot]
 

slot used to print the about Qt message.

void TxqHelpWindow::addBookmark ( ) [private, slot]
 

slot to add a new bookmark.

void TxqHelpWindow::bookmChosen ( int ) [private, slot]
 

slot to set the source to selected bookmark.

void TxqHelpWindow::enableSaveMenu ( bool enable )
 

Enable or disable the save menu.

Parameters:
enable   enable is set to true to enable the save menu which is disabled by default.

void TxqHelpWindow::histChosen ( int ) [private, slot]
 

slot to set the source to selected history.

void TxqHelpWindow::newWindow ( ) [private, slot]
 

slot to open a new browswer.

void TxqHelpWindow::openFile ( ) [private, slot]
 

slot to open a file and set the browser source.

void TxqHelpWindow::pathSelected ( const QString & ) [private, slot]
 

slot to set the new path.

void TxqHelpWindow::print ( ) [private, slot]
 

slot to print the text.

void TxqHelpWindow::readBookmarks ( ) [private]
 

read the book mark file.

void TxqHelpWindow::readHistory ( ) [private]
 

read the history file.

void TxqHelpWindow::saveFile ( ) [private, slot]
 

slot to save a file.

void TxqHelpWindow::setBackwardAvailable ( bool ) [private, slot]
 

Enable the Backward button.

void TxqHelpWindow::setEditable ( bool e )
 

Set the browswer to be editable if true.

Parameters:
e   true if the text can be editted.

void TxqHelpWindow::setForwardAvailable ( bool ) [private, slot]
 

Enable the Forward button.

void TxqHelpWindow::setMimeSource ( QString filetype,
QString type = "text/plain" )
 

Set the file type to be able to parse.

Parameters:
filetype   the source filetype, for example ".inp"
type   the mime type of the file, default to "text/plain"

void TxqHelpWindow::start ( )
 

show the browser and set its source to home.

void TxqHelpWindow::textChanged ( ) [private, slot]
 

slot used when a new document is needed.


Member Data Documentation

int TxqHelpWindow::backwardId [private]
 

The backward button id number.

Definition at line 203 of file TxqHelpWindow.h.

QPopupMenu * TxqHelpWindow::bookm [private]
 

The menu for Add bookmark.

Definition at line 242 of file TxqHelpWindow.h.

QStringList TxqHelpWindow::bookmarks [private]
 

The bookmark list.

Definition at line 227 of file TxqHelpWindow.h.

QTextBrowser * TxqHelpWindow::browser [private]
 

the data member browser.

Definition at line 189 of file TxqHelpWindow.h.

QPopupMenu * TxqHelpWindow::file [private]
 

The file menu.

Definition at line 257 of file TxqHelpWindow.h.

QStringList TxqHelpWindow::fileList [private]
 

The list of files in the path.

Definition at line 218 of file TxqHelpWindow.h.

int TxqHelpWindow::forwardId [private]
 

The forward button id number.

Definition at line 199 of file TxqHelpWindow.h.

QPopupMenu * TxqHelpWindow::hist [private]
 

The menu for history.

Definition at line 237 of file TxqHelpWindow.h.

QStringList TxqHelpWindow::history [private]
 

The history list.

Definition at line 223 of file TxqHelpWindow.h.

QString TxqHelpWindow::home [private]
 

The class data member for home.

Definition at line 247 of file TxqHelpWindow.h.

QMap< int, QString > TxqHelpWindow::mBookmarks [private]
 

The map of history and bookmarks.

Definition at line 232 of file TxqHelpWindow.h.

QMap< int, QString > TxqHelpWindow::mHistory [private]
 

The map of history and bookmarks.

Definition at line 232 of file TxqHelpWindow.h.

QDir TxqHelpWindow::path [private]
 

The directory path.

Definition at line 213 of file TxqHelpWindow.h.

QComboBox * TxqHelpWindow::pathCombo [private]
 

The path box on the browser.

Definition at line 194 of file TxqHelpWindow.h.

int TxqHelpWindow::saveId [private]
 

The save menu id.

Definition at line 252 of file TxqHelpWindow.h.

QString TxqHelpWindow::selectedURL [private]
 

The URL selected by the user.

Definition at line 208 of file TxqHelpWindow.h.


The documentation for this class was generated from the following file: Copyright Tech-X Corporation, all rights reserved.