VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageVMs.h@ 103551

Last change on this file since 103551 was 98103, checked in by vboxsync, 23 months ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.5 KB
Line 
1/* $Id: UIWizardExportAppPageVMs.h 98103 2023-01-17 14:15:46Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UIWizardExportAppPageVMs 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_exportappliance_UIWizardExportAppPageVMs_h
29#define FEQT_INCLUDED_SRC_wizards_exportappliance_UIWizardExportAppPageVMs_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34/* Qt includes */
35#include <QUuid>
36
37/* GUI includes: */
38#include "UINativeWizardPage.h"
39
40/* Forward declarations: */
41class QListWidget;
42class QIRichTextLabel;
43class UIWizardExportApp;
44
45/** Namespace for VMs page of the Export Appliance wizard. */
46namespace UIWizardExportAppVMs
47{
48 /** Populates @a pVMSelector with items on the basis of passed @a selectedVMNames. */
49 void populateVMItems(QListWidget *pVMSelector, const QStringList &selectedVMNames);
50
51 /** Refresh a list of saved machines selected in @a pVMSelector. */
52 void refreshSavedMachines(QStringList &savedMachines, QListWidget *pVMSelector);
53
54 /** Returns a list of machine names selected in @a pVMSelector. */
55 QStringList machineNames(QListWidget *pVMSelector);
56 /** Returns a list of machine IDs selected in @a pVMSelector. */
57 QList<QUuid> machineIDs(QListWidget *pVMSelector);
58}
59
60/** UINativeWizardPage extension for VMs page of the Export Appliance wizard,
61 * based on UIWizardExportAppVMs namespace functions. */
62class UIWizardExportAppPageVMs : public UINativeWizardPage
63{
64 Q_OBJECT;
65
66public:
67
68 /** Constructs VMs page.
69 * @param selectedVMNames Brings the list of selected VM names.
70 * @param fFastTravelToNextPage Brings whether we should fast-travel to next page. */
71 UIWizardExportAppPageVMs(const QStringList &selectedVMNames, bool fFastTravelToNextPage);
72
73protected:
74
75 /** Returns wizard this page belongs to. */
76 UIWizardExportApp *wizard() const;
77
78 /** Handles translation event. */
79 virtual void retranslateUi() /* override final */;
80
81 /** Performs page initialization. */
82 virtual void initializePage() /* override final */;
83
84 /** Returns whether page is complete. */
85 virtual bool isComplete() const /* override final */;
86
87 /** Performs page validation. */
88 virtual bool validatePage() /* override final */;
89
90private slots:
91
92 /** Handles VM item selection change. */
93 void sltHandleVMItemSelectionChanged();
94
95private:
96
97 /** Holds the list of selected VM names. */
98 const QStringList m_selectedVMNames;
99 /** Holds whether we should fast travel to next page. */
100 bool m_fFastTravelToNextPage;
101
102 /** Holds the main label instance. */
103 QIRichTextLabel *m_pLabelMain;
104
105 /** Holds the VM selector instance. */
106 QListWidget *m_pVMSelector;
107};
108
109#endif /* !FEQT_INCLUDED_SRC_wizards_exportappliance_UIWizardExportAppPageVMs_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