source: trunk/tools/assistant/helpwindow.h

Last change on this file was 191, checked in by rudi, 14 years ago

Qt Assistant added

File size: 2.4 KB
RevLine 
[191]1/**********************************************************************
2** Copyright (C) 2000-2007 Trolltech ASA. All rights reserved.
3**
4** This file is part of the Qt Assistant.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
12** licenses may use this file in accordance with the Qt Commercial License
13** Agreement provided with the Software.
14**
15** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
17**
18** See http://www.trolltech.com/gpl/ for GPL licensing information.
19** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
20** information about Qt Commercial License Agreements.
21**
22** Contact info@trolltech.com if any conditions of this licensing are
23** not clear to you.
24**
25**********************************************************************/
26
27#ifndef HELPWINDOW_H
28#define HELPWINDOW_H
29
30#include <qtextbrowser.h>
31
32class MainWindow;
33class QKeyEvent;
34class QMime;
35class QMouseEvent;
36
37class HelpWindow : public QTextBrowser
38{
39 Q_OBJECT
40public:
41 HelpWindow( MainWindow *m, QWidget *parent = 0, const char *name = 0 );
42 void setSource( const QString &name );
43 QPopupMenu *createPopupMenu( const QPoint& pos );
44 void blockScrolling( bool b );
45 void openLinkInNewWindow( const QString &link );
46 void openLinkInNewPage( const QString &link );
47 void addMimePath( const QString &path );
48
49 void contentsMousePressEvent(QMouseEvent *e);
50 void keyPressEvent(QKeyEvent *);
51
52 bool isBackwardAvailable() const { return backAvail; }
53 bool isForwardAvailable() const { return fwdAvail; }
54
55signals:
56 void chooseWebBrowser();
57
58public slots:
59 void copy();
60protected slots:
61 void ensureCursorVisible();
62
63private slots:
64 void openLinkInNewWindow();
65 void openLinkInNewPage();
66 void updateForward(bool);
67 void updateBackward(bool);
68
69private:
70 MainWindow *mw;
71 QString lastAnchor;
72 bool blockScroll;
73 bool shiftPressed;
74 bool newWindow;
75 QMimeSourceFactory *mimeSourceFactory;
76 bool fwdAvail;
77 bool backAvail;
78};
79
80#endif
Note: See TracBrowser for help on using the repository browser.