2012-10-02 09:12:39 +02:00
|
|
|
/****************************************************************************
|
2010-03-29 14:57:02 +02:00
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
** Contact: https://www.qt.io/licensing/
|
2010-03-29 14:57:02 +02:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** This file is part of Qt Creator.
|
2010-03-29 14:57:02 +02:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** 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
|
2016-01-15 14:57:40 +01:00
|
|
|
** a written agreement between you and The Qt Company. For licensing terms
|
|
|
|
|
** and conditions see https://www.qt.io/terms-conditions. For further
|
|
|
|
|
** information use the contact form at https://www.qt.io/contact-us.
|
2010-03-29 14:57:02 +02:00
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** GNU General Public License Usage
|
|
|
|
|
** Alternatively, this file may be used under the terms of the GNU
|
|
|
|
|
** General Public License version 3 as published by the Free Software
|
|
|
|
|
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
|
|
|
|
** included in the packaging of this file. Please review the following
|
|
|
|
|
** information to ensure the GNU General Public License requirements will
|
|
|
|
|
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
2010-12-17 16:01:08 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
****************************************************************************/
|
2010-03-29 14:57:02 +02:00
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2010-03-29 14:57:02 +02:00
|
|
|
|
2012-02-15 10:42:41 +01:00
|
|
|
#include <QObject>
|
2010-03-29 14:57:02 +02:00
|
|
|
|
2019-09-02 15:52:01 +02:00
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
|
class QAbstractItemModel;
|
|
|
|
|
class QComboBox;
|
|
|
|
|
class QListView;
|
|
|
|
|
class QModelIndex;
|
|
|
|
|
class QPoint;
|
|
|
|
|
class QUrl;
|
|
|
|
|
class QWidget;
|
|
|
|
|
QT_END_NAMESPACE
|
2010-03-29 14:57:02 +02:00
|
|
|
|
|
|
|
|
namespace Help {
|
2019-09-02 15:52:01 +02:00
|
|
|
namespace Internal {
|
2010-03-29 14:57:02 +02:00
|
|
|
|
2019-09-02 15:52:01 +02:00
|
|
|
class HelpWidget;
|
2010-03-29 19:16:23 +02:00
|
|
|
class HelpViewer;
|
2010-04-12 16:43:23 +02:00
|
|
|
class OpenPagesSwitcher;
|
2010-04-12 14:55:41 +02:00
|
|
|
class OpenPagesWidget;
|
2010-03-29 14:57:02 +02:00
|
|
|
|
|
|
|
|
class OpenPagesManager : public QObject
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
2019-09-02 15:52:01 +02:00
|
|
|
OpenPagesManager(HelpWidget *helpWidget);
|
2018-05-07 15:08:20 +02:00
|
|
|
~OpenPagesManager() override;
|
2010-03-29 14:57:02 +02:00
|
|
|
|
2010-04-12 14:39:23 +02:00
|
|
|
QWidget *openPagesWidget() const;
|
|
|
|
|
QComboBox *openPagesComboBox() const;
|
2010-03-29 14:57:02 +02:00
|
|
|
|
|
|
|
|
void setupInitialPages();
|
|
|
|
|
|
|
|
|
|
void closeCurrentPage();
|
|
|
|
|
void closePage(const QModelIndex &index);
|
|
|
|
|
void closePagesExcept(const QModelIndex &index);
|
|
|
|
|
|
2010-04-12 14:55:41 +02:00
|
|
|
void gotoNextPage();
|
|
|
|
|
void gotoPreviousPage();
|
|
|
|
|
|
2010-03-29 14:57:02 +02:00
|
|
|
private:
|
|
|
|
|
void removePage(int index);
|
2010-04-12 14:55:41 +02:00
|
|
|
void showTwicherOrSelectPage() const;
|
2010-08-16 15:25:27 +02:00
|
|
|
void openPagesContextMenu(const QPoint &point);
|
|
|
|
|
|
2018-04-19 10:47:13 +02:00
|
|
|
QComboBox *m_comboBox = nullptr;
|
2019-09-02 15:52:01 +02:00
|
|
|
HelpWidget *m_helpWidget = nullptr;
|
2018-04-19 10:47:13 +02:00
|
|
|
mutable OpenPagesWidget *m_openPagesWidget = nullptr;
|
|
|
|
|
OpenPagesSwitcher *m_openPagesSwitcher = nullptr;
|
2010-03-29 14:57:02 +02:00
|
|
|
};
|
|
|
|
|
|
2019-09-02 15:52:01 +02:00
|
|
|
} // namespace Internal
|
2010-03-29 14:57:02 +02:00
|
|
|
} // namespace Help
|