00001 /**************************************************************************** 00002 ** $Id: helpwindow.h,v 1.1 2004/04/07 13:07:42 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 copyright : (C) 2000 -2004 by llornkcor 00010 email : ljp@llornkcor.com 00011 *****************************************************************************/ 00012 00013 #ifndef HELPWINDOW_H 00014 #define HELPWINDOW_H 00015 00016 #include <qmainwindow.h> 00017 #include <qtextbrowser.h> 00018 #include <qstringlist.h> 00019 #include <qmap.h> 00020 #include <qdir.h> 00021 #include <qevent.h> 00022 00023 class QComboBox; 00024 class QPopupMenu; 00025 00026 class HelpWindow : public QMainWindow 00027 { 00028 Q_OBJECT 00029 public: 00030 HelpWindow( const QString& home_, const QString& path, QWidget* parent = 0, const char *name=0 ); 00031 ~HelpWindow(); 00032 00033 private slots: 00034 void setBackwardAvailable( bool ); 00035 void setForwardAvailable( bool ); 00036 00037 void textChanged(); 00038 // void about(); 00039 // void aboutQt(); 00040 void openFile(); 00041 void newWindow(); 00042 void print(); 00043 00044 void pathSelected( const QString & ); 00045 void histChosen( int ); 00046 void bookmChosen( int ); 00047 void addBookmark(); 00048 private: 00049 void readHistory(); 00050 void readBookmarks(); 00051 00052 QTextBrowser* browser; 00053 QComboBox *pathCombo; 00054 int backwardId, forwardId; 00055 QString selectedURL; 00056 QStringList history, bookmarks; 00057 QMap<int, QString> mHistory, mBookmarks; 00058 QPopupMenu *hist, *bookm; 00059 00060 }; 00061 00062 00063 00064 00065 00066 #endif 00067
1.4.2