[31877] | 1 | /** @file
|
---|
| 2 | *
|
---|
| 3 | * VBox frontends: Qt4 GUI ("VirtualBox"):
|
---|
| 4 | * VBoxLicenseViewer class declaration
|
---|
| 5 | */
|
---|
| 6 |
|
---|
| 7 | /*
|
---|
| 8 | * Copyright (C) 2006-2010 Oracle Corporation
|
---|
| 9 | *
|
---|
[31885] | 10 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
| 11 | * available from http://www.virtualbox.org. This file is free software;
|
---|
| 12 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
| 13 | * General Public License (GPL) as published by the Free Software
|
---|
| 14 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
| 15 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
| 16 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
[31877] | 17 | */
|
---|
| 18 |
|
---|
| 19 | #ifndef __VBoxLicenseViewer__
|
---|
| 20 | #define __VBoxLicenseViewer__
|
---|
| 21 |
|
---|
| 22 | #include "QIWithRetranslateUI.h"
|
---|
| 23 |
|
---|
| 24 | /* Qt includes */
|
---|
| 25 | #include <QDialog>
|
---|
| 26 |
|
---|
| 27 | class QTextBrowser;
|
---|
| 28 | class QPushButton;
|
---|
| 29 |
|
---|
| 30 | /**
|
---|
| 31 | * This class is used to show a user license under linux.
|
---|
| 32 | */
|
---|
[35103] | 33 | class VBoxLicenseViewer : public QIWithRetranslateUI2<QDialog>
|
---|
[31877] | 34 | {
|
---|
| 35 | Q_OBJECT;
|
---|
| 36 |
|
---|
| 37 | public:
|
---|
| 38 |
|
---|
[35103] | 39 | VBoxLicenseViewer(QWidget *pParent = 0);
|
---|
[31877] | 40 |
|
---|
[34811] | 41 | int showLicenseFromFile(const QString &strLicenseFileName);
|
---|
| 42 | int showLicenseFromString(const QString &strLicenseText);
|
---|
[31877] | 43 |
|
---|
| 44 | protected:
|
---|
| 45 |
|
---|
| 46 | void retranslateUi();
|
---|
| 47 |
|
---|
| 48 | private slots:
|
---|
| 49 |
|
---|
[34811] | 50 | int exec();
|
---|
| 51 |
|
---|
[31877] | 52 | void onScrollBarMoving (int aValue);
|
---|
| 53 |
|
---|
| 54 | void unlockButtons();
|
---|
| 55 |
|
---|
| 56 | private:
|
---|
| 57 |
|
---|
| 58 | void showEvent (QShowEvent *aEvent);
|
---|
| 59 |
|
---|
| 60 | bool eventFilter (QObject *aObject, QEvent *aEvent);
|
---|
| 61 |
|
---|
| 62 | /* Private member vars */
|
---|
| 63 | QTextBrowser *mLicenseText;
|
---|
| 64 | QPushButton *mAgreeButton;
|
---|
| 65 | QPushButton *mDisagreeButton;
|
---|
| 66 | };
|
---|
| 67 |
|
---|
| 68 | #endif /* __VBoxLicenseViewer__ */
|
---|
| 69 |
|
---|