VirtualBox

Changeset 72018 in vbox for trunk


Ignore:
Timestamp:
Apr 25, 2018 1:47:29 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
122279
Message:

FE/Qt: bugref:9049: Full and heavy cleanup for UIWizardPage and move it to VBoxGlobal library.

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

Legend:

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

    r72009 r72018  
    568568        src/widgets/graphics/UIGraphicsToolBar.h \
    569569        src/widgets/graphics/UIGraphicsTextPane.h \
    570         src/wizards/UIWizardPage.h \
    571570        src/wizards/newvm/UIWizardNewVM.h \
    572571        src/wizards/newvm/UIWizardNewVMPageBasic1.h \
     
    675674        src/selector/UIVirtualBoxEventHandler.h \
    676675        src/wizards/UIWizard.h \
     676        src/wizards/UIWizardPage.h \
    677677        src/widgets/UIBootTable.h \
    678678        src/widgets/UIFilePathSelector.h \
     
    775775        src/selector/UIVirtualBoxEventHandler.h \
    776776        src/wizards/UIWizard.h \
     777        src/wizards/UIWizardPage.h \
    777778        src/widgets/UIBootTable.h \
    778779        src/widgets/UIFilePathSelector.h \
     
    10681069        src/widgets/graphics/UIGraphicsToolBar.cpp \
    10691070        src/widgets/graphics/UIGraphicsTextPane.cpp \
    1070         src/wizards/UIWizardPage.cpp \
    10711071        src/wizards/newvm/UIWizardNewVM.cpp \
    10721072        src/wizards/newvm/UIWizardNewVMPageBasic1.cpp \
     
    12141214        src/settings/UISettingsDefs.cpp \
    12151215        src/wizards/UIWizard.cpp \
     1216        src/wizards/UIWizardPage.cpp \
    12161217        src/widgets/UIBootTable.cpp \
    12171218        src/widgets/UIFilePathSelector.cpp \
     
    13401341        src/settings/UISettingsDefs.cpp \
    13411342        src/wizards/UIWizard.cpp \
     1343        src/wizards/UIWizardPage.cpp \
    13421344        src/widgets/UIBootTable.cpp \
    13431345        src/widgets/UIFilePathSelector.cpp \
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/UIWizardPage.cpp

    r71027 r72018  
    55
    66/*
    7  * Copyright (C) 2009-2017 Oracle Corporation
     7 * Copyright (C) 2009-2018 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    2020#else  /* !VBOX_WITH_PRECOMPILED_HEADERS */
    2121
    22 /* Global includes: */
     22/* Qt includes: */
    2323# include <QAbstractButton>
    2424
    25 /* Local includes: */
     25/* GUI includes: */
     26# include "VBoxGlobal.h"
     27# include "UIWizard.h"
    2628# include "UIWizardPage.h"
    27 # include "UIWizard.h"
    28 # include "VBoxGlobal.h"
    2929
    3030#endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
    3131
    3232
    33 UIWizard* UIWizardPageBase::wizardImp()
     33/*********************************************************************************************************************************
     34*   Class UIWizardPageBase implementation.                                                                                       *
     35*********************************************************************************************************************************/
     36
     37UIWizard *UIWizardPageBase::wizardImp()
    3438{
    3539    /* Should be reimplemented in sub-class to enable access to wizard! */
     
    3842}
    3943
    40 UIWizardPage* UIWizardPageBase::thisImp()
     44UIWizardPage *UIWizardPageBase::thisImp()
    4145{
    4246    /* Should be reimplemented in sub-class to enable access to wizard page! */
     
    5155    return QVariant();
    5256}
     57
     58
     59/*********************************************************************************************************************************
     60*   Class UIWizardPage implementation.                                                                                           *
     61*********************************************************************************************************************************/
    5362
    5463UIWizardPage::UIWizardPage()
     
    7079}
    7180
    72 UIWizard* UIWizardPage::wizard() const
     81UIWizard *UIWizardPage::wizard() const
    7382{
    7483    return qobject_cast<UIWizard*>(QWizardPage::wizard());
     
    8695        wizard()->button(QWizard::FinishButton)->setEnabled(true);
    8796}
    88 
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/UIWizardPage.h

    r71027 r72018  
    55
    66/*
    7  * Copyright (C) 2009-2017 Oracle Corporation
     7 * Copyright (C) 2009-2018 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    1919#define ___UIWizardPage_h___
    2020
    21 /* Global includes: */
     21/* Qt includes: */
    2222#include <QVariant>
    2323#include <QWizardPage>
    2424
    25 /* Local includes: */
     25/* GUI includes: */
    2626#include "QIWithRetranslateUI.h"
     27#include "UILibraryDefs.h"
    2728
    2829/* Forward declarations: */
     
    3031class UIWizardPage;
    3132
    32 /* One of interfaces for wizard page,
    33  * providing API for basic/expert pages. */
    34 class UIWizardPageBase
     33
     34/** One of two interfaces for wizard page.
     35  * This is page-BASE providing access API for basic/expert pages. */
     36class SHARED_LIBRARY_STUFF UIWizardPageBase
    3537{
    3638public:
     39
     40    /** Destructs wizard page-base. */
    3741    virtual ~UIWizardPageBase() { /* Makes MSC happy. */ }
    3842
    3943protected:
    4044
    41     /* Helpers: */
    42     virtual UIWizard* wizardImp();
    43     virtual UIWizardPage* thisImp();
     45    /** Returns wizard this page-base belongs to. */
     46    virtual UIWizard *wizardImp();
     47
     48    /** Returns wizard page this page-base belongs to. */
     49    virtual UIWizardPage *thisImp();
     50
     51    /** Returns page field with certain @a strFieldName. */
    4452    virtual QVariant fieldImp(const QString &strFieldName) const;
    4553};
    4654
    47 /* One of interfaces for wizard page,
    48  * QWizardPage class reimplementation with extended funtionality. */
    49 class UIWizardPage : public QIWithRetranslateUI<QWizardPage>
     55
     56/** One of two interfaces for wizard page.
     57  * This is page-BODY based on QWizardPage with advanced functionality. */
     58class SHARED_LIBRARY_STUFF UIWizardPage : public QIWithRetranslateUI<QWizardPage>
    5059{
    5160    Q_OBJECT;
     
    5362public:
    5463
    55     /* Constructor: */
     64    /** Constructs wizard page. */
    5665    UIWizardPage();
    5766
    58     /* Translation stuff: */
     67    /** Redirects the translation call to actual handler. */
    5968    void retranslate() { retranslateUi(); }
    6069
    61     /* Prepare stuff: */
     70    /** Marks page ready. */
    6271    void markReady();
    6372
    64     /* Title stuff: */
     73    /** Defines page @a strTitle. */
    6574    void setTitle(const QString &strTitle);
    6675
    6776protected:
    6877
    69     /* Helpers: */
    70     UIWizard* wizard() const;
     78    /** Returns wizard this page belongs to. */
     79    UIWizard *wizard() const;
     80
     81    /** Starts page processing.  */
    7182    void startProcessing();
     83    /** Ends page processing.  */
    7284    void endProcessing();
    7385
    74     /* Variables: */
     86    /** Holds whether page is ready. */
    7587    bool m_fReady;
     88    /** Holds the page title. */
    7689    QString m_strTitle;
    7790};
    7891
     92
    7993#endif
    80 
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