VirtualBox

Changeset 91260 in vbox


Ignore:
Timestamp:
Sep 15, 2021 6:55:11 PM (3 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9996: Export Appliance wizard: Move UIVMListWidgetItem from UIWizardExportAppDefs.h to UIWizardExportAppPageBasic1.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppDefs.h

    r82968 r91260  
    55
    66/*
    7  * Copyright (C) 2009-2020 Oracle Corporation
     7 * Copyright (C) 2009-2021 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    2525#include <QMetaType>
    2626#include <QPointer>
    27 #include <QListWidget>
    2827
    2928/* GUI includes: */
     
    3433Q_DECLARE_METATYPE(ExportAppliancePointer);
    3534
    36 /** QListWidgetItem subclass for Export Appliance wizard VM list. */
    37 class UIVMListWidgetItem : public QListWidgetItem
    38 {
    39 public:
    40 
    41     /** Constructs VM list item passing @a pixIcon, @a strText and @a pParent to the base-class.
    42       * @param  strUuid       Brings the machine ID.
    43       * @param  fInSaveState  Brings whether machine is in Saved state. */
    44     UIVMListWidgetItem(QPixmap &pixIcon, QString &strText, QUuid aUuid, bool fInSaveState, QListWidget *pParent)
    45         : QListWidgetItem(pixIcon, strText, pParent)
    46         , m_uUuid(aUuid)
    47         , m_fInSaveState(fInSaveState)
    48     {}
    49 
    50     /** Returns whether this item is less than @a other. */
    51     bool operator<(const QListWidgetItem &other) const
    52     {
    53         return text().toLower() < other.text().toLower();
    54     }
    55 
    56     /** Returns the machine ID. */
    57     QUuid uuid() const { return m_uUuid; }
    58     /** Returns whether machine is in Saved state. */
    59     bool isInSaveState() const { return m_fInSaveState; }
    60 
    61 private:
    62 
    63     /** Holds the machine ID. */
    64     QUuid    m_uUuid;
    65     /** Holds whether machine is in Saved state. */
    66     bool     m_fInSaveState;
    67 };
    68 
    6935#endif /* !FEQT_INCLUDED_SRC_wizards_exportappliance_UIWizardExportAppDefs_h */
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic1.cpp

    r91125 r91260  
    55
    66/*
    7  * Copyright (C) 2009-2020 Oracle Corporation
     7 * Copyright (C) 2009-2021 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    1717
    1818/* Qt includes: */
     19#include <QListWidget>
    1920#include <QVBoxLayout>
    2021
     
    2627#include "UIMessageCenter.h"
    2728#include "UIWizardExportApp.h"
    28 #include "UIWizardExportAppDefs.h"
    2929#include "UIWizardExportAppPageBasic1.h"
    3030
    3131/* COM includes: */
    3232#include "CMachine.h"
     33
     34
     35/** QListWidgetItem subclass for Export Appliance wizard VM list. */
     36class UIVMListWidgetItem : public QListWidgetItem
     37{
     38public:
     39
     40    /** Constructs VM list item passing @a pixIcon, @a strText and @a pParent to the base-class.
     41      * @param  strUuid       Brings the machine ID.
     42      * @param  fInSaveState  Brings whether machine is in Saved state. */
     43    UIVMListWidgetItem(QPixmap &pixIcon, QString &strText, QUuid aUuid, bool fInSaveState, QListWidget *pParent)
     44        : QListWidgetItem(pixIcon, strText, pParent)
     45        , m_uUuid(aUuid)
     46        , m_fInSaveState(fInSaveState)
     47    {}
     48
     49    /** Returns whether this item is less than @a other. */
     50    bool operator<(const QListWidgetItem &other) const
     51    {
     52        return text().toLower() < other.text().toLower();
     53    }
     54
     55    /** Returns the machine ID. */
     56    QUuid uuid() const { return m_uUuid; }
     57    /** Returns whether machine is in Saved state. */
     58    bool isInSaveState() const { return m_fInSaveState; }
     59
     60private:
     61
     62    /** Holds the machine ID. */
     63    QUuid    m_uUuid;
     64    /** Holds whether machine is in Saved state. */
     65    bool     m_fInSaveState;
     66};
    3367
    3468
Note: See TracChangeset for help on using the changeset viewer.

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