Changeset 100300 in vbox
- Timestamp:
- Jun 27, 2023 2:44:16 PM (17 months ago)
- 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 1883 1883 }; 1884 1884 1885 /** Simple action extension, used as 'Perform GoForward' in file manager action class. */ 1886 class UIActionMenuFileManagerGoForward : public UIActionSimple 1887 { 1888 Q_OBJECT; 1889 1890 public: 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 1899 protected: 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. */ 1925 class UIActionMenuFileManagerGoBackward : public UIActionSimple 1926 { 1927 Q_OBJECT; 1928 1929 public: 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 1938 protected: 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 1885 1963 /** Simple action extension, used as 'Perform Delete' in file manager action class. */ 1886 1964 class UIActionMenuFileManagerDelete : public UIActionSimple … … 3196 3274 m_pool[UIActionIndex_M_FileManager_S_Host_GoHome] = new UIActionMenuFileManagerGoHome(this); 3197 3275 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); 3198 3280 m_pool[UIActionIndex_M_FileManager_S_Host_Refresh] = new UIActionMenuFileManagerRefresh(this); 3199 3281 m_pool[UIActionIndex_M_FileManager_S_Guest_Refresh] = new UIActionMenuFileManagerRefresh(this); -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.h
r100180 r100300 128 128 UIActionIndex_M_FileManager_S_Host_GoHome, 129 129 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, 130 134 UIActionIndex_M_FileManager_S_Host_Refresh, 131 135 UIActionIndex_M_FileManager_S_Guest_Refresh, -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerTable.cpp
r100283 r100300 452 452 connect(m_pNavigationWidget, &UIFileTableNavigationWidget::sigPathChanged, 453 453 this, &UIFileManagerTable::sltHandleNavigationWidgetPathChange); 454 connect(m_pNavigationWidget, &UIFileTableNavigationWidget::sigHistoryListChanged, 455 this, &UIFileManagerTable::sltHandleNavigationWidgetHistoryListChanged); 454 456 m_pMainLayout->addWidget(m_pNavigationWidget, 1, 1, 1, 6); 455 457 m_sessionWidgets << m_pNavigationWidget; … … 639 641 } 640 642 643 void UIFileManagerTable::sltGoForward() 644 { 645 } 646 647 void UIFileManagerTable::sltGoBackward() 648 { 649 } 650 641 651 void UIFileManagerTable::sltRefresh() 642 652 { … … 904 914 { 905 915 goIntoDirectory(UIPathOperations::pathTrail(strPath)); 916 } 917 918 void 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(); 906 923 } 907 924 -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerTable.h
r100283 r100300 174 174 void sltGoUp(); 175 175 void sltGoHome(); 176 void sltGoForward(); 177 void sltGoBackward(); 176 178 void sltRefresh(); 177 179 void sltDelete(); … … 276 278 void sltHandleItemRenameAttempt(UICustomFileSystemItem *pItem, QString strOldName, QString strNewName); 277 279 void sltHandleNavigationWidgetPathChange(const QString& strPath); 280 void sltHandleNavigationWidgetHistoryListChanged(); 278 281 279 282 private: -
trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserDialog.cpp
r99971 r100300 45 45 #endif 46 46 47 /* Other VBox includes: */ 47 48 #include <iprt/assert.h> 48 49 -
trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoBrowserBase.cpp
r100299 r100300 39 39 #include "UIVisoBrowserBase.h" 40 40 41 /* Other VBox includes: */ 42 #include <iprt/assert.h> 41 43 42 44 /********************************************************************************************************************************* -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIFileTableNavigationWidget.cpp
r100283 r100300 241 241 } 242 242 m_pHistoryComboBox->setCurrentIndex(itemIndex); 243 emit sigHistoryListChanged(); 243 244 } 244 245 } … … 251 252 m_pHistoryComboBox->clear(); 252 253 m_pHistoryComboBox->blockSignals(false); 254 emit sigHistoryListChanged(); 253 255 } 254 256 … … 262 264 if (m_pBreadCrumbs) 263 265 m_pBreadCrumbs->setPathSeparator(m_pathSeparator); 266 } 267 268 int UIFileTableNavigationWidget::historyItemCount() const 269 { 270 if (m_pHistoryComboBox) 271 return 0; 272 return m_pHistoryComboBox->count(); 273 } 274 275 int UIFileTableNavigationWidget::currentHistoryIndex() const 276 { 277 if (m_pHistoryComboBox) 278 return 0; 279 return m_pHistoryComboBox->currentIndex(); 264 280 } 265 281 -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIFileTableNavigationWidget.h
r100297 r100300 52 52 53 53 void sigPathChanged(const QString &strPath); 54 void sigHistoryListChanged(); 54 55 55 56 public: … … 59 60 void reset(); 60 61 void setPathSeparator(const QChar &separator); 62 int historyItemCount() const; 63 int currentHistoryIndex() const; 64 65 protected: 66 61 67 bool eventFilter(QObject *pObject, QEvent *pEvent) override; 62 68
Note:
See TracChangeset
for help on using the changeset viewer.