VirtualBox

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

Last change on this file since 82781 was 76581, checked in by vboxsync, 5 years ago

Fe/QT: scm header guard alignment.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.4 KB
Line 
1/* $Id: VBoxLicenseViewer.h 76581 2019-01-01 06:24:57Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - VBoxLicenseViewer class declaration.
4 */
5
6/*
7 * Copyright (C) 2006-2019 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18#ifndef FEQT_INCLUDED_SRC_VBoxLicenseViewer_h
19#define FEQT_INCLUDED_SRC_VBoxLicenseViewer_h
20#ifndef RT_WITHOUT_PRAGMA_ONCE
21# pragma once
22#endif
23
24/* Qt includes: */
25#include <QDialog>
26
27/* GUI includes: */
28#include "QIWithRetranslateUI.h"
29#include "UILibraryDefs.h"
30
31/* Forward declarations: */
32class QTextBrowser;
33class QPushButton;
34
35/** QDialog subclass used to show a user license under linux. */
36class SHARED_LIBRARY_STUFF VBoxLicenseViewer : public QIWithRetranslateUI2<QDialog>
37{
38 Q_OBJECT;
39
40public:
41
42 /** Constructs license viewer passing @a pParent to the base-class. */
43 VBoxLicenseViewer(QWidget *pParent = 0);
44
45 /** Shows license from passed @a strLicenseText. */
46 int showLicenseFromString(const QString &strLicenseText);
47 /** Shows license from file with passed @a strLicenseFileName. */
48 int showLicenseFromFile(const QString &strLicenseFileName);
49
50protected:
51
52 /** Preprocesses Qt @a pEvent for passed @a pObject. */
53 virtual bool eventFilter(QObject *pObject, QEvent *pEvent) /* override */;
54
55 /** Handles Qt show @a pEvent. */
56 virtual void showEvent(QShowEvent *pEvent) /* override */;
57
58 /** Handles translation event. */
59 virtual void retranslateUi() /* override */;
60
61private slots:
62
63 /** Executes the dialog. */
64 int exec();
65
66 /** Handles scroll-bar moving by a certain @a iValue. */
67 void sltHandleScrollBarMoved(int iValue);
68
69 /** Uplocks buttons. */
70 void sltUnlockButtons();
71
72private:
73
74 /** Holds the licence text browser instance. */
75 QTextBrowser *m_pLicenseBrowser;
76
77 /** Holds the licence agree button instance. */
78 QPushButton *m_pButtonAgree;
79 /** Holds the licence disagree button instance. */
80 QPushButton *m_pButtonDisagree;
81};
82
83#endif /* !FEQT_INCLUDED_SRC_VBoxLicenseViewer_h */
84
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use