1 | /** @file
|
---|
2 | *
|
---|
3 | * VBox frontends: Qt4 GUI ("VirtualBox"):
|
---|
4 | * VBoxGlobalSettingsDlg class declaration
|
---|
5 | */
|
---|
6 |
|
---|
7 | /*
|
---|
8 | * Copyright (C) 2006-2008 Sun Microsystems, Inc.
|
---|
9 | *
|
---|
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.
|
---|
17 | *
|
---|
18 | * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
|
---|
19 | * Clara, CA 95054 USA or visit http://www.sun.com if you need
|
---|
20 | * additional information or have any questions.
|
---|
21 | */
|
---|
22 |
|
---|
23 | #ifndef __VBoxGlobalSettingsDlg_h__
|
---|
24 | #define __VBoxGlobalSettingsDlg_h__
|
---|
25 |
|
---|
26 | #include "VBoxGlobalSettingsDlg.gen.h"
|
---|
27 | #include "QIMainDialog.h"
|
---|
28 | #include "QIWithRetranslateUI.h"
|
---|
29 | #include "COMDefs.h"
|
---|
30 | #include "VBoxGlobalSettings.h"
|
---|
31 |
|
---|
32 | class QIWidgetValidator;
|
---|
33 | class VBoxMediaComboBox;
|
---|
34 | class VBoxWarnIconLabel;
|
---|
35 |
|
---|
36 | class QTimer;
|
---|
37 |
|
---|
38 | class VBoxGlobalSettingsDlg : public QIWithRetranslateUI<QIMainDialog>,
|
---|
39 | public Ui::VBoxGlobalSettingsDlg
|
---|
40 | {
|
---|
41 | Q_OBJECT;
|
---|
42 |
|
---|
43 | public:
|
---|
44 |
|
---|
45 | VBoxGlobalSettingsDlg (QWidget *aParent);
|
---|
46 |
|
---|
47 | void getFrom (const CSystemProperties &aProps,
|
---|
48 | const VBoxGlobalSettings &aGs);
|
---|
49 | COMResult putBackTo (CSystemProperties &aProps,
|
---|
50 | VBoxGlobalSettings &aGs);
|
---|
51 |
|
---|
52 | protected:
|
---|
53 |
|
---|
54 | void retranslateUi();
|
---|
55 |
|
---|
56 | private slots:
|
---|
57 |
|
---|
58 | void enableOk (const QIWidgetValidator*);
|
---|
59 | void revalidate (QIWidgetValidator *aWval);
|
---|
60 | void settingsGroupChanged (QTreeWidgetItem *aItem, QTreeWidgetItem *aPrev);
|
---|
61 | void updateWhatsThis (bool aGotFocus = false);
|
---|
62 | void whatsThisCandidateDestroyed (QObject *aObj = NULL);
|
---|
63 |
|
---|
64 | private:
|
---|
65 |
|
---|
66 | bool eventFilter (QObject *aObject, QEvent *aEvent);
|
---|
67 | void showEvent (QShowEvent *aEvent);
|
---|
68 |
|
---|
69 | QString pagePath (QWidget *aPage);
|
---|
70 | void setWarning (const QString &aWarning);
|
---|
71 | void updateAvailability();
|
---|
72 |
|
---|
73 | /* Common */
|
---|
74 | QString mWarnString;
|
---|
75 | VBoxWarnIconLabel *mWarnIconLabel;
|
---|
76 |
|
---|
77 | /* Flags */
|
---|
78 | bool mPolished;
|
---|
79 | bool mValid;
|
---|
80 |
|
---|
81 | /* WhatsThis Stuff */
|
---|
82 | QTimer *mWhatsThisTimer;
|
---|
83 | QWidget *mWhatsThisCandidate;
|
---|
84 | };
|
---|
85 |
|
---|
86 | #endif // __VBoxGlobalSettingsDlg_h__
|
---|
87 |
|
---|