00001 /**************************************************************************** 00002 ** $Id: helpwindow.h,v 1.1 2002/11/01 16:43:35 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_, const QString& path, QWidget* parent = 0, const char *name=0 ); 00029 ~HelpWindow(); 00030 00031 private slots: 00032 void setBackwardAvailable( bool ); 00033 void setForwardAvailable( bool ); 00034 00035 void textChanged(); 00036 void openFile(); 00037 void newWindow(); 00038 00039 void pathSelected( const QString & ); 00040 void histChosen( int ); 00041 void bookmChosen( int ); 00042 void addBookmark(); 00043 private: 00044 void readHistory(); 00045 void readBookmarks(); 00046 00047 QTextBrowser* browser; 00048 QComboBox *pathCombo; 00049 int backwardId, forwardId; 00050 QString selectedURL; 00051 QStringList history, bookmarks; 00052 QMap<int, QString> mHistory, mBookmarks; 00053 QPopupMenu *hist, *bookm; 00054 00055 }; 00056 00057 00058 00059 00060 00061 #endif 00062
1.4.2