VirtualBox

Changeset 100300 in vbox


Ignore:
Timestamp:
Jun 27, 2023 2:44:16 PM (17 months ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9080. Build fix.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.cpp

    r100180 r100300  
    18831883};
    18841884
     1885/** Simple action extension, used as 'Perform GoForward' in file manager action class. */
     1886class UIActionMenuFileManagerGoForward : public UIActionSimple
     1887{
     1888    Q_OBJECT;
     1889
     1890public:
     1891
     1892    /** Constructs action passing @a pParent to the base-class. */
     1893    UIActionMenuFileManagerGoForward(UIActionPool *pParent)
     1894        : UIActionSimple(pParent,
     1895                         ":/file_manager_go_home_24px.png", ":/file_manager_go_home_16px.png",
     1896                         ":/file_manager_go_home_disabled_24px.png", ":/file_manager_go_home_disabled_16px.png")
     1897    {}
     1898
     1899protected:
     1900
     1901    /** Returns shortcut extra-data ID. */
     1902    virtual QString shortcutExtraDataID() const RT_OVERRIDE
     1903    {
     1904        return QString("FileManagerGoForward");
     1905    }
     1906
     1907    /** Returns default shortcut. */
     1908    virtual QKeySequence defaultShortcut(UIActionPoolType) const RT_OVERRIDE
     1909    {
     1910        return QKeySequence();
     1911    }
     1912
     1913    /** Handles translation event. */
     1914    virtual void retranslateUi() RT_OVERRIDE
     1915    {
     1916        setName(QApplication::translate("UIActionPool", "Go Forward"));
     1917        setShortcutScope(QApplication::translate("UIActionPool", "File Manager"));
     1918        setStatusTip(QApplication::translate("UIActionPool", "Go forward"));
     1919        setToolTip(  QApplication::translate("UIActionPool", "Go Forward")
     1920                   + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString())));
     1921    }
     1922};
     1923
     1924/** Simple action extension, used as 'Perform GoBackward' in file manager action class. */
     1925class UIActionMenuFileManagerGoBackward : public UIActionSimple
     1926{
     1927    Q_OBJECT;
     1928
     1929public:
     1930
     1931    /** Constructs action passing @a pParent to the base-class. */
     1932    UIActionMenuFileManagerGoBackward(UIActionPool *pParent)
     1933        : UIActionSimple(pParent,
     1934                         ":/file_manager_go_home_24px.png", ":/file_manager_go_home_16px.png",
     1935                         ":/file_manager_go_home_disabled_24px.png", ":/file_manager_go_home_disabled_16px.png")
     1936    {}
     1937
     1938protected:
     1939
     1940    /** Returns shortcut extra-data ID. */
     1941    virtual QString shortcutExtraDataID() const RT_OVERRIDE
     1942    {
     1943        return QString("FileManagerGoBackward");
     1944    }
     1945
     1946    /** Returns default shortcut. */
     1947    virtual QKeySequence defaultShortcut(UIActionPoolType) const RT_OVERRIDE
     1948    {
     1949        return QKeySequence();
     1950    }
     1951
     1952    /** Handles translation event. */
     1953    virtual void retranslateUi() RT_OVERRIDE
     1954    {
     1955        setName(QApplication::translate("UIActionPool", "Go Backward"));
     1956        setShortcutScope(QApplication::translate("UIActionPool", "File Manager"));
     1957        setStatusTip(QApplication::translate("UIActionPool", "Go forward"));
     1958        setToolTip(  QApplication::translate("UIActionPool", "Go Backward")
     1959                   + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString())));
     1960    }
     1961};
     1962
    18851963/** Simple action extension, used as 'Perform Delete' in file manager action class. */
    18861964class UIActionMenuFileManagerDelete : public UIActionSimple
     
    31963274    m_pool[UIActionIndex_M_FileManager_S_Host_GoHome] = new UIActionMenuFileManagerGoHome(this);
    31973275    m_pool[UIActionIndex_M_FileManager_S_Guest_GoHome] = new UIActionMenuFileManagerGoHome(this);
     3276    m_pool[UIActionIndex_M_FileManager_S_Host_GoForward] = new UIActionMenuFileManagerGoForward(this);
     3277    m_pool[UIActionIndex_M_FileManager_S_Guest_GoForward] = new UIActionMenuFileManagerGoForward(this);
     3278    m_pool[UIActionIndex_M_FileManager_S_Host_GoBackward] = new UIActionMenuFileManagerGoBackward(this);
     3279    m_pool[UIActionIndex_M_FileManager_S_Guest_GoBackward] = new UIActionMenuFileManagerGoBackward(this);
    31983280    m_pool[UIActionIndex_M_FileManager_S_Host_Refresh] = new UIActionMenuFileManagerRefresh(this);
    31993281    m_pool[UIActionIndex_M_FileManager_S_Guest_Refresh] = new UIActionMenuFileManagerRefresh(this);
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.h

    r100180 r100300  
    128128    UIActionIndex_M_FileManager_S_Host_GoHome,
    129129    UIActionIndex_M_FileManager_S_Guest_GoHome,
     130    UIActionIndex_M_FileManager_S_Host_GoForward,
     131    UIActionIndex_M_FileManager_S_Guest_GoForward,
     132    UIActionIndex_M_FileManager_S_Host_GoBackward,
     133    UIActionIndex_M_FileManager_S_Guest_GoBackward,
    130134    UIActionIndex_M_FileManager_S_Host_Refresh,
    131135    UIActionIndex_M_FileManager_S_Guest_Refresh,
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerTable.cpp

    r100283 r100300  
    452452        connect(m_pNavigationWidget, &UIFileTableNavigationWidget::sigPathChanged,
    453453                this, &UIFileManagerTable::sltHandleNavigationWidgetPathChange);
     454        connect(m_pNavigationWidget, &UIFileTableNavigationWidget::sigHistoryListChanged,
     455                this, &UIFileManagerTable::sltHandleNavigationWidgetHistoryListChanged);
    454456        m_pMainLayout->addWidget(m_pNavigationWidget, 1, 1, 1, 6);
    455457        m_sessionWidgets << m_pNavigationWidget;
     
    639641}
    640642
     643void UIFileManagerTable::sltGoForward()
     644{
     645}
     646
     647void UIFileManagerTable::sltGoBackward()
     648{
     649}
     650
    641651void UIFileManagerTable::sltRefresh()
    642652{
     
    904914{
    905915    goIntoDirectory(UIPathOperations::pathTrail(strPath));
     916}
     917
     918void UIFileManagerTable::sltHandleNavigationWidgetHistoryListChanged()
     919{
     920    /* Check if forward/backward actions should be disabled/enabled: */
     921    int iHistoryListCount = m_pNavigationWidget->historyItemCount();
     922    int iCurrentHistoryIndex = m_pNavigationWidget->currentHistoryIndex();
    906923}
    907924
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerTable.h

    r100283 r100300  
    174174    void sltGoUp();
    175175    void sltGoHome();
     176    void sltGoForward();
     177    void sltGoBackward();
    176178    void sltRefresh();
    177179    void sltDelete();
     
    276278    void sltHandleItemRenameAttempt(UICustomFileSystemItem *pItem, QString strOldName, QString strNewName);
    277279    void sltHandleNavigationWidgetPathChange(const QString& strPath);
     280    void sltHandleNavigationWidgetHistoryListChanged();
    278281
    279282private:
  • trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserDialog.cpp

    r99971 r100300  
    4545#endif
    4646
     47/* Other VBox includes: */
    4748#include <iprt/assert.h>
    4849
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoBrowserBase.cpp

    r100299 r100300  
    3939#include "UIVisoBrowserBase.h"
    4040
     41/* Other VBox includes: */
     42#include <iprt/assert.h>
    4143
    4244/*********************************************************************************************************************************
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIFileTableNavigationWidget.cpp

    r100283 r100300  
    241241        }
    242242        m_pHistoryComboBox->setCurrentIndex(itemIndex);
     243        emit sigHistoryListChanged();
    243244    }
    244245}
     
    251252        m_pHistoryComboBox->clear();
    252253        m_pHistoryComboBox->blockSignals(false);
     254        emit sigHistoryListChanged();
    253255    }
    254256
     
    262264    if (m_pBreadCrumbs)
    263265        m_pBreadCrumbs->setPathSeparator(m_pathSeparator);
     266}
     267
     268int UIFileTableNavigationWidget::historyItemCount() const
     269{
     270    if (m_pHistoryComboBox)
     271        return 0;
     272    return m_pHistoryComboBox->count();
     273}
     274
     275int UIFileTableNavigationWidget::currentHistoryIndex() const
     276{
     277    if (m_pHistoryComboBox)
     278        return 0;
     279    return m_pHistoryComboBox->currentIndex();
    264280}
    265281
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIFileTableNavigationWidget.h

    r100297 r100300  
    5252
    5353    void sigPathChanged(const QString &strPath);
     54    void sigHistoryListChanged();
    5455
    5556public:
     
    5960    void reset();
    6061    void setPathSeparator(const QChar &separator);
     62    int historyItemCount() const;
     63    int currentHistoryIndex() const;
     64
     65protected:
     66
    6167    bool eventFilter(QObject *pObject, QEvent *pEvent) override;
    6268
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