VirtualBox

Changeset 101020 in vbox


Ignore:
Timestamp:
Sep 5, 2023 12:10:22 PM (15 months ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10496, bugref:6699. Some refactoring.

Location:
trunk/src/VBox/Frontends/VirtualBox
Files:
3 edited
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk

    r101015 r101020  
    844844        src/guestctrl/UIFileManagerGuestTable.h \
    845845        src/guestctrl/UIFileManagerHostTable.h \
    846         src/guestctrl/UIFileManagerPanel.h \
     846        src/guestctrl/UIFileManagerPaneContainer.h \
    847847        src/guestctrl/UIFileManagerTable.h \
    848848        src/helpbrowser/UIHelpBrowserDialog.h \
     
    10631063        src/globals/UIVirtualBoxClientEventHandler.cpp \
    10641064        src/guestctrl/UIFileManager.cpp \
    1065         src/guestctrl/UIFileManagerPanel.cpp \
     1065        src/guestctrl/UIFileManagerPaneContainer.cpp \
    10661066        src/guestctrl/UIFileManagerTable.cpp \
    10671067        src/guestctrl/UIFileManagerGuestTable.cpp \
     
    14261426        src/guestctrl/UIFileManagerGuestTable.cpp \
    14271427        src/guestctrl/UIFileManagerHostTable.cpp \
    1428         src/guestctrl/UIFileManagerPanel.cpp \
     1428        src/guestctrl/UIFileManagerPaneContainer.cpp \
    14291429        src/guestctrl/UIFileManagerTable.cpp \
    14301430        src/helpbrowser/UIHelpBrowserDialog.cpp \
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManager.cpp

    r100955 r101020  
    4242#include "UIIconPool.h"
    4343#include "UIFileManager.h"
    44 #include "UIFileManagerPanel.h"
     44#include "UIFileManagerPaneContainer.h"
    4545#include "UIFileManagerGuestTable.h"
    4646#include "UIFileManagerHostTable.h"
     
    251251    }
    252252
    253     m_pPanel = new UIFileManagerPanel(this, UIFileManagerOptions::instance());
     253    m_pPanel = new UIFileManagerPaneContainer(this, UIFileManagerOptions::instance());
    254254    AssertReturnVoid(m_pPanel);
    255255
     
    258258    m_panelActions.insert(m_pActionPool->action(UIActionIndex_M_FileManager_T_Operations));
    259259
    260     m_pActionPool->action(UIActionIndex_M_FileManager_T_Preferences)->setData(static_cast<int>(UIFileManagerPanel::Page_Preferences));
    261     m_pActionPool->action(UIActionIndex_M_FileManager_T_Log)->setData(static_cast<int>(UIFileManagerPanel::Page_Log));
    262     m_pActionPool->action(UIActionIndex_M_FileManager_T_Operations)->setData(static_cast<int>(UIFileManagerPanel::Page_Operations));
     260    m_pActionPool->action(UIActionIndex_M_FileManager_T_Preferences)->setData(static_cast<int>(UIFileManagerPaneContainer::Page_Preferences));
     261    m_pActionPool->action(UIActionIndex_M_FileManager_T_Log)->setData(static_cast<int>(UIFileManagerPaneContainer::Page_Log));
     262    m_pActionPool->action(UIActionIndex_M_FileManager_T_Operations)->setData(static_cast<int>(UIFileManagerPaneContainer::Page_Operations));
    263263
    264264    m_pVerticalSplitter->addWidget(m_pPanel);
     
    322322    if (m_pPanel)
    323323    {
    324         connect(m_pPanel, &UIFileManagerPanel::sigOptionsChanged,
     324        connect(m_pPanel, &UIFileManagerPaneContainer::sigOptionsChanged,
    325325                this, &UIFileManager::sltHandleOptionsUpdated);
    326         connect(m_pPanel, &UIFileManagerPanel::sigFileOperationComplete,
     326        connect(m_pPanel, &UIFileManagerPaneContainer::sigFileOperationComplete,
    327327                this, &UIFileManager::sltFileOperationComplete);
    328         connect(m_pPanel, &UIFileManagerPanel::sigFileOperationFail,
     328        connect(m_pPanel, &UIFileManagerPaneContainer::sigFileOperationFail,
    329329                this, &UIFileManager::sltReceieveLogOutput);
    330         connect(m_pPanel, &UIFileManagerPanel::sigCurrentTabChanged,
     330        connect(m_pPanel, &UIFileManagerPaneContainer::sigCurrentTabChanged,
    331331                this, &UIFileManager::sltPanelCurrentTabChanged);
    332         connect(m_pPanel, &UIFileManagerPanel::sigHidden,
     332        connect(m_pPanel, &UIFileManagerPaneContainer::sigHidden,
    333333                this, &UIFileManager::sltPanelContainerHidden);
    334334    }
     
    563563    }
    564564
    565     switch (static_cast<UIFileManagerPanel::Page>(iIndex))
    566     {
    567         case UIFileManagerPanel::Page_Preferences:
     565    switch (static_cast<UIFileManagerPaneContainer::Page>(iIndex))
     566    {
     567        case UIFileManagerPaneContainer::Page_Preferences:
    568568            m_pActionPool->action(UIActionIndex_M_FileManager_T_Preferences)->setChecked(true);
    569569            break;
    570         case UIFileManagerPanel::Page_Operations:
     570        case UIFileManagerPaneContainer::Page_Operations:
    571571            m_pActionPool->action(UIActionIndex_M_FileManager_T_Operations)->setChecked(true);
    572572            break;
    573         case UIFileManagerPanel::Page_Log:
     573        case UIFileManagerPaneContainer::Page_Log:
    574574            m_pActionPool->action(UIActionIndex_M_FileManager_T_Log)->setChecked(true);
    575575            break;
    576         case UIFileManagerPanel::Page_Max:
     576        case UIFileManagerPaneContainer::Page_Max:
    577577        default:
    578578            break;
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManager.h

    r100955 r101020  
    5454class UIDialogPanel;
    5555class UIFileManagerLogPanel;
    56 class UIFileManagerPanel;
     56class UIFileManagerPaneContainer;
    5757class UIFileManagerOperationsPanel;
    5858class UIFileManagerGuestTable;
     
    184184    UIFileManagerLogPanel         *m_pLogPanel;
    185185    UIFileManagerOperationsPanel  *m_pOperationsPanel;
    186     UIFileManagerPanel            *m_pPanel;
     186    UIFileManagerPaneContainer    *m_pPanel;
    187187    bool m_fCommitDataSignalReceived;
    188188
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerPaneContainer.cpp

    r101019 r101020  
    4343#include "QIToolButton.h"
    4444#include "UIErrorString.h"
    45 #include "UIFileManagerPanel.h"
     45#include "UIFileManagerPaneContainer.h"
    4646#include "UIFileManager.h"
    4747#include "UIProgressEventHandler.h"
     
    364364}
    365365
     366
    366367/*********************************************************************************************************************************
    367 *   UIFileManagerPanel implementation.                                                                                   *
     368*   UIFileManagerPaneContainer implementation.                                                                                   *
    368369*********************************************************************************************************************************/
    369370
    370 UIFileManagerPanel::UIFileManagerPanel(QWidget *pParent, UIFileManagerOptions *pFileManagerOptions)
     371UIFileManagerPaneContainer::UIFileManagerPaneContainer(QWidget *pParent, UIFileManagerOptions *pFileManagerOptions)
    371372    : UIPaneContainer(pParent)
    372373    , m_pListDirectoriesOnTopCheckBox(0)
     
    386387
    387388
    388 void UIFileManagerPanel::prepare()
     389void UIFileManagerPaneContainer::prepare()
    389390{
    390391    preparePreferencesTab();
     
    393394}
    394395
    395 void UIFileManagerPanel::preparePreferencesTab()
     396void UIFileManagerPaneContainer::preparePreferencesTab()
    396397{
    397398    QWidget *pPreferencesTab = new QWidget;
     
    420421
    421422    connect(m_pListDirectoriesOnTopCheckBox, &QCheckBox::toggled,
    422             this, &UIFileManagerPanel::sltListDirectoryCheckBoxToogled);
     423            this, &UIFileManagerPaneContainer::sltListDirectoryCheckBoxToogled);
    423424    connect(m_pDeleteConfirmationCheckBox, &QCheckBox::toggled,
    424             this, &UIFileManagerPanel::sltDeleteConfirmationCheckBoxToogled);
     425            this, &UIFileManagerPaneContainer::sltDeleteConfirmationCheckBoxToogled);
    425426    connect(m_pHumanReabableSizesCheckBox, &QCheckBox::toggled,
    426             this, &UIFileManagerPanel::sltHumanReabableSizesCheckBoxToogled);
     427            this, &UIFileManagerPaneContainer::sltHumanReabableSizesCheckBoxToogled);
    427428    connect(m_pShowHiddenObjectsCheckBox, &QCheckBox::toggled,
    428             this, &UIFileManagerPanel::sltShowHiddenObjectsCheckBoxToggled);
     429            this, &UIFileManagerPaneContainer::sltShowHiddenObjectsCheckBoxToggled);
    429430
    430431    QGridLayout *pPreferencesLayout = new QGridLayout(pPreferencesTab);
     
    441442}
    442443
    443 void UIFileManagerPanel::prepareLogTab()
     444void UIFileManagerPaneContainer::prepareLogTab()
    444445{
    445446    QWidget *pLogTab = new QWidget;
     
    454455}
    455456
    456 void UIFileManagerPanel::prepareOperationsTab()
     457void UIFileManagerPaneContainer::prepareOperationsTab()
    457458{
    458459    QPalette pal = QApplication::palette();
     
    469470    QScrollBar *pVerticalScrollBar = m_pScrollArea->verticalScrollBar();
    470471    if (pVerticalScrollBar)
    471         QObject::connect(pVerticalScrollBar, &QScrollBar::rangeChanged, this, &UIFileManagerPanel::sltScrollToBottom);
     472        QObject::connect(pVerticalScrollBar, &QScrollBar::rangeChanged, this, &UIFileManagerPaneContainer::sltScrollToBottom);
    472473
    473474    m_pScrollArea->setBackgroundRole(QPalette::Window);
     
    482483}
    483484
    484 void UIFileManagerPanel::sltListDirectoryCheckBoxToogled(bool bChecked)
     485void UIFileManagerPaneContainer::sltListDirectoryCheckBoxToogled(bool bChecked)
    485486{
    486487    if (!m_pFileManagerOptions)
     
    490491}
    491492
    492 void UIFileManagerPanel::sltDeleteConfirmationCheckBoxToogled(bool bChecked)
     493void UIFileManagerPaneContainer::sltDeleteConfirmationCheckBoxToogled(bool bChecked)
    493494{
    494495    if (!m_pFileManagerOptions)
     
    498499}
    499500
    500 void UIFileManagerPanel::sltHumanReabableSizesCheckBoxToogled(bool bChecked)
     501void UIFileManagerPaneContainer::sltHumanReabableSizesCheckBoxToogled(bool bChecked)
    501502{
    502503    if (!m_pFileManagerOptions)
     
    506507}
    507508
    508 void UIFileManagerPanel::sltShowHiddenObjectsCheckBoxToggled(bool bChecked)
     509void UIFileManagerPaneContainer::sltShowHiddenObjectsCheckBoxToggled(bool bChecked)
    509510{
    510511    if (!m_pFileManagerOptions)
     
    514515}
    515516
    516 void UIFileManagerPanel::retranslateUi()
     517void UIFileManagerPaneContainer::retranslateUi()
    517518{
    518519    if (m_pListDirectoriesOnTopCheckBox)
     
    547548}
    548549
    549 void UIFileManagerPanel::updatePreferences()
     550void UIFileManagerPaneContainer::updatePreferences()
    550551{
    551552    if (!m_pFileManagerOptions)
     
    581582}
    582583
    583 void UIFileManagerPanel::appendLog(const QString &strLog, const QString &strMachineName, FileManagerLogType eLogType)
     584void UIFileManagerPaneContainer::appendLog(const QString &strLog, const QString &strMachineName, FileManagerLogType eLogType)
    584585{
    585586    if (!m_pLogTextEdit)
     
    598599}
    599600
    600 void UIFileManagerPanel::addNewProgress(const CProgress &comProgress, const QString &strSourceTableName)
     601void UIFileManagerPaneContainer::addNewProgress(const CProgress &comProgress, const QString &strSourceTableName)
    601602{
    602603    if (!m_pOperationsTabLayout)
     
    610611
    611612    connect(pOperationsWidget, &UIFileOperationProgressWidget::sigProgressComplete,
    612             this, &UIFileManagerPanel::sigFileOperationComplete);
     613            this, &UIFileManagerPaneContainer::sigFileOperationComplete);
    613614    connect(pOperationsWidget, &UIFileOperationProgressWidget::sigProgressFail,
    614             this, &UIFileManagerPanel::sigFileOperationFail);
     615            this, &UIFileManagerPaneContainer::sigFileOperationFail);
    615616
    616617    connect(pOperationsWidget, &UIFileOperationProgressWidget::sigFocusIn,
    617             this, &UIFileManagerPanel::sltHandleWidgetFocusIn);
     618            this, &UIFileManagerPaneContainer::sltHandleWidgetFocusIn);
    618619    connect(pOperationsWidget, &UIFileOperationProgressWidget::sigFocusOut,
    619             this, &UIFileManagerPanel::sltHandleWidgetFocusOut);
    620 }
    621 
    622 void UIFileManagerPanel::contextMenuEvent(QContextMenuEvent *pEvent)
     620            this, &UIFileManagerPaneContainer::sltHandleWidgetFocusOut);
     621}
     622
     623void UIFileManagerPaneContainer::contextMenuEvent(QContextMenuEvent *pEvent)
    623624{
    624625    QMenu *menu = new QMenu(this);
     
    628629        QAction *pRemoveSelected = menu->addAction(UIFileManager::tr("Remove Selected"));
    629630        connect(pRemoveSelected, &QAction::triggered,
    630                 this, &UIFileManagerPanel::sltRemoveSelected);
     631                this, &UIFileManagerPaneContainer::sltRemoveSelected);
    631632    }
    632633
     
    635636
    636637    connect(pRemoveFinished, &QAction::triggered,
    637             this, &UIFileManagerPanel::sltRemoveFinished);
     638            this, &UIFileManagerPaneContainer::sltRemoveFinished);
    638639    connect(pRemoveAll, &QAction::triggered,
    639             this, &UIFileManagerPanel::sltRemoveAll);
     640            this, &UIFileManagerPaneContainer::sltRemoveAll);
    640641
    641642    menu->exec(pEvent->globalPos());
     
    643644}
    644645
    645 void UIFileManagerPanel::sltRemoveFinished()
     646void UIFileManagerPaneContainer::sltRemoveFinished()
    646647{
    647648    QList<UIFileOperationProgressWidget*> widgetsToRemove;
     
    659660}
    660661
    661 void UIFileManagerPanel::sltRemoveAll()
     662void UIFileManagerPaneContainer::sltRemoveAll()
    662663{
    663664    foreach (QWidget *pWidget, m_widgetSet)
     
    671672}
    672673
    673 void UIFileManagerPanel::sltRemoveSelected()
     674void UIFileManagerPaneContainer::sltRemoveSelected()
    674675{
    675676    if (!m_pWidgetInFocus)
     
    679680}
    680681
    681 void UIFileManagerPanel::sltHandleWidgetFocusIn(QWidget *pWidget)
     682void UIFileManagerPaneContainer::sltHandleWidgetFocusIn(QWidget *pWidget)
    682683{
    683684    if (!pWidget)
     
    686687}
    687688
    688 void UIFileManagerPanel::sltHandleWidgetFocusOut(QWidget *pWidget)
     689void UIFileManagerPaneContainer::sltHandleWidgetFocusOut(QWidget *pWidget)
    689690{
    690691    if (!pWidget)
     
    693694}
    694695
    695 void UIFileManagerPanel::sltScrollToBottom(int iMin, int iMax)
     696void UIFileManagerPaneContainer::sltScrollToBottom(int iMin, int iMax)
    696697{
    697698    Q_UNUSED(iMin);
     
    701702
    702703
    703 #include "UIFileManagerPanel.moc"
     704#include "UIFileManagerPaneContainer.moc"
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerPaneContainer.h

    r101019 r101020  
    2626 */
    2727
    28 #ifndef FEQT_INCLUDED_SRC_guestctrl_UIFileManagerPanel_h
    29 #define FEQT_INCLUDED_SRC_guestctrl_UIFileManagerPanel_h
     28#ifndef FEQT_INCLUDED_SRC_guestctrl_UIFileManagerPaneContainer_h
     29#define FEQT_INCLUDED_SRC_guestctrl_UIFileManagerPaneContainer_h
    3030#ifndef RT_WITHOUT_PRAGMA_ONCE
    3131# pragma once
     
    5353class QVBoxLayout;
    5454
    55 class UIFileManagerPanel : public UIPaneContainer
     55class UIFileManagerPaneContainer : public UIPaneContainer
    5656{
    5757    Q_OBJECT;
     
    6767public:
    6868
    69     UIFileManagerPanel(QWidget *pParent, UIFileManagerOptions *pFileManagerOptions);
     69    UIFileManagerPaneContainer(QWidget *pParent, UIFileManagerOptions *pFileManagerOptions);
    7070    void updatePreferences();
    7171    void appendLog(const QString &strLog, const QString &strMachineName, FileManagerLogType eLogType);
     
    137137};
    138138
    139 #endif /* !FEQT_INCLUDED_SRC_guestctrl_UIFileManagerPanel_h */
     139#endif /* !FEQT_INCLUDED_SRC_guestctrl_UIFileManagerPaneContainer_h */
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