VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/VBoxLicenseViewer.h

Last change on this file was 104358, checked in by vboxsync, 3 months ago

FE/Qt. bugref:10622. More refactoring around the retranslation functionality.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.6 KB
Line 
1/* $Id: VBoxLicenseViewer.h 104358 2024-04-18 05:33:40Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - VBoxLicenseViewer class declaration.
4 */
5
6/*
7 * Copyright (C) 2006-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_VBoxLicenseViewer_h
29#define FEQT_INCLUDED_SRC_VBoxLicenseViewer_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34/* Qt includes: */
35#include <QDialog>
36
37/* GUI includes: */
38#include "UILibraryDefs.h"
39
40/* Forward declarations: */
41class QTextBrowser;
42class QPushButton;
43
44/** QDialog subclass used to show a user license under linux. */
45class SHARED_LIBRARY_STUFF VBoxLicenseViewer : public QDialog
46{
47 Q_OBJECT;
48
49public:
50
51 /** Constructs license viewer passing @a pParent to the base-class. */
52 VBoxLicenseViewer(QWidget *pParent = 0);
53
54 /** Shows license from passed @a strLicenseText. */
55 int showLicenseFromString(const QString &strLicenseText);
56 /** Shows license from file with passed @a strLicenseFileName. */
57 int showLicenseFromFile(const QString &strLicenseFileName);
58
59protected:
60
61 /** Preprocesses Qt @a pEvent for passed @a pObject. */
62 virtual bool eventFilter(QObject *pObject, QEvent *pEvent) RT_OVERRIDE;
63
64 /** Handles Qt show @a pEvent. */
65 virtual void showEvent(QShowEvent *pEvent) RT_OVERRIDE;
66
67private slots:
68
69 /** Executes the dialog. */
70 int exec() RT_OVERRIDE;
71
72 /** Handles scroll-bar moving by a certain @a iValue. */
73 void sltHandleScrollBarMoved(int iValue);
74
75 /** Uplocks buttons. */
76 void sltUnlockButtons();
77
78 /** Handles translation event. */
79 void sltRetranslateUI();
80
81private:
82
83 /** Holds the licence text browser instance. */
84 QTextBrowser *m_pLicenseBrowser;
85
86 /** Holds the licence agree button instance. */
87 QPushButton *m_pButtonAgree;
88 /** Holds the licence disagree button instance. */
89 QPushButton *m_pButtonDisagree;
90};
91
92#endif /* !FEQT_INCLUDED_SRC_VBoxLicenseViewer_h */
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use