VirtualBox

Changeset 64486 in vbox for trunk


Ignore:
Timestamp:
Oct 31, 2016 1:31:18 PM (8 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:6899: Accessibility support (step 110): Settings: Storage page: Move storage tree-view from .ui to .h/.cpp files as we require a bit more complex case.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.cpp

    r63322 r64486  
    20542054    mDelAttAction->setIcon(iconPool()->icon(AttachmentDelEn, AttachmentDelDis));
    20552055
    2056     /* Storage Model/View */
     2056    /* Create storage-view: */
     2057    mTwStorageTree = new StorageView(this);
     2058    {
     2059        /* Configure storage-view: */
     2060        mLsLeftPane->setBuddy(mTwStorageTree);
     2061        /* Add storage-view into layout: */
     2062        mLtStorage->insertWidget(0, mTwStorageTree);
     2063    }
     2064
     2065    /* Create storage-model: */
    20572066    mStorageModel = new StorageModel (mTwStorageTree);
    20582067    StorageDelegate *storageDelegate = new StorageDelegate (mTwStorageTree);
     
    24812490    Ui::UIMachineSettingsStorage::retranslateUi(this);
    24822491
     2492    /* Translate storage-view: */
     2493    mTwStorageTree->setWhatsThis(tr("Lists all storage controllers for this machine and "
     2494                                    "the virtual images and host drives attached to them."));
     2495
     2496    /* Translate tool-bar: */
    24832497    mAddCtrAction->setShortcut(QKeySequence("Ins"));
    24842498    mDelCtrAction->setShortcut(QKeySequence("Del"));
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.h

    r61442 r64486  
    3131
    3232/* GUI includes: */
     33#include "QITreeView.h"
    3334#include "UISettingsPage.h"
    3435#include "UIMachineSettingsStorage.gen.h"
     
    570571};
    571572Q_DECLARE_METATYPE (StorageModel::ToolTipType);
     573
     574/** QITreeView subclass used as Storage-view. */
     575class StorageView : public QITreeView
     576{
     577    Q_OBJECT;
     578
     579public:
     580
     581    /** Constructs storage-view passing @a pParent to the base-class. */
     582    StorageView(QWidget *pParent) : QITreeView(pParent) {}
     583};
    572584
    573585/* Storage Delegate */
     
    798810    QString m_strMachineGuestOSTypeId;
    799811
     812    /** Holds the storage-tree instance. */
     813    QITreeView *mTwStorageTree;
     814    /** Holds the storage-model instance. */
    800815    StorageModel *mStorageModel;
    801816
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.ui

    r62495 r64486  
    5151          <string>&amp;Storage Tree</string>
    5252         </property>
    53          <property name="buddy" >
    54           <cstring>mTwStorageTree</cstring>
    55          </property>
    5653        </widget>
    5754       </item>
     
    6461          <number>0</number>
    6562         </property>
    66          <item>
    67           <widget class="QITreeView" native="1" name="mTwStorageTree" >
    68            <property name="whatsThis" >
    69             <string>Lists all storage controllers for this machine and the virtual images and host drives attached to them.</string>
    70            </property>
    71           </widget>
    72          </item>
    7363         <item>
    7464          <layout class="QHBoxLayout" name="mLtStorageBar" >
     
    625615  </customwidget>
    626616  <customwidget>
    627    <class>QITreeView</class>
    628    <extends>QTreeView</extends>
    629    <header>QITreeView.h</header>
    630    <container>1</container>
    631   </customwidget>
    632   <customwidget>
    633617   <class>UIToolBar</class>
    634618   <extends>QWidget</extends>
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