VirtualBox

Changeset 79461 in vbox


Ignore:
Timestamp:
Jul 2, 2019 9:41:51 AM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
131718
Message:

FE/Qt: bugref:9241: Chooser pane: Wipe out all the stuff related to group entering feature.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/manager
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIToolPaneMachine.cpp

    r76771 r79461  
    116116                    /* Configure pane: */
    117117                    m_pPaneDetails->setProperty("ToolType", QVariant::fromValue(UIToolType_Details));
    118                     connect(this, &UIToolPaneMachine::sigSlidingStarted, m_pPaneDetails, &UIDetails::sigSlidingStarted);
    119118                    connect(this, &UIToolPaneMachine::sigToggleStarted,  m_pPaneDetails, &UIDetails::sigToggleStarted);
    120119                    connect(this, &UIToolPaneMachine::sigToggleFinished, m_pPaneDetails, &UIDetails::sigToggleFinished);
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIToolPaneMachine.h

    r76581 r79461  
    5151signals:
    5252
    53     /** Redirects signal from UIVirtualBoxManager to UIDetails. */
    54     void sigSlidingStarted();
    5553    /** Redirects signal from UIVirtualBoxManager to UIDetails. */
    5654    void sigToggleStarted();
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp

    r79391 r79461  
    491491    connect(m_pPaneChooser, &UIChooser::sigSelectionInvalidated,
    492492            this, &UIVirtualBoxManagerWidget::sltHandleChooserPaneSelectionInvalidated);
    493     connect(m_pPaneChooser, &UIChooser::sigSlidingStarted,
    494             m_pPaneToolsMachine, &UIToolPaneMachine::sigSlidingStarted);
    495493    connect(m_pPaneChooser, &UIChooser::sigToggleStarted,
    496494            m_pPaneToolsMachine, &UIToolPaneMachine::sigToggleStarted);
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooser.h

    r77933 r79461  
    4949        /** Notifies listeners about selection invalidated. */
    5050        void sigSelectionInvalidated();
    51 
    52         /** Notifies listeners about sliding started. */
    53         void sigSlidingStarted();
    5451
    5552        /** Notifies listeners about toggling started. */
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGroup.cpp

    r79265 r79461  
    5050    , m_iHeaderDarkness(110)
    5151    , m_pToggleButton(0)
    52     , m_pEnterButton(0)
    53     , m_pExitButton(0)
    5452    , m_pNameEditorWidget(0)
    5553    , m_pContainerFavorite(0)
     
    7270    , m_iHeaderDarkness(110)
    7371    , m_pToggleButton(0)
    74     , m_pEnterButton(0)
    75     , m_pExitButton(0)
    7672    , m_pNameEditorWidget(0)
    7773    , m_pContainerFavorite(0)
     
    166162void UIChooserItemGroup::retranslateUi()
    167163{
    168     /* Update button tool-tips: */
    169     if (m_pEnterButton)
    170         m_pEnterButton->setToolTip(tr("Enter group"));
    171     if (m_pExitButton)
    172         m_pExitButton->setToolTip(tr("Exit group"));
    173164    updateToggleButtonToolTip();
    174165}
     
    214205        return;
    215206
    216     /* Show enter-button: */
    217     if (!isRoot() && m_pEnterButton)
    218         m_pEnterButton->show();
    219 
    220207    /* Call to base-class: */
    221208    UIChooserItem::hoverMoveEvent(pEvent);
     
    230217    if (!isHovered())
    231218        return;
    232 
    233     /* Hide enter-button: */
    234     if (m_pEnterButton)
    235         m_pEnterButton->hide();
    236219
    237220    /* Call to base-class: */
     
    571554    /* Prepare variables: */
    572555    const int iMarginHL = data(GroupItemData_MarginHL).toInt();
    573     const int iMarginHR = data(GroupItemData_MarginHR).toInt();
    574556    const int iMarginV = data(GroupItemData_MarginV).toInt();
    575557    const int iParentIndent = data(GroupItemData_ParentIndent).toInt();
     
    582564        /* Acquire view: */
    583565        const QGraphicsView *pView = model()->scene()->views().first();
    584 
    585 #if 0
    586         /* Header (non-main root-item): */
    587         if (!isMainRoot())
    588         {
    589             /* Hide unnecessary buttons: */
    590             if (m_pToggleButton)
    591                 m_pToggleButton->hide();
    592             if (m_pEnterButton)
    593                 m_pEnterButton->hide();
    594 
    595             /* Exit-button: */
    596             if (m_pExitButton)
    597             {
    598                 /* Prepare variables: */
    599                 int iExitButtonHeight = m_exitButtonSize.height();
    600                 /* Layout exit-button: */
    601                 int iExitButtonX = iHorizontalMargin;
    602                 int iExitButtonY = iExitButtonHeight == iFullHeaderHeight ? iMarginV :
    603                                    iMarginV + (iFullHeaderHeight - iExitButtonHeight) / 2;
    604                 m_pExitButton->setPos(iExitButtonX, iExitButtonY);
    605                 /* Show exit-button: */
    606                 m_pExitButton->show();
    607             }
    608 
    609             /* Prepare body indent: */
    610             iPreviousVerticalIndent = iMarginV + iFullHeaderHeight + iMarginV;
    611         }
    612 #endif
    613566
    614567        /* Adjust scroll-view geometry: */
     
    626579    else
    627580    {
    628         /* Hide unnecessary button: */
    629         if (m_pExitButton)
    630             m_pExitButton->hide();
    631 
    632581        /* Toggle-button: */
    633582        if (m_pToggleButton)
     
    642591            /* Show toggle-button: */
    643592            m_pToggleButton->show();
    644         }
    645 
    646         /* Enter-button: */
    647         if (m_pEnterButton)
    648         {
    649             /* Prepare variables: */
    650             int iFullWidth = (int)geometry().width();
    651             int iEnterButtonWidth = m_enterButtonSize.width();
    652             int iEnterButtonHeight = m_enterButtonSize.height();
    653             /* Layout enter-button: */
    654             int iEnterButtonX = iFullWidth - iMarginHR - iEnterButtonWidth;
    655             int iEnterButtonY = iEnterButtonHeight == iFullHeaderHeight ? iMarginV :
    656                                 iMarginV + (iFullHeaderHeight - iEnterButtonHeight) / 2;
    657             m_pEnterButton->setPos(iEnterButtonX, iEnterButtonY);
    658593        }
    659594
     
    1026961    m_minimumHeaderSize = QSize(0, 0);
    1027962
    1028     /* Prepare header widgets of root item: */
    1029     if (isRoot())
    1030     {
    1031 #if 0
    1032         /* Except main root ofc: */
    1033         if (!isMainRoot())
    1034         {
    1035             /* Setup exit-button: */
    1036             m_pExitButton = new UIGraphicsButton(this, UIIconPool::iconSet(":/previous_16px.png"));
    1037             if (m_pExitButton)
    1038             {
    1039                 m_pExitButton->hide();
    1040                 QSizeF sh = m_pExitButton->minimumSizeHint();
    1041                 m_pExitButton->setTransformOriginPoint(sh.width() / 2, sh.height() / 2);
    1042                 connect(m_pExitButton, &UIGraphicsButton::sigButtonClicked,
    1043                         this, &UIChooserItemGroup::sltUnindentRoot);
    1044             }
    1045             m_exitButtonSize = m_pExitButton ? m_pExitButton->minimumSizeHint().toSize() : QSize(0, 0);
    1046         }
    1047 #endif
    1048     }
    1049963    /* Prepare header widgets of non-root item: */
    1050     else
     964    if (!isRoot())
    1051965    {
    1052966        /* Setup toggle-button: */
     
    1061975        }
    1062976        m_toggleButtonSize = m_pToggleButton ? m_pToggleButton->minimumSizeHint().toSize() : QSize(0, 0);
    1063 
    1064         /* Setup enter-button: */
    1065         m_pEnterButton = new UIGraphicsButton(this, UIIconPool::iconSet(":/next_16px.png"));
    1066         if (m_pEnterButton)
    1067         {
    1068             m_pEnterButton->hide();
    1069             connect(m_pEnterButton, &UIGraphicsButton::sigButtonClicked,
    1070                     this, &UIChooserItemGroup::sltIndentRoot);
    1071         }
    1072         m_enterButtonSize = m_pEnterButton ? m_pEnterButton->minimumSizeHint().toSize() : QSize(0, 0);
    1073977
    1074978        /* Setup name-editor: */
     
    14621366    int iHeaderSpacing = data(GroupItemData_HeaderSpacing).toInt();
    14631367    int iToggleButtonWidth = m_toggleButtonSize.width();
    1464     int iEnterButtonWidth = m_enterButtonSize.width();
    1465     int iExitButtonWidth = m_exitButtonSize.width();
    14661368    int iGroupPixmapWidth = m_pixmapSizeGroups.width();
    14671369    int iMachinePixmapWidth = m_pixmapSizeMachines.width();
     
    14731375    iMaximumWidth -= iMarginHL;
    14741376    /* Button width: */
    1475     if (isRoot())
    1476         iMaximumWidth -= iExitButtonWidth;
    1477     else
     1377    if (!isRoot())
    14781378        iMaximumWidth -= iToggleButtonWidth;
    14791379    /* Spacing between button and name: */
     
    14891389        if (!m_machineItems.isEmpty())
    14901390            iMaximumWidth -= (iMachinePixmapWidth + iMachineCountTextWidth);
    1491         /* Spacing + button width: */
    1492         if (!isRoot())
    1493             iMaximumWidth -= iEnterButtonWidth;
    14941391    }
    14951392    /* Right margin: */
     
    15441441    int iHeaderWidth = 0;
    15451442    /* Button width: */
    1546     if (isRoot())
    1547         iHeaderWidth += m_exitButtonSize.width();
    1548     else
     1443    if (!isRoot())
    15491444        iHeaderWidth += m_toggleButtonSize.width();
    15501445    iHeaderWidth += /* Spacing between button and name: */
     
    15601455    if (!m_machineItems.isEmpty())
    15611456        iHeaderWidth += (m_pixmapSizeMachines.width() + m_infoSizeMachines.width());
    1562     /* Spacing + button width: */
    1563     if (!isRoot())
    1564         iHeaderWidth += m_enterButtonSize.width();
    15651457
    15661458    /* Calculate maximum height: */
    15671459    QList<int> heights;
    15681460    /* Button height: */
    1569     if (isRoot())
    1570         heights << m_exitButtonSize.height();
    1571     else
     1461    if (!isRoot())
    15721462        heights << m_toggleButtonSize.height();
    15731463    heights /* Minimum name height: */
     
    15781468            << m_pixmapSizeMachines.height() << m_infoSizeMachines.height();
    15791469    /* Button height: */
    1580     if (!isRoot())
    1581         heights << m_enterButtonSize.height();
    15821470    int iHeaderHeight = 0;
    15831471    foreach (int iHeight, heights)
     
    17521640    /* Paint name: */
    17531641    int iNameX = iMarginHL;
    1754     if (isRoot())
    1755         iNameX += m_exitButtonSize.width();
    1756     else
     1642    if (!isRoot())
    17571643        iNameX += m_toggleButtonSize.width();
    17581644    iNameX += iHeaderSpacing;
     
    17731659    if (isHovered())
    17741660    {
    1775         /* Prepare variables: */
    1776         int iEnterButtonWidth = m_enterButtonSize.width();
    1777 
    17781661        /* Indent: */
    17791662        int iHorizontalIndent = rect.right() - iMarginHR;
    1780         if (!isRoot())
    1781             iHorizontalIndent -= iEnterButtonWidth;
    17821663
    17831664        /* Should we draw machine count info? */
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGroup.h

    r77923 r79461  
    335335        /** Holds the group toggle button instance. */
    336336        UIGraphicsRotatorButton *m_pToggleButton;
    337         /** Holds the group enter button instance. */
    338         UIGraphicsButton        *m_pEnterButton;
    339         /** Holds the group exit button instance. */
    340         UIGraphicsButton        *m_pExitButton;
    341337
    342338        /** Holds the group name editor instance. */
     
    392388        /** Holds cached toggle button size. */
    393389        QSize  m_toggleButtonSize;
    394         /** Holds cached enter button size. */
    395         QSize  m_enterButtonSize;
    396         /** Holds cached exit button size. */
    397         QSize  m_exitButtonSize;
    398390    /** @} */
    399391};
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetails.cpp

    r76606 r79461  
    8181    connect(m_pDetailsModel, &UIDetailsModel::sigLinkClicked,
    8282            this, &UIDetails::sigLinkClicked);
    83     connect(this, &UIDetails::sigSlidingStarted,
    84             m_pDetailsModel, &UIDetailsModel::sltHandleSlidingStarted);
    8583    connect(this, &UIDetails::sigToggleStarted,
    8684            m_pDetailsModel, &UIDetailsModel::sltHandleToggleStarted);
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetails.h

    r76581 r79461  
    4646                        const QUuid &uId);
    4747
    48     /** Notifies listeners about sliding started. */
    49     void sigSlidingStarted();
    50 
    5148    /** Notifies listeners about toggling started. */
    5249    void sigToggleStarted();
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsModel.cpp

    r79365 r79461  
    185185}
    186186
    187 void UIDetailsModel::sltHandleSlidingStarted()
    188 {
    189     m_pRoot->stopBuildingGroup();
    190 }
    191 
    192187void UIDetailsModel::sltHandleToggleStarted()
    193188{
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsModel.h

    r76581 r79461  
    159159    void sltHandleViewResize();
    160160
    161     /** Handles chooser pane signal about item sliding started. */
    162     void sltHandleSlidingStarted();
    163161    /** Handles chooser pane signal about group toggle started. */
    164162    void sltHandleToggleStarted();
Note: See TracChangeset for help on using the changeset viewer.

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