00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef GUI_HELP_CONTENTS_H
00012 #define GUI_HELP_CONTENTS_H
00013
00014 #include <qtextbrowser.h>
00015 #include <qsize.h>
00016 #include <qtextstream.h>
00017
00018
00021
00022
00024 typedef enum
00025 {
00026 BILLBOARD,
00027 WHATS_NEW,
00028 IMPORTING_AND_ORGANIZING,
00029 ANNOTATING_ALBUMS,
00030 FRAMING,
00031 ENHANCING,
00032 PRO_TOOLS,
00033 MANIPULATING,
00034 SAVING_AND_LOADING,
00035 KEYBOARD_SHORTCUTS,
00036 INVALID,
00037 } HELP_PAGE;
00038
00039
00040 class Contents : public QTextBrowser
00041 {
00042 Q_OBJECT
00043
00044 public:
00045 Contents( QTextStream::Encoding type,
00046 QString saveCharSet, QMimeSourceFactory* loadingMimeSource,
00047 QWidget *parent=0, const char* name=0);
00048
00049 QSize minimumSizeHint() const;
00050
00051 private:
00052 QSize optimalSize;
00053 QString filename();
00054 void generateHTML(QTextStream::Encoding type, QString charSet);
00055 void printLink( QTextStream& stream, QString text, HELP_PAGE anchor, QString anchorString );
00056 HELP_PAGE currentPage;
00057
00058 QTextStream::Encoding type;
00059 QString saveCharSet;
00060
00061 signals:
00062 void setPage(HELP_PAGE page);
00063
00064 private slots:
00065 void handleAnchorClick(const QString &name, const QString &link);
00066
00067 };
00068
00069
00070 #endif //GUI_HELP_CONTENTS_H