00001 /**************************************************************************** 00002 ** $Id: helpwindow.h,v 1.3 2003/04/22 14:11:34 llornkcor Exp $ 00003 ** 00004 ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. 00005 ** 00006 ** This file is part of an example program for Qt. This example 00007 ** program may be used, distributed and modified without limitation. 00008 ** 00009 *****************************************************************************/ 00010 00011 #ifndef HELPWINDOW_H 00012 #define HELPWINDOW_H 00013 00014 #include <qmainwindow.h> 00015 #include <qtextbrowser.h> 00016 #include <qstringlist.h> 00017 #include <qmap.h> 00018 #include <qdir.h> 00019 #include <qevent.h> 00020 00021 class QComboBox; 00022 class QPopupMenu; 00023 00024 class HelpWindow : public QMainWindow 00025 { 00026 Q_OBJECT 00027 public: 00028 HelpWindow( const QString& home_=0, const QString& path=0, QWidget* parent=0, const char *name=0 ); 00029 ~HelpWindow(); 00030 00031 private slots: 00032 00033 void addBookmark(); 00034 void bookmChosen( int ); 00035 void histChosen( int ); 00036 void newWindow(); 00037 void openFile(); 00038 void pathSelected( const QString & ); 00039 void print(); 00040 void setBackwardAvailable( bool ); 00041 void setForwardAvailable( bool ); 00042 void textChanged(); 00043 private: 00044 QTextBrowser* browser; 00045 QComboBox *pathCombo; 00046 int backwardId, forwardId; 00047 QString selectedURL; 00048 QStringList history, bookmarks; 00049 QMap<int, QString> mHistory, mBookmarks; 00050 QPopupMenu *hist, *bookm; 00051 00052 void readHistory(); 00053 void readBookmarks(); 00054 00055 }; 00056 00057 00058 00059 00060 00061 #endif 00062
1.4.2