VirtualBox

Changeset 91328 in vbox


Ignore:
Timestamp:
Sep 22, 2021 3:15:09 PM (3 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:6143. Using QITableView in VISO creator. I will have to refactor data structure to accommodate row/cell objects of the accessibility infrastruture.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerTable.h

    r87718 r91328  
    128128 *  and a host version are derived from this base. Each of these children
    129129 *  populates the UICustomFileSystemModel by scanning the file system
    130  *  differently. The file structre kept in this class as a tree. */
     130 *  differently. The file structure kept in this class as a tree. */
    131131class UIFileManagerTable : public QIWithRetranslateUI<QWidget>
    132132{
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoContentBrowser.cpp

    r91235 r91328  
    2323#include <QHeaderView>
    2424#include <QMimeData>
    25 #include <QTableView>
    2625#include <QTreeView>
    2726
     
    3029#include "UIPathOperations.h"
    3130#include "UIVisoContentBrowser.h"
     31#include "QITableView.h"
    3232
    3333/*********************************************************************************************************************************
     
    3636
    3737/** An QTableView extension mainly used to handle dropeed file objects from the host browser. */
    38 class UIVisoContentTableView : public QTableView
     38class UIVisoContentTableView : public QITableView
    3939{
    4040    Q_OBJECT;
     
    7777*********************************************************************************************************************************/
    7878UIVisoContentTableView::UIVisoContentTableView(QWidget *pParent /* = 0 */)
    79     :QTableView(pParent)
     79    :QITableView(pParent)
    8080{
    8181}
     
    481481    else
    482482    {
    483         QItemSelectionModel *selectionModel = m_pTreeView->selectionModel();
    484         if (selectionModel)
    485         {
     483        if (m_pTreeView && m_pTreeView->selectionModel())
     484        {
     485            QItemSelectionModel *selectionModel = m_pTreeView->selectionModel();
    486486            if (!selectionModel->selectedIndexes().isEmpty())
    487487            {
     
    579579    else if (index.model() == m_pModel)
    580580        return m_pTableProxyModel->mapFromSource(index);
    581     /* else if (index.model() == m_pTreeProxyModel): */
    582     return m_pTableProxyModel->mapFromSource(m_pTreeProxyModel->mapToSource(index));
     581    else if (index.model() == m_pTreeProxyModel)
     582        return m_pTableProxyModel->mapFromSource(m_pTreeProxyModel->mapToSource(index));
     583    return QModelIndex();
    583584}
    584585
     
    592593    else if (index.model() == m_pModel)
    593594        return m_pTreeProxyModel->mapFromSource(index);
    594     /* else if (index.model() == m_pTableProxyModel): */
    595     return m_pTreeProxyModel->mapFromSource(m_pTableProxyModel->mapToSource(index));
     595    else if (index.model() == m_pTableProxyModel)
     596        return m_pTreeProxyModel->mapFromSource(m_pTableProxyModel->mapToSource(index));
     597    return QModelIndex();
    596598}
    597599
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoCreator.cpp

    r91300 r91328  
    145145        m_pRenameAction->setToolTip(QApplication::translate("UIVisoCreator", "Rename the selected object"));
    146146    if (m_pButtonBox && m_pButtonBox->button(QDialogButtonBox::Ok))
     147    {
    147148        m_pButtonBox->button(QDialogButtonBox::Ok)->setText(QApplication::translate("UIVisoCreator", "C&reate"));
     149        m_pButtonBox->button(QDialogButtonBox::Ok)->setToolTip(QApplication::translate("UIVisoCreator", "Creates VISO file with the selected content"));
     150    }
     151    if (m_pButtonBox && m_pButtonBox->button(QDialogButtonBox::Help))
     152        m_pButtonBox->button(QDialogButtonBox::Help)->setToolTip(QApplication::translate("UIVisoCreator", "Opens the help browser and navigates to the related section"));
    148153}
    149154
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoHostBrowser.cpp

    r91235 r91328  
    2020#include <QHeaderView>
    2121#include <QMimeData>
    22 #include <QTableView>
    2322#include <QTextEdit>
    2423#include <QTreeView>
    2524
    2625/* GUI includes: */
     26#include "QITableView.h"
    2727#include "UIVisoHostBrowser.h"
    2828
     
    3636
    3737public:
     38
    3839    virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const /* override */;
    3940    UIVisoHostBrowserModel(QObject *pParent);
     
    149150    }
    150151
    151     m_pTableView = new QTableView;
     152    m_pTableView = new QITableView;
    152153    if (m_pTableView)
    153154    {
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoHostBrowser.h

    r82968 r91328  
    2727/* Forward declarations: */
    2828class QItemSelection;
    29 class QTableView;
     29class QITableView;
    3030class UIVisoHostBrowserModel;
    3131
     
    7272    UIVisoHostBrowserModel *m_pTreeModel;
    7373    UIVisoHostBrowserModel *m_pTableModel;
    74     QTableView             *m_pTableView;
     74    QITableView            *m_pTableView;
    7575};
    7676
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