1 | /** @file
|
---|
2 | *
|
---|
3 | * VBox frontends: Qt GUI ("VirtualBox"):
|
---|
4 | * VBoxOSTypeSelectorWidget class declaration
|
---|
5 | */
|
---|
6 |
|
---|
7 | /*
|
---|
8 | * Copyright (C) 2008-2010 Oracle Corporation
|
---|
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 |
|
---|
19 | #ifndef __VBoxOSTypeSelectorWidget_h__
|
---|
20 | #define __VBoxOSTypeSelectorWidget_h__
|
---|
21 |
|
---|
22 | #include "QIWithRetranslateUI.h"
|
---|
23 | #include "VBoxGlobal.h"
|
---|
24 |
|
---|
25 | #include <QWidget>
|
---|
26 |
|
---|
27 | class QComboBox;
|
---|
28 | class QLabel;
|
---|
29 |
|
---|
30 | Q_DECLARE_METATYPE (CGuestOSType);
|
---|
31 |
|
---|
32 | class VBoxOSTypeSelectorWidget : public QIWithRetranslateUI <QWidget>
|
---|
33 | {
|
---|
34 | Q_OBJECT;
|
---|
35 | Q_PROPERTY(CGuestOSType type READ type WRITE setType);
|
---|
36 |
|
---|
37 | public:
|
---|
38 |
|
---|
39 | VBoxOSTypeSelectorWidget (QWidget *aParent);
|
---|
40 |
|
---|
41 | void setType (const CGuestOSType &aType);
|
---|
42 | CGuestOSType type() const;
|
---|
43 |
|
---|
44 | void setLayoutPosition (int aPos);
|
---|
45 | void activateLayout();
|
---|
46 |
|
---|
47 | signals:
|
---|
48 |
|
---|
49 | void osTypeChanged();
|
---|
50 |
|
---|
51 | protected:
|
---|
52 |
|
---|
53 | void retranslateUi();
|
---|
54 | void showEvent (QShowEvent *aEvent);
|
---|
55 |
|
---|
56 | private slots:
|
---|
57 |
|
---|
58 | void onFamilyChanged (int aIndex);
|
---|
59 | void onTypeChanged (int aIndex);
|
---|
60 |
|
---|
61 | private:
|
---|
62 |
|
---|
63 | QLabel *mTxFamilyName;
|
---|
64 | QLabel *mTxTypeName;
|
---|
65 | QLabel *mPxTypeIcon;
|
---|
66 | QComboBox *mCbFamily;
|
---|
67 | QComboBox *mCbType;
|
---|
68 |
|
---|
69 | CGuestOSType mType;
|
---|
70 | QMap <QString, QString> mCurrentIds;
|
---|
71 |
|
---|
72 | int mLayoutPosition;
|
---|
73 | bool mLayoutActivated;
|
---|
74 |
|
---|
75 | bool m_fSupportsHWVirtEx;
|
---|
76 | bool m_fSupportsLongMode;
|
---|
77 | };
|
---|
78 |
|
---|
79 | #endif /* __VBoxOSTypeSelectorWidget_h__ */
|
---|
80 |
|
---|