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