VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/wizards/addcloudvm/UIWizardAddCloudVMPageSource.h@ 104158

Last change on this file since 104158 was 103982, checked in by vboxsync, 10 months ago

FE/Qt: bugref:10624. Replacing override and final keywords with RT_OVERRIDE and RT_FINAL defines.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.8 KB
Line 
1/* $Id: UIWizardAddCloudVMPageSource.h 103982 2024-03-21 11:43:53Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UIWizardAddCloudVMPageSource class declaration.
4 */
5
6/*
7 * Copyright (C) 2009-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_addcloudvm_UIWizardAddCloudVMPageSource_h
29#define FEQT_INCLUDED_SRC_wizards_addcloudvm_UIWizardAddCloudVMPageSource_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34/* GUI includes: */
35#include "UINativeWizardPage.h"
36
37/* COM includes: */
38#include "CCloudClient.h"
39
40/* Forward declarations: */
41class QGridLayout;
42class QLabel;
43class QListWidget;
44class QIComboBox;
45class QIRichTextLabel;
46class QIToolButton;
47class UINotificationCenter;
48class UIWizardAddCloudVM;
49
50/** Provider combo data fields. */
51enum
52{
53 ProviderData_Name = Qt::UserRole + 1,
54 ProviderData_ShortName = Qt::UserRole + 2
55};
56
57/** Profile combo data fields. */
58enum
59{
60 ProfileData_Name = Qt::UserRole + 1
61};
62
63/** Namespace for source page of the Add Cloud VM wizard. */
64namespace UIWizardAddCloudVMSource
65{
66 /** Populates @a pCombo with known providers. */
67 void populateProviders(QIComboBox *pCombo, UINotificationCenter *pCenter);
68 /** Populates @a pCombo with known profiles.
69 * @param strProviderShortName Brings the short name of provider profiles related to.
70 * @param strProfileName Brings the name of profile to be chosen by default. */
71 void populateProfiles(QIComboBox *pCombo, UINotificationCenter *pCenter, const QString &strProviderShortName, const QString &strProfileName);
72 /** Populates @a pList with profile instances available in @a comClient. */
73 void populateProfileInstances(QListWidget *pList, UINotificationCenter *pCenter, const CCloudClient &comClient);
74
75 /** Updates @a pCombo tool-tips. */
76 void updateComboToolTip(QIComboBox *pCombo);
77
78 /** Returns current user data for @a pList specified. */
79 QStringList currentListWidgetData(QListWidget *pList);
80}
81
82/** UINativeWizardPage extension for source page of the Add Cloud VM wizard,
83 * based on UIWizardAddCloudVMSource namespace functions. */
84class UIWizardAddCloudVMPageSource : public UINativeWizardPage
85{
86 Q_OBJECT;
87
88public:
89
90 /** Constructs source page. */
91 UIWizardAddCloudVMPageSource();
92
93protected:
94
95 /** Returns wizard this page belongs to. */
96 UIWizardAddCloudVM *wizard() const;
97
98 /** Performs page initialization. */
99 virtual void initializePage() RT_OVERRIDE RT_FINAL;
100
101 /** Returns whether page is complete. */
102 virtual bool isComplete() const RT_OVERRIDE RT_FINAL;
103
104 /** Performs page validation. */
105 virtual bool validatePage() RT_OVERRIDE RT_FINAL;
106
107private slots:
108
109 /** Handles change in provider combo-box. */
110 void sltHandleProviderComboChange();
111
112 /** Handles change in profile combo-box. */
113 void sltHandleProfileComboChange();
114 /** Handles profile tool-button click. */
115 void sltHandleProfileButtonClick();
116
117 /** Handles change in instance list. */
118 void sltHandleSourceInstanceChange();
119
120 /** Handles translation event. */
121 virtual void sltRetranslateUI() RT_OVERRIDE RT_FINAL;
122
123private:
124
125 /** Holds the main label instance. */
126 QIRichTextLabel *m_pLabelMain;
127
128 /** Holds the provider layout instance. */
129 QGridLayout *m_pProviderLayout;
130 /** Holds the provider type label instance. */
131 QLabel *m_pProviderLabel;
132 /** Holds the provider type combo-box instance. */
133 QIComboBox *m_pProviderComboBox;
134
135 /** Holds the description label instance. */
136 QIRichTextLabel *m_pLabelDescription;
137
138 /** Holds the options layout instance. */
139 QGridLayout *m_pOptionsLayout;
140 /** Holds the profile label instance. */
141 QLabel *m_pProfileLabel;
142 /** Holds the profile combo-box instance. */
143 QIComboBox *m_pProfileComboBox;
144 /** Holds the profile management tool-button instance. */
145 QIToolButton *m_pProfileToolButton;
146 /** Holds the source instance label instance. */
147 QLabel *m_pSourceInstanceLabel;
148 /** Holds the source instance list instance. */
149 QListWidget *m_pSourceInstanceList;
150};
151
152#endif /* !FEQT_INCLUDED_SRC_wizards_addcloudvm_UIWizardAddCloudVMPageSource_h */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette