VirtualBox

Changeset 19149 in vbox for trunk


Ignore:
Timestamp:
Apr 23, 2009 3:44:55 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
46384
Message:

FE/Qt4-OVF: make it possible to edit items with the keyboard

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxApplianceEditorWgt.h

    r18384 r19149  
    171171    QVariant headerData (int aSection, Qt::Orientation aOrientation, int aRole) const;
    172172
     173    QModelIndex buddy (const QModelIndex &aIndex) const;
     174
    173175    void restoreDefaults (const QModelIndex& aParent = QModelIndex());
    174176    void putBack();
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxApplianceEditorWgt.cpp

    r18846 r19149  
    784784}
    785785
     786QModelIndex VirtualSystemModel::buddy (const QModelIndex &aIndex) const
     787{
     788    if (!aIndex.isValid())
     789        return QModelIndex();
     790
     791    if (aIndex.column() == ConfigValueSection)
     792        return aIndex;
     793    else
     794        return index (aIndex.row(), ConfigValueSection, aIndex.parent());
     795}
     796
    786797void VirtualSystemModel::restoreDefaults (const QModelIndex& aParent /* = QModelIndex() */)
    787798{
     
    980991    mTvSettings->setRootIsDecorated (false);
    981992    mTvSettings->setAlternatingRowColors (true);
     993    mTvSettings->setAllColumnsShowFocus (true);
    982994    mTvSettings->header()->setStretchLastSection (true);
    983995    mTvSettings->header()->setResizeMode (QHeaderView::ResizeToContents);
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