VirtualBox

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

Last change on this file since 82781 was 82436, checked in by vboxsync, 4 years ago

FE/Qt: bugref:9390: UIGraphicsControllerEditor: Get rid of hardcoded graphics controller types, instead acquire these types through CSystemProperties interface; Besides that, adjust machine settings to advice recommended controller only if it's among supported.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.6 KB
Line 
1/* $Id: UIGraphicsControllerEditor.h 82436 2019-12-05 17:48:54Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UIGraphicsControllerEditor class declaration.
4 */
5
6/*
7 * Copyright (C) 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_widgets_UIGraphicsControllerEditor_h
19#define FEQT_INCLUDED_SRC_widgets_UIGraphicsControllerEditor_h
20#ifndef RT_WITHOUT_PRAGMA_ONCE
21# pragma once
22#endif
23
24/* Qt includes: */
25#include <QWidget>
26
27/* GUI includes: */
28#include "QIWithRetranslateUI.h"
29#include "UILibraryDefs.h"
30
31/* COM includes: */
32#include "COMEnums.h"
33
34/* Forward declarations: */
35class QLabel;
36class QIComboBox;
37
38/** QWidget subclass used as a graphics controller editor. */
39class SHARED_LIBRARY_STUFF UIGraphicsControllerEditor : public QIWithRetranslateUI<QWidget>
40{
41 Q_OBJECT;
42
43signals:
44
45 /** Notifies listeners about @a enmValue change. */
46 void sigValueChanged(KGraphicsControllerType enmValue);
47
48public:
49
50 /** Constructs graphics controller editor passing @a pParent to the base-class.
51 * @param fWithLabel Brings whether we should add label ourselves. */
52 UIGraphicsControllerEditor(QWidget *pParent = 0, bool fWithLabel = false);
53
54 /** Defines editor @a enmValue. */
55 void setValue(KGraphicsControllerType enmValue);
56 /** Returns editor value. */
57 KGraphicsControllerType value() const;
58
59 /** Returns the vector of supported values. */
60 QVector<KGraphicsControllerType> supportedValues() const { return m_supportedValues; }
61
62protected:
63
64 /** Handles translation event. */
65 virtual void retranslateUi() /* override */;
66
67private slots:
68
69 /** Handles current index change. */
70 void sltHandleCurrentIndexChanged();
71
72private:
73
74 /** Prepares all. */
75 void prepare();
76 /** Populates combo. */
77 void populateCombo();
78
79 /** Holds whether descriptive label should be created. */
80 bool m_fWithLabel;
81
82 /** Holds the value to be selected. */
83 KGraphicsControllerType m_enmValue;
84
85 /** Holds the vector of supported values. */
86 QVector<KGraphicsControllerType> m_supportedValues;
87
88 /** Holds the label instance. */
89 QLabel *m_pLabel;
90 /** Holds the combo instance. */
91 QIComboBox *m_pCombo;
92};
93
94#endif /* !FEQT_INCLUDED_SRC_widgets_UIGraphicsControllerEditor_h */
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use