VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserDialog.h@ 102493

Last change on this file since 102493 was 99973, checked in by vboxsync, 17 months ago

FE/Qt: bugref:10451. scm fix.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.0 KB
Line 
1/* $Id: UIHelpBrowserDialog.h 99973 2023-05-25 10:14:39Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UIHelpBrowserDialog class declaration.
4 */
5
6/*
7 * Copyright (C) 2010-2023 Oracle and/or its affiliates.
8 *
9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * SPDX-License-Identifier: GPL-3.0-only
26 */
27
28#ifndef FEQT_INCLUDED_SRC_helpbrowser_UIHelpBrowserDialog_h
29#define FEQT_INCLUDED_SRC_helpbrowser_UIHelpBrowserDialog_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34/* Qt includes: */
35#include <QPointer>
36
37/* GUI includes: */
38#include "QIWithRestorableGeometry.h"
39#include "QIWithRetranslateUI.h"
40
41
42/* Forward declarations: */
43class QLabel;
44class UIHelpBrowserWidget;
45
46class SHARED_LIBRARY_STUFF UIHelpBrowserDialog : public QIWithRetranslateUI<QIWithRestorableGeometry<QMainWindow> >
47{
48 Q_OBJECT;
49
50public:
51
52 static void findManualFileAndShow(const QString &strKeyword = QString());
53
54 /** @name Remove default ctor, and copying.
55 * @{ */
56 UIHelpBrowserDialog() = delete;
57 UIHelpBrowserDialog(const UIHelpBrowserDialog &other) = delete;
58 void operator=(const UIHelpBrowserDialog &other) = delete;
59 /** @} */
60
61protected:
62
63 /** Handles translation event. */
64 virtual void retranslateUi() RT_OVERRIDE;
65 virtual bool event(QEvent *pEvent) RT_OVERRIDE;
66
67 /** @name Prepare/cleanup cascade.
68 * @{ */
69 virtual void prepareCentralWidget();
70 virtual void loadSettings();
71 virtual void saveDialogGeometry();
72 /** @} */
73
74 /** Returns whether the window should be maximized when geometry being restored. */
75 virtual bool shouldBeMaximized() const RT_OVERRIDE;
76
77private slots:
78
79 void sltStatusBarMessage(const QString& strLink, int iTimeOut);
80 void sltStatusBarVisibilityChange(bool fVisible);
81 void sltZoomPercentageChanged(int iPercentage);
82
83private:
84
85 UIHelpBrowserDialog(QWidget *pParent, QWidget *pCenterWidget, const QString &strHelpFilePath);
86 static void showUserManual(const QString &strHelpFilePath, const QString &strKeyword);
87
88 /** A passthru function for QHelpIndexWidget::showHelpForKeyword. */
89 void showHelpForKeyword(const QString &strKeyword);
90
91 QString m_strHelpFilePath;
92 UIHelpBrowserWidget *m_pWidget;
93 QWidget *m_pCenterWidget;
94 int m_iGeometrySaveTimerId;
95 QLabel *m_pZoomLabel;
96 static QPointer<UIHelpBrowserDialog> m_pInstance;
97};
98
99
100#endif /* !FEQT_INCLUDED_SRC_helpbrowser_UIHelpBrowserDialog_h */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette