1 | /* $Id: UIProxyFeaturesEditor.h 104313 2024-04-12 13:10:30Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VBox Qt GUI - UIProxyFeaturesEditor class declaration.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2006-2023 Oracle and/or its affiliates.
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox base platform packages, as
|
---|
10 | * available from https://www.virtualbox.org.
|
---|
11 | *
|
---|
12 | * This program is free software; you can redistribute it and/or
|
---|
13 | * modify it under the terms of the GNU General Public License
|
---|
14 | * as published by the Free Software Foundation, in version 3 of the
|
---|
15 | * License.
|
---|
16 | *
|
---|
17 | * This program is distributed in the hope that it will be useful, but
|
---|
18 | * WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
20 | * General Public License for more details.
|
---|
21 | *
|
---|
22 | * You should have received a copy of the GNU General Public License
|
---|
23 | * along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
24 | *
|
---|
25 | * SPDX-License-Identifier: GPL-3.0-only
|
---|
26 | */
|
---|
27 |
|
---|
28 | #ifndef FEQT_INCLUDED_SRC_settings_editors_UIProxyFeaturesEditor_h
|
---|
29 | #define FEQT_INCLUDED_SRC_settings_editors_UIProxyFeaturesEditor_h
|
---|
30 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
31 | # pragma once
|
---|
32 | #endif
|
---|
33 |
|
---|
34 | /* COM includes: */
|
---|
35 | #include "KProxyMode.h"
|
---|
36 |
|
---|
37 | /* GUI includes: */
|
---|
38 | #include "UIEditor.h"
|
---|
39 |
|
---|
40 |
|
---|
41 | /* Forward declarations: */
|
---|
42 | class QButtonGroup;
|
---|
43 | class QLabel;
|
---|
44 | class QRadioButton;
|
---|
45 | class QILineEdit;
|
---|
46 |
|
---|
47 | /** UIEditor sub-class used as global proxy features editor. */
|
---|
48 | class SHARED_LIBRARY_STUFF UIProxyFeaturesEditor : public UIEditor
|
---|
49 | {
|
---|
50 | Q_OBJECT;
|
---|
51 |
|
---|
52 | signals:
|
---|
53 |
|
---|
54 | /** Notifies listeners about proxy mode changed. */
|
---|
55 | void sigProxyModeChanged();
|
---|
56 | /** Notifies listeners about proxy host changed. */
|
---|
57 | void sigProxyHostChanged();
|
---|
58 |
|
---|
59 | public:
|
---|
60 |
|
---|
61 | /** Constructs editor passing @a pParent to the base-class. */
|
---|
62 | UIProxyFeaturesEditor(QWidget *pParent = 0);
|
---|
63 |
|
---|
64 | /** Defines proxy @a enmMode. */
|
---|
65 | void setProxyMode(KProxyMode enmMode);
|
---|
66 | /** Returns proxy mode. */
|
---|
67 | KProxyMode proxyMode() const;
|
---|
68 |
|
---|
69 | /** Defines proxy @a strHost. */
|
---|
70 | void setProxyHost(const QString &strHost);
|
---|
71 | /** Returns proxy host. */
|
---|
72 | QString proxyHost() const;
|
---|
73 |
|
---|
74 | private slots:
|
---|
75 |
|
---|
76 | /** Handles translation event. */
|
---|
77 | virtual void sltRetranslateUI() RT_OVERRIDE RT_FINAL;
|
---|
78 |
|
---|
79 | /** Handles proxy mode change. */
|
---|
80 | void sltHandleProxyModeChanged();
|
---|
81 |
|
---|
82 | private:
|
---|
83 |
|
---|
84 | /** Prepares all. */
|
---|
85 | void prepare();
|
---|
86 |
|
---|
87 | /** @name Values
|
---|
88 | * @{ */
|
---|
89 | /** Holds the proxy mode. */
|
---|
90 | KProxyMode m_enmProxyMode;
|
---|
91 | /** Holds the proxy host. */
|
---|
92 | QString m_strProxyHost;
|
---|
93 | /** @} */
|
---|
94 |
|
---|
95 | /** @name Widgets
|
---|
96 | * @{ */
|
---|
97 | /** Holds the button-group instance. */
|
---|
98 | QButtonGroup *m_pButtonGroup;
|
---|
99 | /** Holds the 'proxy auto' radio-button instance. */
|
---|
100 | QRadioButton *m_pRadioButtonProxyAuto;
|
---|
101 | /** Holds the 'proxy disabled' radio-button instance. */
|
---|
102 | QRadioButton *m_pRadioButtonProxyDisabled;
|
---|
103 | /** Holds the 'proxy enabled' radio-button instance. */
|
---|
104 | QRadioButton *m_pRadioButtonProxyEnabled;
|
---|
105 | /** Holds the settings widget instance. */
|
---|
106 | QWidget *m_pWidgetSettings;
|
---|
107 | /** Holds the host label instance. */
|
---|
108 | QLabel *m_pLabelHost;
|
---|
109 | /** Holds the host editor instance. */
|
---|
110 | QILineEdit *m_pEditorHost;
|
---|
111 | /** @} */
|
---|
112 | };
|
---|
113 |
|
---|
114 | #endif /* !FEQT_INCLUDED_SRC_settings_editors_UIProxyFeaturesEditor_h */
|
---|