VirtualBox

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

Last change on this file since 96407 was 96407, checked in by vboxsync, 2 years ago

scm copyright and license note update

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