VirtualBox

Changeset 63978 in vbox for trunk


Ignore:
Timestamp:
Sep 23, 2016 3:27:40 PM (8 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:6899: Accessibility support (step 56): Settings: Rename VBoxSettingsSelector* => UISettingsSelector.

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

Legend:

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

    r63952 r63978  
    412412        src/settings/UISettingsDialogSpecific.h \
    413413        src/settings/UISettingsPage.h \
     414        src/settings/UISettingsSelector.h \
    414415        src/settings/UISettingsSerializer.h \
    415         src/settings/VBoxSettingsSelector.h \
    416416        src/settings/global/UIGlobalSettingsExtension.h \
    417417        src/settings/global/UIGlobalSettingsGeneral.h \
     
    717717        src/settings/UISettingsDialogSpecific.cpp \
    718718        src/settings/UISettingsPage.cpp \
     719        src/settings/UISettingsSelector.cpp \
    719720        src/settings/UISettingsSerializer.cpp \
    720         src/settings/VBoxSettingsSelector.cpp \
    721721        src/settings/global/UIGlobalSettingsExtension.cpp \
    722722        src/settings/global/UIGlobalSettingsGeneral.cpp \
  • trunk/src/VBox/Frontends/VirtualBox/src/precomp.h

    r63952 r63978  
    656656#include "VBoxMediaComboBox.h"
    657657#include "VBoxOSTypeSelectorButton.h"
    658 #include "VBoxSettingsSelector.h"
     658#include "UISettingsSelector.h"
    659659#include "VBoxSnapshotDetailsDlg.h"
    660660#include "UISnapshotPane.h"
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialog.cpp

    r63567 r63978  
    3434# include "UIPopupCenter.h"
    3535# include "QIWidgetValidator.h"
    36 # include "VBoxSettingsSelector.h"
     36# include "UISettingsSelector.h"
    3737# include "UIModalWindowManager.h"
    3838# include "UISettingsSerializer.h"
     
    9191    m_pLbTitle->hide();
    9292    /* Create modern tool-bar selector: */
    93     m_pSelector = new VBoxSettingsToolBarSelector(this);
     93    m_pSelector = new UISettingsSelectorToolBar(this);
    9494    static_cast<UIToolBar*>(m_pSelector->widget())->enableMacToolbar();
    9595    addToolBar(qobject_cast<QToolBar*>(m_pSelector->widget()));
     
    9999#else
    100100    /* Create classical tree-view selector: */
    101     m_pSelector = new VBoxSettingsTreeViewSelector(this);
     101    m_pSelector = new UISettingsSelectorTreeView(this);
    102102    pMainLayout->addWidget(m_pSelector->widget(), 0, 0, 2, 1);
    103103    m_pSelector->widget()->setFocus();
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialog.h

    r62493 r63978  
    3131class QTimer;
    3232class UIWarningPane;
    33 class VBoxSettingsSelector;
     33class UISettingsSelector;
    3434class UISettingsPage;
    3535class UISettingsSerializer;
     
    112112
    113113    /* Protected variables: */
    114     VBoxSettingsSelector *m_pSelector;
     114    UISettingsSelector *m_pSelector;
    115115    QStackedWidget *m_pStack;
    116116
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.cpp

    r62493 r63978  
    2828# include "UIExtraDataManager.h"
    2929# include "QIWidgetValidator.h"
    30 # include "VBoxSettingsSelector.h"
     30# include "UISettingsSelector.h"
    3131# include "UIVirtualBoxEventHandler.h"
    3232
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsSelector.cpp

    r63977 r63978  
    11/* $Id$ */
    22/** @file
    3  * VBox Qt GUI - VBoxSettingsSelector class implementation.
     3 * VBox Qt GUI - UISettingsSelector class implementation.
    44 */
    55
     
    2727
    2828/* Local includes */
    29 # include "VBoxSettingsSelector.h"
     29# include "UISettingsSelector.h"
    3030# include "UISettingsPage.h"
    3131# include "UIToolBar.h"
     
    7575};
    7676
    77 VBoxSettingsSelector::VBoxSettingsSelector (QWidget *aParent /* = NULL */)
     77UISettingsSelector::UISettingsSelector (QWidget *aParent /* = NULL */)
    7878    :QObject (aParent)
    7979{
    8080}
    8181
    82 VBoxSettingsSelector::~VBoxSettingsSelector()
     82UISettingsSelector::~UISettingsSelector()
    8383{
    8484    qDeleteAll (mItemList);
     
    8686}
    8787
    88 void VBoxSettingsSelector::setItemText (int aId, const QString &aText)
     88void UISettingsSelector::setItemText (int aId, const QString &aText)
    8989{
    9090    if (SelectorItem *item = findItem (aId))
     
    9292}
    9393
    94 QString VBoxSettingsSelector::itemTextByPage (UISettingsPage *aPage) const
     94QString UISettingsSelector::itemTextByPage (UISettingsPage *aPage) const
    9595{
    9696    QString text;
     
    100100}
    101101
    102 QWidget *VBoxSettingsSelector::idToPage (int aId) const
     102QWidget *UISettingsSelector::idToPage (int aId) const
    103103{
    104104    UISettingsPage *page = NULL;
     
    108108}
    109109
    110 QList<UISettingsPage*> VBoxSettingsSelector::settingPages() const
     110QList<UISettingsPage*> UISettingsSelector::settingPages() const
    111111{
    112112    QList<UISettingsPage*> list;
     
    117117}
    118118
    119 QList<QWidget*> VBoxSettingsSelector::rootPages() const
     119QList<QWidget*> UISettingsSelector::rootPages() const
    120120{
    121121    QList<QWidget*> list;
     
    127127
    128128
    129 SelectorItem *VBoxSettingsSelector::findItem (int aId) const
     129SelectorItem *UISettingsSelector::findItem (int aId) const
    130130{
    131131    SelectorItem *result = NULL;
     
    139139}
    140140
    141 SelectorItem *VBoxSettingsSelector::findItemByLink (const QString &aLink) const
     141SelectorItem *UISettingsSelector::findItemByLink (const QString &aLink) const
    142142{
    143143    SelectorItem *result = NULL;
     
    151151}
    152152
    153 SelectorItem *VBoxSettingsSelector::findItemByPage (UISettingsPage* aPage) const
     153SelectorItem *UISettingsSelector::findItemByPage (UISettingsPage* aPage) const
    154154{
    155155    SelectorItem *result = NULL;
     
    163163}
    164164
    165 /* VBoxSettingsTreeViewSelector */
     165/* UISettingsSelectorTreeView */
    166166
    167167/* Returns the path to the item in the form of 'grandparent > parent > item'
     
    182182}
    183183
    184 VBoxSettingsTreeViewSelector::VBoxSettingsTreeViewSelector (QWidget *aParent /* = NULL */)
    185     :VBoxSettingsSelector (aParent)
     184UISettingsSelectorTreeView::UISettingsSelectorTreeView (QWidget *aParent /* = NULL */)
     185    :UISettingsSelector (aParent)
    186186{
    187187    mTwSelector = new QITreeWidget (aParent);
     
    212212}
    213213
    214 QWidget *VBoxSettingsTreeViewSelector::widget() const
     214QWidget *UISettingsSelectorTreeView::widget() const
    215215{
    216216    return mTwSelector;
    217217}
    218218
    219 QWidget *VBoxSettingsTreeViewSelector::addItem (const QString & /* strBigIcon */,
     219QWidget *UISettingsSelectorTreeView::addItem (const QString & /* strBigIcon */,
    220220                                                const QString &strMediumIcon ,
    221221                                                const QString & /* strSmallIcon */,
     
    244244}
    245245
    246 void VBoxSettingsTreeViewSelector::setItemText (int aId, const QString &aText)
    247 {
    248     VBoxSettingsSelector::setItemText (aId, aText);
     246void UISettingsSelectorTreeView::setItemText (int aId, const QString &aText)
     247{
     248    UISettingsSelector::setItemText (aId, aText);
    249249    QTreeWidgetItem *item = findItem (mTwSelector, idToString (aId), treeWidget_Id);
    250250    if (item)
     
    252252}
    253253
    254 QString VBoxSettingsTreeViewSelector::itemText (int aId) const
     254QString UISettingsSelectorTreeView::itemText (int aId) const
    255255{
    256256    return pagePath (idToString (aId));
    257257}
    258258
    259 int VBoxSettingsTreeViewSelector::currentId () const
     259int UISettingsSelectorTreeView::currentId () const
    260260{
    261261    int id = -1;
     
    266266}
    267267
    268 int VBoxSettingsTreeViewSelector::linkToId (const QString &aLink) const
     268int UISettingsSelectorTreeView::linkToId (const QString &aLink) const
    269269{
    270270    int id = -1;
     
    276276
    277277
    278 void VBoxSettingsTreeViewSelector::selectById (int aId)
     278void UISettingsSelectorTreeView::selectById (int aId)
    279279{
    280280    QTreeWidgetItem *item = findItem (mTwSelector, idToString (aId), treeWidget_Id);
     
    283283}
    284284
    285 void VBoxSettingsTreeViewSelector::setVisibleById (int aId, bool aShow)
     285void UISettingsSelectorTreeView::setVisibleById (int aId, bool aShow)
    286286{
    287287    QTreeWidgetItem *item = findItem (mTwSelector, idToString (aId), treeWidget_Id);
     
    290290}
    291291
    292 void VBoxSettingsTreeViewSelector::polish()
     292void UISettingsSelectorTreeView::polish()
    293293{
    294294    /* Get recommended size hint: */
     
    315315}
    316316
    317 void VBoxSettingsTreeViewSelector::settingsGroupChanged (QTreeWidgetItem *aItem,
     317void UISettingsSelectorTreeView::settingsGroupChanged (QTreeWidgetItem *aItem,
    318318                                                     QTreeWidgetItem * /* aPrevItem */)
    319319{
     
    326326}
    327327
    328 void VBoxSettingsTreeViewSelector::clear()
     328void UISettingsSelectorTreeView::clear()
    329329{
    330330    mTwSelector->clear();
     
    335335 *  details.
    336336 */
    337 QString VBoxSettingsTreeViewSelector::pagePath (const QString &aMatch) const
     337QString UISettingsSelectorTreeView::pagePath (const QString &aMatch) const
    338338{
    339339    QTreeWidgetItem *li =
     
    346346/* Returns first item of 'aView' matching required 'aMatch' value
    347347 * searching the 'aColumn' column. */
    348 QTreeWidgetItem* VBoxSettingsTreeViewSelector::findItem (QTreeWidget *aView,
     348QTreeWidgetItem* UISettingsSelectorTreeView::findItem (QTreeWidget *aView,
    349349                                                         const QString &aMatch,
    350350                                                         int aColumn) const
     
    356356}
    357357
    358 QString VBoxSettingsTreeViewSelector::idToString (int aId) const
     358QString UISettingsSelectorTreeView::idToString (int aId) const
    359359{
    360360    return QString ("%1").arg (aId, 2, 10, QLatin1Char ('0'));
    361361}
    362362
    363 /* VBoxSettingsToolBarSelector */
     363/* UISettingsSelectorToolBar */
    364364
    365365
     
    386386};
    387387
    388 VBoxSettingsToolBarSelector::VBoxSettingsToolBarSelector (QWidget *aParent /* = NULL */)
    389     : VBoxSettingsSelector (aParent)
     388UISettingsSelectorToolBar::UISettingsSelectorToolBar (QWidget *aParent /* = NULL */)
     389    : UISettingsSelector (aParent)
    390390{
    391391    /* Init the toolbar */
     
    403403}
    404404
    405 VBoxSettingsToolBarSelector::~VBoxSettingsToolBarSelector()
     405UISettingsSelectorToolBar::~UISettingsSelectorToolBar()
    406406{
    407407    delete mTbSelector;
    408408}
    409409
    410 QWidget *VBoxSettingsToolBarSelector::widget() const
     410QWidget *UISettingsSelectorToolBar::widget() const
    411411{
    412412    return mTbSelector;
    413413}
    414414
    415 QWidget *VBoxSettingsToolBarSelector::addItem (const QString &strBigIcon,
     415QWidget *UISettingsSelectorToolBar::addItem (const QString &strBigIcon,
    416416                                               const QString & /* strMediumIcon */,
    417417                                               const QString &strSmallIcon,
     
    465465}
    466466
    467 void VBoxSettingsToolBarSelector::setItemText (int aId, const QString &aText)
     467void UISettingsSelectorToolBar::setItemText (int aId, const QString &aText)
    468468{
    469469    if (SelectorActionItem *item = findActionItem (aId))
     
    484484}
    485485
    486 QString VBoxSettingsToolBarSelector::itemText (int aId) const
     486QString UISettingsSelectorToolBar::itemText (int aId) const
    487487{
    488488    QString result;
     
    492492}
    493493
    494 int VBoxSettingsToolBarSelector::currentId () const
     494int UISettingsSelectorToolBar::currentId () const
    495495{
    496496    SelectorActionItem *action = findActionItemByAction (mActionGroup->checkedAction());
     
    501501}
    502502
    503 int VBoxSettingsToolBarSelector::linkToId (const QString &aLink) const
     503int UISettingsSelectorToolBar::linkToId (const QString &aLink) const
    504504{
    505505    int id = -1;
    506     SelectorItem *item = VBoxSettingsSelector::findItemByLink (aLink);
     506    SelectorItem *item = UISettingsSelector::findItemByLink (aLink);
    507507    if (item)
    508508        id = item->id();
     
    510510}
    511511
    512 QWidget *VBoxSettingsToolBarSelector::idToPage (int aId) const
     512QWidget *UISettingsSelectorToolBar::idToPage (int aId) const
    513513{
    514514    QWidget *page = NULL;
     
    522522}
    523523
    524 QWidget *VBoxSettingsToolBarSelector::rootPage (int aId) const
     524QWidget *UISettingsSelectorToolBar::rootPage (int aId) const
    525525{
    526526    QWidget *page = NULL;
     
    537537}
    538538
    539 void VBoxSettingsToolBarSelector::selectById (int aId)
     539void UISettingsSelectorToolBar::selectById (int aId)
    540540{
    541541    if (SelectorActionItem *item = findActionItem (aId))
     
    558558
    559559
    560 void VBoxSettingsToolBarSelector::setVisibleById (int aId, bool aShow)
     560void UISettingsSelectorToolBar::setVisibleById (int aId, bool aShow)
    561561{
    562562    SelectorActionItem *item = findActionItem (aId);
     
    585585}
    586586
    587 void VBoxSettingsToolBarSelector::clear()
     587void UISettingsSelectorToolBar::clear()
    588588{
    589589    QList<QAction*> list = mActionGroup->actions();
     
    592592}
    593593
    594 int VBoxSettingsToolBarSelector::minWidth() const
     594int UISettingsSelectorToolBar::minWidth() const
    595595{
    596596    return mTbSelector->sizeHint().width() + 2 * 10;
    597597}
    598598
    599 void VBoxSettingsToolBarSelector::settingsGroupChanged (QAction *aAction)
     599void UISettingsSelectorToolBar::settingsGroupChanged (QAction *aAction)
    600600{
    601601    SelectorActionItem *item = findActionItemByAction (aAction);
     
    621621}
    622622
    623 void VBoxSettingsToolBarSelector::settingsGroupChanged (int aIndex)
     623void UISettingsSelectorToolBar::settingsGroupChanged (int aIndex)
    624624{
    625625    SelectorActionItem *item = findActionItemByTabWidget (qobject_cast<QTabWidget*> (sender()), aIndex);
     
    639639}
    640640
    641 SelectorActionItem* VBoxSettingsToolBarSelector::findActionItem (int aId) const
    642 {
    643     return static_cast<SelectorActionItem*> (VBoxSettingsSelector::findItem (aId));
    644 }
    645 
    646 SelectorActionItem *VBoxSettingsToolBarSelector::findActionItemByTabWidget (QTabWidget* aTabWidget, int aIndex) const
     641SelectorActionItem* UISettingsSelectorToolBar::findActionItem (int aId) const
     642{
     643    return static_cast<SelectorActionItem*> (UISettingsSelector::findItem (aId));
     644}
     645
     646SelectorActionItem *UISettingsSelectorToolBar::findActionItemByTabWidget (QTabWidget* aTabWidget, int aIndex) const
    647647{
    648648    SelectorActionItem *result = NULL;
     
    660660}
    661661
    662 QList<QWidget*> VBoxSettingsToolBarSelector::rootPages() const
     662QList<QWidget*> UISettingsSelectorToolBar::rootPages() const
    663663{
    664664    QList<QWidget*> list;
     
    675675}
    676676
    677 SelectorActionItem *VBoxSettingsToolBarSelector::findActionItemByAction (QAction *aAction) const
     677SelectorActionItem *UISettingsSelectorToolBar::findActionItemByAction (QAction *aAction) const
    678678{
    679679    SelectorActionItem *result = NULL;
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsSelector.h

    r63977 r63978  
    11/* $Id$ */
    22/** @file
    3  * VBox Qt GUI - VBoxSettingsSelector class declaration.
     3 * VBox Qt GUI - UISettingsSelector class declaration.
    44 */
    55
     
    1616 */
    1717
    18 #ifndef __VBoxSettingsSelector_h__
    19 #define __VBoxSettingsSelector_h__
     18#ifndef __UISettingsSelector_h__
     19#define __UISettingsSelector_h__
    2020
    2121/* Qt includes */
     
    3636class QTabWidget;
    3737
    38 class VBoxSettingsSelector: public QObject
     38class UISettingsSelector: public QObject
    3939{
    4040    Q_OBJECT;
     
    4242public:
    4343
    44     VBoxSettingsSelector (QWidget *aParent = NULL);
    45     ~VBoxSettingsSelector();
     44    UISettingsSelector (QWidget *aParent = NULL);
     45    ~UISettingsSelector();
    4646
    4747    virtual QWidget *widget() const = 0;
     
    8787};
    8888
    89 class VBoxSettingsTreeViewSelector: public VBoxSettingsSelector
     89class UISettingsSelectorTreeView: public UISettingsSelector
    9090{
    9191    Q_OBJECT;
     
    9393public:
    9494
    95     VBoxSettingsTreeViewSelector (QWidget *aParent = NULL);
     95    UISettingsSelectorTreeView (QWidget *aParent = NULL);
    9696
    9797    virtual QWidget *widget() const;
     
    127127};
    128128
    129 class VBoxSettingsToolBarSelector: public VBoxSettingsSelector
     129class UISettingsSelectorToolBar: public UISettingsSelector
    130130{
    131131    Q_OBJECT;
     
    133133public:
    134134
    135     VBoxSettingsToolBarSelector (QWidget *aParent = NULL);
    136     ~VBoxSettingsToolBarSelector();
     135    UISettingsSelectorToolBar (QWidget *aParent = NULL);
     136    ~UISettingsSelectorToolBar();
    137137
    138138    virtual QWidget *widget() const;
     
    174174};
    175175
    176 #endif /* __VBoxSettingsSelector_h__ */
     176#endif /* __UISettingsSelector_h__ */
    177177
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