VirtualBox

Changeset 92270 in vbox for trunk/src


Ignore:
Timestamp:
Nov 8, 2021 2:46:28 PM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
148112
Message:

FE/Qt: bugref:10141 Some renaming

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.cpp

    r92111 r92270  
    17521752
    17531753    QWidget *pDialogParent = windowManager().realParentWindow(pParent);
    1754     UIVisoCreator *pVisoCreator = new UIVisoCreator(pDialogParent, strMachineName);
     1754    UIVisoCreatorDialog *pVisoCreator = new UIVisoCreatorDialog(pDialogParent, strMachineName);
    17551755
    17561756    if (!pVisoCreator)
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoConfigurationPanel.cpp

    r82968 r92270  
    2828#include "UIVisoCreator.h"
    2929
    30 UIVisoConfigurationPanel::UIVisoConfigurationPanel(UIVisoCreator *pCreator, QWidget *pParent /* =0 */)
     30UIVisoConfigurationPanel::UIVisoConfigurationPanel(QWidget *pParent /* =0 */)
    3131    : UIDialogPanel(pParent)
    32     , m_pCreator(pCreator)
    3332    , m_pVisoNameLabel(0)
    3433    , m_pCustomOptionsLabel(0)
     
    7271        return;
    7372
    74     /* Install creator's event-filter: */
    75     m_pCreator->installEventFilter(this);
    76 
    7773    /* Name edit and and label: */
    7874    m_pVisoNameLabel = new QILabel(QApplication::translate("UIVisoCreator", "VISO Name:"));
     
    112108    if (m_pDeleteButton)
    113109        connect(m_pDeleteButton, &QIToolButton::clicked, this, &UIVisoConfigurationPanel::sltHandleDeleteCurrentCustomOption);
    114 }
    115 
    116 bool UIVisoConfigurationPanel::eventFilter(QObject *pObject, QEvent *pEvent)
    117 {
    118     /* Handle only events sent to creator only: */
    119     if (pObject != m_pCreator)
    120         return UIDialogPanel::eventFilter(pObject, pEvent);
    121 
    122     switch (pEvent->type())
    123     {
    124         case QEvent::KeyPress:
    125         {
    126             QKeyEvent *pKeyEvent = static_cast<QKeyEvent*>(pEvent);
    127             if (pKeyEvent->key() == Qt::Key_Return && m_pCustomOptionsComboBox && m_pCustomOptionsComboBox->hasFocus())
    128                 addCustomVisoOption();
    129             return true;
    130             break;
    131         }
    132         default:
    133         break;
    134     }
    135 
    136     /* Call to base-class: */
    137     return UIDialogPanel::eventFilter(pObject, pEvent);
    138110}
    139111
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoConfigurationPanel.h

    r82968 r92270  
    4242
    4343public:
    44     UIVisoConfigurationPanel(UIVisoCreator *pCreator, QWidget *pParent = 0);
     44    UIVisoConfigurationPanel(QWidget *pParent = 0);
    4545    ~UIVisoConfigurationPanel();
    4646    virtual QString panelName() const /* override */;
     
    5050protected:
    5151
    52     bool eventFilter(QObject *pObject, QEvent *pEvent) /* override */;
    5352    void retranslateUi() /* override */;
    5453
     
    6564    void emitCustomVisoOptions();
    6665
    67     /** Holds the parent creator reference. */
    68     UIVisoCreator *m_pCreator;
    69 
    7066    QILabel      *m_pVisoNameLabel;
    7167    QILabel      *m_pCustomOptionsLabel;
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoCreator.cpp

    r91328 r92270  
    3939#endif
    4040
    41 UIVisoCreator::UIVisoCreator(QWidget *pParent /* =0 */, const QString& strMachineName /* = QString() */)
     41UIVisoCreatorDialog::UIVisoCreatorDialog(QWidget *pParent /* =0 */, const QString& strMachineName /* = QString() */)
    4242    : QIWithRetranslateUI<QIMainDialog>(pParent)
    4343    , m_pActionConfiguration(0)
     
    6969}
    7070
    71 QStringList UIVisoCreator::entryList() const
     71QStringList UIVisoCreatorDialog::entryList() const
    7272{
    7373    if (!m_pVisoBrowser)
     
    7676}
    7777
    78 const QString &UIVisoCreator::visoName() const
     78const QString &UIVisoCreatorDialog::visoName() const
    7979{
    8080    return m_visoOptions.m_strVisoName;
    8181}
    8282
    83 const QStringList &UIVisoCreator::customOptions() const
     83const QStringList &UIVisoCreatorDialog::customOptions() const
    8484{
    8585    return m_visoOptions.m_customOptions;
    8686}
    8787
    88 QString UIVisoCreator::currentPath() const
     88QString UIVisoCreatorDialog::currentPath() const
    8989{
    9090    if (!m_pHostBrowser)
     
    9393}
    9494
    95 void UIVisoCreator::setCurrentPath(const QString &strPath)
     95void UIVisoCreatorDialog::setCurrentPath(const QString &strPath)
    9696{
    9797    if (!m_pHostBrowser)
     
    100100}
    101101
    102 void UIVisoCreator::retranslateUi()
     102void UIVisoCreatorDialog::retranslateUi()
    103103{
    104104    if (!m_strMachineName.isEmpty())
     
    153153}
    154154
    155 void UIVisoCreator::sltHandleAddObjectsToViso(QStringList pathList)
     155void UIVisoCreatorDialog::sltHandleAddObjectsToViso(QStringList pathList)
    156156{
    157157    if (m_pVisoBrowser)
     
    159159}
    160160
    161 void UIVisoCreator::sltPanelActionToggled(bool fChecked)
     161void UIVisoCreatorDialog::sltPanelActionToggled(bool fChecked)
    162162{
    163163    QAction *pSenderAction = qobject_cast<QAction*>(sender());
     
    180180}
    181181
    182 void UIVisoCreator::sltHandleVisoNameChanged(const QString &strVisoName)
     182void UIVisoCreatorDialog::sltHandleVisoNameChanged(const QString &strVisoName)
    183183{
    184184    if (m_visoOptions.m_strVisoName == strVisoName)
     
    189189}
    190190
    191 void UIVisoCreator::sltHandleCustomVisoOptionsChanged(const QStringList &customVisoOptions)
     191void UIVisoCreatorDialog::sltHandleCustomVisoOptionsChanged(const QStringList &customVisoOptions)
    192192{
    193193    if (m_visoOptions.m_customOptions == customVisoOptions)
     
    196196}
    197197
    198 void UIVisoCreator::sltHandleShowHiddenObjectsChange(bool fShow)
     198void UIVisoCreatorDialog::sltHandleShowHiddenObjectsChange(bool fShow)
    199199{
    200200    if (m_browserOptions.m_fShowHiddenObjects == fShow)
     
    204204}
    205205
    206 void UIVisoCreator::sltHandleHidePanel(UIDialogPanel *pPanel)
     206void UIVisoCreatorDialog::sltHandleHidePanel(UIDialogPanel *pPanel)
    207207{
    208208    hidePanel(pPanel);
    209209}
    210210
    211 void UIVisoCreator::sltHandleBrowserTreeViewVisibilityChanged(bool fVisible)
     211void UIVisoCreatorDialog::sltHandleBrowserTreeViewVisibilityChanged(bool fVisible)
    212212{
    213213    Q_UNUSED(fVisible);
     
    215215}
    216216
    217 void UIVisoCreator::sltHandleHostBrowserTableSelectionChanged(bool fIsSelectionEmpty)
     217void UIVisoCreatorDialog::sltHandleHostBrowserTableSelectionChanged(bool fIsSelectionEmpty)
    218218{
    219219    if (m_pAddAction)
     
    221221}
    222222
    223 void UIVisoCreator::sltHandleContentBrowserTableSelectionChanged(bool fIsSelectionEmpty)
     223void UIVisoCreatorDialog::sltHandleContentBrowserTableSelectionChanged(bool fIsSelectionEmpty)
    224224{
    225225    if (m_pRemoveAction)
     
    227227}
    228228
    229 void UIVisoCreator::sltHandleShowContextMenu(const QWidget *pContextMenuRequester, const QPoint &point)
     229void UIVisoCreatorDialog::sltHandleShowContextMenu(const QWidget *pContextMenuRequester, const QPoint &point)
    230230{
    231231    if (!pContextMenuRequester)
     
    248248}
    249249
    250 void UIVisoCreator::prepareWidgets()
     250void UIVisoCreatorDialog::prepareWidgets()
    251251{
    252252    m_pCentralWidget = new QWidget;
     
    342342}
    343343
    344 void UIVisoCreator::prepareConnections()
     344void UIVisoCreatorDialog::prepareConnections()
    345345{
    346346    if (m_pHostBrowser)
    347347    {
    348348        connect(m_pHostBrowser, &UIVisoHostBrowser::sigAddObjectsToViso,
    349                 this, &UIVisoCreator::sltHandleAddObjectsToViso);
     349                this, &UIVisoCreatorDialog::sltHandleAddObjectsToViso);
    350350        connect(m_pHostBrowser, &UIVisoHostBrowser::sigTreeViewVisibilityChanged,
    351                 this, &UIVisoCreator::sltHandleBrowserTreeViewVisibilityChanged);
     351                this, &UIVisoCreatorDialog::sltHandleBrowserTreeViewVisibilityChanged);
    352352        connect(m_pHostBrowser, &UIVisoHostBrowser::sigTableSelectionChanged,
    353                 this, &UIVisoCreator::sltHandleHostBrowserTableSelectionChanged);
     353                this, &UIVisoCreatorDialog::sltHandleHostBrowserTableSelectionChanged);
    354354        connect(m_pHostBrowser, &UIVisoHostBrowser::sigCreateFileTableViewContextMenu,
    355                 this, &UIVisoCreator::sltHandleShowContextMenu);
     355                this, &UIVisoCreatorDialog::sltHandleShowContextMenu);
    356356    }
    357357
     
    359359    {
    360360        connect(m_pVisoBrowser, &UIVisoContentBrowser::sigTableSelectionChanged,
    361                 this, &UIVisoCreator::sltHandleContentBrowserTableSelectionChanged);
     361                this, &UIVisoCreatorDialog::sltHandleContentBrowserTableSelectionChanged);
    362362        connect(m_pVisoBrowser, &UIVisoContentBrowser::sigCreateFileTableViewContextMenu,
    363                 this, &UIVisoCreator::sltHandleShowContextMenu);
     363                this, &UIVisoCreatorDialog::sltHandleShowContextMenu);
    364364    }
    365365
    366366    if (m_pButtonBox)
    367367    {
    368         connect(m_pButtonBox, &QIDialogButtonBox::rejected, this, &UIVisoCreator::close);
    369         connect(m_pButtonBox, &QIDialogButtonBox::accepted, this, &UIVisoCreator::accept);
     368        connect(m_pButtonBox, &QIDialogButtonBox::rejected, this, &UIVisoCreatorDialog::close);
     369        connect(m_pButtonBox, &QIDialogButtonBox::accepted, this, &UIVisoCreatorDialog::accept);
    370370    }
    371371
    372372    if (m_pActionConfiguration)
    373         connect(m_pActionConfiguration, &QAction::triggered, this, &UIVisoCreator::sltPanelActionToggled);
     373        connect(m_pActionConfiguration, &QAction::triggered, this, &UIVisoCreatorDialog::sltPanelActionToggled);
    374374    if (m_pActionOptions)
    375         connect(m_pActionOptions, &QAction::triggered, this, &UIVisoCreator::sltPanelActionToggled);
     375        connect(m_pActionOptions, &QAction::triggered, this, &UIVisoCreatorDialog::sltPanelActionToggled);
    376376
    377377    if (m_pConfigurationPanel)
    378378    {
    379379        connect(m_pConfigurationPanel, &UIVisoConfigurationPanel::sigVisoNameChanged,
    380                 this, &UIVisoCreator::sltHandleVisoNameChanged);
     380                this, &UIVisoCreatorDialog::sltHandleVisoNameChanged);
    381381        connect(m_pConfigurationPanel, &UIVisoConfigurationPanel::sigCustomVisoOptionsChanged,
    382                 this, &UIVisoCreator::sltHandleCustomVisoOptionsChanged);
     382                this, &UIVisoCreatorDialog::sltHandleCustomVisoOptionsChanged);
    383383        connect(m_pConfigurationPanel, &UIVisoConfigurationPanel::sigHidePanel,
    384                 this, &UIVisoCreator::sltHandleHidePanel);
     384                this, &UIVisoCreatorDialog::sltHandleHidePanel);
    385385        m_panelActionMap.insert(m_pConfigurationPanel, m_pActionConfiguration);
    386386    }
     
    389389    {
    390390        connect(m_pCreatorOptionsPanel, &UIVisoCreatorOptionsPanel::sigShowHiddenObjects,
    391                 this, &UIVisoCreator::sltHandleShowHiddenObjectsChange);
     391                this, &UIVisoCreatorDialog::sltHandleShowHiddenObjectsChange);
    392392        connect(m_pCreatorOptionsPanel, &UIVisoCreatorOptionsPanel::sigHidePanel,
    393                 this, &UIVisoCreator::sltHandleHidePanel);
     393                this, &UIVisoCreatorDialog::sltHandleHidePanel);
    394394        m_panelActionMap.insert(m_pCreatorOptionsPanel, m_pActionOptions);
    395395    }
     
    413413}
    414414
    415 void UIVisoCreator::prepareActions()
     415void UIVisoCreatorDialog::prepareActions()
    416416{
    417417    m_pActionConfiguration = new QAction(this);
     
    479479}
    480480
    481 void UIVisoCreator::populateMenuMainToolbar()
     481void UIVisoCreatorDialog::populateMenuMainToolbar()
    482482{
    483483    if (!m_pMainMenu || !m_pToolBar)
     
    496496}
    497497
    498 void UIVisoCreator::hidePanel(UIDialogPanel* panel)
     498void UIVisoCreatorDialog::hidePanel(UIDialogPanel* panel)
    499499{
    500500    if (panel && panel->isVisible())
     
    510510}
    511511
    512 void UIVisoCreator::showPanel(UIDialogPanel* panel)
     512void UIVisoCreatorDialog::showPanel(UIDialogPanel* panel)
    513513{
    514514    if (panel && panel->isHidden())
     
    525525}
    526526
    527 void UIVisoCreator::manageEscapeShortCut()
     527void UIVisoCreatorDialog::manageEscapeShortCut()
    528528{
    529529    /* Take the escape key from m_pButtonBox and from the panels in case treeview(s) in
     
    556556}
    557557
    558 void UIVisoCreator::prepareVerticalToolBar()
     558void UIVisoCreatorDialog::prepareVerticalToolBar()
    559559{
    560560    m_pVerticalToolBar = new QIToolBar;
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoCreator.h

    r86233 r92270  
    4343  * for VISO file system. It has the main menu, main toolbar, and a vertical toolbar and corresponding
    4444  * actions. */
    45 class UIVisoCreator : public QIWithRetranslateUI<QIMainDialog>
     45class UIVisoCreatorDialog : public QIWithRetranslateUI<QIMainDialog>
    4646{
    4747    Q_OBJECT;
     
    4949public:
    5050
    51     UIVisoCreator(QWidget *pParent = 0, const QString& strMachineName = QString());
     51    UIVisoCreatorDialog(QWidget *pParent = 0, const QString& strMachineName = QString());
    5252    /** Returns the content of the .viso file. Each element of the list corresponds to a line in the .viso file. */
    5353    QStringList       entryList() const;
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