aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/help/helpwidget.h
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@digia.com>2014-06-17 18:14:37 +0200
committerEike Ziller <eike.ziller@digia.com>2014-06-20 14:01:18 +0200
commitb2a2a893581433ac06ef29569aba491a7db92e90 (patch)
tree601e15d209709f76fc10b830063a699993876636 /src/plugins/help/helpwidget.h
parent5ee81929acf77428d817c6b808034660389c9273 (diff)
Help: Create separate help widget class
That contains the tool bar together with a help viewer, which can also be used for an external help window, and later be extended to also replace the extra "central widget". Change-Id: I73fac4c135b985cbe47062b90783f156b5062005 Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
Diffstat (limited to 'src/plugins/help/helpwidget.h')
-rw-r--r--src/plugins/help/helpwidget.h74
1 files changed, 74 insertions, 0 deletions
diff --git a/src/plugins/help/helpwidget.h b/src/plugins/help/helpwidget.h
new file mode 100644
index 00000000000..7b2bad4fdb6
--- /dev/null
+++ b/src/plugins/help/helpwidget.h
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of Qt Creator.
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+****************************************************************************/
+
+#ifndef HELPWIDGET_H
+#define HELPWIDGET_H
+
+#include <coreplugin/icontext.h>
+
+#include <qglobal.h>
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QMenu;
+QT_END_NAMESPACE
+
+namespace Help {
+namespace Internal {
+
+class HelpViewer;
+
+class HelpWidget : public QWidget
+{
+ Q_OBJECT
+public:
+ explicit HelpWidget(const Core::Context &context, QWidget *parent = 0);
+
+ HelpViewer *currentViewer() const;
+
+signals:
+ void openHelpMode(const QUrl &url);
+ void close();
+
+private slots:
+ void updateBackMenu();
+ void updateForwardMenu();
+ void emitOpenHelpMode();
+
+private:
+ QMenu *m_backMenu;
+ QMenu *m_forwardMenu;
+
+ HelpViewer *m_viewer;
+};
+
+} // Internal
+} // Help
+
+#endif // HELPWIDGET_H