KVIrc  4.9.2
DeveloperAPIs
HelpWidget.h
Go to the documentation of this file.
1 #ifndef _HELPWIDGET_H_
2 #define _HELPWIDGET_H_
3 //=============================================================================
4 //
5 // File : HelpWidget.h
6 // Creation date : Thu Aug 10 2000 17:26:20 by Szymon Stefanek
7 //
8 // This file is part of the KVIrc IRC client distribution
9 // Copyright (C) 2000-2010 Szymon Stefanek (pragma at kvirc dot net)
10 //
11 // This program is FREE software. You can redistribute it and/or
12 // modify it under the terms of the GNU General Public License
13 // as published by the Free Software Foundation; either version 2
14 // of the License, or (at your option) any later version.
15 //
16 // This program is distributed in the HOPE that it will be USEFUL,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19 // See the GNU General Public License for more details.
20 //
21 // You should have received a copy of the GNU General Public License
22 // along with this program. If not, write to the Free Software Foundation,
23 // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 //
25 //=============================================================================
26 
27 #include "HelpIndex.h"
28 #include "kvi_settings.h"
29 
30 #ifdef COMPILE_WEBKIT_SUPPORT
31 #include <QtWebKitWidgets/QWebView>
32 #include <QToolBar>
33 #include <QVBoxLayout>
34 #else
35 #include "KviTalHBox.h"
36 #include <QTextBrowser>
37 #endif
38 #include <QProgressBar>
39 
40 class QToolButton;
41 class QLineEdit;
42 class KviMainWindow;
43 
44 class HelpWidget : public QWidget
45 {
46  Q_OBJECT
47 public:
48  HelpWidget(QWidget * par, bool bIsStandalone = false);
49  ~HelpWidget();
50 
51 private:
52 #ifdef COMPILE_WEBKIT_SUPPORT
53  QToolBar * m_pToolBar;
54  QToolBar * m_pToolBarHighlight;
55  QLineEdit * m_pFindText;
56  QVBoxLayout * m_pLayout;
57  QWebView * m_pTextBrowser;
58 #else
59  QToolButton * m_pBtnIndex;
60  QToolButton * m_pBtnBackward;
61  QToolButton * m_pBtnForward;
63  QTextBrowser * m_pTextBrowser;
64 #endif
66 
67 protected:
68  virtual void resizeEvent(QResizeEvent * e);
69 protected slots:
70  void showIndex();
71 #ifdef COMPILE_WEBKIT_SUPPORT
72  void slotLoadFinished(bool ok);
73  void slotFindNext();
74  void slotFindPrev();
75  void slotResetFind();
76  void slotZoomIn();
77  void slotZoomOut();
78  void slotTextChanged(const QString);
79  void slotCopy();
80  void slotShowHideFind();
81 #endif
82 public:
83  virtual QSize sizeHint() const;
84 #ifdef COMPILE_WEBKIT_SUPPORT
85  QWebView * textBrowser()
86  {
87  return m_pTextBrowser;
88  }
89 #else
90  QTextBrowser * textBrowser()
91  {
92  return m_pTextBrowser;
93  }
94 #endif
95 };
96 
97 #endif //_HELPWIDGET_H_
QTextBrowser * textBrowser()
Definition: HelpWidget.h:90
Toolkit Abstraction Layer: hbox class.
Definition: KviTalHBox.h:44
virtual QSize sizeHint() const
Definition: HelpWidget.cpp:263
Definition: KviMainWindow.h:60
Class for horizontal box.
HelpWidget(QWidget *par, bool bIsStandalone=false)
Definition: HelpWidget.cpp:188
bool m_bIsStandalone
Definition: HelpWidget.h:65
QTextBrowser * m_pTextBrowser
Definition: HelpWidget.h:63
Definition: HelpWidget.h:44
KviTalHBox * m_pToolBar
Definition: HelpWidget.h:62
#define e
Definition: detector.cpp:69
virtual void resizeEvent(QResizeEvent *e)
Definition: HelpWidget.cpp:254
QToolButton * m_pBtnBackward
Definition: HelpWidget.h:60
QToolButton * m_pBtnForward
Definition: HelpWidget.h:61
QToolButton * m_pBtnIndex
Definition: HelpWidget.h:59
~HelpWidget()
Definition: HelpWidget.cpp:234
void showIndex()
Definition: HelpWidget.cpp:240
This file contains compile time settings.