Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
openpagesmodel.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
3
4#ifndef OPENPAGESMODEL_H
5#define OPENPAGESMODEL_H
6
8
9#include <QtCore/QAbstractTableModel>
10#include <QtCore/QList>
11
13
14class HelpViewer;
15class QUrl;
16
18{
20 friend class OpenPagesManager;
21public:
22 int rowCount(const QModelIndex &parent = QModelIndex()) const override;
23 int columnCount(const QModelIndex &parent = QModelIndex()) const override;
24 QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
25
26 HelpViewer *addPage(const QUrl &url, qreal zoom = 0);
27 void removePage(int index);
28 HelpViewer *pageAt(int index) const;
29
30private slots:
31 void handleTitleChanged();
32
33private:
34 OpenPagesModel(QObject *parent);
35
36private:
37 QList<HelpViewer *> m_pages;
38};
39
40QT_END_NAMESPACE
41
42#endif // OPENPAGESMODEL_H
int currentIndex() const
static CentralWidget * instance()
static HelpEngineWrapper & instance()
void reload()
QUrl source() const
QAbstractItemView * openPagesWidget() const
void setCurrentPage(HelpViewer *page)
bool pagesOpenForNamespace(const QString &nameSpace) const
HelpViewer * createNewPageFromSearch(const QUrl &url)
void closePage(HelpViewer *page)
void reloadPages(const QString &nameSpace)
HelpViewer * createBlankPage()
static OpenPagesManager * instance()
void setCurrentPage(int index)
void closePages(const QString &nameSpace)
HelpViewer * addPage(const QUrl &url, qreal zoom=0)
void removePage(int index)
int columnCount(const QModelIndex &parent=QModelIndex()) const override
Returns the number of columns for the children of the given parent.
int rowCount(const QModelIndex &parent=QModelIndex()) const override
Returns the number of rows under the given parent.
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
Returns the data stored under the given role for the item referred to by the index.
HelpViewer * pageAt(int index) const
void setVisible(bool visible) override
void closePagesExcept(const QModelIndex &index)
\inmodule QtCore
@ ShowLastPages
@ ShowHomePage
Combined button and popup list for selecting options.
#define TRACE_OBJ
Definition tracer.h:34