1 | /* $Id: UIHostnameDomainNameEditor.h 98103 2023-01-17 14:15:46Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VBox Qt GUI - UIHostnameDomainNameEditor 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_wizards_editors_UIHostnameDomainNameEditor_h
|
---|
29 | #define FEQT_INCLUDED_SRC_wizards_editors_UIHostnameDomainNameEditor_h
|
---|
30 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
31 | # pragma once
|
---|
32 | #endif
|
---|
33 |
|
---|
34 | /* Qt includes: */
|
---|
35 | #include <QIcon>
|
---|
36 | #include <QWidget>
|
---|
37 |
|
---|
38 | /* Local includes: */
|
---|
39 | #include "QIWithRetranslateUI.h"
|
---|
40 |
|
---|
41 | /* Forward declarations: */
|
---|
42 | class QGridLayout;
|
---|
43 | class QLabel;
|
---|
44 | class QILineEdit;
|
---|
45 | class UIMarkableLineEdit;
|
---|
46 | class UIPasswordLineEdit;
|
---|
47 |
|
---|
48 | class UIHostnameDomainNameEditor : public QIWithRetranslateUI<QWidget>
|
---|
49 | {
|
---|
50 |
|
---|
51 | Q_OBJECT;
|
---|
52 |
|
---|
53 | signals:
|
---|
54 |
|
---|
55 | void sigHostnameDomainNameChanged(const QString &strHostNameDomain, bool fIsComplete);
|
---|
56 |
|
---|
57 | public:
|
---|
58 |
|
---|
59 | UIHostnameDomainNameEditor(QWidget *pParent = 0);
|
---|
60 |
|
---|
61 | QString hostname() const;
|
---|
62 | void setHostname(const QString &strHostname);
|
---|
63 |
|
---|
64 | QString domainName() const;
|
---|
65 | void setDomainName(const QString &strDomain);
|
---|
66 |
|
---|
67 | QString hostnameDomainName() const;
|
---|
68 |
|
---|
69 | bool isComplete() const;
|
---|
70 | void mark();
|
---|
71 |
|
---|
72 | int firstColumnWidth() const;
|
---|
73 | void setFirstColumnWidth(int iWidth);
|
---|
74 |
|
---|
75 |
|
---|
76 | protected:
|
---|
77 |
|
---|
78 | void retranslateUi();
|
---|
79 |
|
---|
80 | private slots:
|
---|
81 |
|
---|
82 | void sltHostnameChanged();
|
---|
83 | void sltDomainChanged();
|
---|
84 |
|
---|
85 | private:
|
---|
86 |
|
---|
87 | void prepare();
|
---|
88 | template<class T>
|
---|
89 | void addLineEdit(int &iRow, QLabel *&pLabel, T *&pLineEdit, QGridLayout *pLayout);
|
---|
90 |
|
---|
91 | UIMarkableLineEdit *m_pHostnameLineEdit;
|
---|
92 | QILineEdit *m_pDomainNameLineEdit;
|
---|
93 |
|
---|
94 | QLabel *m_pHostnameLabel;
|
---|
95 | QLabel *m_pDomainNameLabel;
|
---|
96 | QGridLayout *m_pMainLayout;
|
---|
97 | };
|
---|
98 |
|
---|
99 | #endif /* !FEQT_INCLUDED_SRC_wizards_editors_UIHostnameDomainNameEditor_h */
|
---|