VirtualBox

Changeset 92437 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Nov 15, 2021 5:32:54 PM (3 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10141. Adding some extra data for medium selector dialog.

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.cpp

    r92436 r92437  
    251251const char *UIExtraDataDefs::GUI_VMActivityOverview_HiddenColumns = "GUI/VMActivityOverviewHiddenColumns";
    252252const char *UIExtraDataDefs::GUI_VMActivityOverview_ShowAllMachines = "GUI/VMActivityOverviewShowAllMachines";
     253
     254const char *UIExtraDataDefs::GUI_MediumSelector_DialogGeometry = "GUI/MediumSelector/DialogGeometry";
    253255
    254256/* Obsolete keys: */
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.h

    r92436 r92437  
    459459    /** @} */
    460460
     461    /** @name Medium Selector stuff
     462      * @{ */
     463        SHARED_LIBRARY_STUFF extern const char *GUI_MediumSelector_DialogGeometry;
     464    /** @} */
     465
    461466    /** @name Old key support stuff.
    462467      * @{ */
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp

    r92436 r92437  
    47224722}
    47234723
     4724QRect UIExtraDataManager::mediumSelectorDialogGeometry(QWidget *pWidget, QWidget *pParentWidget, const QRect &defaultGeometry)
     4725{
     4726    return dialogGeometry(GUI_MediumSelector_DialogGeometry, pWidget, pParentWidget, defaultGeometry);
     4727}
     4728
     4729void UIExtraDataManager::setMediumSelectorDialogGeometry(const QRect &geometry, bool fMaximized)
     4730{
     4731    setDialogGeometry(GUI_MediumSelector_DialogGeometry, geometry, fMaximized);
     4732}
     4733
     4734bool UIExtraDataManager::mediumSelectorDialogShouldBeMaximized()
     4735{
     4736    const QStringList data = extraDataStringList(GUI_MediumSelector_DialogGeometry);
     4737
     4738    /* Make sure 5th item has required value: */
     4739    return data.size() == 5 && data[4] == GUI_Geometry_State_Max;
     4740}
     4741
    47244742void UIExtraDataManager::sltExtraDataChange(const QUuid &uMachineID, const QString &strKey, const QString &strValue)
    47254743{
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h

    r92400 r92437  
    829829        bool VMActivityOverviewShowAllMachines();
    830830        void setVMActivityOverviewShowAllMachines(bool fShow);
     831    /** @} */
     832
     833    /** @name Medium Selector
     834      * @{ */
     835        QRect mediumSelectorDialogGeometry(QWidget *pWidget, QWidget *pParentWidget, const QRect &defaultGeometry);
     836        void setMediumSelectorDialogGeometry(const QRect &geometry, bool fMaximized);
     837        bool mediumSelectorDialogShouldBeMaximized();
    831838    /** @} */
    832839
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumSelector.cpp

    r92430 r92437  
    5757                                   const QString &machineSettingsFilePath, const QString &strMachineGuestOSTypeId,
    5858                                   const QUuid &uMachineID, QWidget *pParent, UIActionPool *pActionPool)
    59     :QIWithRetranslateUI<QIMainDialog>(pParent)
     59    :QIWithRetranslateUI<QIWithRestorableGeometry<QIMainDialog> >(pParent)
    6060    , m_pCentralWidget(0)
    6161    , m_pMainLayout(0)
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumSelector.h

    r92414 r92437  
    2525#include "QIMainDialog.h"
    2626#include "QIWithRetranslateUI.h"
     27#include "QIWithRestorableGeometry.h"
    2728#include "UIMedium.h"
    2829#include "UIMediumDefs.h"
     
    4142class UIMediumSearchWidget;
    4243
    43 
    4444/** QIDialog extension providing GUI with a dialog to select an existing medium. */
    45 class SHARED_LIBRARY_STUFF UIMediumSelector : public QIWithRetranslateUI<QIMainDialog>
     45class SHARED_LIBRARY_STUFF UIMediumSelector : public QIWithRetranslateUI<QIWithRestorableGeometry<QIMainDialog> >
    4646{
    4747
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