VirtualBox

儲存庫 vbox 的更動 65337


忽略:
時間撮記:
2017-1-16 下午02:05:31 (8 年 以前)
作者:
vboxsync
訊息:

FE/Qt: bugref:6899: Accessibility support (step 179): A bit of care for UIInformationItem: Refactoring.

位置:
trunk/src/VBox/Frontends/VirtualBox/src/runtime/information
檔案:
修改 4 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIInformationConfiguration.cpp

    r65274 r65337  
    2626/* GUI includes: */
    2727# include "UIInformationConfiguration.h"
     28# include "UIInformationDataItem.h"
    2829# include "UIInformationItem.h"
    2930# include "UIInformationView.h"
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIInformationModel.cpp

    r65334 r65337  
    2020#else  /* !VBOX_WITH_PRECOMPILED_HEADERS */
    2121
    22 /* Qt includes: */
    23 # include <QFont>
    24 # include <QHash>
    25 # include <QBrush>
    26 # include <QGraphicsView>
    27 # include <QGraphicsScene>
    28 # include <QGraphicsSceneContextMenuEvent>
    29 
    3022/* GUI includes: */
    31 # include "VBoxGlobal.h"
    32 # include "UIConverter.h"
    33 # include "UIExtraDataManager.h"
    3423# include "UIInformationModel.h"
    3524# include "UIInformationDataItem.h"
     
    5342}
    5443
    55 int UIInformationModel::rowCount(const QModelIndex& /*parent */) const
     44int UIInformationModel::rowCount(const QModelIndex & /* parentIndex */) const
    5645{
    5746    /* Return row-count: */
     
    6150QVariant UIInformationModel::data(const QModelIndex &index, int role) const
    6251{
    63     /* Get row: */
    64     int row = index.row();
    6552    /* Get item at the row: */
    66     UIInformationDataItem *pItem = m_list.at(row);
     53    UIInformationDataItem *pItem = m_list.at(index.row());
    6754    /* Return the data for the corresponding role: */
    6855    return pItem->data(index, role);
     
    7764}
    7865
    79 void UIInformationModel::updateData(const QModelIndex &idx)
     66void UIInformationModel::updateData(const QModelIndex &index)
    8067{
    8168    /* Emit data-changed signal: */
    82     emit dataChanged(idx, idx);
     69    emit dataChanged(index, index);
    8370}
    8471
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIInformationModel.h

    r65334 r65337  
    2020
    2121/* Qt includes: */
    22 #include <QMap>
    23 #include <QSet>
    24 #include <QObject>
    25 #include <QPointer>
    2622#include <QAbstractListModel>
    2723
    28 /* GUI includes: */
    29 #include "UIExtraDataDefs.h"
    30 #include "UIInformationDataItem.h"
    31 
    3224/* COM includes: */
    33 # include "CGuest.h"
     25# include "COMEnums.h"
    3426# include "CConsole.h"
    35 # include "CDisplay.h"
    3627# include "CMachine.h"
    37 # include "COMEnums.h"
    38 # include "CNetworkAdapter.h"
    39 # include "CMachineDebugger.h"
    40 # include "CMediumAttachment.h"
    41 # include "CSystemProperties.h"
    42 # include "CStorageController.h"
    4328
    4429/* Forward declarations: */
     
    6146    ~UIInformationModel();
    6247
    63     /** Returns the row-count for item specified by the @a parentIdx. */
    64     int rowCount(const QModelIndex &parentIdx = QModelIndex()) const;
     48    /** Returns the row-count for item specified by the @a parentIndex. */
     49    virtual int rowCount(const QModelIndex &parentIndex = QModelIndex()) const /* override */;
    6550
    6651    /** Returns the data for item specified by the @a index and the @a role. */
    67     QVariant data(const QModelIndex &idx, int role = Qt::DisplayRole) const;
     52    virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const /* override */;
    6853
    6954    /** Adds the @a pItem into the model. */
     
    7156
    7257    /** Updates the data for item specified by the @a index. */
    73     void updateData(const QModelIndex &idx);
     58    void updateData(const QModelIndex &index);
    7459
    7560public slots:
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIInformationRuntime.cpp

    r65274 r65337  
    2626/* GUI includes: */
    2727# include "UIInformationRuntime.h"
     28# include "UIInformationDataItem.h"
    2829# include "UIInformationItem.h"
    2930# include "UIInformationView.h"
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette