VirtualBox

Changeset 103551 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Feb 23, 2024 4:09:47 PM (12 months ago)
Author:
vboxsync
Message:

FE/Qt: Moving UIType from UICommon to UIDefs for reuse purposes.

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

Legend:

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

    r103538 r103551  
    48924892    {
    48934893        /* Current VM only: */
    4894         if (   uiCommon().uiType() == UICommon::UIType_RuntimeUI
     4894        if (   uiCommon().uiType() == UIType_RuntimeUI
    48954895            && uMachineID == uiCommon().managedVMUuid())
    48964896        {
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.cpp

    r103538 r103551  
    633633    }
    634634
    635     if (m_enmType == UIType_RuntimeUI && startVM)
     635    if (uiType() == UIType_RuntimeUI && startVM)
    636636    {
    637637        /* m_fSeparateProcess makes sense only if a VM is started. */
     
    677677
    678678    /* For Selector UI: */
    679     if (uiType() == UIType_SelectorUI)
     679    if (uiType() == UIType_ManagerUI)
    680680    {
    681681        /* We should create separate logging file for VM selector: */
     
    14041404        {
    14051405            /* For Selector UI: */
    1406             case UIType_SelectorUI:
     1406            case UIType_ManagerUI:
    14071407            {
    14081408                /* Just switch to existing VM window: */
     
    15851585    }
    15861586    /* Is this a Selector UI call? */
    1587     else if (uiType() == UIType_SelectorUI)
     1587    else if (uiType() == UIType_ManagerUI)
    15881588    {
    15891589        /* Open existing 'shared' session: */
     
    30853085
    30863086            /* For Selector UI: */
    3087             if (uiType() == UIType_SelectorUI)
     3087            if (uiType() == UIType_ManagerUI)
    30883088            {
    30893089                /* Recreate Main event listeners: */
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.h

    r103464 r103551  
    145145public:
    146146
    147     /** UI types. */
    148     enum UIType
    149     {
    150         UIType_SelectorUI,
    151         UIType_RuntimeUI
    152     };
    153 
    154147    /** VM launch running options. */
    155148    enum LaunchRunning
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDefs.h

    r103540 r103551  
    3333
    3434/* Qt includes: */
    35 #include <QEvent>
    3635#include <QStringList>
    3736
     
    8483
    8584
     85/** UI types. */
     86enum UIType
     87{
     88    UIType_ManagerUI,
     89    UIType_RuntimeUI
     90};
     91
     92
    8693/** VM launch modes. */
    8794enum UILaunchMode
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp

    r103538 r103551  
    10701070    return    m_enmSynthTestPolicy == DesktopWatchdogPolicy_SynthTest_Disabled
    10711071           || (   m_enmSynthTestPolicy == DesktopWatchdogPolicy_SynthTest_ManagerOnly
    1072                && uiCommon().uiType() == UICommon::UIType_RuntimeUI)
     1072               && uiCommon().uiType() == UIType_RuntimeUI)
    10731073           || (   m_enmSynthTestPolicy == DesktopWatchdogPolicy_SynthTest_MachineOnly
    1074                && uiCommon().uiType() == UICommon::UIType_SelectorUI);
     1074               && uiCommon().uiType() == UIType_ManagerUI);
    10751075}
    10761076
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp

    r103537 r103551  
    21902190    if (!strAutoConfirmId.isEmpty())
    21912191    {
    2192         const QUuid uID = uiCommon().uiType() == UICommon::UIType_RuntimeUI
     2192        const QUuid uID = uiCommon().uiType() == UIType_RuntimeUI
    21932193                        ? uiCommon().managedVMUuid()
    21942194                        : UIExtraDataManager::GlobalID;
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.cpp

    r102726 r103551  
    997997
    998998        /* Add a label tab with machine name on it. Used only in manager UI: */
    999         if (uiCommon().uiType() == UICommon::UIType_SelectorUI)
     999        if (uiCommon().uiType() == UIType_ManagerUI)
    10001000            m_pTabWidget->addTab(new UILabelTab(this, uMachineId, strMachineName), strMachineName);
    10011001
  • trunk/src/VBox/Frontends/VirtualBox/src/main.cpp

    r103538 r103551  
    542542#ifndef VBOX_RUNTIME_UI
    543543        /* Create global app instance for Selector UI: */
    544         UICommon::create(UICommon::UIType_SelectorUI);
     544        UICommon::create(UIType_ManagerUI);
    545545#else
    546546        /* Create global app instance for Runtime UI: */
    547         UICommon::create(UICommon::UIType_RuntimeUI);
     547        UICommon::create(UIType_RuntimeUI);
    548548#endif
    549549
  • trunk/src/VBox/Frontends/VirtualBox/src/networking/UIUpdateManager.cpp

    r98103 r103551  
    272272#ifdef VBOX_WITH_UPDATE_REQUEST
    273273    /* Ask updater to check for the first time, for Selector UI only: */
    274     if (gEDataManager->applicationUpdateEnabled() && uiCommon().uiType() == UICommon::UIType_SelectorUI)
     274    if (gEDataManager->applicationUpdateEnabled() && uiCommon().uiType() == UIType_ManagerUI)
    275275        QTimer::singleShot(0, this, SLOT(sltCheckIfUpdateIsNecessary()));
    276276#endif /* VBOX_WITH_UPDATE_REQUEST */
  • trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.cpp

    r103549 r103551  
    23912391    switch (uiCommon().uiType())
    23922392    {
    2393         case UICommon::UIType_SelectorUI:
     2393        case UIType_ManagerUI:
    23942394        {
    23952395            /* Open a session thru which we will modify the machine: */
     
    24982498    switch (uiCommon().uiType())
    24992499    {
    2500         case UICommon::UIType_SelectorUI:
     2500        case UIType_ManagerUI:
    25012501        {
    25022502            /* Acquire VM id: */
     
    25432543    switch (uiCommon().uiType())
    25442544    {
    2545         case UICommon::UIType_RuntimeUI:
     2545        case UIType_RuntimeUI:
    25462546        {
    25472547            /* Check the console state, it might be already gone: */
     
    37203720    switch (uiCommon().uiType())
    37213721    {
    3722         case UICommon::UIType_SelectorUI:
     3722        case UIType_ManagerUI:
    37233723        {
    37243724            /* Acquire session state: */
     
    37493749            break;
    37503750        }
    3751         case UICommon::UIType_RuntimeUI:
     3751        case UIType_RuntimeUI:
    37523752        {
    37533753            /* Get passed machine: */
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIShortcutConfigurationEditor.cpp

    r102220 r103551  
    978978
    979979        /* In the VM process we start by displaying the Runtime UI tab: */
    980         if (uiCommon().uiType() == UICommon::UIType_RuntimeUI)
     980        if (uiCommon().uiType() == UIType_RuntimeUI)
    981981            m_pTabWidget->setCurrentWidget(pTabMachine);
    982982    }
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