VirtualBox

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


Ignore:
Timestamp:
Jan 23, 2019 9:26:31 AM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
128324
Message:

FE/Qt: bugref:9080: Move dialog panel base to globals

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

Legend:

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

    r76944 r76947  
    805805        src/globals/UICustomFileSystemModel.h \
    806806        src/globals/UIDesktopWidgetWatchdog.h \
     807        src/globals/UIDialogPanel.h \
    807808        src/globals/UIMainEventListener.h \
    808809        src/globals/UIMessageCenter.h \
     
    832833        src/medium/viso/UIVisoContentBrowser.h \
    833834        src/medium/viso/UIVisoCreator.h \
    834         src/medium/viso/UIVisoCreatorPanel.h \
    835835        src/medium/viso/UIVisoConfigurationPanel.h \
    836836        src/medium/viso/UIVisoCreatorOptionsPanel.h \
     
    12661266        src/globals/UIDefs.cpp \
    12671267        src/globals/UIDesktopWidgetWatchdog.cpp \
     1268        src/globals/UIDialogPanel.cpp \
    12681269        src/globals/UIErrorString.cpp \
    12691270        src/globals/UIIconPool.cpp \
     
    12981299        src/medium/viso/UIVisoContentBrowser.cpp \
    12991300        src/medium/viso/UIVisoCreator.cpp \
    1300         src/medium/viso/UIVisoCreatorPanel.cpp \
    13011301        src/medium/viso/UIVisoConfigurationPanel.cpp \
    13021302        src/medium/viso/UIVisoCreatorOptionsPanel.cpp \
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDialogPanel.cpp

    r76946 r76947  
    2727#include "QIToolButton.h"
    2828#include "UIIconPool.h"
    29 #include "UIVisoCreatorPanel.h"
     29#include "UIDialogPanel.h"
    3030#ifdef VBOX_WS_MAC
    3131# include "VBoxUtils-darwin.h"
     
    3333
    3434
    35 UIVisoCreatorPanel::UIVisoCreatorPanel(QWidget *pParent)
     35UIDialogPanel::UIDialogPanel(QWidget *pParent)
    3636    : QIWithRetranslateUI<QWidget>(pParent)
    3737    , m_pMainLayout(0)
     
    4141}
    4242
    43 void UIVisoCreatorPanel::setCloseButtonShortCut(QKeySequence shortCut)
     43void UIDialogPanel::setCloseButtonShortCut(QKeySequence shortCut)
    4444{
    4545    if (!m_pCloseButton)
     
    4848}
    4949
    50 QHBoxLayout* UIVisoCreatorPanel::mainLayout()
     50QHBoxLayout* UIDialogPanel::mainLayout()
    5151{
    5252    return m_pMainLayout;
    5353}
    5454
    55 void UIVisoCreatorPanel::prepare()
     55void UIDialogPanel::prepare()
    5656{
    5757    prepareWidgets();
     
    6060}
    6161
    62 void UIVisoCreatorPanel::prepareWidgets()
     62void UIDialogPanel::prepareWidgets()
    6363{
    6464    m_pMainLayout = new QHBoxLayout(this);
     
    8383}
    8484
    85 void UIVisoCreatorPanel::prepareConnections()
     85void UIDialogPanel::prepareConnections()
    8686{
    8787    if (m_pCloseButton)
    88         connect(m_pCloseButton, &QIToolButton::clicked, this, &UIVisoCreatorPanel::hide);
     88        connect(m_pCloseButton, &QIToolButton::clicked, this, &UIDialogPanel::hide);
    8989}
    9090
    91 void UIVisoCreatorPanel::retranslateUi()
     91void UIDialogPanel::retranslateUi()
    9292{
    9393    if (m_pCloseButton)
     
    9595}
    9696
    97 bool UIVisoCreatorPanel::eventFilter(QObject *pObject, QEvent *pEvent)
     97bool UIDialogPanel::eventFilter(QObject *pObject, QEvent *pEvent)
    9898{
    9999    Q_UNUSED(pObject);
     
    103103}
    104104
    105 void UIVisoCreatorPanel::showEvent(QShowEvent *pEvent)
     105void UIDialogPanel::showEvent(QShowEvent *pEvent)
    106106{
    107107    QWidget::showEvent(pEvent);
    108108}
    109109
    110 void UIVisoCreatorPanel::hideEvent(QHideEvent *pEvent)
     110void UIDialogPanel::hideEvent(QHideEvent *pEvent)
    111111{
    112112    /* Get focused widget: */
     
    121121}
    122122
    123 void UIVisoCreatorPanel::addVerticalSeparator()
     123void UIDialogPanel::addVerticalSeparator()
    124124{
    125125    QFrame *pSeparator = new QFrame();
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDialogPanel.h

    r76946 r76947  
    1616 */
    1717
    18 #ifndef FEQT_INCLUDED_SRC_medium_viso_UIVisoCreatorPanel_h
    19 #define FEQT_INCLUDED_SRC_medium_viso_UIVisoCreatorPanel_h
     18#ifndef FEQT_INCLUDED_SRC_globals_UIDialogPanel_h
     19#define FEQT_INCLUDED_SRC_globals_UIDialogPanel_h
    2020#ifndef RT_WITHOUT_PRAGMA_ONCE
    2121# pragma once
     
    3636
    3737/** QWidget extension acting as the base class for UIVMLogViewerXXXPanel widgets. */
    38 class UIVisoCreatorPanel : public QIWithRetranslateUI<QWidget>
     38class UIDialogPanel : public QIWithRetranslateUI<QWidget>
    3939{
    4040    Q_OBJECT;
     
    4242public:
    4343
    44     UIVisoCreatorPanel(QWidget *pParent);
     44    UIDialogPanel(QWidget *pParent);
    4545    void setCloseButtonShortCut(QKeySequence shortCut);
    4646    virtual QString panelName() const = 0;
     
    4848signals:
    4949
    50     void sigHidePanel(UIVisoCreatorPanel *pPanel);
     50    void sigHidePanel(UIDialogPanel *pPanel);
    5151
    5252protected:
     
    7777};
    7878
    79 #endif /* !FEQT_INCLUDED_SRC_medium_viso_UIVisoCreatorPanel_h */
     79#endif /* !FEQT_INCLUDED_SRC_globals_UIDialogPanel_h */
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoConfigurationPanel.cpp

    r76944 r76947  
    3535
    3636UIVisoConfigurationPanel::UIVisoConfigurationPanel(QWidget *pParent /* =0 */)
    37     : UIVisoCreatorPanel(pParent)
     37    : UIDialogPanel(pParent)
    3838    , m_pVisoNameLabel(0)
    3939    , m_pCustomOptionsLabel(0)
     
    137137    }
    138138    /* Call to base-class: */
    139     return UIVisoCreatorPanel::eventFilter(pObject, pEvent);
     139    return UIDialogPanel::eventFilter(pObject, pEvent);
    140140}
    141141
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoConfigurationPanel.h

    r76945 r76947  
    2323
    2424/* GUI includes: */
    25 #include "UIVisoCreatorPanel.h"
     25#include "UIDialogPanel.h"
    2626
    2727/* Forward declarations: */
     
    3535class UIVisoCreator;
    3636
    37 class UIVisoConfigurationPanel : public UIVisoCreatorPanel
     37class UIVisoConfigurationPanel : public UIDialogPanel
    3838{
    3939    Q_OBJECT;
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoCreator.cpp

    r76946 r76947  
    113113    if (!pSenderAction)
    114114        return;
    115     UIVisoCreatorPanel* pPanel = 0;
     115    UIDialogPanel* pPanel = 0;
    116116    /* Look for the sender() within the m_panelActionMap's values: */
    117     for (QMap<UIVisoCreatorPanel*, QAction*>::const_iterator iterator = m_panelActionMap.begin();
     117    for (QMap<UIDialogPanel*, QAction*>::const_iterator iterator = m_panelActionMap.begin();
    118118        iterator != m_panelActionMap.end(); ++iterator)
    119119    {
     
    153153}
    154154
    155 void UIVisoCreator::sltHandleHidePanel(UIVisoCreatorPanel *pPanel)
     155void UIVisoCreator::sltHandleHidePanel(UIDialogPanel *pPanel)
    156156{
    157157    hidePanel(pPanel);
     
    312312
    313313
    314 void UIVisoCreator::hidePanel(UIVisoCreatorPanel* panel)
     314void UIVisoCreator::hidePanel(UIDialogPanel* panel)
    315315{
    316316    if (panel && panel->isVisible())
    317317        panel->setVisible(false);
    318     QMap<UIVisoCreatorPanel*, QAction*>::iterator iterator = m_panelActionMap.find(panel);
     318    QMap<UIDialogPanel*, QAction*>::iterator iterator = m_panelActionMap.find(panel);
    319319    if (iterator != m_panelActionMap.end())
    320320    {
     
    326326}
    327327
    328 void UIVisoCreator::showPanel(UIVisoCreatorPanel* panel)
     328void UIVisoCreator::showPanel(UIDialogPanel* panel)
    329329{
    330330    if (panel && panel->isHidden())
    331331        panel->setVisible(true);
    332     QMap<UIVisoCreatorPanel*, QAction*>::iterator iterator = m_panelActionMap.find(panel);
     332    QMap<UIDialogPanel*, QAction*>::iterator iterator = m_panelActionMap.find(panel);
    333333    if (iterator != m_panelActionMap.end())
    334334    {
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoCreator.h

    r76945 r76947  
    4141class QIDialogButtonBox;
    4242class UIActionPool;
     43class UIDialogPanel;
    4344class UIToolBar;
    4445class UIVisoHostBrowser;
    4546class UIVisoContentBrowser;
    4647class UIVisoCreatorOptionsPanel;
    47 class UIVisoCreatorPanel;
    4848class UIVisoConfigurationPanel;
    4949
     
    7676    void sltHandleCustomVisoOptionsChanged(const QStringList &customVisoOptions);
    7777    void sltHandleShowHiddenObjectsChange(bool fShow);
    78     void sltHandleHidePanel(UIVisoCreatorPanel *pPanel);
     78    void sltHandleHidePanel(UIDialogPanel *pPanel);
    7979
    8080private:
     
    101101    void setTableRootIndex(QModelIndex index = QModelIndex() );
    102102    void setTreeCurrentIndex(QModelIndex index = QModelIndex() );
    103     void hidePanel(UIVisoCreatorPanel *panel);
    104     void showPanel(UIVisoCreatorPanel *panel);
     103    void hidePanel(UIDialogPanel *panel);
     104    void showPanel(UIDialogPanel *panel);
    105105    /** Makes sure escape key is assigned to only a single widget. This is done by checking
    106106        several things in the following order:
     
    127127    UIVisoCreatorOptionsPanel *m_pCreatorOptionsPanel;
    128128    UIVisoConfigurationPanel  *m_pConfigurationPanel;
    129     QMap<UIVisoCreatorPanel*, QAction*> m_panelActionMap;
    130     QList<UIVisoCreatorPanel*>          m_visiblePanelsList;
     129    QMap<UIDialogPanel*, QAction*> m_panelActionMap;
     130    QList<UIDialogPanel*>          m_visiblePanelsList;
    131131};
    132132
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoCreatorOptionsPanel.cpp

    r76944 r76947  
    3232
    3333UIVisoCreatorOptionsPanel::UIVisoCreatorOptionsPanel(QWidget *pParent /* =0 */)
    34     : UIVisoCreatorPanel(pParent)
     34    : UIDialogPanel(pParent)
    3535    , m_pShowHiddenObjectsCheckBox(0)
    3636    , m_pShowHiddenObjectsLabel(0)
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoCreatorOptionsPanel.h

    r76945 r76947  
    2727
    2828/* GUI includes: */
    29 #include "UIVisoCreatorPanel.h"
     29#include "UIDialogPanel.h"
    3030#include "QIWithRetranslateUI.h"
    3131
    32 class UIVisoCreatorOptionsPanel : public UIVisoCreatorPanel
     32class UIVisoCreatorOptionsPanel : public UIDialogPanel
    3333{
    3434    Q_OBJECT;
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