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
globalactions.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 GLOBALACTIONS_H
5#define GLOBALACTIONS_H
6
7#include <QtCore/QList>
8#include <QtCore/QObject>
9#include <QtGui/qtguiglobal.h>
10
12
13class QAction;
14class QMenu;
15
16class GlobalActions : public QObject
17{
18 Q_OBJECT
19 Q_DISABLE_COPY(GlobalActions)
20public:
21 static GlobalActions *instance(QObject *parent = nullptr);
22
23 QList<QAction *> actionList() const { return m_actionList; }
24 QAction *backAction() const { return m_backAction; }
25 QAction *nextAction() const { return m_nextAction; }
26 QAction *homeAction() const { return m_homeAction; }
27 QAction *zoomInAction() const { return m_zoomInAction; }
28 QAction *zoomOutAction() const { return m_zoomOutAction; }
29#if QT_CONFIG(clipboard)
30 QAction *copyAction() const { return m_copyAction; }
31#endif
32 QAction *printAction() const { return m_printAction; }
33 QAction *findAction() const { return m_findAction; }
34
35public slots:
36#if QT_CONFIG(clipboard)
37 void setCopyAvailable(bool available);
38#endif
39 void updateActions();
40
41#if defined(BROWSER_QTWEBKIT)
42private slots:
46#endif // BROWSER_QTWEBKIT
47
48private:
49 void setupNavigationMenus(QAction *back, QAction *next, QWidget *parent);
50
51private:
52 GlobalActions(QObject *parent);
53
54 static GlobalActions *m_instance;
55
56 QAction *m_backAction;
57 QAction *m_nextAction;
58 QAction *m_homeAction;
59 QAction *m_zoomInAction;
60 QAction *m_zoomOutAction;
61#if QT_CONFIG(clipboard)
63#endif
64 QAction *m_printAction;
65 QAction *m_findAction;
66
67 QList<QAction *> m_actionList;
68
69#if defined(BROWSER_QTWEBKIT)
72#endif
73};
74
75QT_END_NAMESPACE
76
77#endif // GLOBALACTIONS_H
QString documentTitle() const
void setText(const QString &text, const QByteArray &resources)
void setPixmap(const QPixmap &pixmap)
QSize minimumSizeHint() const override
QVariant loadResource(int type, const QUrl &name) override
This function is called when the document is loaded and for each image in the document.
void doSetSource(const QUrl &name, QTextDocument::ResourceType type) override
Attempts to load the document at the given url with the specified type.
void setText(const QString &text, const QByteArray &resources)
void subclassKeyPressEvent(QKeyEvent *event)
void focusInEvent(QFocusEvent *event) override
This event handler can be reimplemented in a subclass to receive keyboard focus events (focus receive...
void setBookmarksToolbar(QToolBar *toolBar)
void setSource(const QUrl &url)
void setSourceInNewTab(const QUrl &url)
QWidget * bookmarkDockWidget() const
~BookmarkManager() override
static void destroy()
bool eventFilter(QObject *object, QEvent *event) override
Filters events if this object has been installed as an event filter for the watched object.
void sourceChanged(const QUrl &url)
QString currentTitle() const
void backwardAvailable(bool available)
bool isBackwardAvailable() const
HelpViewer * viewerAt(int index) const
int currentIndex() const
static CentralWidget * instance()
void forwardAvailable(bool available)
bool hasSelection() const
CentralWidget(QWidget *parent=nullptr)
void keyPressEvent(QKeyEvent *) override
This event handler, for event event, can be reimplemented in a subclass to receive key press events f...
void setSourceFromSearch(const QUrl &url)
bool eventFilter(QObject *object, QEvent *e) override
Filters events if this object has been installed as an event filter for the watched object.
QUrl currentSource() const
void highlighted(const QUrl &link)
void setSource(const QUrl &url)
HelpViewer * currentHelpViewer() const
void focusInEvent(QFocusEvent *event) override
This event handler can be reimplemented in a subclass to receive keyboard focus events (focus receive...
void updateUserInterface()
~CentralWidget() override
bool isForwardAvailable() const
ShowState index() const
ShowState contents() const
ShowState bookmarks() const
bool enableRemoteControl() const
bool collectionFileGiven() const
ShowState search() const
bool syncToContent(const QUrl &url)
void focusInEvent(QFocusEvent *e) override
This event handler can be reimplemented in a subclass to receive keyboard focus events (focus receive...
void escapePressed()
void expandToDepth(int depth)
bool eventFilter(QObject *o, QEvent *e) override
Filters events if this object has been installed as an event filter for the watched object.
~ContentWindow() override
QAction * findAction() const
QAction * zoomInAction() const
QAction * nextAction() const
QList< QAction * > actionList() const
QAction * homeAction() const
QAction * backAction() const
QAction * printAction() const
QAction * zoomOutAction() const
QHelpFilterEngine * filterEngine() const
QHelpSearchEngine * searchEngine() const
static HelpEngineWrapper & instance()
bool addressBarEnabled() const
bool addressBarVisible() const
void setUseBrowserFont(bool useBrowserFont)
QHelpIndexModel * indexModel() const
bool filterFunctionalityEnabled() const
bool filterToolbarVisible() const
void setUseAppFont(bool useAppFont)
QHelpContentModel * contentModel() const
void escapePressed()
void closeEvent(QCloseEvent *event) override
[21]
void setIndexString(const QString &str)
~MainWindow() override
void syncContents()
void setBookmarksVisible(bool visible)
static void activateCurrentBrowser()
void activateCurrentCentralWidgetTab()
void expandTOC(int depth)
void setIndexVisible(bool visible)
void setSearchVisible(bool visible)
void currentFilterChanged(const QString &filter)
bool usesDefaultCollection() const
QAbstractItemView * openPagesWidget() const
HelpViewer * createNewPageFromSearch(const QUrl &url)
void pageAdded(int index)
HelpViewer * createBlankPage()
static OpenPagesManager * instance()
void updateApplicationFont()
void updateUserInterface()
void docsInstalled(bool newDocsInstalled)
void setCurrent(HelpViewer *viewer)
void removeTabAt(HelpViewer *viewer)
QUrl link() const
Combined button and popup list for selecting options.
static const char * docs[]
static QStringList newQtDocumentation()
@ warnAboutMissingModules
#define TRACE_OBJ
Definition tracer.h:34