Changeset 76177 in vbox
- Timestamp:
- Dec 12, 2018 1:38:57 PM (6 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 12 edited
- 22 moved
-
Makefile.kmk (modified) (6 diffs)
-
src/converter/UIConverterBackendGlobal.cpp (modified) (2 diffs)
-
src/extradata/UIExtraDataDefs.cpp (modified) (1 diff)
-
src/extradata/UIExtraDataDefs.h (modified) (2 diffs)
-
src/extradata/UIExtraDataManager.cpp (modified) (5 diffs)
-
src/extradata/UIExtraDataManager.h (modified) (1 diff)
-
src/globals/UIActionPool.cpp (modified) (42 diffs)
-
src/globals/UIActionPool.h (modified) (2 diffs)
-
src/globals/UIActionPoolRuntime.cpp (modified) (6 diffs)
-
src/globals/UIActionPoolRuntime.h (modified) (1 diff)
-
src/guestctrl/UIFileManager.cpp (moved) (moved from trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileManager.cpp ) (44 diffs)
-
src/guestctrl/UIFileManager.h (moved) (moved from trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileManager.h ) (9 diffs)
-
src/guestctrl/UIFileManagerDialog.cpp (moved) (moved from trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileManagerDialog.cpp ) (12 diffs)
-
src/guestctrl/UIFileManagerDialog.h (moved) (moved from trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileManagerDialog.h ) (6 diffs)
-
src/guestctrl/UIFileManagerGuestTable.cpp (moved) (moved from trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestFileTable.cpp ) (31 diffs)
-
src/guestctrl/UIFileManagerGuestTable.h (moved) (moved from trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestFileTable.h ) (5 diffs)
-
src/guestctrl/UIFileManagerHostTable.cpp (moved) (moved from trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIHostFileTable.cpp ) (21 diffs)
-
src/guestctrl/UIFileManagerHostTable.h (moved) (moved from trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIHostFileTable.h ) (5 diffs)
-
src/guestctrl/UIFileManagerLogPanel.cpp (moved) (moved from trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileManagerLogPanel.cpp ) (6 diffs)
-
src/guestctrl/UIFileManagerLogPanel.h (moved) (moved from trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileManagerLogPanel.h ) (3 diffs)
-
src/guestctrl/UIFileManagerModel.cpp (moved) (moved from trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileModel.cpp ) (19 diffs)
-
src/guestctrl/UIFileManagerModel.h (moved) (moved from trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileModel.h ) (6 diffs)
-
src/guestctrl/UIFileManagerOperationsPanel.cpp (moved) (moved from trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileManagerOperationsPanel.cpp ) (15 diffs)
-
src/guestctrl/UIFileManagerOperationsPanel.h (moved) (moved from trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileManagerOperationsPanel.h ) (5 diffs)
-
src/guestctrl/UIFileManagerOptionsPanel.cpp (moved) (moved from trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileManagerOptionsPanel.cpp ) (8 diffs)
-
src/guestctrl/UIFileManagerOptionsPanel.h (moved) (moved from trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileManagerOptionsPanel.h ) (4 diffs)
-
src/guestctrl/UIFileManagerPanel.cpp (moved) (moved from trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileManagerPanel.cpp ) (7 diffs)
-
src/guestctrl/UIFileManagerPanel.h (moved) (moved from trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileManagerPanel.h ) (4 diffs)
-
src/guestctrl/UIFileManagerSessionPanel.cpp (moved) (moved from trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileManagerSessionPanel.cpp ) (9 diffs)
-
src/guestctrl/UIFileManagerSessionPanel.h (moved) (moved from trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileManagerSessionPanel.h ) (3 diffs)
-
src/guestctrl/UIFileManagerTable.cpp (moved) (moved from trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileTable.cpp ) (58 diffs)
-
src/guestctrl/UIFileManagerTable.h (moved) (moved from trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileTable.h ) (9 diffs)
-
src/runtime/UIMachineLogic.cpp (modified) (6 diffs)
-
src/runtime/UIMachineLogic.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
r76021 r76177 851 851 src/runtime/information/UIVMInformationDialog.h \ 852 852 src/guestctrl/UIGuestControlConsole.h \ 853 src/guestctrl/UI GuestControlFileManager.h \854 src/guestctrl/UI GuestControlFileManagerDialog.h \855 src/guestctrl/UI GuestControlFileManagerLogPanel.h \856 src/guestctrl/UI GuestControlFileManagerOperationsPanel.h \857 src/guestctrl/UI GuestControlFileManagerOptionsPanel.h \858 src/guestctrl/UI GuestControlFileManagerPanel.h \859 src/guestctrl/UI GuestControlFileManagerSessionPanel.h \860 src/guestctrl/UI GuestControlFileModel.h \861 src/guestctrl/UI GuestControlFileTable.h \853 src/guestctrl/UIFileManager.h \ 854 src/guestctrl/UIFileManagerDialog.h \ 855 src/guestctrl/UIFileManagerLogPanel.h \ 856 src/guestctrl/UIFileManagerOperationsPanel.h \ 857 src/guestctrl/UIFileManagerOptionsPanel.h \ 858 src/guestctrl/UIFileManagerPanel.h \ 859 src/guestctrl/UIFileManagerSessionPanel.h \ 860 src/guestctrl/UIFileManagerModel.h \ 861 src/guestctrl/UIFileManagerTable.h \ 862 862 src/guestctrl/UIGuestControlInterface.h \ 863 863 src/guestctrl/UIGuestControlTreeItem.h \ 864 src/guestctrl/UI GuestFileTable.h \864 src/guestctrl/UIFileManagerGuestTable.h \ 865 865 src/guestctrl/UIGuestProcessControlDialog.h \ 866 866 src/guestctrl/UIGuestProcessControlWidget.h \ 867 src/guestctrl/UI HostFileTable.h \867 src/guestctrl/UIFileManagerHostTable.h \ 868 868 src/runtime/normal/UIKeyboardHandlerNormal.h \ 869 869 src/runtime/normal/UIMachineLogicNormal.h \ … … 1007 1007 src/runtime/information/UIVMInformationDialog.h \ 1008 1008 src/guestctrl/UIGuestControlConsole.h \ 1009 src/guestctrl/UI GuestControlFileManager.h \1010 src/guestctrl/UI GuestControlFileManagerDialog.h \1011 src/guestctrl/UI GuestControlFileManagerLogPanel.h \1012 src/guestctrl/UI GuestControlFileManagerOperationsPanel.h \1013 src/guestctrl/UI GuestControlFileManagerOptionsPanel.h \1014 src/guestctrl/UI GuestControlFileManagerPanel.h \1015 src/guestctrl/UI GuestControlFileManagerSessionPanel.h \1016 src/guestctrl/UI GuestControlFileModel.h \1017 src/guestctrl/UI GuestControlFileTable.h \1009 src/guestctrl/UIFileManager.h \ 1010 src/guestctrl/UIFileManagerDialog.h \ 1011 src/guestctrl/UIFileManagerLogPanel.h \ 1012 src/guestctrl/UIFileManagerOperationsPanel.h \ 1013 src/guestctrl/UIFileManagerOptionsPanel.h \ 1014 src/guestctrl/UIFileManagerPanel.h \ 1015 src/guestctrl/UIFileManagerSessionPanel.h \ 1016 src/guestctrl/UIFileManagerModel.h \ 1017 src/guestctrl/UIFileManagerTable.h \ 1018 1018 src/guestctrl/UIGuestControlInterface.h \ 1019 1019 src/guestctrl/UIGuestControlTreeItem.h \ 1020 src/guestctrl/UI GuestFileTable.h \1020 src/guestctrl/UIFileManagerGuestTable.h \ 1021 1021 src/guestctrl/UIGuestProcessControlDialog.h \ 1022 1022 src/guestctrl/UIGuestProcessControlWidget.h \ 1023 src/guestctrl/UI HostFileTable.h \1023 src/guestctrl/UIFileManagerHostTable.h \ 1024 1024 src/runtime/normal/UIKeyboardHandlerNormal.h \ 1025 1025 src/runtime/normal/UIMachineLogicNormal.h \ … … 1238 1238 src/runtime/UIFrameBuffer.cpp \ 1239 1239 src/runtime/UIIndicatorsPool.cpp \ 1240 src/guestctrl/UI GuestControlFileManager.cpp \1241 src/guestctrl/UI GuestControlFileManagerLogPanel.cpp \1242 src/guestctrl/UI GuestControlFileManagerOperationsPanel.cpp \1243 src/guestctrl/UI GuestControlFileTable.cpp \1244 src/guestctrl/UI GuestFileTable.cpp \1240 src/guestctrl/UIFileManager.cpp \ 1241 src/guestctrl/UIFileManagerLogPanel.cpp \ 1242 src/guestctrl/UIFileManagerOperationsPanel.cpp \ 1243 src/guestctrl/UIFileManagerTable.cpp \ 1244 src/guestctrl/UIFileManagerGuestTable.cpp \ 1245 1245 src/guestctrl/UIGuestProcessControlWidget.cpp \ 1246 src/guestctrl/UI HostFileTable.cpp \1246 src/guestctrl/UIFileManagerHostTable.cpp \ 1247 1247 src/settings/global/UIGlobalSettingsInput.cpp \ 1248 1248 src/settings/machine/UIMachineSettingsNetwork.cpp \ … … 1289 1289 src/runtime/UIFrameBuffer.cpp \ 1290 1290 src/runtime/UIIndicatorsPool.cpp \ 1291 src/guestctrl/UI GuestControlFileManager.cpp \1292 src/guestctrl/UI GuestControlFileManagerLogPanel.cpp \1293 src/guestctrl/UI GuestControlFileManagerOperationsPanel.cpp \1294 src/guestctrl/UI GuestControlFileManagerSessionPanel.cpp \1295 src/guestctrl/UI GuestControlFileTable.cpp \1296 src/guestctrl/UI GuestFileTable.cpp \1291 src/guestctrl/UIFileManager.cpp \ 1292 src/guestctrl/UIFileManagerLogPanel.cpp \ 1293 src/guestctrl/UIFileManagerOperationsPanel.cpp \ 1294 src/guestctrl/UIFileManagerSessionPanel.cpp \ 1295 src/guestctrl/UIFileManagerTable.cpp \ 1296 src/guestctrl/UIFileManagerGuestTable.cpp \ 1297 1297 src/guestctrl/UIGuestProcessControlWidget.cpp \ 1298 src/guestctrl/UI HostFileTable.cpp \1298 src/guestctrl/UIFileManagerHostTable.cpp \ 1299 1299 src/widgets/UIMiniToolBar.cpp 1300 1300 … … 1569 1569 src/runtime/information/UIVMInformationDialog.cpp \ 1570 1570 src/guestctrl/UIGuestControlConsole.cpp \ 1571 src/guestctrl/UI GuestControlFileManager.cpp \1572 src/guestctrl/UI GuestControlFileManagerDialog.cpp \1573 src/guestctrl/UI GuestControlFileManagerLogPanel.cpp \1574 src/guestctrl/UI GuestControlFileManagerOperationsPanel.cpp \1575 src/guestctrl/UI GuestControlFileManagerOptionsPanel.cpp \1576 src/guestctrl/UI GuestControlFileManagerPanel.cpp \1577 src/guestctrl/UI GuestControlFileManagerSessionPanel.cpp \1578 src/guestctrl/UI GuestControlFileModel.cpp \1579 src/guestctrl/UI GuestControlFileTable.cpp \1571 src/guestctrl/UIFileManager.cpp \ 1572 src/guestctrl/UIFileManagerDialog.cpp \ 1573 src/guestctrl/UIFileManagerLogPanel.cpp \ 1574 src/guestctrl/UIFileManagerOperationsPanel.cpp \ 1575 src/guestctrl/UIFileManagerOptionsPanel.cpp \ 1576 src/guestctrl/UIFileManagerPanel.cpp \ 1577 src/guestctrl/UIFileManagerSessionPanel.cpp \ 1578 src/guestctrl/UIFileManagerModel.cpp \ 1579 src/guestctrl/UIFileManagerTable.cpp \ 1580 1580 src/guestctrl/UIGuestControlInterface.cpp \ 1581 1581 src/guestctrl/UIGuestControlTreeItem.cpp \ 1582 src/guestctrl/UI GuestFileTable.cpp \1582 src/guestctrl/UIFileManagerGuestTable.cpp \ 1583 1583 src/guestctrl/UIGuestProcessControlDialog.cpp \ 1584 1584 src/guestctrl/UIGuestProcessControlWidget.cpp \ 1585 src/guestctrl/UI HostFileTable.cpp \1585 src/guestctrl/UIFileManagerHostTable.cpp \ 1586 1586 src/runtime/normal/UIKeyboardHandlerNormal.cpp \ 1587 1587 src/runtime/normal/UIMachineLogicNormal.cpp \ … … 1748 1748 src/runtime/information/UIVMInformationDialog.cpp \ 1749 1749 src/guestctrl/UIGuestControlConsole.cpp \ 1750 src/guestctrl/UI GuestControlFileManager.cpp \1751 src/guestctrl/UI GuestControlFileManagerDialog.cpp \1752 src/guestctrl/UI GuestControlFileManagerLogPanel.cpp \1753 src/guestctrl/UI GuestControlFileManagerOperationsPanel.cpp \1754 src/guestctrl/UI GuestControlFileManagerOptionsPanel.cpp \1755 src/guestctrl/UI GuestControlFileManagerPanel.cpp \1756 src/guestctrl/UI GuestControlFileManagerSessionPanel.cpp \1757 src/guestctrl/UI GuestControlFileModel.cpp \1758 src/guestctrl/UI GuestControlFileTable.cpp \1750 src/guestctrl/UIFileManager.cpp \ 1751 src/guestctrl/UIFileManagerDialog.cpp \ 1752 src/guestctrl/UIFileManagerLogPanel.cpp \ 1753 src/guestctrl/UIFileManagerOperationsPanel.cpp \ 1754 src/guestctrl/UIFileManagerOptionsPanel.cpp \ 1755 src/guestctrl/UIFileManagerPanel.cpp \ 1756 src/guestctrl/UIFileManagerSessionPanel.cpp \ 1757 src/guestctrl/UIFileManagerModel.cpp \ 1758 src/guestctrl/UIFileManagerTable.cpp \ 1759 1759 src/guestctrl/UIGuestControlInterface.cpp \ 1760 1760 src/guestctrl/UIGuestControlTreeItem.cpp \ 1761 src/guestctrl/UI GuestFileTable.cpp \1761 src/guestctrl/UIFileManagerGuestTable.cpp \ 1762 1762 src/guestctrl/UIGuestProcessControlWidget.cpp \ 1763 1763 src/guestctrl/UIGuestProcessControlDialog.cpp \ 1764 src/guestctrl/UI HostFileTable.cpp \1764 src/guestctrl/UIFileManagerHostTable.cpp \ 1765 1765 src/runtime/normal/UIKeyboardHandlerNormal.cpp \ 1766 1766 src/runtime/normal/UIMachineLogicNormal.cpp \ -
trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendGlobal.cpp
r76059 r76177 561 561 case UIExtraDataMetaDefs::RuntimeMenuMachineActionType_TakeSnapshot: strResult = "TakeSnapshot"; break; 562 562 case UIExtraDataMetaDefs::RuntimeMenuMachineActionType_InformationDialog: strResult = "InformationDialog"; break; 563 case UIExtraDataMetaDefs::RuntimeMenuMachineActionType_ GuestControlFileManagerDialog: strResult = "GuestControlFileManagerDialog"; break;563 case UIExtraDataMetaDefs::RuntimeMenuMachineActionType_FileManagerDialog: strResult = "FileManagerDialog"; break; 564 564 case UIExtraDataMetaDefs::RuntimeMenuMachineActionType_GuestProcessControlDialog: strResult = "GuestProcessControlDialog"; break; 565 565 case UIExtraDataMetaDefs::RuntimeMenuMachineActionType_Pause: strResult = "Pause"; break; … … 589 589 keys << "TakeSnapshot"; values << UIExtraDataMetaDefs::RuntimeMenuMachineActionType_TakeSnapshot; 590 590 keys << "InformationDialog"; values << UIExtraDataMetaDefs::RuntimeMenuMachineActionType_InformationDialog; 591 keys << " GuestControlFileManagerDialog"; values << UIExtraDataMetaDefs::RuntimeMenuMachineActionType_GuestControlFileManagerDialog;591 keys << "FileManagerDialog"; values << UIExtraDataMetaDefs::RuntimeMenuMachineActionType_FileManagerDialog; 592 592 keys << "GuestProcessControlDialog"; values << UIExtraDataMetaDefs::RuntimeMenuMachineActionType_GuestProcessControlDialog; 593 593 keys << "Pause"; values << UIExtraDataMetaDefs::RuntimeMenuMachineActionType_Pause; -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.cpp
r75642 r76177 204 204 const char *UIExtraDataDefs::GUI_GuestControl_ProcessControlDialogGeometry = "GUI/GuestControl/ProcessControlDialogGeometry"; 205 205 206 /* Guest Control file manager options: */206 /* File Manager options: */ 207 207 const char *UIExtraDataDefs::GUI_GuestControl_FileManagerOptions = "GUI/GuestControl/FileManagerOptions"; 208 208 const char *UIExtraDataDefs::GUI_GuestControl_FileManagerListDirectoriesFirst = "ListDirectoriesFirst"; -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.h
r75966 r76177 365 365 /** @} */ 366 366 367 /** @name Guest Control file manager options367 /** @name File Manager options 368 368 * @{ */ 369 369 extern const char *GUI_GuestControl_FileManagerOptions; … … 501 501 RuntimeMenuMachineActionType_TakeSnapshot = RT_BIT(1), 502 502 RuntimeMenuMachineActionType_InformationDialog = RT_BIT(2), 503 RuntimeMenuMachineActionType_ GuestControlFileManagerDialog= RT_BIT(3),503 RuntimeMenuMachineActionType_FileManagerDialog = RT_BIT(3), 504 504 RuntimeMenuMachineActionType_GuestProcessControlDialog = RT_BIT(4), 505 505 RuntimeMenuMachineActionType_Pause = RT_BIT(5), -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp
r76164 r76177 4219 4219 } 4220 4220 4221 QRect UIExtraDataManager:: guestControlFileManagerDialogGeometry(QWidget *pWidget, const QRect &defaultGeometry)4221 QRect UIExtraDataManager::fileManagerDialogGeometry(QWidget *pWidget, const QRect &defaultGeometry) 4222 4222 { 4223 4223 return dialogGeometry(GUI_GuestControl_FileManagerDialogGeometry, pWidget, defaultGeometry); 4224 4224 } 4225 4225 4226 bool UIExtraDataManager:: guestControlFileManagerDialogShouldBeMaximized()4226 bool UIExtraDataManager::fileManagerDialogShouldBeMaximized() 4227 4227 { 4228 4228 /* Get corresponding extra-data: */ … … 4233 4233 } 4234 4234 4235 void UIExtraDataManager::set GuestControlFileManagerDialogGeometry(const QRect &geometry, bool fMaximized)4235 void UIExtraDataManager::setFileManagerDialogGeometry(const QRect &geometry, bool fMaximized) 4236 4236 { 4237 4237 setDialogGeometry(GUI_GuestControl_FileManagerDialogGeometry, geometry, fMaximized); 4238 4238 } 4239 4239 4240 void UIExtraDataManager::set GuestControlFileManagerVisiblePanels(const QStringList &panelNameList)4240 void UIExtraDataManager::setFileManagerVisiblePanels(const QStringList &panelNameList) 4241 4241 { 4242 4242 setExtraDataStringList(GUI_GuestControl_FileManagerVisiblePanels, panelNameList); 4243 4243 } 4244 4244 4245 QStringList UIExtraDataManager:: guestControlFileManagerVisiblePanels()4245 QStringList UIExtraDataManager::fileManagerVisiblePanels() 4246 4246 { 4247 4247 return extraDataStringList(GUI_GuestControl_FileManagerVisiblePanels); 4248 4248 } 4249 4249 4250 void UIExtraDataManager::set GuestControlFileManagerOptions(bool fListDirectoriesFirst,4251 bool fShowDeleteConfirmation, bool fShowHumanReadableSizes)4250 void UIExtraDataManager::setFileManagerOptions(bool fListDirectoriesFirst, 4251 bool fShowDeleteConfirmation, bool fShowHumanReadableSizes) 4252 4252 { 4253 4253 /* Serialize passed values: */ … … 4265 4265 } 4266 4266 4267 bool UIExtraDataManager:: guestControlFileManagerListDirectoriesFirst()4267 bool UIExtraDataManager::fileManagerListDirectoriesFirst() 4268 4268 { 4269 4269 const QStringList data = extraDataStringList(GUI_GuestControl_FileManagerOptions); … … 4276 4276 } 4277 4277 4278 bool UIExtraDataManager:: guestControlFileManagerShowDeleteConfirmation()4278 bool UIExtraDataManager::fileManagerShowDeleteConfirmation() 4279 4279 { 4280 4280 const QStringList data = extraDataStringList(GUI_GuestControl_FileManagerOptions); … … 4287 4287 } 4288 4288 4289 bool UIExtraDataManager:: guestControlFileManagerShowHumanReadableSizes()4289 bool UIExtraDataManager::fileManagerShowHumanReadableSizes() 4290 4290 { 4291 4291 const QStringList data = extraDataStringList(GUI_GuestControl_FileManagerOptions); -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h
r75642 r76177 638 638 void setGuestControlProcessControlSplitterHints(const QList<int> &hints); 639 639 QList<int> guestControlProcessControlSplitterHints(); 640 QRect guestControlFileManagerDialogGeometry(QWidget *pWidget, const QRect &defaultGeometry);641 bool guestControlFileManagerDialogShouldBeMaximized();642 void set GuestControlFileManagerDialogGeometry(const QRect &geometry, bool fMaximized);640 QRect fileManagerDialogGeometry(QWidget *pWidget, const QRect &defaultGeometry); 641 bool fileManagerDialogShouldBeMaximized(); 642 void setFileManagerDialogGeometry(const QRect &geometry, bool fMaximized); 643 643 QRect guestProcessControlDialogGeometry(QWidget *pWidget, const QRect &defaultGeometry); 644 644 bool guestProcessControlDialogShouldBeMaximized(); 645 645 void setGuestProcessControlDialogGeometry(const QRect &geometry, bool fMaximized); 646 void set GuestControlFileManagerVisiblePanels(const QStringList &panelNameList);647 QStringList guestControlFileManagerVisiblePanels();648 /** @} */ 649 650 /** @name Guest Control file manager options651 * @{ */ 652 void set GuestControlFileManagerOptions(bool fListDirectoriesFirst,653 bool fShowDeleteConfirmation, bool fshowHumanReadableSizes);654 bool guestControlFileManagerListDirectoriesFirst();655 bool guestControlFileManagerShowDeleteConfirmation();656 bool guestControlFileManagerShowHumanReadableSizes();646 void setFileManagerVisiblePanels(const QStringList &panelNameList); 647 QStringList fileManagerVisiblePanels(); 648 /** @} */ 649 650 /** @name File Manager options 651 * @{ */ 652 void setFileManagerOptions(bool fListDirectoriesFirst, 653 bool fShowDeleteConfirmation, bool fshowHumanReadableSizes); 654 bool fileManagerListDirectoriesFirst(); 655 bool fileManagerShowDeleteConfirmation(); 656 bool fileManagerShowHumanReadableSizes(); 657 657 /** @} */ 658 658 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.cpp
r76176 r76177 1450 1450 }; 1451 1451 1452 /** Menu action extension, used as ' Guest ControlFile Manager' menu class. */1453 class UIActionMenu GuestControlFileManager : public UIActionMenu1454 { 1455 Q_OBJECT; 1456 1457 public: 1458 1459 /** Constructs action passing @a pParent to the base-class. */ 1460 UIActionMenu GuestControlFileManager(UIActionPool *pParent)1452 /** Menu action extension, used as 'File Manager' menu class. */ 1453 class UIActionMenuFileManager : public UIActionMenu 1454 { 1455 Q_OBJECT; 1456 1457 public: 1458 1459 /** Constructs action passing @a pParent to the base-class. */ 1460 UIActionMenuFileManager(UIActionPool *pParent) 1461 1461 : UIActionMenu(pParent) 1462 1462 {} … … 1467 1467 virtual QString shortcutExtraDataID() const /* override */ 1468 1468 { 1469 return QString(" GuestControlFileManagerMenu");1469 return QString("FileManagerMenu"); 1470 1470 } 1471 1471 … … 1478 1478 }; 1479 1479 1480 class UIActionMenu GuestControlFileManagerHostSubmenu : public UIActionMenu1481 { 1482 Q_OBJECT; 1483 1484 public: 1485 1486 /** Constructs action passing @a pParent to the base-class. */ 1487 UIActionMenu GuestControlFileManagerHostSubmenu(UIActionPool *pParent)1480 class UIActionMenuFileManagerHostSubmenu : public UIActionMenu 1481 { 1482 Q_OBJECT; 1483 1484 public: 1485 1486 /** Constructs action passing @a pParent to the base-class. */ 1487 UIActionMenuFileManagerHostSubmenu(UIActionPool *pParent) 1488 1488 : UIActionMenu(pParent) 1489 1489 {} … … 1494 1494 virtual QString shortcutExtraDataID() const /* override */ 1495 1495 { 1496 return QString(" GuestControlFileManagerHostSubmenu");1496 return QString("FileManagerHostSubmenu"); 1497 1497 } 1498 1498 … … 1505 1505 }; 1506 1506 1507 class UIActionMenu GuestControlFileManagerGuestSubmenu : public UIActionMenu1508 { 1509 Q_OBJECT; 1510 1511 public: 1512 1513 /** Constructs action passing @a pParent to the base-class. */ 1514 UIActionMenu GuestControlFileManagerGuestSubmenu(UIActionPool *pParent)1507 class UIActionMenuFileManagerGuestSubmenu : public UIActionMenu 1508 { 1509 Q_OBJECT; 1510 1511 public: 1512 1513 /** Constructs action passing @a pParent to the base-class. */ 1514 UIActionMenuFileManagerGuestSubmenu(UIActionPool *pParent) 1515 1515 : UIActionMenu(pParent) 1516 1516 {} … … 1521 1521 virtual QString shortcutExtraDataID() const /* override */ 1522 1522 { 1523 return QString(" GuestControlFileManagerGuestSubmenu");1523 return QString("FileManagerGuestSubmenu"); 1524 1524 } 1525 1525 … … 1533 1533 1534 1534 1535 /** Simple action extension, used as 'Copy to Guest' in guest controlfile manager action class. */1536 class UIActionMenu GuestControlFileManagerCopyToGuest : public UIActionSimple1537 { 1538 Q_OBJECT; 1539 1540 public: 1541 1542 /** Constructs action passing @a pParent to the base-class. */ 1543 UIActionMenu GuestControlFileManagerCopyToGuest(UIActionPool *pParent)1535 /** Simple action extension, used as 'Copy to Guest' in file manager action class. */ 1536 class UIActionMenuFileManagerCopyToGuest : public UIActionSimple 1537 { 1538 Q_OBJECT; 1539 1540 public: 1541 1542 /** Constructs action passing @a pParent to the base-class. */ 1543 UIActionMenuFileManagerCopyToGuest(UIActionPool *pParent) 1544 1544 : UIActionSimple(pParent, 1545 1545 ":/file_manager_copy_to_guest_24px.png", ":/file_manager_copy_to_guest_16px.png", … … 1564 1564 { 1565 1565 setName(QApplication::translate("UIActionPool", "Copy to guest")); 1566 setShortcutScope(QApplication::translate("UIActionPool", " Guest ControlFile Manager"));1566 setShortcutScope(QApplication::translate("UIActionPool", "File Manager")); 1567 1567 setToolTip(QApplication::translate("UIActionPool", "Copy the Selected Object(s) from Host to Guest")); 1568 1568 setStatusTip(QApplication::translate("UIActionPool", "Copy the selected object(s) from host to guest")); … … 1570 1570 }; 1571 1571 1572 /** Simple action extension, used as 'Copy to Host' in guest controlfile manager action class. */1573 class UIActionMenu GuestControlFileManagerCopyToHost : public UIActionSimple1574 { 1575 Q_OBJECT; 1576 1577 public: 1578 1579 /** Constructs action passing @a pParent to the base-class. */ 1580 UIActionMenu GuestControlFileManagerCopyToHost(UIActionPool *pParent)1572 /** Simple action extension, used as 'Copy to Host' in file manager action class. */ 1573 class UIActionMenuFileManagerCopyToHost : public UIActionSimple 1574 { 1575 Q_OBJECT; 1576 1577 public: 1578 1579 /** Constructs action passing @a pParent to the base-class. */ 1580 UIActionMenuFileManagerCopyToHost(UIActionPool *pParent) 1581 1581 : UIActionSimple(pParent, 1582 1582 ":/file_manager_copy_to_host_24px.png", ":/file_manager_copy_to_host_16px.png", … … 1601 1601 { 1602 1602 setName(QApplication::translate("UIActionPool", "Copy to host")); 1603 setShortcutScope(QApplication::translate("UIActionPool", " Guest ControlFile Manager"));1603 setShortcutScope(QApplication::translate("UIActionPool", "File Manager")); 1604 1604 setToolTip(QApplication::translate("UIActionPool", "Copy the Selected Object(s) from Guest to Host")); 1605 1605 setStatusTip(QApplication::translate("UIActionPool", "Copy the selected object(s) from guest to host")); … … 1607 1607 }; 1608 1608 1609 /** Toggle action extension, used to toggle 'File Manager Options' panel in guest controlfile manager. */1610 class UIActionMenu GuestControlFileManagerOptions : public UIActionToggle1611 { 1612 Q_OBJECT; 1613 1614 public: 1615 1616 /** Constructs action passing @a pParent to the base-class. */ 1617 UIActionMenu GuestControlFileManagerOptions(UIActionPool *pParent)1609 /** Toggle action extension, used to toggle 'File Manager Options' panel in file manager. */ 1610 class UIActionMenuFileManagerOptions : public UIActionToggle 1611 { 1612 Q_OBJECT; 1613 1614 public: 1615 1616 /** Constructs action passing @a pParent to the base-class. */ 1617 UIActionMenuFileManagerOptions(UIActionPool *pParent) 1618 1618 : UIActionToggle(pParent) 1619 1619 { … … 1647 1647 }; 1648 1648 1649 /** Toggle action extension, used to toggle 'File Manager Log' panel in guest controlfile manager. */1650 class UIActionMenu GuestControlFileManagerLog : public UIActionToggle1651 { 1652 Q_OBJECT; 1653 1654 public: 1655 1656 /** Constructs action passing @a pParent to the base-class. */ 1657 UIActionMenu GuestControlFileManagerLog(UIActionPool *pParent)1649 /** Toggle action extension, used to toggle 'File Manager Log' panel in file manager. */ 1650 class UIActionMenuFileManagerLog : public UIActionToggle 1651 { 1652 Q_OBJECT; 1653 1654 public: 1655 1656 /** Constructs action passing @a pParent to the base-class. */ 1657 UIActionMenuFileManagerLog(UIActionPool *pParent) 1658 1658 : UIActionToggle(pParent) 1659 1659 { … … 1687 1687 }; 1688 1688 1689 /** Toggle action extension, used to toggle 'File Manager File Operations' panel in guest controlfile manager. */1690 class UIActionMenu GuestControlFileManagerFileOperations : public UIActionToggle1691 { 1692 Q_OBJECT; 1693 1694 public: 1695 1696 /** Constructs action passing @a pParent to the base-class. */ 1697 UIActionMenu GuestControlFileManagerFileOperations(UIActionPool *pParent)1689 /** Toggle action extension, used to toggle 'File Manager Operations' panel in file manager. */ 1690 class UIActionMenuFileManagerOperations : public UIActionToggle 1691 { 1692 Q_OBJECT; 1693 1694 public: 1695 1696 /** Constructs action passing @a pParent to the base-class. */ 1697 UIActionMenuFileManagerOperations(UIActionPool *pParent) 1698 1698 : UIActionToggle(pParent) 1699 1699 { … … 1708 1708 virtual QString shortcutExtraDataID() const /* override */ 1709 1709 { 1710 return QString("ToggleFileManager FileOperationsPanel");1710 return QString("ToggleFileManagerOperationsPanel"); 1711 1711 } 1712 1712 … … 1727 1727 }; 1728 1728 1729 /** Toggle action extension, used to toggle 'File Manager Session' panel in guest controlfile manager. */1730 class UIActionMenu GuestControlFileManagerSession : public UIActionToggle1731 { 1732 Q_OBJECT; 1733 1734 public: 1735 1736 /** Constructs action passing @a pParent to the base-class. */ 1737 UIActionMenu GuestControlFileManagerSession(UIActionPool *pParent)1729 /** Toggle action extension, used to toggle 'File Manager Session' panel in file manager. */ 1730 class UIActionMenuFileManagerSession : public UIActionToggle 1731 { 1732 Q_OBJECT; 1733 1734 public: 1735 1736 /** Constructs action passing @a pParent to the base-class. */ 1737 UIActionMenuFileManagerSession(UIActionPool *pParent) 1738 1738 : UIActionToggle(pParent) 1739 1739 { … … 1767 1767 }; 1768 1768 1769 /** Simple action extension, used as 'Perform GoUp' in guest controlfile manager action class. */1770 class UIActionMenu GuestControlFileManagerGoUp : public UIActionSimple1771 { 1772 Q_OBJECT; 1773 1774 public: 1775 1776 /** Constructs action passing @a pParent to the base-class. */ 1777 UIActionMenu GuestControlFileManagerGoUp(UIActionPool *pParent)1769 /** Simple action extension, used as 'Perform GoUp' in file manager action class. */ 1770 class UIActionMenuFileManagerGoUp : public UIActionSimple 1771 { 1772 Q_OBJECT; 1773 1774 public: 1775 1776 /** Constructs action passing @a pParent to the base-class. */ 1777 UIActionMenuFileManagerGoUp(UIActionPool *pParent) 1778 1778 : UIActionSimple(pParent, 1779 1779 ":/file_manager_go_up_24px.png", ":/file_manager_go_up_16px.png", … … 1799 1799 { 1800 1800 setName(QApplication::translate("UIActionPool", "Go Up")); 1801 setShortcutScope(QApplication::translate("UIActionPool", " Guest ControlFile Manager"));1801 setShortcutScope(QApplication::translate("UIActionPool", "File Manager")); 1802 1802 setStatusTip(QApplication::translate("UIActionPool", "Go one level up to parent folder")); 1803 1803 setToolTip(QApplication::translate("UIActionPool", "Go One Level Up to Parent Folder")); … … 1806 1806 1807 1807 1808 /** Simple action extension, used as 'Perform GoHome' in guest controlfile manager action class. */1809 class UIActionMenu GuestControlFileManagerGoHome : public UIActionSimple1810 { 1811 Q_OBJECT; 1812 1813 public: 1814 1815 /** Constructs action passing @a pParent to the base-class. */ 1816 UIActionMenu GuestControlFileManagerGoHome(UIActionPool *pParent)1808 /** Simple action extension, used as 'Perform GoHome' in file manager action class. */ 1809 class UIActionMenuFileManagerGoHome : public UIActionSimple 1810 { 1811 Q_OBJECT; 1812 1813 public: 1814 1815 /** Constructs action passing @a pParent to the base-class. */ 1816 UIActionMenuFileManagerGoHome(UIActionPool *pParent) 1817 1817 : UIActionSimple(pParent, 1818 1818 ":/file_manager_go_home_24px.png", ":/file_manager_go_home_16px.png", … … 1838 1838 { 1839 1839 setName(QApplication::translate("UIActionPool", "Go Home")); 1840 setShortcutScope(QApplication::translate("UIActionPool", " Guest ControlFile Manager"));1840 setShortcutScope(QApplication::translate("UIActionPool", "File Manager")); 1841 1841 setStatusTip(QApplication::translate("UIActionPool", "Go to home folder")); 1842 1842 setToolTip(QApplication::translate("UIActionPool", "Go to Home Folder")); … … 1845 1845 1846 1846 1847 /** Simple action extension, used as 'Perform Delete' in guest controlfile manager action class. */1848 class UIActionMenu GuestControlFileManagerDelete : public UIActionSimple1849 { 1850 Q_OBJECT; 1851 1852 public: 1853 1854 /** Constructs action passing @a pParent to the base-class. */ 1855 UIActionMenu GuestControlFileManagerDelete(UIActionPool *pParent)1847 /** Simple action extension, used as 'Perform Delete' in file manager action class. */ 1848 class UIActionMenuFileManagerDelete : public UIActionSimple 1849 { 1850 Q_OBJECT; 1851 1852 public: 1853 1854 /** Constructs action passing @a pParent to the base-class. */ 1855 UIActionMenuFileManagerDelete(UIActionPool *pParent) 1856 1856 : UIActionSimple(pParent, 1857 1857 ":/file_manager_delete_24px.png", ":/file_manager_delete_16px.png", … … 1877 1877 { 1878 1878 setName(QApplication::translate("UIActionPool", "Delete")); 1879 setShortcutScope(QApplication::translate("UIActionPool", " Guest ControlFile Manager"));1879 setShortcutScope(QApplication::translate("UIActionPool", "File Manager")); 1880 1880 setStatusTip(QApplication::translate("UIActionPool", "Delete selected file object(s)")); 1881 1881 setToolTip(QApplication::translate("UIActionPool", "Delete Selected File Object(s)")); … … 1883 1883 }; 1884 1884 1885 /** Simple action extension, used as 'Perform Refresh' in guest controlfile manager action class. */1886 class UIActionMenu GuestControlFileManagerRefresh : public UIActionSimple1887 { 1888 Q_OBJECT; 1889 1890 public: 1891 1892 /** Constructs action passing @a pParent to the base-class. */ 1893 UIActionMenu GuestControlFileManagerRefresh(UIActionPool *pParent)1885 /** Simple action extension, used as 'Perform Refresh' in file manager action class. */ 1886 class UIActionMenuFileManagerRefresh : public UIActionSimple 1887 { 1888 Q_OBJECT; 1889 1890 public: 1891 1892 /** Constructs action passing @a pParent to the base-class. */ 1893 UIActionMenuFileManagerRefresh(UIActionPool *pParent) 1894 1894 : UIActionSimple(pParent, 1895 1895 ":/file_manager_refresh_24px.png", ":/file_manager_refresh_16px.png", … … 1915 1915 { 1916 1916 setName(QApplication::translate("UIActionPool", "Refresh")); 1917 setShortcutScope(QApplication::translate("UIActionPool", " Guest ControlFile Manager"));1917 setShortcutScope(QApplication::translate("UIActionPool", "File Manager")); 1918 1918 setStatusTip(QApplication::translate("UIActionPool", "Refresh")); 1919 1919 setToolTip(QApplication::translate("UIActionPool", "Refresh")); … … 1922 1922 1923 1923 1924 /** Simple action extension, used as 'Perform Rename' in guest controlfile manager action class. */1925 class UIActionMenu GuestControlFileManagerRename : public UIActionSimple1926 { 1927 Q_OBJECT; 1928 1929 public: 1930 1931 /** Constructs action passing @a pParent to the base-class. */ 1932 UIActionMenu GuestControlFileManagerRename(UIActionPool *pParent)1924 /** Simple action extension, used as 'Perform Rename' in file manager action class. */ 1925 class UIActionMenuFileManagerRename : public UIActionSimple 1926 { 1927 Q_OBJECT; 1928 1929 public: 1930 1931 /** Constructs action passing @a pParent to the base-class. */ 1932 UIActionMenuFileManagerRename(UIActionPool *pParent) 1933 1933 : UIActionSimple(pParent, 1934 1934 ":/file_manager_rename_24px.png", ":/file_manager_rename_16px.png", … … 1953 1953 { 1954 1954 setName(QApplication::translate("UIActionPool", "Rename")); 1955 setShortcutScope(QApplication::translate("UIActionPool", " Guest ControlFile Manager"));1955 setShortcutScope(QApplication::translate("UIActionPool", "File Manager")); 1956 1956 setStatusTip(QApplication::translate("UIActionPool", "Rename")); 1957 1957 setToolTip(QApplication::translate("UIActionPool", "Rename")); … … 1959 1959 }; 1960 1960 1961 /** Simple action extension, used as 'Perform Rename' in guest controlfile manager action class. */1962 class UIActionMenu GuestControlFileManagerCreateNewDirectory : public UIActionSimple1963 { 1964 Q_OBJECT; 1965 1966 public: 1967 1968 /** Constructs action passing @a pParent to the base-class. */ 1969 UIActionMenu GuestControlFileManagerCreateNewDirectory(UIActionPool *pParent)1961 /** Simple action extension, used as 'Perform Rename' in file manager action class. */ 1962 class UIActionMenuFileManagerCreateNewDirectory : public UIActionSimple 1963 { 1964 Q_OBJECT; 1965 1966 public: 1967 1968 /** Constructs action passing @a pParent to the base-class. */ 1969 UIActionMenuFileManagerCreateNewDirectory(UIActionPool *pParent) 1970 1970 : UIActionSimple(pParent, 1971 1971 ":/file_manager_new_directory_24px.png", ":/file_manager_new_directory_16px.png", … … 1990 1990 { 1991 1991 setName(QApplication::translate("UIActionPool", "Create New Directory")); 1992 setShortcutScope(QApplication::translate("UIActionPool", " Guest ControlFile Manager"));1992 setShortcutScope(QApplication::translate("UIActionPool", "File Manager")); 1993 1993 setStatusTip(QApplication::translate("UIActionPool", "Create New Directory")); 1994 1994 setToolTip(QApplication::translate("UIActionPool", "Create New Directory")); … … 1997 1997 1998 1998 1999 /** Simple action extension, used as 'Perform Copy' in guest controlfile manager action class. */2000 class UIActionMenu GuestControlFileManagerCopy : public UIActionSimple2001 { 2002 Q_OBJECT; 2003 2004 public: 2005 2006 /** Constructs action passing @a pParent to the base-class. */ 2007 UIActionMenu GuestControlFileManagerCopy(UIActionPool *pParent)1999 /** Simple action extension, used as 'Perform Copy' in file manager action class. */ 2000 class UIActionMenuFileManagerCopy : public UIActionSimple 2001 { 2002 Q_OBJECT; 2003 2004 public: 2005 2006 /** Constructs action passing @a pParent to the base-class. */ 2007 UIActionMenuFileManagerCopy(UIActionPool *pParent) 2008 2008 : UIActionSimple(pParent, 2009 2009 ":/file_manager_copy_24px.png", ":/file_manager_copy_16px.png", … … 2028 2028 { 2029 2029 setName(QApplication::translate("UIActionPool", "Copy")); 2030 setShortcutScope(QApplication::translate("UIActionPool", " Guest ControlFile Manager"));2030 setShortcutScope(QApplication::translate("UIActionPool", "File Manager")); 2031 2031 setStatusTip(QApplication::translate("UIActionPool", "Copy selected file object(s)")); 2032 2032 setToolTip(QApplication::translate("UIActionPool", "Copy Selected File Object(s)")); … … 2034 2034 }; 2035 2035 2036 /** Simple action extension, used as 'Perform Cut' in guest controlfile manager action class. */2037 class UIActionMenu GuestControlFileManagerCut : public UIActionSimple2038 { 2039 Q_OBJECT; 2040 2041 public: 2042 2043 /** Constructs action passing @a pParent to the base-class. */ 2044 UIActionMenu GuestControlFileManagerCut(UIActionPool *pParent)2036 /** Simple action extension, used as 'Perform Cut' in file manager action class. */ 2037 class UIActionMenuFileManagerCut : public UIActionSimple 2038 { 2039 Q_OBJECT; 2040 2041 public: 2042 2043 /** Constructs action passing @a pParent to the base-class. */ 2044 UIActionMenuFileManagerCut(UIActionPool *pParent) 2045 2045 : UIActionSimple(pParent, 2046 2046 ":/file_manager_cut_24px.png", ":/file_manager_cut_16px.png", … … 2065 2065 { 2066 2066 setName(QApplication::translate("UIActionPool", "Cut")); 2067 setShortcutScope(QApplication::translate("UIActionPool", " Guest ControlFile Manager"));2067 setShortcutScope(QApplication::translate("UIActionPool", "File Manager")); 2068 2068 setStatusTip(QApplication::translate("UIActionPool", "Cut selected file object(s)")); 2069 2069 setToolTip(QApplication::translate("UIActionPool", "Cut Selected File Object(s)")); … … 2071 2071 }; 2072 2072 2073 /** Simple action extension, used as 'Perform Paste' in guest controlfile manager action class. */2074 class UIActionMenu GuestControlFileManagerPaste : public UIActionSimple2075 { 2076 Q_OBJECT; 2077 2078 public: 2079 2080 /** Constructs action passing @a pParent to the base-class. */ 2081 UIActionMenu GuestControlFileManagerPaste(UIActionPool *pParent)2073 /** Simple action extension, used as 'Perform Paste' in file manager action class. */ 2074 class UIActionMenuFileManagerPaste : public UIActionSimple 2075 { 2076 Q_OBJECT; 2077 2078 public: 2079 2080 /** Constructs action passing @a pParent to the base-class. */ 2081 UIActionMenuFileManagerPaste(UIActionPool *pParent) 2082 2082 : UIActionSimple(pParent, 2083 2083 ":/file_manager_paste_24px.png", ":/file_manager_paste_16px.png", … … 2102 2102 { 2103 2103 setName(QApplication::translate("UIActionPool", "Paste")); 2104 setShortcutScope(QApplication::translate("UIActionPool", " Guest ControlFile Manager"));2104 setShortcutScope(QApplication::translate("UIActionPool", "File Manager")); 2105 2105 setStatusTip(QApplication::translate("UIActionPool", "Paste copied/cut file object(s)")); 2106 2106 setToolTip(QApplication::translate("UIActionPool", "Paste Copied/Cut File Object(s)")); … … 2108 2108 }; 2109 2109 2110 /** Simple action extension, used as 'Select All' in guest controlfile manager action class. */2111 class UIActionMenu GuestControlFileManagerSelectAll : public UIActionSimple2112 { 2113 Q_OBJECT; 2114 2115 public: 2116 2117 /** Constructs action passing @a pParent to the base-class. */ 2118 UIActionMenu GuestControlFileManagerSelectAll(UIActionPool *pParent)2110 /** Simple action extension, used as 'Select All' in file manager action class. */ 2111 class UIActionMenuFileManagerSelectAll : public UIActionSimple 2112 { 2113 Q_OBJECT; 2114 2115 public: 2116 2117 /** Constructs action passing @a pParent to the base-class. */ 2118 UIActionMenuFileManagerSelectAll(UIActionPool *pParent) 2119 2119 : UIActionSimple(pParent, 2120 2120 ":/file_manager_select_all_24px.png", ":/file_manager_select_all_16px.png", … … 2139 2139 { 2140 2140 setName(QApplication::translate("UIActionPool", "Select All")); 2141 setShortcutScope(QApplication::translate("UIActionPool", " Guest ControlFile Manager"));2141 setShortcutScope(QApplication::translate("UIActionPool", "File Manager")); 2142 2142 setStatusTip(QApplication::translate("UIActionPool", "Select all files objects")); 2143 2143 setToolTip(QApplication::translate("UIActionPool", "Select All Files Objects")); … … 2146 2146 2147 2147 2148 /** Simple action extension, used as 'Invert Selection' in guest controlfile manager action class. */2149 class UIActionMenu GuestControlFileManagerInvertSelection : public UIActionSimple2150 { 2151 Q_OBJECT; 2152 2153 public: 2154 2155 /** Constructs action passing @a pParent to the base-class. */ 2156 UIActionMenu GuestControlFileManagerInvertSelection(UIActionPool *pParent)2148 /** Simple action extension, used as 'Invert Selection' in file manager action class. */ 2149 class UIActionMenuFileManagerInvertSelection : public UIActionSimple 2150 { 2151 Q_OBJECT; 2152 2153 public: 2154 2155 /** Constructs action passing @a pParent to the base-class. */ 2156 UIActionMenuFileManagerInvertSelection(UIActionPool *pParent) 2157 2157 : UIActionSimple(pParent, 2158 2158 ":/file_manager_invert_selection_24px.png", ":/file_manager_invert_selection_16px.png", … … 2177 2177 { 2178 2178 setName(QApplication::translate("UIActionPool", "Invert Selection")); 2179 setShortcutScope(QApplication::translate("UIActionPool", " Guest ControlFile Manager"));2179 setShortcutScope(QApplication::translate("UIActionPool", "File Manager")); 2180 2180 setStatusTip(QApplication::translate("UIActionPool", "Invert the current selection")); 2181 2181 setToolTip(QApplication::translate("UIActionPool", "Invert the Current Selection")); … … 2184 2184 2185 2185 2186 /** Simple action extension, used as 'Show Properties' in guest controlfile manager action class. */2187 class UIActionMenu GuestControlFileManagerShowProperties : public UIActionSimple2188 { 2189 Q_OBJECT; 2190 2191 public: 2192 2193 /** Constructs action passing @a pParent to the base-class. */ 2194 UIActionMenu GuestControlFileManagerShowProperties(UIActionPool *pParent)2186 /** Simple action extension, used as 'Show Properties' in file manager action class. */ 2187 class UIActionMenuFileManagerShowProperties : public UIActionSimple 2188 { 2189 Q_OBJECT; 2190 2191 public: 2192 2193 /** Constructs action passing @a pParent to the base-class. */ 2194 UIActionMenuFileManagerShowProperties(UIActionPool *pParent) 2195 2195 : UIActionSimple(pParent, 2196 2196 ":/file_manager_properties_24px.png", ":/file_manager_properties_16px.png", … … 2215 2215 { 2216 2216 setName(QApplication::translate("UIActionPool", "Show Properties")); 2217 setShortcutScope(QApplication::translate("UIActionPool", " Guest ControlFile Manager"));2217 setShortcutScope(QApplication::translate("UIActionPool", "File Manager")); 2218 2218 setStatusTip(QApplication::translate("UIActionPool", "Show the properties of currently selected file object(s)")); 2219 2219 setToolTip(QApplication::translate("UIActionPool", "Show the Properties of Currently Selected File Object(s)")); … … 2430 2430 m_pool[UIActionIndex_M_Log_S_Save] = new UIActionMenuSelectorLogPerformSave(this); 2431 2431 2432 /* Create ' Guest ControlFile Manager' actions: */2433 m_pool[UIActionIndex_M_ GuestControlFileManager] = new UIActionMenuGuestControlFileManager(this);2434 m_pool[UIActionIndex_M_ GuestControlFileManager_M_HostSubmenu] = new UIActionMenuGuestControlFileManagerHostSubmenu(this);2435 m_pool[UIActionIndex_M_ GuestControlFileManager_M_GuestSubmenu] = new UIActionMenuGuestControlFileManagerGuestSubmenu(this);2436 m_pool[UIActionIndex_M_ GuestControlFileManager_S_CopyToGuest] = new UIActionMenuGuestControlFileManagerCopyToGuest(this);2437 m_pool[UIActionIndex_M_ GuestControlFileManager_S_CopyToHost] = new UIActionMenuGuestControlFileManagerCopyToHost(this);2438 2439 m_pool[UIActionIndex_M_ GuestControlFileManager_T_Options] = new UIActionMenuGuestControlFileManagerOptions(this);2440 m_pool[UIActionIndex_M_ GuestControlFileManager_T_Log] = new UIActionMenuGuestControlFileManagerLog(this);2441 m_pool[UIActionIndex_M_ GuestControlFileManager_T_FileOperations] = new UIActionMenuGuestControlFileManagerFileOperations(this);2442 m_pool[UIActionIndex_M_ GuestControlFileManager_T_Session] = new UIActionMenuGuestControlFileManagerSession(this);2443 2444 m_pool[UIActionIndex_M_ GuestControlFileManager_S_Host_GoUp] = new UIActionMenuGuestControlFileManagerGoUp(this);2445 m_pool[UIActionIndex_M_ GuestControlFileManager_S_Guest_GoUp] = new UIActionMenuGuestControlFileManagerGoUp(this);2446 m_pool[UIActionIndex_M_ GuestControlFileManager_S_Host_GoHome] = new UIActionMenuGuestControlFileManagerGoHome(this);2447 m_pool[UIActionIndex_M_ GuestControlFileManager_S_Guest_GoHome] = new UIActionMenuGuestControlFileManagerGoHome(this);2448 m_pool[UIActionIndex_M_ GuestControlFileManager_S_Host_Refresh] = new UIActionMenuGuestControlFileManagerRefresh(this);2449 m_pool[UIActionIndex_M_ GuestControlFileManager_S_Guest_Refresh] = new UIActionMenuGuestControlFileManagerRefresh(this);2450 m_pool[UIActionIndex_M_ GuestControlFileManager_S_Host_Delete] = new UIActionMenuGuestControlFileManagerDelete(this);2451 m_pool[UIActionIndex_M_ GuestControlFileManager_S_Guest_Delete] = new UIActionMenuGuestControlFileManagerDelete(this);2452 m_pool[UIActionIndex_M_ GuestControlFileManager_S_Host_Rename] = new UIActionMenuGuestControlFileManagerRename(this);2453 m_pool[UIActionIndex_M_ GuestControlFileManager_S_Guest_Rename] = new UIActionMenuGuestControlFileManagerRename(this);2454 m_pool[UIActionIndex_M_ GuestControlFileManager_S_Host_CreateNewDirectory] = new UIActionMenuGuestControlFileManagerCreateNewDirectory(this);2455 m_pool[UIActionIndex_M_ GuestControlFileManager_S_Guest_CreateNewDirectory] = new UIActionMenuGuestControlFileManagerCreateNewDirectory(this);2456 m_pool[UIActionIndex_M_ GuestControlFileManager_S_Host_Copy] = new UIActionMenuGuestControlFileManagerCopy(this);2457 m_pool[UIActionIndex_M_ GuestControlFileManager_S_Guest_Copy] = new UIActionMenuGuestControlFileManagerCopy(this);2458 m_pool[UIActionIndex_M_ GuestControlFileManager_S_Host_Cut] = new UIActionMenuGuestControlFileManagerCut(this);2459 m_pool[UIActionIndex_M_ GuestControlFileManager_S_Guest_Cut] = new UIActionMenuGuestControlFileManagerCut(this);2460 m_pool[UIActionIndex_M_ GuestControlFileManager_S_Host_Paste] = new UIActionMenuGuestControlFileManagerPaste(this);2461 m_pool[UIActionIndex_M_ GuestControlFileManager_S_Guest_Paste] = new UIActionMenuGuestControlFileManagerPaste(this);2462 m_pool[UIActionIndex_M_ GuestControlFileManager_S_Host_SelectAll] = new UIActionMenuGuestControlFileManagerSelectAll(this);2463 m_pool[UIActionIndex_M_ GuestControlFileManager_S_Guest_SelectAll] = new UIActionMenuGuestControlFileManagerSelectAll(this);2464 m_pool[UIActionIndex_M_ GuestControlFileManager_S_Host_InvertSelection] = new UIActionMenuGuestControlFileManagerInvertSelection(this);2465 m_pool[UIActionIndex_M_ GuestControlFileManager_S_Guest_InvertSelection] = new UIActionMenuGuestControlFileManagerInvertSelection(this);2466 m_pool[UIActionIndex_M_ GuestControlFileManager_S_Host_ShowProperties] = new UIActionMenuGuestControlFileManagerShowProperties(this);2467 m_pool[UIActionIndex_M_ GuestControlFileManager_S_Guest_ShowProperties] = new UIActionMenuGuestControlFileManagerShowProperties(this);2432 /* Create 'File Manager' actions: */ 2433 m_pool[UIActionIndex_M_FileManager] = new UIActionMenuFileManager(this); 2434 m_pool[UIActionIndex_M_FileManager_M_HostSubmenu] = new UIActionMenuFileManagerHostSubmenu(this); 2435 m_pool[UIActionIndex_M_FileManager_M_GuestSubmenu] = new UIActionMenuFileManagerGuestSubmenu(this); 2436 m_pool[UIActionIndex_M_FileManager_S_CopyToGuest] = new UIActionMenuFileManagerCopyToGuest(this); 2437 m_pool[UIActionIndex_M_FileManager_S_CopyToHost] = new UIActionMenuFileManagerCopyToHost(this); 2438 2439 m_pool[UIActionIndex_M_FileManager_T_Options] = new UIActionMenuFileManagerOptions(this); 2440 m_pool[UIActionIndex_M_FileManager_T_Log] = new UIActionMenuFileManagerLog(this); 2441 m_pool[UIActionIndex_M_FileManager_T_Operations] = new UIActionMenuFileManagerOperations(this); 2442 m_pool[UIActionIndex_M_FileManager_T_Session] = new UIActionMenuFileManagerSession(this); 2443 2444 m_pool[UIActionIndex_M_FileManager_S_Host_GoUp] = new UIActionMenuFileManagerGoUp(this); 2445 m_pool[UIActionIndex_M_FileManager_S_Guest_GoUp] = new UIActionMenuFileManagerGoUp(this); 2446 m_pool[UIActionIndex_M_FileManager_S_Host_GoHome] = new UIActionMenuFileManagerGoHome(this); 2447 m_pool[UIActionIndex_M_FileManager_S_Guest_GoHome] = new UIActionMenuFileManagerGoHome(this); 2448 m_pool[UIActionIndex_M_FileManager_S_Host_Refresh] = new UIActionMenuFileManagerRefresh(this); 2449 m_pool[UIActionIndex_M_FileManager_S_Guest_Refresh] = new UIActionMenuFileManagerRefresh(this); 2450 m_pool[UIActionIndex_M_FileManager_S_Host_Delete] = new UIActionMenuFileManagerDelete(this); 2451 m_pool[UIActionIndex_M_FileManager_S_Guest_Delete] = new UIActionMenuFileManagerDelete(this); 2452 m_pool[UIActionIndex_M_FileManager_S_Host_Rename] = new UIActionMenuFileManagerRename(this); 2453 m_pool[UIActionIndex_M_FileManager_S_Guest_Rename] = new UIActionMenuFileManagerRename(this); 2454 m_pool[UIActionIndex_M_FileManager_S_Host_CreateNewDirectory] = new UIActionMenuFileManagerCreateNewDirectory(this); 2455 m_pool[UIActionIndex_M_FileManager_S_Guest_CreateNewDirectory] = new UIActionMenuFileManagerCreateNewDirectory(this); 2456 m_pool[UIActionIndex_M_FileManager_S_Host_Copy] = new UIActionMenuFileManagerCopy(this); 2457 m_pool[UIActionIndex_M_FileManager_S_Guest_Copy] = new UIActionMenuFileManagerCopy(this); 2458 m_pool[UIActionIndex_M_FileManager_S_Host_Cut] = new UIActionMenuFileManagerCut(this); 2459 m_pool[UIActionIndex_M_FileManager_S_Guest_Cut] = new UIActionMenuFileManagerCut(this); 2460 m_pool[UIActionIndex_M_FileManager_S_Host_Paste] = new UIActionMenuFileManagerPaste(this); 2461 m_pool[UIActionIndex_M_FileManager_S_Guest_Paste] = new UIActionMenuFileManagerPaste(this); 2462 m_pool[UIActionIndex_M_FileManager_S_Host_SelectAll] = new UIActionMenuFileManagerSelectAll(this); 2463 m_pool[UIActionIndex_M_FileManager_S_Guest_SelectAll] = new UIActionMenuFileManagerSelectAll(this); 2464 m_pool[UIActionIndex_M_FileManager_S_Host_InvertSelection] = new UIActionMenuFileManagerInvertSelection(this); 2465 m_pool[UIActionIndex_M_FileManager_S_Guest_InvertSelection] = new UIActionMenuFileManagerInvertSelection(this); 2466 m_pool[UIActionIndex_M_FileManager_S_Host_ShowProperties] = new UIActionMenuFileManagerShowProperties(this); 2467 m_pool[UIActionIndex_M_FileManager_S_Guest_ShowProperties] = new UIActionMenuFileManagerShowProperties(this); 2468 2468 2469 2469 … … 2477 2477 m_menuUpdateHandlers[UIActionIndex_M_Log].ptf = &UIActionPool::updateMenuLogViewer; 2478 2478 2479 m_menuUpdateHandlers[UIActionIndex_M_ GuestControlFileManager].ptf = &UIActionPool::updateMenuGuestControlFileManager;2479 m_menuUpdateHandlers[UIActionIndex_M_FileManager].ptf = &UIActionPool::updateMenuFileManager; 2480 2480 2481 2481 /* Invalidate all known menus: */ … … 2775 2775 } 2776 2776 2777 void UIActionPool::updateMenu GuestControlFileManager()2778 { 2779 updateMenu GuestControlFileManagerWrapper(action(UIActionIndex_M_GuestControlFileManager)->menu());2777 void UIActionPool::updateMenuFileManager() 2778 { 2779 updateMenuFileManagerWrapper(action(UIActionIndex_M_FileManager)->menu()); 2780 2780 2781 2781 /* Mark menu as valid: */ 2782 m_invalidations.remove(UIActionIndex_M_ GuestControlFileManager);2783 } 2784 2785 void UIActionPool::updateMenu GuestControlFileManagerWrapper(UIMenu *pMenu)2786 { 2787 addAction(pMenu, action(UIActionIndex_M_ GuestControlFileManager_T_Session));2788 addAction(pMenu, action(UIActionIndex_M_ GuestControlFileManager_T_Options));2789 addAction(pMenu, action(UIActionIndex_M_ GuestControlFileManager_T_FileOperations));2790 addAction(pMenu, action(UIActionIndex_M_ GuestControlFileManager_T_Log));2791 2792 addAction(pMenu, action(UIActionIndex_M_ GuestControlFileManager_M_HostSubmenu));2793 addAction(pMenu, action(UIActionIndex_M_ GuestControlFileManager_M_GuestSubmenu));2794 2795 UIMenu *pHostSubmenu = action(UIActionIndex_M_ GuestControlFileManager_M_HostSubmenu)->menu();2782 m_invalidations.remove(UIActionIndex_M_FileManager); 2783 } 2784 2785 void UIActionPool::updateMenuFileManagerWrapper(UIMenu *pMenu) 2786 { 2787 addAction(pMenu, action(UIActionIndex_M_FileManager_T_Session)); 2788 addAction(pMenu, action(UIActionIndex_M_FileManager_T_Options)); 2789 addAction(pMenu, action(UIActionIndex_M_FileManager_T_Operations)); 2790 addAction(pMenu, action(UIActionIndex_M_FileManager_T_Log)); 2791 2792 addAction(pMenu, action(UIActionIndex_M_FileManager_M_HostSubmenu)); 2793 addAction(pMenu, action(UIActionIndex_M_FileManager_M_GuestSubmenu)); 2794 2795 UIMenu *pHostSubmenu = action(UIActionIndex_M_FileManager_M_HostSubmenu)->menu(); 2796 2796 if (pHostSubmenu) 2797 2797 { 2798 addAction(pHostSubmenu, action(UIActionIndex_M_ GuestControlFileManager_S_Host_GoUp));2799 addAction(pHostSubmenu, action(UIActionIndex_M_ GuestControlFileManager_S_Host_GoHome));2800 addAction(pHostSubmenu, action(UIActionIndex_M_ GuestControlFileManager_S_Host_Refresh));2801 addAction(pHostSubmenu, action(UIActionIndex_M_ GuestControlFileManager_S_Host_Delete));2802 addAction(pHostSubmenu, action(UIActionIndex_M_ GuestControlFileManager_S_Host_Rename));2803 addAction(pHostSubmenu, action(UIActionIndex_M_ GuestControlFileManager_S_Host_CreateNewDirectory));2804 addAction(pHostSubmenu, action(UIActionIndex_M_ GuestControlFileManager_S_Host_Copy));2805 addAction(pHostSubmenu, action(UIActionIndex_M_ GuestControlFileManager_S_Host_Cut));2806 addAction(pHostSubmenu, action(UIActionIndex_M_ GuestControlFileManager_S_Host_Paste));2807 addAction(pHostSubmenu, action(UIActionIndex_M_ GuestControlFileManager_S_Host_SelectAll));2808 addAction(pHostSubmenu, action(UIActionIndex_M_ GuestControlFileManager_S_Host_InvertSelection));2809 addAction(pHostSubmenu, action(UIActionIndex_M_ GuestControlFileManager_S_Host_ShowProperties));2810 } 2811 2812 UIMenu *pGuestSubmenu = action(UIActionIndex_M_ GuestControlFileManager_M_GuestSubmenu)->menu();2798 addAction(pHostSubmenu, action(UIActionIndex_M_FileManager_S_Host_GoUp)); 2799 addAction(pHostSubmenu, action(UIActionIndex_M_FileManager_S_Host_GoHome)); 2800 addAction(pHostSubmenu, action(UIActionIndex_M_FileManager_S_Host_Refresh)); 2801 addAction(pHostSubmenu, action(UIActionIndex_M_FileManager_S_Host_Delete)); 2802 addAction(pHostSubmenu, action(UIActionIndex_M_FileManager_S_Host_Rename)); 2803 addAction(pHostSubmenu, action(UIActionIndex_M_FileManager_S_Host_CreateNewDirectory)); 2804 addAction(pHostSubmenu, action(UIActionIndex_M_FileManager_S_Host_Copy)); 2805 addAction(pHostSubmenu, action(UIActionIndex_M_FileManager_S_Host_Cut)); 2806 addAction(pHostSubmenu, action(UIActionIndex_M_FileManager_S_Host_Paste)); 2807 addAction(pHostSubmenu, action(UIActionIndex_M_FileManager_S_Host_SelectAll)); 2808 addAction(pHostSubmenu, action(UIActionIndex_M_FileManager_S_Host_InvertSelection)); 2809 addAction(pHostSubmenu, action(UIActionIndex_M_FileManager_S_Host_ShowProperties)); 2810 } 2811 2812 UIMenu *pGuestSubmenu = action(UIActionIndex_M_FileManager_M_GuestSubmenu)->menu(); 2813 2813 if (pGuestSubmenu) 2814 2814 { 2815 addAction(pGuestSubmenu, action(UIActionIndex_M_ GuestControlFileManager_S_Host_GoUp));2816 addAction(pGuestSubmenu, action(UIActionIndex_M_ GuestControlFileManager_S_Guest_GoHome));2817 addAction(pGuestSubmenu, action(UIActionIndex_M_ GuestControlFileManager_S_Guest_Refresh));2818 addAction(pGuestSubmenu, action(UIActionIndex_M_ GuestControlFileManager_S_Guest_Delete));2819 addAction(pGuestSubmenu, action(UIActionIndex_M_ GuestControlFileManager_S_Guest_Rename));2820 addAction(pGuestSubmenu, action(UIActionIndex_M_ GuestControlFileManager_S_Guest_CreateNewDirectory));2821 addAction(pGuestSubmenu, action(UIActionIndex_M_ GuestControlFileManager_S_Guest_Copy));2822 addAction(pGuestSubmenu, action(UIActionIndex_M_ GuestControlFileManager_S_Guest_Cut));2823 addAction(pGuestSubmenu, action(UIActionIndex_M_ GuestControlFileManager_S_Guest_Paste));2824 addAction(pGuestSubmenu, action(UIActionIndex_M_ GuestControlFileManager_S_Guest_SelectAll));2825 addAction(pGuestSubmenu, action(UIActionIndex_M_ GuestControlFileManager_S_Guest_InvertSelection));2826 addAction(pGuestSubmenu, action(UIActionIndex_M_ GuestControlFileManager_S_Guest_ShowProperties));2815 addAction(pGuestSubmenu, action(UIActionIndex_M_FileManager_S_Host_GoUp)); 2816 addAction(pGuestSubmenu, action(UIActionIndex_M_FileManager_S_Guest_GoHome)); 2817 addAction(pGuestSubmenu, action(UIActionIndex_M_FileManager_S_Guest_Refresh)); 2818 addAction(pGuestSubmenu, action(UIActionIndex_M_FileManager_S_Guest_Delete)); 2819 addAction(pGuestSubmenu, action(UIActionIndex_M_FileManager_S_Guest_Rename)); 2820 addAction(pGuestSubmenu, action(UIActionIndex_M_FileManager_S_Guest_CreateNewDirectory)); 2821 addAction(pGuestSubmenu, action(UIActionIndex_M_FileManager_S_Guest_Copy)); 2822 addAction(pGuestSubmenu, action(UIActionIndex_M_FileManager_S_Guest_Cut)); 2823 addAction(pGuestSubmenu, action(UIActionIndex_M_FileManager_S_Guest_Paste)); 2824 addAction(pGuestSubmenu, action(UIActionIndex_M_FileManager_S_Guest_SelectAll)); 2825 addAction(pGuestSubmenu, action(UIActionIndex_M_FileManager_S_Guest_InvertSelection)); 2826 addAction(pGuestSubmenu, action(UIActionIndex_M_FileManager_S_Guest_ShowProperties)); 2827 2827 } 2828 2828 } -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.h
r75903 r76177 98 98 UIActionIndex_M_Log_S_Save, 99 99 100 /* Guest control file manager actions: */101 UIActionIndex_M_ GuestControlFileManager,102 UIActionIndex_M_ GuestControlFileManager_M_HostSubmenu,103 UIActionIndex_M_ GuestControlFileManager_M_GuestSubmenu,104 UIActionIndex_M_ GuestControlFileManager_S_CopyToGuest,105 UIActionIndex_M_ GuestControlFileManager_S_CopyToHost,106 UIActionIndex_M_ GuestControlFileManager_T_Options,107 UIActionIndex_M_ GuestControlFileManager_T_Log,108 UIActionIndex_M_ GuestControlFileManager_T_FileOperations,109 UIActionIndex_M_ GuestControlFileManager_T_Session,110 UIActionIndex_M_ GuestControlFileManager_S_Host_GoUp,111 UIActionIndex_M_ GuestControlFileManager_S_Guest_GoUp,112 UIActionIndex_M_ GuestControlFileManager_S_Host_GoHome,113 UIActionIndex_M_ GuestControlFileManager_S_Guest_GoHome,114 UIActionIndex_M_ GuestControlFileManager_S_Host_Refresh,115 UIActionIndex_M_ GuestControlFileManager_S_Guest_Refresh,116 UIActionIndex_M_ GuestControlFileManager_S_Host_Delete,117 UIActionIndex_M_ GuestControlFileManager_S_Guest_Delete,118 UIActionIndex_M_ GuestControlFileManager_S_Host_Rename,119 UIActionIndex_M_ GuestControlFileManager_S_Guest_Rename,120 UIActionIndex_M_ GuestControlFileManager_S_Host_CreateNewDirectory,121 UIActionIndex_M_ GuestControlFileManager_S_Guest_CreateNewDirectory,122 UIActionIndex_M_ GuestControlFileManager_S_Host_Copy,123 UIActionIndex_M_ GuestControlFileManager_S_Guest_Copy,124 UIActionIndex_M_ GuestControlFileManager_S_Host_Cut,125 UIActionIndex_M_ GuestControlFileManager_S_Guest_Cut,126 UIActionIndex_M_ GuestControlFileManager_S_Host_Paste,127 UIActionIndex_M_ GuestControlFileManager_S_Guest_Paste,128 UIActionIndex_M_ GuestControlFileManager_S_Host_SelectAll,129 UIActionIndex_M_ GuestControlFileManager_S_Guest_SelectAll,130 UIActionIndex_M_ GuestControlFileManager_S_Host_InvertSelection,131 UIActionIndex_M_ GuestControlFileManager_S_Guest_InvertSelection,132 UIActionIndex_M_ GuestControlFileManager_S_Host_ShowProperties,133 UIActionIndex_M_ GuestControlFileManager_S_Guest_ShowProperties,100 /* File Manager actions: */ 101 UIActionIndex_M_FileManager, 102 UIActionIndex_M_FileManager_M_HostSubmenu, 103 UIActionIndex_M_FileManager_M_GuestSubmenu, 104 UIActionIndex_M_FileManager_S_CopyToGuest, 105 UIActionIndex_M_FileManager_S_CopyToHost, 106 UIActionIndex_M_FileManager_T_Options, 107 UIActionIndex_M_FileManager_T_Log, 108 UIActionIndex_M_FileManager_T_Operations, 109 UIActionIndex_M_FileManager_T_Session, 110 UIActionIndex_M_FileManager_S_Host_GoUp, 111 UIActionIndex_M_FileManager_S_Guest_GoUp, 112 UIActionIndex_M_FileManager_S_Host_GoHome, 113 UIActionIndex_M_FileManager_S_Guest_GoHome, 114 UIActionIndex_M_FileManager_S_Host_Refresh, 115 UIActionIndex_M_FileManager_S_Guest_Refresh, 116 UIActionIndex_M_FileManager_S_Host_Delete, 117 UIActionIndex_M_FileManager_S_Guest_Delete, 118 UIActionIndex_M_FileManager_S_Host_Rename, 119 UIActionIndex_M_FileManager_S_Guest_Rename, 120 UIActionIndex_M_FileManager_S_Host_CreateNewDirectory, 121 UIActionIndex_M_FileManager_S_Guest_CreateNewDirectory, 122 UIActionIndex_M_FileManager_S_Host_Copy, 123 UIActionIndex_M_FileManager_S_Guest_Copy, 124 UIActionIndex_M_FileManager_S_Host_Cut, 125 UIActionIndex_M_FileManager_S_Guest_Cut, 126 UIActionIndex_M_FileManager_S_Host_Paste, 127 UIActionIndex_M_FileManager_S_Guest_Paste, 128 UIActionIndex_M_FileManager_S_Host_SelectAll, 129 UIActionIndex_M_FileManager_S_Guest_SelectAll, 130 UIActionIndex_M_FileManager_S_Host_InvertSelection, 131 UIActionIndex_M_FileManager_S_Guest_InvertSelection, 132 UIActionIndex_M_FileManager_S_Host_ShowProperties, 133 UIActionIndex_M_FileManager_S_Guest_ShowProperties, 134 134 135 135 … … 612 612 virtual void updateMenuLogViewerWrapper(UIMenu *pMenu); 613 613 614 /** Updates ' Guest Control Window' menu. */615 virtual void updateMenu GuestControlFileManager();616 /** Updates ' Guest Control' @a pMenu. */617 virtual void updateMenu GuestControlFileManagerWrapper(UIMenu *pMenu);614 /** Updates 'File Manager' menu. */ 615 virtual void updateMenuFileManager(); 616 /** Updates 'File Manager' @a pMenu. */ 617 virtual void updateMenuFileManagerWrapper(UIMenu *pMenu); 618 618 619 619 /** Updates shortcuts. */ -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPoolRuntime.cpp
r76062 r76177 230 230 }; 231 231 232 /** Simple action extension, used as 'Show Guest ControlFile Manager Dialog' action class. */233 class UIActionSimpleRuntimeShow GuestControlFileManagerDialog : public UIActionSimple234 { 235 Q_OBJECT; 236 237 public: 238 239 /** Constructs action passing @a pParent to the base-class. */ 240 UIActionSimpleRuntimeShow GuestControlFileManagerDialog(UIActionPool *pParent)232 /** Simple action extension, used as 'Show File Manager Dialog' action class. */ 233 class UIActionSimpleRuntimeShowFileManagerDialog : public UIActionSimple 234 { 235 Q_OBJECT; 236 237 public: 238 239 /** Constructs action passing @a pParent to the base-class. */ 240 UIActionSimpleRuntimeShowFileManagerDialog(UIActionPool *pParent) 241 241 : UIActionSimple(pParent, ":/session_info_16px.png", ":/session_info_disabled_16px.png", true) 242 242 {} … … 247 247 virtual int extraDataID() const /* override */ 248 248 { 249 return UIExtraDataMetaDefs::RuntimeMenuMachineActionType_ GuestControlFileManagerDialog;250 } 251 /** Returns action extra-data key. */ 252 virtual QString extraDataKey() const /* override */ 253 { 254 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_ GuestControlFileManagerDialog);255 } 256 /** Returns whether action is allowed. */ 257 virtual bool isAllowed() const /* override */ 258 { 259 return actionPool()->toRuntime()->isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_ GuestControlFileManagerDialog);260 } 261 262 /** Returns shortcut extra-data ID. */ 263 virtual QString shortcutExtraDataID() const /* override */ 264 { 265 return QString(" GuestControlFileManagerDialog");249 return UIExtraDataMetaDefs::RuntimeMenuMachineActionType_FileManagerDialog; 250 } 251 /** Returns action extra-data key. */ 252 virtual QString extraDataKey() const /* override */ 253 { 254 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_FileManagerDialog); 255 } 256 /** Returns whether action is allowed. */ 257 virtual bool isAllowed() const /* override */ 258 { 259 return actionPool()->toRuntime()->isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_FileManagerDialog); 260 } 261 262 /** Returns shortcut extra-data ID. */ 263 virtual QString shortcutExtraDataID() const /* override */ 264 { 265 return QString("FileManagerDialog"); 266 266 } 267 267 … … 276 276 { 277 277 setName(QApplication::translate("UIActionPool", "File Manager...")); 278 setStatusTip(QApplication::translate("UIActionPool", "Display the virtual machine guest controlfile manager window"));278 setStatusTip(QApplication::translate("UIActionPool", "Display the virtual machine file manager window")); 279 279 } 280 280 }; … … 3323 3323 m_pool[UIActionIndexRT_M_Machine_S_TakeSnapshot] = new UIActionSimpleRuntimePerformTakeSnapshot(this); 3324 3324 m_pool[UIActionIndexRT_M_Machine_S_ShowInformation] = new UIActionSimpleRuntimeShowInformationDialog(this); 3325 m_pool[UIActionIndexRT_M_Machine_S_Show GuestControlFileManager] = new UIActionSimpleRuntimeShowGuestControlFileManagerDialog(this);3325 m_pool[UIActionIndexRT_M_Machine_S_ShowFileManager] = new UIActionSimpleRuntimeShowFileManagerDialog(this); 3326 3326 m_pool[UIActionIndexRT_M_Machine_S_ShowGuestProcessControl] = new UIActionSimpleRuntimeShowGuestProcessControlDialog(this); 3327 3327 m_pool[UIActionIndexRT_M_Machine_T_Pause] = new UIActionToggleRuntimePause(this); … … 3603 3603 updateMenuLogViewerWindow(); 3604 3604 3605 /* ' Guest ControlFile Manager' menu: */3606 updateMenu GuestControlFileManager();3605 /* 'File Manager' menu: */ 3606 updateMenuFileManager(); 3607 3607 } 3608 3608 … … 3632 3632 /* 'Information Dialog' action: */ 3633 3633 fSeparator = addAction(pMenu, action(UIActionIndexRT_M_Machine_S_ShowInformation)) || fSeparator; 3634 fSeparator = addAction(pMenu, action(UIActionIndexRT_M_Machine_S_Show GuestControlFileManager)) || fSeparator;3634 fSeparator = addAction(pMenu, action(UIActionIndexRT_M_Machine_S_ShowFileManager)) || fSeparator; 3635 3635 #ifdef VBOX_GUI_WITH_GUEST_CONTROL_UI 3636 3636 fSeparator = addAction(pMenu, action(UIActionIndexRT_M_Machine_S_ShowGuestProcessControl)) || fSeparator; -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPoolRuntime.h
r76062 r76177 43 43 UIActionIndexRT_M_Machine_S_TakeSnapshot, 44 44 UIActionIndexRT_M_Machine_S_ShowInformation, 45 UIActionIndexRT_M_Machine_S_Show GuestControlFileManager,45 UIActionIndexRT_M_Machine_S_ShowFileManager, 46 46 UIActionIndexRT_M_Machine_S_ShowGuestProcessControl, 47 47 UIActionIndexRT_M_Machine_T_Pause, -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManager.cpp
r76176 r76177 1 1 /* $Id$ */ 2 2 /** @file 3 * VBox Qt GUI - UI GuestControlFileManager class implementation.3 * VBox Qt GUI - UIFileManager class implementation. 4 4 */ 5 5 … … 41 41 # include "UIIconPool.h" 42 42 # include "UIGuestControlConsole.h" 43 # include "UI GuestControlFileManager.h"44 # include "UI GuestControlFileManagerSessionPanel.h"45 # include "UI GuestControlFileManagerOptionsPanel.h"46 # include "UI GuestControlFileManagerLogPanel.h"47 # include "UI GuestControlFileManagerOperationsPanel.h"48 # include "UI GuestFileTable.h"43 # include "UIFileManager.h" 44 # include "UIFileManagerSessionPanel.h" 45 # include "UIFileManagerOptionsPanel.h" 46 # include "UIFileManagerLogPanel.h" 47 # include "UIFileManagerOperationsPanel.h" 48 # include "UIFileManagerGuestTable.h" 49 49 # include "UIGuestControlInterface.h" 50 # include "UI HostFileTable.h"50 # include "UIFileManagerHostTable.h" 51 51 # include "UIToolBar.h" 52 52 # include "VBoxGlobal.h" … … 79 79 80 80 /********************************************************************************************************************************* 81 * UI GuestControlFileManagerOptions implementation. *81 * UIFileManagerOptions implementation. * 82 82 *********************************************************************************************************************************/ 83 83 84 UI GuestControlFileManagerOptions *UIGuestControlFileManagerOptions::m_pInstance = 0;85 86 UI GuestControlFileManagerOptions* UIGuestControlFileManagerOptions::instance()84 UIFileManagerOptions *UIFileManagerOptions::m_pInstance = 0; 85 86 UIFileManagerOptions* UIFileManagerOptions::instance() 87 87 { 88 88 if (!m_pInstance) 89 m_pInstance = new UI GuestControlFileManagerOptions;89 m_pInstance = new UIFileManagerOptions; 90 90 return m_pInstance; 91 91 } 92 92 93 void UI GuestControlFileManagerOptions::create()93 void UIFileManagerOptions::create() 94 94 { 95 95 if (m_pInstance) 96 96 return; 97 m_pInstance = new UI GuestControlFileManagerOptions;98 } 99 100 void UI GuestControlFileManagerOptions::destroy()97 m_pInstance = new UIFileManagerOptions; 98 } 99 100 void UIFileManagerOptions::destroy() 101 101 { 102 102 delete m_pInstance; … … 104 104 } 105 105 106 UI GuestControlFileManagerOptions::~UIGuestControlFileManagerOptions()107 { 108 109 } 110 111 UI GuestControlFileManagerOptions::UIGuestControlFileManagerOptions()106 UIFileManagerOptions::~UIFileManagerOptions() 107 { 108 109 } 110 111 UIFileManagerOptions::UIFileManagerOptions() 112 112 : bListDirectoriesOnTop(true) 113 113 , bAskDeleteConfirmation(false) … … 126 126 127 127 /********************************************************************************************************************************* 128 * UI GuestControlFileManager implementation. *128 * UIFileManager implementation. * 129 129 *********************************************************************************************************************************/ 130 130 131 UI GuestControlFileManager::UIGuestControlFileManager(EmbedTo enmEmbedding, UIActionPool *pActionPool,131 UIFileManager::UIFileManager(EmbedTo enmEmbedding, UIActionPool *pActionPool, 132 132 const CGuest &comGuest, QWidget *pParent, bool fShowToolbar /* = true */) 133 133 : QIWithRetranslateUI<QWidget>(pParent) … … 153 153 retranslateUi(); 154 154 restorePanelVisibility(); 155 UI GuestControlFileManagerOptions::create();156 } 157 158 UI GuestControlFileManager::~UIGuestControlFileManager()155 UIFileManagerOptions::create(); 156 } 157 158 UIFileManager::~UIFileManager() 159 159 { 160 160 if (m_comGuest.isOk() && m_pQtGuestListener && m_comGuestListener.isOk()) … … 167 167 168 168 saveOptions(); 169 UI GuestControlFileManagerOptions::destroy();170 } 171 172 QMenu *UI GuestControlFileManager::menu() const169 UIFileManagerOptions::destroy(); 170 } 171 172 QMenu *UIFileManager::menu() const 173 173 { 174 174 if (!m_pActionPool) 175 175 return 0; 176 return m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager)->menu();177 } 178 179 void UI GuestControlFileManager::retranslateUi()180 { 181 } 182 183 void UI GuestControlFileManager::prepareGuestListener()176 return m_pActionPool->action(UIActionIndex_M_FileManager)->menu(); 177 } 178 179 void UIFileManager::retranslateUi() 180 { 181 } 182 183 void UIFileManager::prepareGuestListener() 184 184 { 185 185 if (m_comGuest.isOk()) … … 193 193 } 194 194 195 void UI GuestControlFileManager::prepareObjects()195 void UIFileManager::prepareObjects() 196 196 { 197 197 /* m_pMainLayout is the outer most layout containing the main toolbar and splitter widget: */ … … 239 239 pFileTableContainerLayout->setSpacing(0); 240 240 pFileTableContainerLayout->setContentsMargins(0, 0, 0, 0); 241 m_pGuestFileTable = new UI GuestFileTable(m_pActionPool);241 m_pGuestFileTable = new UIFileManagerGuestTable(m_pActionPool); 242 242 m_pGuestFileTable->setEnabled(false); 243 243 244 m_pHostFileTable = new UI HostFileTable(m_pActionPool);244 m_pHostFileTable = new UIFileManagerHostTable(m_pActionPool); 245 245 if (m_pHostFileTable) 246 246 { 247 connect(m_pHostFileTable, &UI HostFileTable::sigLogOutput,248 this, &UI GuestControlFileManager::sltReceieveLogOutput);249 connect(m_pHostFileTable, &UI HostFileTable::sigDeleteConfirmationOptionChanged,250 this, &UI GuestControlFileManager::sltHandleOptionsUpdated);247 connect(m_pHostFileTable, &UIFileManagerHostTable::sigLogOutput, 248 this, &UIFileManager::sltReceieveLogOutput); 249 connect(m_pHostFileTable, &UIFileManagerHostTable::sigDeleteConfirmationOptionChanged, 250 this, &UIFileManager::sltHandleOptionsUpdated); 251 251 pFileTableContainerLayout->addWidget(m_pHostFileTable); 252 252 } … … 254 254 if (m_pGuestFileTable) 255 255 { 256 connect(m_pGuestFileTable, &UI GuestFileTable::sigLogOutput,257 this, &UI GuestControlFileManager::sltReceieveLogOutput);258 connect(m_pGuestFileTable, &UI GuestFileTable::sigNewFileOperation,259 this, &UI GuestControlFileManager::sltReceieveNewFileOperation);260 connect(m_pGuestFileTable, &UI GuestFileTable::sigDeleteConfirmationOptionChanged,261 this, &UI GuestControlFileManager::sltHandleOptionsUpdated);256 connect(m_pGuestFileTable, &UIFileManagerGuestTable::sigLogOutput, 257 this, &UIFileManager::sltReceieveLogOutput); 258 connect(m_pGuestFileTable, &UIFileManagerGuestTable::sigNewFileOperation, 259 this, &UIFileManager::sltReceieveNewFileOperation); 260 connect(m_pGuestFileTable, &UIFileManagerGuestTable::sigDeleteConfirmationOptionChanged, 261 this, &UIFileManager::sltHandleOptionsUpdated); 262 262 pFileTableContainerLayout->addWidget(m_pGuestFileTable); 263 263 } … … 265 265 266 266 pTopLayout->addLayout(pFileTableContainerLayout); 267 m_pSessionPanel = new UI GuestControlFileManagerSessionPanel(this /* manager dialog */, 0 /*parent */);267 m_pSessionPanel = new UIFileManagerSessionPanel(this /* manager dialog */, 0 /*parent */); 268 268 if (m_pSessionPanel) 269 269 { 270 270 m_pSessionPanel->hide(); 271 m_panelActionMap.insert(m_pSessionPanel, m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_T_Session));271 m_panelActionMap.insert(m_pSessionPanel, m_pActionPool->action(UIActionIndex_M_FileManager_T_Session)); 272 272 pTopLayout->addWidget(m_pSessionPanel); 273 273 } 274 274 275 275 m_pOptionsPanel = 276 new UI GuestControlFileManagerOptionsPanel(this /* manager dialog */,277 0 /*parent */, UI GuestControlFileManagerOptions::instance());276 new UIFileManagerOptionsPanel(this /* manager dialog */, 277 0 /*parent */, UIFileManagerOptions::instance()); 278 278 if (m_pOptionsPanel) 279 279 { 280 280 m_pOptionsPanel->hide(); 281 m_panelActionMap.insert(m_pOptionsPanel, m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_T_Options));282 connect(m_pOptionsPanel, &UI GuestControlFileManagerOptionsPanel::sigOptionsChanged,283 this, &UI GuestControlFileManager::sltListDirectoriesBeforeChanged);281 m_panelActionMap.insert(m_pOptionsPanel, m_pActionPool->action(UIActionIndex_M_FileManager_T_Options)); 282 connect(m_pOptionsPanel, &UIFileManagerOptionsPanel::sigOptionsChanged, 283 this, &UIFileManager::sltListDirectoriesBeforeChanged); 284 284 pTopLayout->addWidget(m_pOptionsPanel); 285 285 } … … 288 288 289 289 m_pOperationsPanel = 290 new UI GuestControlFileManagerOperationsPanel(this /* manager dialog */, 0 /*parent */);290 new UIFileManagerOperationsPanel(this /* manager dialog */, 0 /*parent */); 291 291 if (m_pOperationsPanel) 292 292 { 293 293 m_pOperationsPanel->hide(); 294 connect(m_pOperationsPanel, &UI GuestControlFileManagerOperationsPanel::sigFileOperationComplete,295 this, &UI GuestControlFileManager::sltFileOperationComplete);296 connect(m_pOperationsPanel, &UI GuestControlFileManagerOperationsPanel::sigFileOperationFail,297 this, &UI GuestControlFileManager::sltReceieveLogOutput);298 m_panelActionMap.insert(m_pOperationsPanel, m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_T_FileOperations));299 } 300 301 m_pLogPanel = new UI GuestControlFileManagerLogPanel(this /* manager dialog */, 0 /*parent */);294 connect(m_pOperationsPanel, &UIFileManagerOperationsPanel::sigFileOperationComplete, 295 this, &UIFileManager::sltFileOperationComplete); 296 connect(m_pOperationsPanel, &UIFileManagerOperationsPanel::sigFileOperationFail, 297 this, &UIFileManager::sltReceieveLogOutput); 298 m_panelActionMap.insert(m_pOperationsPanel, m_pActionPool->action(UIActionIndex_M_FileManager_T_Operations)); 299 } 300 301 m_pLogPanel = new UIFileManagerLogPanel(this /* manager dialog */, 0 /*parent */); 302 302 if (m_pLogPanel) 303 303 { 304 304 m_pLogPanel->hide(); 305 m_panelActionMap.insert(m_pLogPanel, m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_T_Log));305 m_panelActionMap.insert(m_pLogPanel, m_pActionPool->action(UIActionIndex_M_FileManager_T_Log)); 306 306 } 307 307 … … 317 317 } 318 318 319 void UI GuestControlFileManager::prepareVerticalToolBar(QHBoxLayout *layout)319 void UIFileManager::prepareVerticalToolBar(QHBoxLayout *layout) 320 320 { 321 321 m_pVerticalToolBar = new UIToolBar; … … 335 335 336 336 m_pVerticalToolBar->addWidget(topSpacerWidget); 337 m_pVerticalToolBar->addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_CopyToHost));338 m_pVerticalToolBar->addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_CopyToGuest));337 m_pVerticalToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_CopyToHost)); 338 m_pVerticalToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_CopyToGuest)); 339 339 m_pVerticalToolBar->addWidget(bottomSpacerWidget); 340 340 341 connect(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_CopyToHost), &QAction::triggered,342 this, &UI GuestControlFileManager::sltCopyGuestToHost);343 connect(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_CopyToGuest), &QAction::triggered,344 this, &UI GuestControlFileManager::sltCopyHostToGuest);341 connect(m_pActionPool->action(UIActionIndex_M_FileManager_S_CopyToHost), &QAction::triggered, 342 this, &UIFileManager::sltCopyGuestToHost); 343 connect(m_pActionPool->action(UIActionIndex_M_FileManager_S_CopyToGuest), &QAction::triggered, 344 this, &UIFileManager::sltCopyHostToGuest); 345 345 346 346 layout ->addWidget(m_pVerticalToolBar); 347 347 } 348 348 349 void UI GuestControlFileManager::prepareConnections()349 void UIFileManager::prepareConnections() 350 350 { 351 351 if (m_pQtGuestListener) 352 352 { 353 353 connect(m_pQtGuestListener->getWrapped(), &UIMainEventListener::sigGuestSessionUnregistered, 354 this, &UI GuestControlFileManager::sltGuestSessionUnregistered);354 this, &UIFileManager::sltGuestSessionUnregistered); 355 355 } 356 356 if (m_pSessionPanel) 357 357 { 358 connect(m_pSessionPanel, &UI GuestControlFileManagerSessionPanel::sigCreateSession,359 this, &UI GuestControlFileManager::sltCreateSession);360 connect(m_pSessionPanel, &UI GuestControlFileManagerSessionPanel::sigCloseSession,361 this, &UI GuestControlFileManager::sltCloseSession);362 } 363 } 364 365 void UI GuestControlFileManager::prepareToolBar()358 connect(m_pSessionPanel, &UIFileManagerSessionPanel::sigCreateSession, 359 this, &UIFileManager::sltCreateSession); 360 connect(m_pSessionPanel, &UIFileManagerSessionPanel::sigCloseSession, 361 this, &UIFileManager::sltCloseSession); 362 } 363 } 364 365 void UIFileManager::prepareToolBar() 366 366 { 367 367 /* Create toolbar: */ … … 374 374 m_pToolBar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); 375 375 376 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_T_Session));377 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_T_Options));378 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_T_FileOperations));379 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_T_Log));380 381 connect(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_T_Options), &QAction::toggled,382 this, &UI GuestControlFileManager::sltPanelActionToggled);383 connect(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_T_Log), &QAction::toggled,384 this, &UI GuestControlFileManager::sltPanelActionToggled);385 connect(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_T_Session), &QAction::toggled,386 this, &UI GuestControlFileManager::sltPanelActionToggled);387 connect(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_T_FileOperations), &QAction::toggled,388 this, &UI GuestControlFileManager::sltPanelActionToggled);376 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_T_Session)); 377 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_T_Options)); 378 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_T_Operations)); 379 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_T_Log)); 380 381 connect(m_pActionPool->action(UIActionIndex_M_FileManager_T_Options), &QAction::toggled, 382 this, &UIFileManager::sltPanelActionToggled); 383 connect(m_pActionPool->action(UIActionIndex_M_FileManager_T_Log), &QAction::toggled, 384 this, &UIFileManager::sltPanelActionToggled); 385 connect(m_pActionPool->action(UIActionIndex_M_FileManager_T_Session), &QAction::toggled, 386 this, &UIFileManager::sltPanelActionToggled); 387 connect(m_pActionPool->action(UIActionIndex_M_FileManager_T_Operations), &QAction::toggled, 388 this, &UIFileManager::sltPanelActionToggled); 389 389 390 390 #ifdef TEST_COPY … … 397 397 398 398 connect(pSession, &QAction::triggered, 399 this, &UI GuestControlFileManager::sltTestSession);399 this, &UIFileManager::sltTestSession); 400 400 connect(pCopy, &QAction::triggered, 401 this, &UI GuestControlFileManager::sltTestCopy);401 this, &UIFileManager::sltTestCopy); 402 402 403 403 #endif … … 418 418 419 419 420 void UI GuestControlFileManager::sltGuestSessionUnregistered(CGuestSession guestSession)420 void UIFileManager::sltGuestSessionUnregistered(CGuestSession guestSession) 421 421 { 422 422 if (guestSession.isNull()) … … 429 429 } 430 430 431 void UI GuestControlFileManager::sltCreateSession(QString strUserName, QString strPassword)431 void UIFileManager::sltCreateSession(QString strUserName, QString strPassword) 432 432 { 433 433 if (!UIGuestControlInterface::isGuestAdditionsAvailable(m_comGuest)) … … 445 445 } 446 446 447 void UI GuestControlFileManager::sltCloseSession()447 void UIFileManager::sltCloseSession() 448 448 { 449 449 if (!m_comGuestSession.isOk()) … … 464 464 } 465 465 466 void UI GuestControlFileManager::sltGuestSessionStateChanged(const CGuestSessionStateChangedEvent &cEvent)466 void UIFileManager::sltGuestSessionStateChanged(const CGuestSessionStateChangedEvent &cEvent) 467 467 { 468 468 if (cEvent.isOk() /*&& m_comGuestSession.isOk()*/) … … 483 483 } 484 484 485 void UI GuestControlFileManager::sltReceieveLogOutput(QString strOutput, FileManagerLogType eLogType)485 void UIFileManager::sltReceieveLogOutput(QString strOutput, FileManagerLogType eLogType) 486 486 { 487 487 appendLog(strOutput, eLogType); 488 488 } 489 489 490 void UI GuestControlFileManager::sltCopyGuestToHost()490 void UIFileManager::sltCopyGuestToHost() 491 491 { 492 492 copyToHost(); 493 493 } 494 494 495 void UI GuestControlFileManager::sltCopyHostToGuest()495 void UIFileManager::sltCopyHostToGuest() 496 496 { 497 497 copyToGuest(); 498 498 } 499 499 500 void UI GuestControlFileManager::sltPanelActionToggled(bool fChecked)500 void UIFileManager::sltPanelActionToggled(bool fChecked) 501 501 { 502 502 QAction *pSenderAction = qobject_cast<QAction*>(sender()); 503 503 if (!pSenderAction) 504 504 return; 505 UI GuestControlFileManagerPanel* pPanel = 0;505 UIFileManagerPanel* pPanel = 0; 506 506 /* Look for the sender() within the m_panelActionMap's values: */ 507 for (QMap<UI GuestControlFileManagerPanel*, QAction*>::const_iterator iterator = m_panelActionMap.begin();507 for (QMap<UIFileManagerPanel*, QAction*>::const_iterator iterator = m_panelActionMap.begin(); 508 508 iterator != m_panelActionMap.end(); ++iterator) 509 509 { … … 519 519 } 520 520 521 void UI GuestControlFileManager::sltListDirectoriesBeforeChanged()521 void UIFileManager::sltListDirectoriesBeforeChanged() 522 522 { 523 523 if (m_pGuestFileTable) … … 527 527 } 528 528 529 void UI GuestControlFileManager::sltReceieveNewFileOperation(const CProgress &comProgress)529 void UIFileManager::sltReceieveNewFileOperation(const CProgress &comProgress) 530 530 { 531 531 if (m_pOperationsPanel) … … 533 533 } 534 534 535 void UI GuestControlFileManager::sltFileOperationComplete(QUuid progressId)535 void UIFileManager::sltFileOperationComplete(QUuid progressId) 536 536 { 537 537 Q_UNUSED(progressId); … … 543 543 } 544 544 545 void UI GuestControlFileManager::sltHandleOptionsUpdated()545 void UIFileManager::sltHandleOptionsUpdated() 546 546 { 547 547 if (m_pOptionsPanel) … … 551 551 } 552 552 553 void UI GuestControlFileManager::copyToHost()553 void UIFileManager::copyToHost() 554 554 { 555 555 if (!m_pGuestFileTable || !m_pHostFileTable) … … 560 560 } 561 561 562 void UI GuestControlFileManager::copyToGuest()562 void UIFileManager::copyToGuest() 563 563 { 564 564 if (!m_pGuestFileTable || !m_pHostFileTable) … … 569 569 } 570 570 571 void UI GuestControlFileManager::initFileTable()571 void UIFileManager::initFileTable() 572 572 { 573 573 if (!m_comGuestSession.isOk() || m_comGuestSession.GetStatus() != KGuestSessionStatus_Started) … … 578 578 } 579 579 580 void UI GuestControlFileManager::postSessionCreated()580 void UIFileManager::postSessionCreated() 581 581 { 582 582 if (m_pSessionPanel) … … 588 588 } 589 589 590 void UI GuestControlFileManager::postSessionClosed()590 void UIFileManager::postSessionClosed() 591 591 { 592 592 if (m_pSessionPanel) … … 598 598 } 599 599 600 bool UI GuestControlFileManager::createSession(const QString& strUserName, const QString& strPassword,600 bool UIFileManager::createSession(const QString& strUserName, const QString& strPassword, 601 601 const QString& strDomain /* not used currently */) 602 602 { … … 627 627 628 628 connect(m_pQtSessionListener->getWrapped(), &UIMainEventListener::sigGuestSessionStatedChanged, 629 this, &UI GuestControlFileManager::sltGuestSessionStateChanged);629 this, &UIFileManager::sltGuestSessionStateChanged); 630 630 /* Wait session to start. For some reason we cannot get GuestSessionStatusChanged event 631 631 consistently. So we wait: */ … … 642 642 } 643 643 644 void UI GuestControlFileManager::prepareListener(ComObjPtr<UIMainEventListenerImpl> &QtListener,644 void UIFileManager::prepareListener(ComObjPtr<UIMainEventListenerImpl> &QtListener, 645 645 CEventListener &comEventListener, 646 646 CEventSource comEventSource, QVector<KVBoxEventType>& eventTypes) … … 665 665 } 666 666 667 void UI GuestControlFileManager::cleanupListener(ComObjPtr<UIMainEventListenerImpl> &QtListener,667 void UIFileManager::cleanupListener(ComObjPtr<UIMainEventListenerImpl> &QtListener, 668 668 CEventListener &comEventListener, 669 669 CEventSource comEventSource) … … 687 687 688 688 template<typename T> 689 QStringList UI GuestControlFileManager::getFsObjInfoStringList(const T &fsObjectInfo) const689 QStringList UIFileManager::getFsObjInfoStringList(const T &fsObjectInfo) const 690 690 { 691 691 QStringList objectInfo; … … 696 696 } 697 697 698 void UI GuestControlFileManager::saveOptions()698 void UIFileManager::saveOptions() 699 699 { 700 700 /* Save a list of currently visible panels: */ 701 701 QStringList strNameList; 702 foreach(UI GuestControlFileManagerPanel* pPanel, m_visiblePanelsList)702 foreach(UIFileManagerPanel* pPanel, m_visiblePanelsList) 703 703 strNameList.append(pPanel->panelName()); 704 gEDataManager->set GuestControlFileManagerVisiblePanels(strNameList);704 gEDataManager->setFileManagerVisiblePanels(strNameList); 705 705 /* Save the options: */ 706 UI GuestControlFileManagerOptions *pOptions = UIGuestControlFileManagerOptions::instance();706 UIFileManagerOptions *pOptions = UIFileManagerOptions::instance(); 707 707 if (pOptions) 708 708 { 709 gEDataManager->set GuestControlFileManagerOptions(pOptions->bListDirectoriesOnTop,709 gEDataManager->setFileManagerOptions(pOptions->bListDirectoriesOnTop, 710 710 pOptions->bAskDeleteConfirmation, 711 711 pOptions->bShowHumanReadableSizes); … … 713 713 } 714 714 715 void UI GuestControlFileManager::restorePanelVisibility()715 void UIFileManager::restorePanelVisibility() 716 716 { 717 717 /** Make sure the actions are set to not-checked. this prevents an unlikely … … 725 725 726 726 /* Load the visible panel list and show them: */ 727 QStringList strNameList = gEDataManager-> guestControlFileManagerVisiblePanels();727 QStringList strNameList = gEDataManager->fileManagerVisiblePanels(); 728 728 foreach(const QString strName, strNameList) 729 729 { 730 foreach(UI GuestControlFileManagerPanel* pPanel, m_panelActionMap.keys())730 foreach(UIFileManagerPanel* pPanel, m_panelActionMap.keys()) 731 731 { 732 732 if (strName == pPanel->panelName()) … … 739 739 } 740 740 741 void UI GuestControlFileManager::loadOptions()741 void UIFileManager::loadOptions() 742 742 { 743 743 /* Load options: */ 744 UI GuestControlFileManagerOptions *pOptions = UIGuestControlFileManagerOptions::instance();744 UIFileManagerOptions *pOptions = UIFileManagerOptions::instance(); 745 745 if (pOptions) 746 746 { 747 pOptions->bListDirectoriesOnTop = gEDataManager-> guestControlFileManagerListDirectoriesFirst();748 pOptions->bAskDeleteConfirmation = gEDataManager-> guestControlFileManagerShowDeleteConfirmation();749 pOptions->bShowHumanReadableSizes = gEDataManager-> guestControlFileManagerShowHumanReadableSizes();750 } 751 } 752 753 void UI GuestControlFileManager::hidePanel(UIGuestControlFileManagerPanel* panel)747 pOptions->bListDirectoriesOnTop = gEDataManager->fileManagerListDirectoriesFirst(); 748 pOptions->bAskDeleteConfirmation = gEDataManager->fileManagerShowDeleteConfirmation(); 749 pOptions->bShowHumanReadableSizes = gEDataManager->fileManagerShowHumanReadableSizes(); 750 } 751 } 752 753 void UIFileManager::hidePanel(UIFileManagerPanel* panel) 754 754 { 755 755 if (panel && panel->isVisible()) 756 756 panel->setVisible(false); 757 QMap<UI GuestControlFileManagerPanel*, QAction*>::iterator iterator = m_panelActionMap.find(panel);757 QMap<UIFileManagerPanel*, QAction*>::iterator iterator = m_panelActionMap.find(panel); 758 758 if (iterator != m_panelActionMap.end()) 759 759 { … … 765 765 } 766 766 767 void UI GuestControlFileManager::showPanel(UIGuestControlFileManagerPanel* panel)767 void UIFileManager::showPanel(UIFileManagerPanel* panel) 768 768 { 769 769 if (panel && panel->isHidden()) 770 770 panel->setVisible(true); 771 QMap<UI GuestControlFileManagerPanel*, QAction*>::iterator iterator = m_panelActionMap.find(panel);771 QMap<UIFileManagerPanel*, QAction*>::iterator iterator = m_panelActionMap.find(panel); 772 772 if (iterator != m_panelActionMap.end()) 773 773 { … … 780 780 } 781 781 782 void UI GuestControlFileManager::manageEscapeShortCut()782 void UIFileManager::manageEscapeShortCut() 783 783 { 784 784 /* if there is no visible panels give the escape shortcut to parent dialog: */ … … 799 799 } 800 800 801 void UI GuestControlFileManager::appendLog(const QString &strLog, FileManagerLogType eLogType)801 void UIFileManager::appendLog(const QString &strLog, FileManagerLogType eLogType) 802 802 { 803 803 if (!m_pLogPanel) … … 806 806 } 807 807 808 void UI GuestControlFileManager::sltTestSession()808 void UIFileManager::sltTestSession() 809 809 { 810 810 createSession("vbox", "password"); 811 811 } 812 812 813 void UI GuestControlFileManager::sltTestCopy()813 void UIFileManager::sltTestCopy() 814 814 { 815 815 QStringList sources; … … 819 819 } 820 820 821 #include "UI GuestControlFileManager.moc"821 #include "UIFileManager.moc" -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManager.h
r76176 r76177 1 1 /* $Id$ */ 2 2 /** @file 3 * VBox Qt GUI - UI GuestControlFileManager class declaration.3 * VBox Qt GUI - UIFileManager class declaration. 4 4 */ 5 5 … … 16 16 */ 17 17 18 #ifndef ___UI GuestControlFileManager_h___19 #define ___UI GuestControlFileManager_h___18 #ifndef ___UIFileManager_h___ 19 #define ___UIFileManager_h___ 20 20 21 21 /* Qt includes: */ … … 47 47 class UIGuestControlConsole; 48 48 class UIGuestControlInterface; 49 class UI GuestControlFileManagerPanel;50 class UI GuestControlFileManagerLogPanel;51 class UI GuestControlFileManagerOperationsPanel;52 class UI GuestControlFileManagerSessionPanel;53 class UI GuestControlFileManagerOptionsPanel;54 class UI GuestFileTable;55 class UI HostFileTable;49 class UIFileManagerPanel; 50 class UIFileManagerLogPanel; 51 class UIFileManagerOperationsPanel; 52 class UIFileManagerSessionPanel; 53 class UIFileManagerOptionsPanel; 54 class UIFileManagerGuestTable; 55 class UIFileManagerHostTable; 56 56 class UIGuestSessionCreateWidget; 57 57 class UIToolBar; 58 58 59 59 /** A Utility class to manage file manager options. */ 60 class UI GuestControlFileManagerOptions60 class UIFileManagerOptions 61 61 { 62 62 63 63 public: 64 64 65 static UI GuestControlFileManagerOptions* instance();65 static UIFileManagerOptions* instance(); 66 66 static void create(); 67 67 static void destroy(); … … 73 73 private: 74 74 75 UI GuestControlFileManagerOptions();76 ~UI GuestControlFileManagerOptions();77 78 static UI GuestControlFileManagerOptions *m_pInstance;75 UIFileManagerOptions(); 76 ~UIFileManagerOptions(); 77 78 static UIFileManagerOptions *m_pInstance; 79 79 }; 80 80 … … 82 82 * one host and one guest file table views, a log viewer 83 83 * and some other file manager related widgets. */ 84 class UI GuestControlFileManager : public QIWithRetranslateUI<QWidget>84 class UIFileManager : public QIWithRetranslateUI<QWidget> 85 85 { 86 86 Q_OBJECT; … … 88 88 public: 89 89 90 UI GuestControlFileManager(EmbedTo enmEmbedding, UIActionPool *pActionPool,90 UIFileManager(EmbedTo enmEmbedding, UIActionPool *pActionPool, 91 91 const CGuest &comGuest, QWidget *pParent, bool fShowToolbar = true); 92 ~UI GuestControlFileManager();92 ~UIFileManager(); 93 93 QMenu *menu() const; 94 94 … … 157 157 * since some widgets are initilized with these options */ 158 158 void loadOptions(); 159 void hidePanel(UI GuestControlFileManagerPanel *panel);160 void showPanel(UI GuestControlFileManagerPanel *panel);159 void hidePanel(UIFileManagerPanel *panel); 160 void showPanel(UIFileManagerPanel *panel); 161 161 /** Makes sure escape key is assigned to only a single widget. This is done by checking 162 162 several things in the following order: … … 179 179 UIGuestControlConsole *m_pConsole; 180 180 UIGuestControlInterface *m_pControlInterface; 181 UI GuestFileTable *m_pGuestFileTable;182 UI HostFileTable*m_pHostFileTable;181 UIFileManagerGuestTable *m_pGuestFileTable; 182 UIFileManagerHostTable *m_pHostFileTable; 183 183 184 184 ComObjPtr<UIMainEventListenerImpl> m_pQtGuestListener; … … 189 189 UIActionPool *m_pActionPool; 190 190 const bool m_fShowToolbar; 191 QMap<UI GuestControlFileManagerPanel*, QAction*> m_panelActionMap;192 QList<UI GuestControlFileManagerPanel*> m_visiblePanelsList;193 UI GuestControlFileManagerOptionsPanel *m_pOptionsPanel;194 UI GuestControlFileManagerLogPanel *m_pLogPanel;195 UI GuestControlFileManagerSessionPanel *m_pSessionPanel;196 UI GuestControlFileManagerOperationsPanel *m_pOperationsPanel;197 friend class UI GuestControlFileManagerOptionsPanel;198 friend class UI GuestControlFileManagerPanel;199 friend class UI GuestControlFileManagerDialog;191 QMap<UIFileManagerPanel*, QAction*> m_panelActionMap; 192 QList<UIFileManagerPanel*> m_visiblePanelsList; 193 UIFileManagerOptionsPanel *m_pOptionsPanel; 194 UIFileManagerLogPanel *m_pLogPanel; 195 UIFileManagerSessionPanel *m_pSessionPanel; 196 UIFileManagerOperationsPanel *m_pOperationsPanel; 197 friend class UIFileManagerOptionsPanel; 198 friend class UIFileManagerPanel; 199 friend class UIFileManagerDialog; 200 200 }; 201 201 202 #endif /* !___UI GuestControlFileManager_h___ */202 #endif /* !___UIFileManager_h___ */ -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerDialog.cpp
r76176 r76177 1 1 /* $Id$ */ 2 2 /** @file 3 * VBox Qt GUI - UI GuestControlFileManagerDialog class implementation.3 * VBox Qt GUI - UIFileManagerDialog class implementation. 4 4 */ 5 5 … … 28 28 # include "UIExtraDataManager.h" 29 29 # include "UIIconPool.h" 30 # include "UI GuestControlFileManager.h"31 # include "UI GuestControlFileManagerDialog.h"30 # include "UIFileManager.h" 31 # include "UIFileManagerDialog.h" 32 32 # include "VBoxGlobal.h" 33 33 # ifdef VBOX_WS_MAC … … 39 39 40 40 /********************************************************************************************************************************* 41 * Class UI GuestControlFileManagerDialogFactory implementation. *41 * Class UIFileManagerDialogFactory implementation. * 42 42 *********************************************************************************************************************************/ 43 43 44 UI GuestControlFileManagerDialogFactory::UIGuestControlFileManagerDialogFactory(UIActionPool *pActionPool /* = 0 */,44 UIFileManagerDialogFactory::UIFileManagerDialogFactory(UIActionPool *pActionPool /* = 0 */, 45 45 const CGuest &comGuest /* = CGuest() */, 46 46 const QString &strMachineName /* = QString() */) … … 51 51 } 52 52 53 void UI GuestControlFileManagerDialogFactory::create(QIManagerDialog *&pDialog, QWidget *pCenterWidget)53 void UIFileManagerDialogFactory::create(QIManagerDialog *&pDialog, QWidget *pCenterWidget) 54 54 { 55 pDialog = new UI GuestControlFileManagerDialog(pCenterWidget, m_pActionPool, m_comGuest, m_strMachineName);55 pDialog = new UIFileManagerDialog(pCenterWidget, m_pActionPool, m_comGuest, m_strMachineName); 56 56 } 57 57 58 58 59 59 /********************************************************************************************************************************* 60 * Class UI GuestControlFileManagerDialog implementation. *60 * Class UIFileManagerDialog implementation. * 61 61 *********************************************************************************************************************************/ 62 62 63 UI GuestControlFileManagerDialog::UIGuestControlFileManagerDialog(QWidget *pCenterWidget,63 UIFileManagerDialog::UIFileManagerDialog(QWidget *pCenterWidget, 64 64 UIActionPool *pActionPool, 65 65 const CGuest &comGuest, … … 72 72 } 73 73 74 void UI GuestControlFileManagerDialog::retranslateUi()74 void UIFileManagerDialog::retranslateUi() 75 75 { 76 76 /* Translate window title: */ 77 setWindowTitle(UI GuestControlFileManager::tr("%1 - Guest ControlFile Manager").arg(m_strMachineName));77 setWindowTitle(UIFileManager::tr("%1 - File Manager").arg(m_strMachineName)); 78 78 /* Translate buttons: */ 79 button(ButtonType_Close)->setText(UI GuestControlFileManager::tr("Close"));79 button(ButtonType_Close)->setText(UIFileManager::tr("Close")); 80 80 } 81 81 82 void UI GuestControlFileManagerDialog::configure()82 void UIFileManagerDialog::configure() 83 83 { 84 84 /* Apply window icons: */ … … 86 86 } 87 87 88 void UI GuestControlFileManagerDialog::configureCentralWidget()88 void UIFileManagerDialog::configureCentralWidget() 89 89 { 90 90 /* Create widget: */ 91 UI GuestControlFileManager *pWidget = new UIGuestControlFileManager(EmbedTo_Dialog, m_pActionPool,91 UIFileManager *pWidget = new UIFileManager(EmbedTo_Dialog, m_pActionPool, 92 92 m_comGuest, this); 93 93 … … 100 100 setWidgetToolbar(pWidget->toolbar()); 101 101 #endif 102 connect(pWidget, &UI GuestControlFileManager::sigSetCloseButtonShortCut,103 this, &UI GuestControlFileManagerDialog::sltSetCloseButtonShortCut);102 connect(pWidget, &UIFileManager::sigSetCloseButtonShortCut, 103 this, &UIFileManagerDialog::sltSetCloseButtonShortCut); 104 104 105 105 /* Add into layout: */ … … 108 108 } 109 109 110 void UI GuestControlFileManagerDialog::finalize()110 void UIFileManagerDialog::finalize() 111 111 { 112 112 /* Apply language settings: */ … … 115 115 } 116 116 117 void UI GuestControlFileManagerDialog::loadSettings()117 void UIFileManagerDialog::loadSettings() 118 118 { 119 119 const QRect desktopRect = gpDesktop->availableGeometry(this); … … 126 126 127 127 /* Load geometry from extradata: */ 128 QRect geometry = gEDataManager-> guestControlFileManagerDialogGeometry(this, defaultGeometry);128 QRect geometry = gEDataManager->fileManagerDialogGeometry(this, defaultGeometry); 129 129 130 130 /* Restore geometry: */ 131 LogRel2(("GUI: UI GuestControlFileManagerDialog: Restoring geometry to: Origin=%dx%d, Size=%dx%d\n",131 LogRel2(("GUI: UIFileManagerDialog: Restoring geometry to: Origin=%dx%d, Size=%dx%d\n", 132 132 geometry.x(), geometry.y(), geometry.width(), geometry.height())); 133 133 setDialogGeometry(geometry); 134 134 } 135 135 136 void UI GuestControlFileManagerDialog::saveSettings() const136 void UIFileManagerDialog::saveSettings() const 137 137 { 138 138 /* Save window geometry to extradata: */ … … 141 141 /* darwinIsWindowMaximized expects a non-const QWidget*. thus const_cast: */ 142 142 QWidget *pw = const_cast<QWidget*>(qobject_cast<const QWidget*>(this)); 143 gEDataManager->set GuestControlFileManagerDialogGeometry(saveGeometry, ::darwinIsWindowMaximized(pw));143 gEDataManager->setFileManagerDialogGeometry(saveGeometry, ::darwinIsWindowMaximized(pw)); 144 144 #else /* !VBOX_WS_MAC */ 145 gEDataManager->set GuestControlFileManagerDialogGeometry(saveGeometry, isMaximized());145 gEDataManager->setFileManagerDialogGeometry(saveGeometry, isMaximized()); 146 146 #endif /* !VBOX_WS_MAC */ 147 LogRel2(("GUI: Guest ControlFile Manager Dialog: Geometry saved as: Origin=%dx%d, Size=%dx%d\n",147 LogRel2(("GUI: File Manager Dialog: Geometry saved as: Origin=%dx%d, Size=%dx%d\n", 148 148 saveGeometry.x(), saveGeometry.y(), saveGeometry.width(), saveGeometry.height())); 149 149 } 150 150 151 bool UI GuestControlFileManagerDialog::shouldBeMaximized() const151 bool UIFileManagerDialog::shouldBeMaximized() const 152 152 { 153 return gEDataManager-> guestControlFileManagerDialogShouldBeMaximized();153 return gEDataManager->fileManagerDialogShouldBeMaximized(); 154 154 } 155 155 156 void UI GuestControlFileManagerDialog::sltSetCloseButtonShortCut(QKeySequence shortcut)156 void UIFileManagerDialog::sltSetCloseButtonShortCut(QKeySequence shortcut) 157 157 { 158 158 if (button(ButtonType_Close)) … … 160 160 } 161 161 162 void UI GuestControlFileManagerDialog::manageEscapeShortCut()162 void UIFileManagerDialog::manageEscapeShortCut() 163 163 { 164 UI GuestControlFileManager *pWidget = qobject_cast<UIGuestControlFileManager*>(widget());164 UIFileManager *pWidget = qobject_cast<UIFileManager*>(widget()); 165 165 if (!pWidget) 166 166 return; -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerDialog.h
r76176 r76177 1 1 /* $Id$ */ 2 2 /** @file 3 * VBox Qt GUI - UI GuestControlFileManagerDialog class declaration.3 * VBox Qt GUI - UIFileManagerDialog class declaration. 4 4 */ 5 5 … … 16 16 */ 17 17 18 #ifndef ___UI GuestControlFileManagerDialog_h___19 #define ___UI GuestControlFileManagerDialog_h___18 #ifndef ___UIFileManagerDialog_h___ 19 #define ___UIFileManagerDialog_h___ 20 20 21 21 /* Qt includes: */ … … 34 34 class QVBoxLayout; 35 35 class UIActionPool; 36 class UI GuestControlFileManagerDialog;36 class UIFileManagerDialog; 37 37 class CGuest; 38 38 39 39 40 /** QIManagerDialogFactory extension used as a factory for the Guest Controldialog. */41 class UI GuestControlFileManagerDialogFactory : public QIManagerDialogFactory40 /** QIManagerDialogFactory extension used as a factory for the file manager dialog. */ 41 class UIFileManagerDialogFactory : public QIManagerDialogFactory 42 42 { 43 43 public: 44 44 45 UI GuestControlFileManagerDialogFactory(UIActionPool *pActionPool = 0, const CGuest &comGuest = CGuest(), const QString &strMachineName = QString());45 UIFileManagerDialogFactory(UIActionPool *pActionPool = 0, const CGuest &comGuest = CGuest(), const QString &strMachineName = QString()); 46 46 47 47 protected: … … 57 57 58 58 59 /** QIManagerDialog extension providing GUI with the dialog displaying guest controlreleated logs. */60 class UI GuestControlFileManagerDialog : public QIWithRetranslateUI<QIManagerDialog>59 /** QIManagerDialog extension providing GUI with the dialog displaying file manager releated logs. */ 60 class UIFileManagerDialog : public QIWithRetranslateUI<QIManagerDialog> 61 61 { 62 62 Q_OBJECT; … … 64 64 public: 65 65 66 /** Constructs Guest Controldialog.66 /** Constructs File Manager dialog. 67 67 * @param pCenterWidget Passes the widget reference to center according to. 68 68 * @param pActionPool Passes the action-pool reference. 69 69 * @param comGuest Passes the com-guest reference. */ 70 UI GuestControlFileManagerDialog(QWidget *pCenterWidget, UIActionPool *pActionPool, const CGuest &comGuest, const QString &strMachineName = QString());70 UIFileManagerDialog(QWidget *pCenterWidget, UIActionPool *pActionPool, const CGuest &comGuest, const QString &strMachineName = QString()); 71 71 72 72 protected: … … 112 112 113 113 114 #endif /* !___UI GuestControlFileManagerDialog_h___ */114 #endif /* !___UIFileManagerDialog_h___ */ -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerGuestTable.cpp
r76176 r76177 1 1 /* $Id$ */ 2 2 /** @file 3 * VBox Qt GUI - UI GuestFileTable class implementation.3 * VBox Qt GUI - UIFileManagerGuestTable class implementation. 4 4 */ 5 5 … … 29 29 # include "UIActionPool.h" 30 30 # include "UIErrorString.h" 31 # include "UI GuestControlFileManager.h"32 # include "UI GuestFileTable.h"31 # include "UIFileManager.h" 32 # include "UIFileManagerGuestTable.h" 33 33 # include "UIMessageCenter.h" 34 34 # include "UIToolBar.h" … … 147 147 } 148 148 149 UI GuestFileTable::UIGuestFileTable(UIActionPool *pActionPool, QWidget *pParent /*= 0*/)150 :UI GuestControlFileTable(pActionPool, pParent)149 UIFileManagerGuestTable::UIFileManagerGuestTable(UIActionPool *pActionPool, QWidget *pParent /*= 0*/) 150 :UIFileManagerTable(pActionPool, pParent) 151 151 { 152 152 prepareToolbar(); … … 155 155 } 156 156 157 void UI GuestFileTable::initGuestFileTable(const CGuestSession &session)157 void UIFileManagerGuestTable::initGuestFileTable(const CGuestSession &session) 158 158 { 159 159 if (!session.isOk()) … … 165 165 } 166 166 167 void UI GuestFileTable::retranslateUi()167 void UIFileManagerGuestTable::retranslateUi() 168 168 { 169 169 if (m_pLocationLabel) 170 m_pLocationLabel->setText(UI GuestControlFileManager::tr("Guest System"));171 UI GuestControlFileTable::retranslateUi();172 } 173 174 void UI GuestFileTable::readDirectory(const QString& strPath,170 m_pLocationLabel->setText(UIFileManager::tr("Guest System")); 171 UIFileManagerTable::retranslateUi(); 172 } 173 174 void UIFileManagerGuestTable::readDirectory(const QString& strPath, 175 175 UIFileTableItem *parent, bool isStartDir /*= false*/) 176 176 … … 241 241 } 242 242 243 void UI GuestFileTable::deleteByItem(UIFileTableItem *item)243 void UIFileManagerGuestTable::deleteByItem(UIFileTableItem *item) 244 244 { 245 245 if (!item) … … 262 262 } 263 263 264 void UI GuestFileTable::deleteByPath(const QStringList &pathList)264 void UIFileManagerGuestTable::deleteByPath(const QStringList &pathList) 265 265 { 266 266 foreach (const QString &strPath, pathList) … … 281 281 } 282 282 283 void UI GuestFileTable::goToHomeDirectory()283 void UIFileManagerGuestTable::goToHomeDirectory() 284 284 { 285 285 if (m_comGuestSession.isNull()) … … 301 301 } 302 302 303 bool UI GuestFileTable::renameItem(UIFileTableItem *item, QString newBaseName)303 bool UIFileManagerGuestTable::renameItem(UIFileTableItem *item, QString newBaseName) 304 304 { 305 305 … … 320 320 } 321 321 322 bool UI GuestFileTable::createDirectory(const QString &path, const QString &directoryName)322 bool UIFileManagerGuestTable::createDirectory(const QString &path, const QString &directoryName) 323 323 { 324 324 QString newDirectoryPath = UIPathOperations::mergePaths(path, directoryName); … … 337 337 } 338 338 339 void UI GuestFileTable::copyHostToGuest(const QStringList &hostSourcePathList,339 void UIFileManagerGuestTable::copyHostToGuest(const QStringList &hostSourcePathList, 340 340 const QString &strDestination /* = QString() */) 341 341 { … … 366 366 } 367 367 368 void UI GuestFileTable::copyGuestToHost(const QString& hostDestinationPath)368 void UIFileManagerGuestTable::copyGuestToHost(const QString& hostDestinationPath) 369 369 { 370 370 if (!checkGuestSession()) … … 391 391 } 392 392 393 FileObjectType UI GuestFileTable::fileType(const CFsObjInfo &fsInfo)393 FileObjectType UIFileManagerGuestTable::fileType(const CFsObjInfo &fsInfo) 394 394 { 395 395 if (fsInfo.isNull() || !fsInfo.isOk()) … … 405 405 } 406 406 407 FileObjectType UI GuestFileTable::fileType(const CGuestFsObjInfo &fsInfo)407 FileObjectType UIFileManagerGuestTable::fileType(const CGuestFsObjInfo &fsInfo) 408 408 { 409 409 if (fsInfo.isNull() || !fsInfo.isOk()) … … 420 420 421 421 422 QString UI GuestFileTable::fsObjectPropertyString()422 QString UIFileManagerGuestTable::fsObjectPropertyString() 423 423 { 424 424 QStringList selectedObjects = selectedItemPathList(); … … 444 444 /* Size: */ 445 445 LONG64 size = fileInfo.GetObjectSize(); 446 propertyStringList << UI GuestControlFileManager::tr("<b>Size:</b> %1 bytes").arg(QString::number(size));447 if (size >= UI GuestControlFileTable::m_iKiloByte)446 propertyStringList << UIFileManager::tr("<b>Size:</b> %1 bytes").arg(QString::number(size)); 447 if (size >= UIFileManagerTable::m_iKiloByte) 448 448 propertyStringList << QString(" (%1)<br/>").arg(humanReadableSize(size)); 449 449 else … … 452 452 /* Allocated size: */ 453 453 size = fileInfo.GetAllocatedSize(); 454 propertyStringList << UI GuestControlFileManager::tr("<b>Allocated:</b> %1 bytes").arg(QString::number(size));455 if (size >= UI GuestControlFileTable::m_iKiloByte)454 propertyStringList << UIFileManager::tr("<b>Allocated:</b> %1 bytes").arg(QString::number(size)); 455 if (size >= UIFileManagerTable::m_iKiloByte) 456 456 propertyStringList << QString(" (%1)<br/>").arg(humanReadableSize(size)); 457 457 else … … 474 474 default: str = tr("illegal-value"); break; 475 475 } 476 propertyStringList << UI GuestControlFileManager::tr("<b>Type:</b> %1<br/>").arg(str);476 propertyStringList << UIFileManager::tr("<b>Type:</b> %1<br/>").arg(str); 477 477 478 478 /* INode number, device, link count: */ 479 propertyStringList << UI GuestControlFileManager::tr("<b>INode:</b> %1<br/>").arg(fileInfo.GetNodeId());480 propertyStringList << UI GuestControlFileManager::tr("<b>Device:</b> %1<br/>").arg(fileInfo.GetNodeIdDevice()); /** @todo hex */481 propertyStringList << UI GuestControlFileManager::tr("<b>Hardlinks:</b> %1<br/>").arg(fileInfo.GetHardLinks());479 propertyStringList << UIFileManager::tr("<b>INode:</b> %1<br/>").arg(fileInfo.GetNodeId()); 480 propertyStringList << UIFileManager::tr("<b>Device:</b> %1<br/>").arg(fileInfo.GetNodeIdDevice()); /** @todo hex */ 481 propertyStringList << UIFileManager::tr("<b>Hardlinks:</b> %1<br/>").arg(fileInfo.GetHardLinks()); 482 482 483 483 /* Attributes: */ … … 488 488 if (offSpace < 0) 489 489 offSpace = str.length(); 490 propertyStringList << UI GuestControlFileManager::tr("<b>Mode:</b> %1<br/>").arg(str.left(offSpace));491 propertyStringList << UI GuestControlFileManager::tr("<b>Attributes:</b> %1<br/>").arg(str.mid(offSpace + 1).trimmed());490 propertyStringList << UIFileManager::tr("<b>Mode:</b> %1<br/>").arg(str.left(offSpace)); 491 propertyStringList << UIFileManager::tr("<b>Attributes:</b> %1<br/>").arg(str.mid(offSpace + 1).trimmed()); 492 492 } 493 493 … … 495 495 ULONG uDeviceNo = fileInfo.GetDeviceNumber(); 496 496 if (uDeviceNo != 0 || enmType == KFsObjType_DevChar || enmType == KFsObjType_DevBlock) 497 propertyStringList << UI GuestControlFileManager::tr("<b>Device ID:</b> %1<br/>").arg(uDeviceNo); /** @todo hex */497 propertyStringList << UIFileManager::tr("<b>Device ID:</b> %1<br/>").arg(uDeviceNo); /** @todo hex */ 498 498 499 499 /* Owner: */ 500 propertyStringList << UI GuestControlFileManager::tr("<b>Owner:</b> %1 (%2)<br/>").500 propertyStringList << UIFileManager::tr("<b>Owner:</b> %1 (%2)<br/>"). 501 501 arg(fileInfo.GetUserName()).arg(fileInfo.GetUID()); 502 propertyStringList << UI GuestControlFileManager::tr("<b>Group:</b> %1 (%2)<br/>").502 propertyStringList << UIFileManager::tr("<b>Group:</b> %1 (%2)<br/>"). 503 503 arg(fileInfo.GetGroupName()).arg(fileInfo.GetGID()); 504 504 505 505 /* Timestamps: */ 506 propertyStringList << UI GuestControlFileManager::tr("<b>Birth:</b> %1<br/>").506 propertyStringList << UIFileManager::tr("<b>Birth:</b> %1<br/>"). 507 507 arg(QDateTime::fromMSecsSinceEpoch(fileInfo.GetBirthTime() / RT_NS_1MS).toString()); 508 propertyStringList << UI GuestControlFileManager::tr("<b>Change:</b> %1<br/>").508 propertyStringList << UIFileManager::tr("<b>Change:</b> %1<br/>"). 509 509 arg(QDateTime::fromMSecsSinceEpoch(fileInfo.GetChangeTime() / RT_NS_1MS).toString()); 510 propertyStringList << UI GuestControlFileManager::tr("<b>Modified:</b> %1<br/>").510 propertyStringList << UIFileManager::tr("<b>Modified:</b> %1<br/>"). 511 511 arg(QDateTime::fromMSecsSinceEpoch(fileInfo.GetModificationTime() / RT_NS_1MS).toString()); 512 propertyStringList << UI GuestControlFileManager::tr("<b>Access:</b> %1<br/>").512 propertyStringList << UIFileManager::tr("<b>Access:</b> %1<br/>"). 513 513 arg(QDateTime::fromMSecsSinceEpoch(fileInfo.GetAccessTime() / RT_NS_1MS).toString()); 514 514 … … 539 539 } 540 540 QStringList propertyStringList; 541 propertyStringList << UI GuestControlFileManager::tr("<b>Selected:</b> %1 files and %2 directories<br/>").541 propertyStringList << UIFileManager::tr("<b>Selected:</b> %1 files and %2 directories<br/>"). 542 542 arg(QString::number(fileCount)).arg(QString::number(directoryCount)); 543 propertyStringList << UI GuestControlFileManager::tr("<b>Size (non-recursive):</b> %1 bytes").arg(QString::number(totalSize));543 propertyStringList << UIFileManager::tr("<b>Size (non-recursive):</b> %1 bytes").arg(QString::number(totalSize)); 544 544 if (totalSize >= m_iKiloByte) 545 545 propertyStringList << QString(" (%1)").arg(humanReadableSize(totalSize)); … … 548 548 } 549 549 550 void UI GuestFileTable::showProperties()550 void UIFileManagerGuestTable::showProperties() 551 551 { 552 552 if (m_comGuestSession.isNull()) … … 577 577 // { 578 578 // connect(directoryThread, &UIGuestDirectoryDiskUsageComputer::sigResultUpdated, 579 // this, &UI GuestFileTable::sltReceiveDirectoryStatistics/*, Qt::DirectConnection*/);579 // this, &UIFileManagerGuestTable::sltReceiveDirectoryStatistics/*, Qt::DirectConnection*/); 580 580 // directoryThread->start(); 581 581 // } 582 582 // } 583 583 584 m_pPropertiesDialog->setWindowTitle(UI GuestControlFileManager::tr("Properties"));584 m_pPropertiesDialog->setWindowTitle(UIFileManager::tr("Properties")); 585 585 m_pPropertiesDialog->setPropertyText(fsPropertyString); 586 586 m_pPropertiesDialog->execute(); … … 591 591 // directoryThread->stopRecursion(); 592 592 // disconnect(directoryThread, &UIGuestDirectoryDiskUsageComputer::sigResultUpdated, 593 // this, &UI GuestFileTable::sltReceiveDirectoryStatistics/*, Qt::DirectConnection*/);593 // this, &UIFileManagerGuestTable::sltReceiveDirectoryStatistics/*, Qt::DirectConnection*/); 594 594 // } 595 595 … … 600 600 } 601 601 602 void UI GuestFileTable::determineDriveLetters()602 void UIFileManagerGuestTable::determineDriveLetters() 603 603 { 604 604 if (m_comGuestSession.isNull()) … … 621 621 } 622 622 623 void UI GuestFileTable::prepareToolbar()623 void UIFileManagerGuestTable::prepareToolbar() 624 624 { 625 625 if (m_pToolBar && m_pActionPool) 626 626 { 627 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Guest_GoUp));628 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Guest_GoHome));629 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Guest_Refresh));627 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_GoUp)); 628 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_GoHome)); 629 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_Refresh)); 630 630 m_pToolBar->addSeparator(); 631 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Guest_Delete));632 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Guest_Rename));633 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Guest_CreateNewDirectory));634 635 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Guest_Copy));636 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Guest_Cut));637 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Guest_Paste));631 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_Delete)); 632 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_Rename)); 633 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_CreateNewDirectory)); 634 635 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_Copy)); 636 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_Cut)); 637 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_Paste)); 638 638 m_pToolBar->addSeparator(); 639 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Guest_SelectAll));640 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Guest_InvertSelection));639 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_SelectAll)); 640 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_InvertSelection)); 641 641 m_pToolBar->addSeparator(); 642 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Guest_ShowProperties));643 m_selectionDependentActions.insert(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Guest_Delete));644 m_selectionDependentActions.insert(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Guest_Rename));645 m_selectionDependentActions.insert(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Guest_Copy));646 m_selectionDependentActions.insert(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Guest_Cut));647 m_selectionDependentActions.insert(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Guest_ShowProperties));642 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_ShowProperties)); 643 m_selectionDependentActions.insert(m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_Delete)); 644 m_selectionDependentActions.insert(m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_Rename)); 645 m_selectionDependentActions.insert(m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_Copy)); 646 m_selectionDependentActions.insert(m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_Cut)); 647 m_selectionDependentActions.insert(m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_ShowProperties)); 648 648 649 649 /* Hide these actions for now until we have a suitable guest-to-guest copy function: */ 650 m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Guest_Copy)->setVisible(false);651 m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Guest_Cut)->setVisible(false);652 m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Guest_Paste)->setVisible(false);650 m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_Copy)->setVisible(false); 651 m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_Cut)->setVisible(false); 652 m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_Paste)->setVisible(false); 653 653 } 654 654 setSelectionDependentActionsEnabled(false); … … 656 656 } 657 657 658 void UI GuestFileTable::createFileViewContextMenu(const QWidget *pWidget, const QPoint &point)658 void UIFileManagerGuestTable::createFileViewContextMenu(const QWidget *pWidget, const QPoint &point) 659 659 { 660 660 if (!pWidget) … … 662 662 663 663 QMenu menu; 664 menu.addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Guest_GoUp));665 666 menu.addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Guest_GoHome));667 menu.addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Guest_Refresh));664 menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_GoUp)); 665 666 menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_GoHome)); 667 menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_Refresh)); 668 668 menu.addSeparator(); 669 menu.addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Guest_Delete));670 menu.addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Guest_Rename));671 menu.addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Guest_CreateNewDirectory));669 menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_Delete)); 670 menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_Rename)); 671 menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_CreateNewDirectory)); 672 672 menu.addSeparator(); 673 menu.addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Guest_Copy));674 menu.addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Guest_Cut));675 menu.addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Guest_Paste));673 menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_Copy)); 674 menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_Cut)); 675 menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_Paste)); 676 676 menu.addSeparator(); 677 menu.addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Guest_SelectAll));678 menu.addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Guest_InvertSelection));677 menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_SelectAll)); 678 menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_InvertSelection)); 679 679 menu.addSeparator(); 680 menu.addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Guest_ShowProperties));680 menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_ShowProperties)); 681 681 menu.exec(pWidget->mapToGlobal(point)); 682 682 } 683 683 684 void UI GuestFileTable::setPasteActionEnabled(bool fEnabled)685 { 686 m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Guest_Paste)->setEnabled(fEnabled);687 } 688 689 void UI GuestFileTable::pasteCutCopiedObjects()684 void UIFileManagerGuestTable::setPasteActionEnabled(bool fEnabled) 685 { 686 m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_Paste)->setEnabled(fEnabled); 687 } 688 689 void UIFileManagerGuestTable::pasteCutCopiedObjects() 690 690 { 691 691 /** Wait until we have a API function that would take multiple source objects … … 701 701 702 702 703 void UI GuestFileTable::prepareActionConnections()704 { 705 connect(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Guest_GoUp), &QAction::triggered,706 this, &UI GuestControlFileTable::sltGoUp);707 connect(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Guest_GoHome), &QAction::triggered,708 this, &UI GuestControlFileTable::sltGoHome);709 connect(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Guest_Refresh), &QAction::triggered,710 this, &UI GuestControlFileTable::sltRefresh);711 connect(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Guest_Delete), &QAction::triggered,712 this, &UI GuestControlFileTable::sltDelete);713 connect(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Guest_Rename), &QAction::triggered,714 this, &UI GuestControlFileTable::sltRename);715 connect(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Guest_Copy), &QAction::triggered,716 this, &UI GuestControlFileTable::sltCopy);717 connect(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Guest_Cut), &QAction::triggered,718 this, &UI GuestControlFileTable::sltCut);719 connect(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Guest_Paste), &QAction::triggered,720 this, &UI GuestControlFileTable::sltPaste);721 connect(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Guest_SelectAll), &QAction::triggered,722 this, &UI GuestControlFileTable::sltSelectAll);723 connect(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Guest_InvertSelection), &QAction::triggered,724 this, &UI GuestControlFileTable::sltInvertSelection);725 connect(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Guest_ShowProperties), &QAction::triggered,726 this, &UI GuestControlFileTable::sltShowProperties);727 connect(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Guest_CreateNewDirectory), &QAction::triggered,728 this, &UI GuestControlFileTable::sltCreateNewDirectory);729 } 730 731 bool UI GuestFileTable::checkGuestSession()703 void UIFileManagerGuestTable::prepareActionConnections() 704 { 705 connect(m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_GoUp), &QAction::triggered, 706 this, &UIFileManagerTable::sltGoUp); 707 connect(m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_GoHome), &QAction::triggered, 708 this, &UIFileManagerTable::sltGoHome); 709 connect(m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_Refresh), &QAction::triggered, 710 this, &UIFileManagerTable::sltRefresh); 711 connect(m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_Delete), &QAction::triggered, 712 this, &UIFileManagerTable::sltDelete); 713 connect(m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_Rename), &QAction::triggered, 714 this, &UIFileManagerTable::sltRename); 715 connect(m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_Copy), &QAction::triggered, 716 this, &UIFileManagerTable::sltCopy); 717 connect(m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_Cut), &QAction::triggered, 718 this, &UIFileManagerTable::sltCut); 719 connect(m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_Paste), &QAction::triggered, 720 this, &UIFileManagerTable::sltPaste); 721 connect(m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_SelectAll), &QAction::triggered, 722 this, &UIFileManagerTable::sltSelectAll); 723 connect(m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_InvertSelection), &QAction::triggered, 724 this, &UIFileManagerTable::sltInvertSelection); 725 connect(m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_ShowProperties), &QAction::triggered, 726 this, &UIFileManagerTable::sltShowProperties); 727 connect(m_pActionPool->action(UIActionIndex_M_FileManager_S_Guest_CreateNewDirectory), &QAction::triggered, 728 this, &UIFileManagerTable::sltCreateNewDirectory); 729 } 730 731 bool UIFileManagerGuestTable::checkGuestSession() 732 732 { 733 733 if (!m_comGuestSession.isOk()) … … 739 739 } 740 740 741 QString UI GuestFileTable::permissionString(const CFsObjInfo &fsInfo)741 QString UIFileManagerGuestTable::permissionString(const CFsObjInfo &fsInfo) 742 742 { 743 743 /* Attributes: */ … … 753 753 } 754 754 755 #include "UI GuestFileTable.moc"755 #include "UIFileManagerGuestTable.moc" -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerGuestTable.h
r76176 r76177 1 1 /* $Id$ */ 2 2 /** @file 3 * VBox Qt GUI - UI GuestFileTable class declaration.3 * VBox Qt GUI - UIFileManagerGuestTable class declaration. 4 4 */ 5 5 … … 27 27 28 28 /* GUI includes: */ 29 #include "UI GuestControlFileTable.h"29 #include "UIFileManagerTable.h" 30 30 31 31 /* Forward declarations: */ … … 34 34 /** This class scans the guest file system by using the VBox Guest Control API 35 35 * and populates the UIGuestControlFileModel*/ 36 class UI GuestFileTable : public UIGuestControlFileTable36 class UIFileManagerGuestTable : public UIFileManagerTable 37 37 { 38 38 Q_OBJECT; … … 40 40 public: 41 41 42 UI GuestFileTable(UIActionPool *pActionPool, QWidget *pParent = 0);42 UIFileManagerGuestTable(UIActionPool *pActionPool, QWidget *pParent = 0); 43 43 void initGuestFileTable(const CGuestSession &session); 44 44 void copyGuestToHost(const QString& hostDestinationPath); … … 82 82 }; 83 83 84 #endif /* !___UI GuestFileTable_h___ */84 #endif /* !___UIFileManagerGuestTable_h___ */ -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerHostTable.cpp
r76176 r76177 1 1 /* $Id$ */ 2 2 /** @file 3 * VBox Qt GUI - UI GuestControlFileTable class implementation.3 * VBox Qt GUI - UIFileManagerHostTable class implementation. 4 4 */ 5 5 … … 28 28 # include "QILabel.h" 29 29 # include "UIActionPool.h" 30 # include "UI GuestControlFileManager.h"31 # include "UI GuestControlFileModel.h"32 # include "UI HostFileTable.h"30 # include "UIFileManager.h" 31 # include "UIFileManagerModel.h" 32 # include "UIFileManagerHostTable.h" 33 33 # include "UIToolBar.h" 34 34 … … 105 105 const QFileInfo &entryInfo = entryList.at(i); 106 106 if (entryInfo.baseName().isEmpty() || entryInfo.baseName() == "." || 107 entryInfo.baseName() == UI GuestControlFileModel::strUpDirectoryString)107 entryInfo.baseName() == UIFileManagerModel::strUpDirectoryString) 108 108 continue; 109 109 statistics.m_totalSize += entryInfo.size(); … … 123 123 124 124 /********************************************************************************************************************************* 125 * UI HostFileTable implementation.*125 * UIFileManagerHostTable implementation. * 126 126 *********************************************************************************************************************************/ 127 127 128 UI HostFileTable::UIHostFileTable(UIActionPool *pActionPool, QWidget *pParent /* = 0 */)129 :UI GuestControlFileTable(pActionPool, pParent)128 UIFileManagerHostTable::UIFileManagerHostTable(UIActionPool *pActionPool, QWidget *pParent /* = 0 */) 129 :UIFileManagerTable(pActionPool, pParent) 130 130 { 131 131 initializeFileTree(); … … 135 135 } 136 136 137 void UI HostFileTable::retranslateUi()137 void UIFileManagerHostTable::retranslateUi() 138 138 { 139 139 if (m_pLocationLabel) 140 m_pLocationLabel->setText(UI GuestControlFileManager::tr("Host System"));141 UI GuestControlFileTable::retranslateUi();142 } 143 144 void UI HostFileTable::prepareToolbar()140 m_pLocationLabel->setText(UIFileManager::tr("Host System")); 141 UIFileManagerTable::retranslateUi(); 142 } 143 144 void UIFileManagerHostTable::prepareToolbar() 145 145 { 146 146 if (m_pToolBar && m_pActionPool) 147 147 { 148 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Host_GoUp));149 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Host_GoHome));150 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Host_Refresh));148 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_GoUp)); 149 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_GoHome)); 150 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Refresh)); 151 151 m_pToolBar->addSeparator(); 152 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Host_Delete));153 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Host_Rename));154 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Host_CreateNewDirectory));152 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Delete)); 153 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Rename)); 154 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_CreateNewDirectory)); 155 155 /* Hide cut, copy, and paste for now. We will implement those 156 156 when we have an API for host file operations: */ 157 157 // m_pToolBar->addSeparator(); 158 // m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Host_Copy));159 // m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Host_Cut));160 // m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Host_Paste));158 // m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Copy)); 159 // m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Cut)); 160 // m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Paste)); 161 161 m_pToolBar->addSeparator(); 162 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Host_SelectAll));163 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Host_InvertSelection));162 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_SelectAll)); 163 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_InvertSelection)); 164 164 m_pToolBar->addSeparator(); 165 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Host_ShowProperties));166 167 m_selectionDependentActions.insert(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Host_Delete));168 m_selectionDependentActions.insert(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Host_Rename));169 m_selectionDependentActions.insert(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Host_ShowProperties));165 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_ShowProperties)); 166 167 m_selectionDependentActions.insert(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Delete)); 168 m_selectionDependentActions.insert(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Rename)); 169 m_selectionDependentActions.insert(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_ShowProperties)); 170 170 } 171 171 … … 173 173 } 174 174 175 void UI HostFileTable::createFileViewContextMenu(const QWidget *pWidget, const QPoint &point)175 void UIFileManagerHostTable::createFileViewContextMenu(const QWidget *pWidget, const QPoint &point) 176 176 { 177 177 if (!pWidget) … … 179 179 180 180 QMenu menu; 181 menu.addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Host_GoUp));182 183 menu.addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Host_GoHome));184 menu.addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Host_Refresh));181 menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_GoUp)); 182 183 menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_GoHome)); 184 menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Refresh)); 185 185 menu.addSeparator(); 186 menu.addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Host_Delete));187 menu.addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Host_Rename));188 menu.addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Host_CreateNewDirectory));186 menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Delete)); 187 menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Rename)); 188 menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_CreateNewDirectory)); 189 189 /* Hide cut, copy, and paste for now. We will implement those 190 190 when we have an API for host file operations: */ 191 191 // menu.addSeparator(); 192 // menu.addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Host_Copy));193 // menu.addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Host_Cut));194 // menu.addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Host_Paste));192 // menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Copy)); 193 // menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Cut)); 194 // menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Paste)); 195 195 menu.addSeparator(); 196 menu.addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Host_SelectAll));197 menu.addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Host_InvertSelection));196 menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_SelectAll)); 197 menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_InvertSelection)); 198 198 menu.addSeparator(); 199 menu.addAction(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Host_ShowProperties));199 menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_ShowProperties)); 200 200 menu.exec(pWidget->mapToGlobal(point)); 201 201 } 202 202 203 void UI HostFileTable::readDirectory(const QString& strPath, UIFileTableItem *parent, bool isStartDir /*= false*/)203 void UIFileManagerHostTable::readDirectory(const QString& strPath, UIFileTableItem *parent, bool isStartDir /*= false*/) 204 204 { 205 205 if (!parent) … … 249 249 } 250 250 251 void UI HostFileTable::deleteByItem(UIFileTableItem *item)251 void UIFileManagerHostTable::deleteByItem(UIFileTableItem *item) 252 252 { 253 253 if (item->isUpDirectory()) … … 271 271 } 272 272 273 void UI HostFileTable::deleteByPath(const QStringList &pathList)273 void UIFileManagerHostTable::deleteByPath(const QStringList &pathList) 274 274 { 275 275 foreach (const QString &strPath, pathList) … … 292 292 } 293 293 294 void UI HostFileTable::goToHomeDirectory()294 void UIFileManagerHostTable::goToHomeDirectory() 295 295 { 296 296 if (!m_pRootItem || m_pRootItem->childCount() <= 0) … … 304 304 } 305 305 306 bool UI HostFileTable::renameItem(UIFileTableItem *item, QString newBaseName)306 bool UIFileManagerHostTable::renameItem(UIFileTableItem *item, QString newBaseName) 307 307 { 308 308 if (!item || item->isUpDirectory() || newBaseName.isEmpty()) … … 318 318 } 319 319 320 bool UI HostFileTable::createDirectory(const QString &path, const QString &directoryName)320 bool UIFileManagerHostTable::createDirectory(const QString &path, const QString &directoryName) 321 321 { 322 322 QDir parentDir(path); … … 330 330 } 331 331 332 FileObjectType UI HostFileTable::fileType(const QFileInfo &fsInfo)332 FileObjectType UIFileManagerHostTable::fileType(const QFileInfo &fsInfo) 333 333 { 334 334 if (!fsInfo.exists()) … … 346 346 } 347 347 348 QString UI HostFileTable::fsObjectPropertyString()348 QString UIFileManagerHostTable::fsObjectPropertyString() 349 349 { 350 350 QStringList selectedObjects = selectedItemPathList(); … … 360 360 QStringList propertyStringList; 361 361 /* Name: */ 362 propertyStringList << UI GuestControlFileManager::tr("<b>Name:</b> %1<br/>").arg(fileInfo.fileName());362 propertyStringList << UIFileManager::tr("<b>Name:</b> %1<br/>").arg(fileInfo.fileName()); 363 363 /* Size: */ 364 propertyStringList << UI GuestControlFileManager::tr("<b>Size:</b> %1 bytes").arg(QString::number(fileInfo.size()));364 propertyStringList << UIFileManager::tr("<b>Size:</b> %1 bytes").arg(QString::number(fileInfo.size())); 365 365 if (fileInfo.size() >= m_iKiloByte) 366 366 propertyStringList << QString(" (%1)").arg(humanReadableSize(fileInfo.size())); 367 367 propertyStringList << "<br/>"; 368 368 /* Type: */ 369 propertyStringList << UI GuestControlFileManager::tr("<b>Type:</b> %1<br/>").arg(fileTypeString(fileType(fileInfo)));369 propertyStringList << UIFileManager::tr("<b>Type:</b> %1<br/>").arg(fileTypeString(fileType(fileInfo))); 370 370 /* Creation Date: */ 371 propertyStringList << UI GuestControlFileManager::tr("<b>Created:</b> %1<br/>").arg(fileInfo.created().toString());371 propertyStringList << UIFileManager::tr("<b>Created:</b> %1<br/>").arg(fileInfo.created().toString()); 372 372 /* Last Modification Date: */ 373 propertyStringList << UI GuestControlFileManager::tr("<b>Modified:</b> %1<br/>").arg(fileInfo.lastModified().toString());373 propertyStringList << UIFileManager::tr("<b>Modified:</b> %1<br/>").arg(fileInfo.lastModified().toString()); 374 374 /* Owner: */ 375 propertyStringList << UI GuestControlFileManager::tr("<b>Owner:</b> %1").arg(fileInfo.owner());375 propertyStringList << UIFileManager::tr("<b>Owner:</b> %1").arg(fileInfo.owner()); 376 376 377 377 return propertyStringList.join(QString());; … … 394 394 } 395 395 QStringList propertyStringList; 396 propertyStringList << UI GuestControlFileManager::tr("<b>Selected:</b> %1 files and %2 directories<br/>").396 propertyStringList << UIFileManager::tr("<b>Selected:</b> %1 files and %2 directories<br/>"). 397 397 arg(QString::number(fileCount)).arg(QString::number(directoryCount)); 398 propertyStringList << UI GuestControlFileManager::tr("<b>Size:</b> %1 bytes").arg(QString::number(totalSize));398 propertyStringList << UIFileManager::tr("<b>Size:</b> %1 bytes").arg(QString::number(totalSize)); 399 399 if (totalSize >= m_iKiloByte) 400 400 propertyStringList << QString(" (%1)").arg(humanReadableSize(totalSize)); … … 403 403 } 404 404 405 void UI HostFileTable::showProperties()405 void UIFileManagerHostTable::showProperties() 406 406 { 407 407 qRegisterMetaType<UIDirectoryStatistics>(); … … 424 424 { 425 425 connect(directoryThread, &UIHostDirectoryDiskUsageComputer::sigResultUpdated, 426 this, &UI HostFileTable::sltReceiveDirectoryStatistics/*, Qt::DirectConnection*/);426 this, &UIFileManagerHostTable::sltReceiveDirectoryStatistics/*, Qt::DirectConnection*/); 427 427 directoryThread->start(); 428 428 } … … 436 436 directoryThread->stopRecursion(); 437 437 disconnect(directoryThread, &UIHostDirectoryDiskUsageComputer::sigResultUpdated, 438 this, &UI HostFileTable::sltReceiveDirectoryStatistics/*, Qt::DirectConnection*/);438 this, &UIFileManagerHostTable::sltReceiveDirectoryStatistics/*, Qt::DirectConnection*/); 439 439 directoryThread->wait(); 440 440 } 441 441 } 442 442 443 void UI HostFileTable::determineDriveLetters()443 void UIFileManagerHostTable::determineDriveLetters() 444 444 { 445 445 QFileInfoList drive = QDir::drives(); … … 453 453 } 454 454 455 QString UI HostFileTable::permissionString(QFileDevice::Permissions permissions)455 QString UIFileManagerHostTable::permissionString(QFileDevice::Permissions permissions) 456 456 { 457 457 QString strPermissions; … … 503 503 } 504 504 505 void UI HostFileTable::prepareActionConnections()506 { 507 connect(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Host_GoUp), &QAction::triggered,508 this, &UI GuestControlFileTable::sltGoUp);509 connect(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Host_GoHome), &QAction::triggered,510 this, &UI GuestControlFileTable::sltGoHome);511 connect(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Host_Refresh), &QAction::triggered,512 this, &UI GuestControlFileTable::sltRefresh);513 connect(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Host_Delete), &QAction::triggered,514 this, &UI GuestControlFileTable::sltDelete);515 connect(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Host_Rename), &QAction::triggered,516 this, &UI GuestControlFileTable::sltRename);517 connect(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Host_Copy), &QAction::triggered,518 this, &UI GuestControlFileTable::sltCopy);519 connect(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Host_Cut), &QAction::triggered,520 this, &UI GuestControlFileTable::sltCut);521 connect(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Host_Paste), &QAction::triggered,522 this, &UI GuestControlFileTable::sltPaste);523 connect(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Host_SelectAll), &QAction::triggered,524 this, &UI GuestControlFileTable::sltSelectAll);525 connect(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Host_InvertSelection), &QAction::triggered,526 this, &UI GuestControlFileTable::sltInvertSelection);527 connect(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Host_ShowProperties), &QAction::triggered,528 this, &UI GuestControlFileTable::sltShowProperties);529 connect(m_pActionPool->action(UIActionIndex_M_ GuestControlFileManager_S_Host_CreateNewDirectory), &QAction::triggered,530 this, &UI GuestControlFileTable::sltCreateNewDirectory);531 } 532 533 #include "UI HostFileTable.moc"505 void UIFileManagerHostTable::prepareActionConnections() 506 { 507 connect(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_GoUp), &QAction::triggered, 508 this, &UIFileManagerTable::sltGoUp); 509 connect(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_GoHome), &QAction::triggered, 510 this, &UIFileManagerTable::sltGoHome); 511 connect(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Refresh), &QAction::triggered, 512 this, &UIFileManagerTable::sltRefresh); 513 connect(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Delete), &QAction::triggered, 514 this, &UIFileManagerTable::sltDelete); 515 connect(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Rename), &QAction::triggered, 516 this, &UIFileManagerTable::sltRename); 517 connect(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Copy), &QAction::triggered, 518 this, &UIFileManagerTable::sltCopy); 519 connect(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Cut), &QAction::triggered, 520 this, &UIFileManagerTable::sltCut); 521 connect(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Paste), &QAction::triggered, 522 this, &UIFileManagerTable::sltPaste); 523 connect(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_SelectAll), &QAction::triggered, 524 this, &UIFileManagerTable::sltSelectAll); 525 connect(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_InvertSelection), &QAction::triggered, 526 this, &UIFileManagerTable::sltInvertSelection); 527 connect(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_ShowProperties), &QAction::triggered, 528 this, &UIFileManagerTable::sltShowProperties); 529 connect(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_CreateNewDirectory), &QAction::triggered, 530 this, &UIFileManagerTable::sltCreateNewDirectory); 531 } 532 533 #include "UIFileManagerHostTable.moc" -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerHostTable.h
r76176 r76177 1 1 /* $Id$ */ 2 2 /** @file 3 * VBox Qt GUI - UI HostFileTable class declaration.3 * VBox Qt GUI - UIFileManagerHostTable class declaration. 4 4 */ 5 5 … … 16 16 */ 17 17 18 #ifndef ___UI HostFileTable_h___19 #define ___UI HostFileTable_h___18 #ifndef ___UIFileManagerHostTable_h___ 19 #define ___UIFileManagerHostTable_h___ 20 20 21 21 /* GUI includes: */ 22 #include "UI GuestControlFileTable.h"22 #include "UIFileManagerTable.h" 23 23 24 24 /* Forward declarations: */ … … 26 26 27 27 /** This class scans the host file system by using the Qt API 28 and connects to the UI GuestControlFileModel*/29 class UI HostFileTable : public UIGuestControlFileTable28 and connects to the UIFileManagerModel*/ 29 class UIFileManagerHostTable : public UIFileManagerTable 30 30 { 31 31 Q_OBJECT; … … 33 33 public: 34 34 35 UI HostFileTable(UIActionPool *pActionPool, QWidget *pParent = 0);35 UIFileManagerHostTable(UIActionPool *pActionPool, QWidget *pParent = 0); 36 36 37 37 protected: … … 64 64 }; 65 65 66 #endif /* !___UI HostFileTable_h___ */66 #endif /* !___UIFileManagerHostTable_h___ */ -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerLogPanel.cpp
r76176 r76177 30 30 # include "QIToolButton.h" 31 31 # include "UIIconPool.h" 32 # include "UI GuestControlFileManager.h"33 # include "UI GuestControlFileManagerLogPanel.h"32 # include "UIFileManager.h" 33 # include "UIFileManagerLogPanel.h" 34 34 35 35 #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */ … … 73 73 QMenu *menu = createStandardContextMenu(); 74 74 75 QAction *pClearAction = menu->addAction(UI GuestControlFileManager::tr("Clear"));75 QAction *pClearAction = menu->addAction(UIFileManager::tr("Clear")); 76 76 connect(pClearAction, &QAction::triggered, this, &UIFileManagerLogViewer::sltClear); 77 77 menu->exec(event->globalPos()); … … 86 86 87 87 /********************************************************************************************************************************* 88 * UI GuestControlFileManagerLogPanel implementation. *88 * UIFileManagerLogPanel implementation. * 89 89 *********************************************************************************************************************************/ 90 90 91 UI GuestControlFileManagerLogPanel::UIGuestControlFileManagerLogPanel(UIGuestControlFileManager *pManagerWidget, QWidget *pParent)92 : UI GuestControlFileManagerPanel(pManagerWidget, pParent)91 UIFileManagerLogPanel::UIFileManagerLogPanel(UIFileManager *pManagerWidget, QWidget *pParent) 92 : UIFileManagerPanel(pManagerWidget, pParent) 93 93 , m_pLogTextEdit(0) 94 94 { … … 96 96 } 97 97 98 void UI GuestControlFileManagerLogPanel::appendLog(const QString &strLog, FileManagerLogType eLogType)98 void UIFileManagerLogPanel::appendLog(const QString &strLog, FileManagerLogType eLogType) 99 99 { 100 100 if (!m_pLogTextEdit) … … 109 109 } 110 110 111 QString UI GuestControlFileManagerLogPanel::panelName() const111 QString UIFileManagerLogPanel::panelName() const 112 112 { 113 113 return "LogPanel"; 114 114 } 115 115 116 void UI GuestControlFileManagerLogPanel::prepareWidgets()116 void UIFileManagerLogPanel::prepareWidgets() 117 117 { 118 118 if (!mainLayout()) … … 125 125 } 126 126 127 void UI GuestControlFileManagerLogPanel::prepareConnections()127 void UIFileManagerLogPanel::prepareConnections() 128 128 { 129 129 } 130 130 131 void UI GuestControlFileManagerLogPanel::retranslateUi()131 void UIFileManagerLogPanel::retranslateUi() 132 132 { 133 UI GuestControlFileManagerPanel::retranslateUi();133 UIFileManagerPanel::retranslateUi(); 134 134 135 135 } 136 136 137 137 138 #include "UI GuestControlFileManagerLogPanel.moc"138 #include "UIFileManagerLogPanel.moc" -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerLogPanel.h
r76176 r76177 16 16 */ 17 17 18 #ifndef ___UI GuestControlFileManagerLogPanel_h___19 #define ___UI GuestControlFileManagerLogPanel_h___18 #ifndef ___UIFileManagerLogPanel_h___ 19 #define ___UIFileManagerLogPanel_h___ 20 20 21 21 /* GUI includes: */ 22 22 #include "UIGuestControlDefs.h" 23 #include "UI GuestControlFileManagerPanel.h"23 #include "UIFileManagerPanel.h" 24 24 25 25 /* Forward declarations: */ 26 26 class QTextEdit; 27 class UI GuestControlFileManager;27 class UIFileManager; 28 28 29 /** UI GuestControlFileManagerPanel extension to display file manager logs. */30 class UI GuestControlFileManagerLogPanel : public UIGuestControlFileManagerPanel29 /** UIFileManagerPanel extension to display file manager logs. */ 30 class UIFileManagerLogPanel : public UIFileManagerPanel 31 31 { 32 32 Q_OBJECT; … … 34 34 public: 35 35 36 UI GuestControlFileManagerLogPanel(UIGuestControlFileManager *pManagerWidget, QWidget *pParent);36 UIFileManagerLogPanel(UIFileManager *pManagerWidget, QWidget *pParent); 37 37 void appendLog(const QString &str, FileManagerLogType); 38 38 virtual QString panelName() const /* override */; … … 54 54 }; 55 55 56 #endif /* !___UI GuestControlFileManagerLogPanel_h___ */56 #endif /* !___UIFileManagerLogPanel_h___ */ -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerModel.cpp
r76176 r76177 1 1 /* $Id$ */ 2 2 /** @file 3 * VBox Qt GUI - UI GuestControlFileModel class implementation.3 * VBox Qt GUI - UIFileManagerModel class implementation. 4 4 */ 5 5 … … 26 26 /* GUI includes: */ 27 27 # include "UIErrorString.h" 28 # include "UI GuestControlFileModel.h"29 # include "UI GuestControlFileTable.h"30 # include "UI GuestControlFileManager.h"28 # include "UIFileManagerModel.h" 29 # include "UIFileManagerTable.h" 30 # include "UIFileManager.h" 31 31 32 32 33 33 #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */ 34 34 35 const char* UI GuestControlFileModel::strUpDirectoryString = "..";35 const char* UIFileManagerModel::strUpDirectoryString = ".."; 36 36 37 37 UIGuestControlFileProxyModel::UIGuestControlFileProxyModel(QObject *parent /* = 0 */) … … 45 45 UIFileTableItem *pRightItem = static_cast<UIFileTableItem*>(right.internalPointer()); 46 46 47 UI GuestControlFileManagerOptions *pOptions = UIGuestControlFileManagerOptions::instance();47 UIFileManagerOptions *pOptions = UIFileManagerOptions::instance(); 48 48 49 49 if (pLeftItem && pRightItem) … … 64 64 65 65 /* If the sort column is QDateTime than handle it correctly: */ 66 if (sortColumn() == UI GuestControlFileModelColumn_ChangeTime)67 { 68 QVariant dataLeft = pLeftItem->data(UI GuestControlFileModelColumn_ChangeTime);69 QVariant dataRight = pRightItem->data(UI GuestControlFileModelColumn_ChangeTime);66 if (sortColumn() == UIFileManagerModelColumn_ChangeTime) 67 { 68 QVariant dataLeft = pLeftItem->data(UIFileManagerModelColumn_ChangeTime); 69 QVariant dataRight = pRightItem->data(UIFileManagerModelColumn_ChangeTime); 70 70 QDateTime leftDateTime = dataLeft.toDateTime(); 71 71 QDateTime rightDateTime = dataRight.toDateTime(); … … 73 73 } 74 74 /* When we show human readble sizes in size column sorting gets confused, so do it here: */ 75 else if(sortColumn() == UI GuestControlFileModelColumn_Size)76 { 77 qulonglong leftSize = pLeftItem->data(UI GuestControlFileModelColumn_Size).toULongLong();78 qulonglong rightSize = pRightItem->data(UI GuestControlFileModelColumn_Size).toULongLong();75 else if(sortColumn() == UIFileManagerModelColumn_Size) 76 { 77 qulonglong leftSize = pLeftItem->data(UIFileManagerModelColumn_Size).toULongLong(); 78 qulonglong rightSize = pRightItem->data(UIFileManagerModelColumn_Size).toULongLong(); 79 79 return (leftSize < rightSize); 80 80 … … 84 84 } 85 85 86 UI GuestControlFileModel::UIGuestControlFileModel(QObject *parent)86 UIFileManagerModel::UIFileManagerModel(QObject *parent) 87 87 : QAbstractItemModel(parent) 88 , m_pParent(qobject_cast<UI GuestControlFileTable*>(parent))89 { 90 } 91 92 UIFileTableItem* UI GuestControlFileModel::rootItem() const88 , m_pParent(qobject_cast<UIFileManagerTable*>(parent)) 89 { 90 } 91 92 UIFileTableItem* UIFileManagerModel::rootItem() const 93 93 { 94 94 if (!m_pParent) … … 97 97 } 98 98 99 UI GuestControlFileModel::~UIGuestControlFileModel()99 UIFileManagerModel::~UIFileManagerModel() 100 100 {} 101 101 102 int UI GuestControlFileModel::columnCount(const QModelIndex &parent) const102 int UIFileManagerModel::columnCount(const QModelIndex &parent) const 103 103 { 104 104 if (parent.isValid()) … … 113 113 } 114 114 115 bool UI GuestControlFileModel::setData(const QModelIndex &index, const QVariant &value, int role)115 bool UIFileManagerModel::setData(const QModelIndex &index, const QVariant &value, int role) 116 116 { 117 117 if (index.isValid() && role == Qt::EditRole) … … 138 138 } 139 139 140 QVariant UI GuestControlFileModel::data(const QModelIndex &index, int role) const140 QVariant UIFileManagerModel::data(const QModelIndex &index, int role) const 141 141 { 142 142 if (!index.isValid()) … … 149 149 { 150 150 /* dont show anything but the name for up directories: */ 151 if (item->isUpDirectory() && index.column() != UI GuestControlFileModelColumn_Name)151 if (item->isUpDirectory() && index.column() != UIFileManagerModelColumn_Name) 152 152 return QVariant(); 153 153 /* Format date/time column: */ … … 159 159 } 160 160 /* Decide whether to show human-readable file object sizes: */ 161 if (index.column() == UI GuestControlFileModelColumn_Size)162 { 163 UI GuestControlFileManagerOptions* pOptions =164 UI GuestControlFileManagerOptions::instance();161 if (index.column() == UIFileManagerModelColumn_Size) 162 { 163 UIFileManagerOptions* pOptions = 164 UIFileManagerOptions::instance(); 165 165 if (pOptions && pOptions->bShowHumanReadableSizes) 166 166 { 167 167 qulonglong size = item->data(index.column()).toULongLong(); 168 return UI GuestControlFileTable::humanReadableSize(size);168 return UIFileManagerTable::humanReadableSize(size); 169 169 } 170 170 else … … 199 199 } 200 200 201 Qt::ItemFlags UI GuestControlFileModel::flags(const QModelIndex &index) const201 Qt::ItemFlags UIFileManagerModel::flags(const QModelIndex &index) const 202 202 { 203 203 if (!index.isValid()) … … 212 212 } 213 213 214 QVariant UI GuestControlFileModel::headerData(int section, Qt::Orientation orientation,214 QVariant UIFileManagerModel::headerData(int section, Qt::Orientation orientation, 215 215 int role) const 216 216 { … … 225 225 } 226 226 227 QModelIndex UI GuestControlFileModel::index(UIFileTableItem* item)227 QModelIndex UIFileManagerModel::index(UIFileTableItem* item) 228 228 { 229 229 if (!item) … … 232 232 } 233 233 234 QModelIndex UI GuestControlFileModel::index(int row, int column, const QModelIndex &parent)234 QModelIndex UIFileManagerModel::index(int row, int column, const QModelIndex &parent) 235 235 const 236 236 { … … 255 255 256 256 257 QModelIndex UI GuestControlFileModel::parent(const QModelIndex &index) const257 QModelIndex UIFileManagerModel::parent(const QModelIndex &index) const 258 258 { 259 259 if (!index.isValid()) … … 269 269 } 270 270 271 int UI GuestControlFileModel::rowCount(const QModelIndex &parent) const271 int UIFileManagerModel::rowCount(const QModelIndex &parent) const 272 272 { 273 273 if (parent.column() > 0) … … 283 283 } 284 284 285 void UI GuestControlFileModel::signalUpdate()285 void UIFileManagerModel::signalUpdate() 286 286 { 287 287 emit layoutChanged(); 288 288 } 289 289 290 QModelIndex UI GuestControlFileModel::rootIndex() const290 QModelIndex UIFileManagerModel::rootIndex() const 291 291 { 292 292 if (!rootItem()) … … 296 296 } 297 297 298 void UI GuestControlFileModel::beginReset()298 void UIFileManagerModel::beginReset() 299 299 { 300 300 beginResetModel(); 301 301 } 302 302 303 void UI GuestControlFileModel::endReset()303 void UIFileManagerModel::endReset() 304 304 { 305 305 endResetModel(); -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerModel.h
r76176 r76177 1 1 /* $Id$ */ 2 2 /** @file 3 * VBox Qt GUI - UI GuestControlFileModel class declaration.3 * VBox Qt GUI - UIFileManagerModel class declaration. 4 4 */ 5 5 … … 16 16 */ 17 17 18 #ifndef ___UI GuestControlFileModel_h___19 #define ___UI GuestControlFileModel_h___18 #ifndef ___UIFileManagerModel_h___ 19 #define ___UIFileManagerModel_h___ 20 20 21 21 /* Qt includes: */ … … 28 28 /* Forward declarations: */ 29 29 class UIFileTableItem; 30 class UI GuestControlFileTable;30 class UIFileManagerTable; 31 31 32 enum UI GuestControlFileModelColumn32 enum UIFileManagerModelColumn 33 33 { 34 UI GuestControlFileModelColumn_Name = 0,35 UI GuestControlFileModelColumn_Size,36 UI GuestControlFileModelColumn_ChangeTime,37 UI GuestControlFileModelColumn_Owner,38 UI GuestControlFileModelColumn_Permissions,39 UI GuestControlFileModelColumn_Max34 UIFileManagerModelColumn_Name = 0, 35 UIFileManagerModelColumn_Size, 36 UIFileManagerModelColumn_ChangeTime, 37 UIFileManagerModelColumn_Owner, 38 UIFileManagerModelColumn_Permissions, 39 UIFileManagerModelColumn_Max 40 40 }; 41 41 … … 56 56 }; 57 57 58 /** UI GuestControlFileModel serves as the model for a file structure.58 /** UIFileManagerModel serves as the model for a file structure. 59 59 * it supports a tree level hierarchy which can be displayed with 60 60 * QTableView and/or QTreeView. Note the file structure data is not 61 61 * kept by the model but rather by the containing widget which also servers 62 62 * as the interface to functionality that this model provides.*/ 63 class UI GuestControlFileModel : public QAbstractItemModel63 class UIFileManagerModel : public QAbstractItemModel 64 64 { 65 65 … … 68 68 public: 69 69 70 explicit UI GuestControlFileModel(QObject *parent = 0);71 ~UI GuestControlFileModel();70 explicit UIFileManagerModel(QObject *parent = 0); 71 ~UIFileManagerModel(); 72 72 73 73 QVariant data(const QModelIndex &index, int role) const /* override */; … … 93 93 UIFileTableItem* rootItem() const; 94 94 void setupModelData(const QStringList &lines, UIFileTableItem *parent); 95 UI GuestControlFileTable*m_pParent;96 UIFileTableItem *m_pRootItem;95 UIFileManagerTable *m_pParent; 96 UIFileTableItem *m_pRootItem; 97 97 }; 98 98 99 99 100 #endif /* !___UI GuestControlFileModel_h___ */100 #endif /* !___UIFileManagerModel_h___ */ -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerOperationsPanel.cpp
r76176 r76177 36 36 # include "UIErrorString.h" 37 37 # include "UIIconPool.h" 38 # include "UI GuestControlFileManager.h"39 # include "UI GuestControlFileManagerOperationsPanel.h"38 # include "UIFileManager.h" 39 # include "UIFileManagerOperationsPanel.h" 40 40 # include "UIProgressEventHandler.h" 41 41 … … 153 153 { 154 154 if (m_pCancelButton) 155 m_pCancelButton->setToolTip(UI GuestControlFileManager::tr("Cancel"));155 m_pCancelButton->setToolTip(UIFileManager::tr("Cancel")); 156 156 157 157 switch (m_eStatus) 158 158 { 159 159 case OperationStatus_NotStarted: 160 m_pStatusLabel->setText(UI GuestControlFileManager::tr("Not yet started"));160 m_pStatusLabel->setText(UIFileManager::tr("Not yet started")); 161 161 break; 162 162 case OperationStatus_Working: 163 m_pStatusLabel->setText(UI GuestControlFileManager::tr("Working"));163 m_pStatusLabel->setText(UIFileManager::tr("Working")); 164 164 break; 165 165 case OperationStatus_Paused: 166 m_pStatusLabel->setText(UI GuestControlFileManager::tr("Paused"));166 m_pStatusLabel->setText(UIFileManager::tr("Paused")); 167 167 break; 168 168 case OperationStatus_Canceled: 169 m_pStatusLabel->setText(UI GuestControlFileManager::tr("Canceled"));169 m_pStatusLabel->setText(UIFileManager::tr("Canceled")); 170 170 break; 171 171 case OperationStatus_Succeded: 172 m_pStatusLabel->setText(UI GuestControlFileManager::tr("Succeded"));172 m_pStatusLabel->setText(UIFileManager::tr("Succeded")); 173 173 break; 174 174 case OperationStatus_Failed: 175 m_pStatusLabel->setText(UI GuestControlFileManager::tr("Failed"));175 m_pStatusLabel->setText(UIFileManager::tr("Failed")); 176 176 break; 177 177 case OperationStatus_Invalid: 178 178 case OperationStatus_Max: 179 179 default: 180 m_pStatusLabel->setText(UI GuestControlFileManager::tr("Invalid"));180 m_pStatusLabel->setText(UIFileManager::tr("Invalid")); 181 181 break; 182 182 } … … 312 312 313 313 /********************************************************************************************************************************* 314 * UI GuestControlFileManagerOperationsPanel implementation. *314 * UIFileManagerOperationsPanel implementation. * 315 315 *********************************************************************************************************************************/ 316 316 317 UI GuestControlFileManagerOperationsPanel::UIGuestControlFileManagerOperationsPanel(UIGuestControlFileManager *pManagerWidget,317 UIFileManagerOperationsPanel::UIFileManagerOperationsPanel(UIFileManager *pManagerWidget, 318 318 QWidget *pParent) 319 : UI GuestControlFileManagerPanel(pManagerWidget, pParent)319 : UIFileManagerPanel(pManagerWidget, pParent) 320 320 , m_pScrollArea(0) 321 321 , m_pContainerWidget(0) … … 327 327 } 328 328 329 void UI GuestControlFileManagerOperationsPanel::addNewProgress(const CProgress &comProgress)329 void UIFileManagerOperationsPanel::addNewProgress(const CProgress &comProgress) 330 330 { 331 331 if (!m_pContainerLayout) … … 339 339 340 340 connect(pOperationsWidget, &UIFileOperationProgressWidget::sigProgressComplete, 341 this, &UI GuestControlFileManagerOperationsPanel::sigFileOperationComplete);341 this, &UIFileManagerOperationsPanel::sigFileOperationComplete); 342 342 connect(pOperationsWidget, &UIFileOperationProgressWidget::sigProgressFail, 343 this, &UI GuestControlFileManagerOperationsPanel::sigFileOperationFail);343 this, &UIFileManagerOperationsPanel::sigFileOperationFail); 344 344 345 345 connect(pOperationsWidget, &UIFileOperationProgressWidget::sigFocusIn, 346 this, &UI GuestControlFileManagerOperationsPanel::sltHandleWidgetFocusIn);346 this, &UIFileManagerOperationsPanel::sltHandleWidgetFocusIn); 347 347 connect(pOperationsWidget, &UIFileOperationProgressWidget::sigFocusOut, 348 this, &UI GuestControlFileManagerOperationsPanel::sltHandleWidgetFocusOut);349 } 350 351 QString UI GuestControlFileManagerOperationsPanel::panelName() const348 this, &UIFileManagerOperationsPanel::sltHandleWidgetFocusOut); 349 } 350 351 QString UIFileManagerOperationsPanel::panelName() const 352 352 { 353 353 return "OperationsPanel"; 354 354 } 355 355 356 void UI GuestControlFileManagerOperationsPanel::prepareWidgets()356 void UIFileManagerOperationsPanel::prepareWidgets() 357 357 { 358 358 if (!mainLayout()) … … 368 368 QScrollBar *pVerticalScrollBar = m_pScrollArea->verticalScrollBar(); 369 369 if (pVerticalScrollBar) 370 QObject::connect(pVerticalScrollBar, &QScrollBar::rangeChanged, this, &UI GuestControlFileManagerOperationsPanel::sltScrollToBottom);370 QObject::connect(pVerticalScrollBar, &QScrollBar::rangeChanged, this, &UIFileManagerOperationsPanel::sltScrollToBottom); 371 371 372 372 m_pScrollArea->setBackgroundRole(QPalette::Window); … … 380 380 } 381 381 382 void UI GuestControlFileManagerOperationsPanel::prepareConnections()383 { 384 385 } 386 387 void UI GuestControlFileManagerOperationsPanel::retranslateUi()388 { 389 UI GuestControlFileManagerPanel::retranslateUi();390 } 391 392 void UI GuestControlFileManagerOperationsPanel::contextMenuEvent(QContextMenuEvent *pEvent)382 void UIFileManagerOperationsPanel::prepareConnections() 383 { 384 385 } 386 387 void UIFileManagerOperationsPanel::retranslateUi() 388 { 389 UIFileManagerPanel::retranslateUi(); 390 } 391 392 void UIFileManagerOperationsPanel::contextMenuEvent(QContextMenuEvent *pEvent) 393 393 { 394 394 QMenu *menu = new QMenu(this); … … 396 396 if (m_pWidgetInFocus) 397 397 { 398 QAction *pRemoveSelected = menu->addAction(UI GuestControlFileManager::tr("Remove Selected"));398 QAction *pRemoveSelected = menu->addAction(UIFileManager::tr("Remove Selected")); 399 399 connect(pRemoveSelected, &QAction::triggered, 400 this, &UI GuestControlFileManagerOperationsPanel::sltRemoveSelected);401 } 402 403 QAction *pRemoveFinished = menu->addAction(UI GuestControlFileManager::tr("Remove Finished"));404 QAction *pRemoveAll = menu->addAction(UI GuestControlFileManager::tr("Remove All"));400 this, &UIFileManagerOperationsPanel::sltRemoveSelected); 401 } 402 403 QAction *pRemoveFinished = menu->addAction(UIFileManager::tr("Remove Finished")); 404 QAction *pRemoveAll = menu->addAction(UIFileManager::tr("Remove All")); 405 405 406 406 connect(pRemoveFinished, &QAction::triggered, 407 this, &UI GuestControlFileManagerOperationsPanel::sltRemoveFinished);407 this, &UIFileManagerOperationsPanel::sltRemoveFinished); 408 408 connect(pRemoveAll, &QAction::triggered, 409 this, &UI GuestControlFileManagerOperationsPanel::sltRemoveAll);409 this, &UIFileManagerOperationsPanel::sltRemoveAll); 410 410 411 411 menu->exec(pEvent->globalPos()); … … 413 413 } 414 414 415 void UI GuestControlFileManagerOperationsPanel::sltRemoveFinished()415 void UIFileManagerOperationsPanel::sltRemoveFinished() 416 416 { 417 417 QList<UIFileOperationProgressWidget*> widgetsToRemove; … … 429 429 } 430 430 431 void UI GuestControlFileManagerOperationsPanel::sltRemoveAll()431 void UIFileManagerOperationsPanel::sltRemoveAll() 432 432 { 433 433 foreach (QWidget *pWidget, m_widgetSet) … … 441 441 } 442 442 443 void UI GuestControlFileManagerOperationsPanel::sltRemoveSelected()443 void UIFileManagerOperationsPanel::sltRemoveSelected() 444 444 { 445 445 if (!m_pWidgetInFocus) … … 449 449 } 450 450 451 void UI GuestControlFileManagerOperationsPanel::sltHandleWidgetFocusIn(QWidget *pWidget)451 void UIFileManagerOperationsPanel::sltHandleWidgetFocusIn(QWidget *pWidget) 452 452 { 453 453 if (!pWidget) … … 456 456 } 457 457 458 void UI GuestControlFileManagerOperationsPanel::sltHandleWidgetFocusOut(QWidget *pWidget)458 void UIFileManagerOperationsPanel::sltHandleWidgetFocusOut(QWidget *pWidget) 459 459 { 460 460 if (!pWidget) … … 463 463 } 464 464 465 void UI GuestControlFileManagerOperationsPanel::sltScrollToBottom(int iMin, int iMax)465 void UIFileManagerOperationsPanel::sltScrollToBottom(int iMin, int iMax) 466 466 { 467 467 Q_UNUSED(iMin); … … 470 470 } 471 471 472 #include "UI GuestControlFileManagerOperationsPanel.moc"472 #include "UIFileManagerOperationsPanel.moc" -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerOperationsPanel.h
r76176 r76177 16 16 */ 17 17 18 #ifndef ___UI GuestControlFileManagerOperationsPanel_h___19 #define ___UI GuestControlFileManagerOperationsPanel_h___18 #ifndef ___UIFileManagerOperationsPanel_h___ 19 #define ___UIFileManagerOperationsPanel_h___ 20 20 21 21 /* Qt includes: */ … … 24 24 /* GUI includes: */ 25 25 #include "UIGuestControlDefs.h" 26 #include "UI GuestControlFileManagerPanel.h"26 #include "UIFileManagerPanel.h" 27 27 28 28 /* Forward declarations: */ … … 34 34 class UIFileOperationModel; 35 35 class UIFileOperationProgressWidget; 36 class UI GuestControlFileManager;36 class UIFileManager; 37 37 38 38 39 39 /** UIVMLogViewerPanel extension hosting a QListWidget which in turn has a special QWidget extension 40 40 * to manage multiple CProgress instances. This is particulary used in monitoring file operations. */ 41 class UI GuestControlFileManagerOperationsPanel : public UIGuestControlFileManagerPanel41 class UIFileManagerOperationsPanel : public UIFileManagerPanel 42 42 { 43 43 Q_OBJECT; … … 50 50 public: 51 51 52 UI GuestControlFileManagerOperationsPanel(UIGuestControlFileManager *pManagerWidget, QWidget *pParent);52 UIFileManagerOperationsPanel(UIFileManager *pManagerWidget, QWidget *pParent); 53 53 virtual QString panelName() const /* override */; 54 54 void addNewProgress(const CProgress &comProgress); … … 92 92 }; 93 93 94 #endif /* !___UI GuestControlFileManagerOperationsPanel_h___ */94 #endif /* !___UIFileManagerOperationsPanel_h___ */ -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerOptionsPanel.cpp
r76176 r76177 32 32 # include "QIToolButton.h" 33 33 # include "UIIconPool.h" 34 # include "UI GuestControlFileManager.h"35 # include "UI GuestControlFileManagerOptionsPanel.h"34 # include "UIFileManager.h" 35 # include "UIFileManagerOptionsPanel.h" 36 36 37 37 #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */ 38 38 39 UI GuestControlFileManagerOptionsPanel::UIGuestControlFileManagerOptionsPanel(UIGuestControlFileManager *pManagerWidget,40 QWidget *pParent, UI GuestControlFileManagerOptions *pFileManagerOptions)41 : UI GuestControlFileManagerPanel(pManagerWidget, pParent)39 UIFileManagerOptionsPanel::UIFileManagerOptionsPanel(UIFileManager *pManagerWidget, 40 QWidget *pParent, UIFileManagerOptions *pFileManagerOptions) 41 : UIFileManagerPanel(pManagerWidget, pParent) 42 42 , m_pListDirectoriesOnTopCheckBox(0) 43 43 , m_pDeleteConfirmationCheckBox(0) … … 48 48 } 49 49 50 QString UI GuestControlFileManagerOptionsPanel::panelName() const50 QString UIFileManagerOptionsPanel::panelName() const 51 51 { 52 52 return "OptionsPanel"; 53 53 } 54 54 55 void UI GuestControlFileManagerOptionsPanel::update()55 void UIFileManagerOptionsPanel::update() 56 56 { 57 57 if (!m_pFileManagerOptions) … … 80 80 } 81 81 82 void UI GuestControlFileManagerOptionsPanel::prepareWidgets()82 void UIFileManagerOptionsPanel::prepareWidgets() 83 83 { 84 84 if (!mainLayout()) … … 116 116 } 117 117 118 void UI GuestControlFileManagerOptionsPanel::sltListDirectoryCheckBoxToogled(bool bChecked)118 void UIFileManagerOptionsPanel::sltListDirectoryCheckBoxToogled(bool bChecked) 119 119 { 120 120 if (!m_pFileManagerOptions) … … 124 124 } 125 125 126 void UI GuestControlFileManagerOptionsPanel::sltDeleteConfirmationCheckBoxToogled(bool bChecked)126 void UIFileManagerOptionsPanel::sltDeleteConfirmationCheckBoxToogled(bool bChecked) 127 127 { 128 128 if (!m_pFileManagerOptions) … … 132 132 } 133 133 134 void UI GuestControlFileManagerOptionsPanel::sltHumanReabableSizesCheckBoxToogled(bool bChecked)134 void UIFileManagerOptionsPanel::sltHumanReabableSizesCheckBoxToogled(bool bChecked) 135 135 { 136 136 if (!m_pFileManagerOptions) … … 140 140 } 141 141 142 void UI GuestControlFileManagerOptionsPanel::prepareConnections()142 void UIFileManagerOptionsPanel::prepareConnections() 143 143 { 144 144 if (m_pListDirectoriesOnTopCheckBox) 145 145 connect(m_pListDirectoriesOnTopCheckBox, &QCheckBox::toggled, 146 this, &UI GuestControlFileManagerOptionsPanel::sltListDirectoryCheckBoxToogled);146 this, &UIFileManagerOptionsPanel::sltListDirectoryCheckBoxToogled); 147 147 if (m_pDeleteConfirmationCheckBox) 148 148 connect(m_pDeleteConfirmationCheckBox, &QCheckBox::toggled, 149 this, &UI GuestControlFileManagerOptionsPanel::sltDeleteConfirmationCheckBoxToogled);149 this, &UIFileManagerOptionsPanel::sltDeleteConfirmationCheckBoxToogled); 150 150 if (m_pHumanReabableSizesCheckBox) 151 151 connect(m_pHumanReabableSizesCheckBox, &QCheckBox::toggled, 152 this, &UI GuestControlFileManagerOptionsPanel::sltHumanReabableSizesCheckBoxToogled);152 this, &UIFileManagerOptionsPanel::sltHumanReabableSizesCheckBoxToogled); 153 153 } 154 154 155 void UI GuestControlFileManagerOptionsPanel::retranslateUi()155 void UIFileManagerOptionsPanel::retranslateUi() 156 156 { 157 UI GuestControlFileManagerPanel::retranslateUi();157 UIFileManagerPanel::retranslateUi(); 158 158 if (m_pListDirectoriesOnTopCheckBox) 159 159 { 160 m_pListDirectoriesOnTopCheckBox->setText(UI GuestControlFileManager::tr("List directories on top"));161 m_pListDirectoriesOnTopCheckBox->setToolTip(UI GuestControlFileManager::tr("List directories before files"));160 m_pListDirectoriesOnTopCheckBox->setText(UIFileManager::tr("List directories on top")); 161 m_pListDirectoriesOnTopCheckBox->setToolTip(UIFileManager::tr("List directories before files")); 162 162 } 163 163 164 164 if (m_pDeleteConfirmationCheckBox) 165 165 { 166 m_pDeleteConfirmationCheckBox->setText(UI GuestControlFileManager::tr("Ask before delete"));167 m_pDeleteConfirmationCheckBox->setToolTip(UI GuestControlFileManager::tr("Show a confirmation dialog "166 m_pDeleteConfirmationCheckBox->setText(UIFileManager::tr("Ask before delete")); 167 m_pDeleteConfirmationCheckBox->setToolTip(UIFileManager::tr("Show a confirmation dialog " 168 168 "before deleting files and directories")); 169 169 } … … 171 171 if (m_pHumanReabableSizesCheckBox) 172 172 { 173 m_pHumanReabableSizesCheckBox->setText(UI GuestControlFileManager::tr("Human readable sizes"));174 m_pHumanReabableSizesCheckBox->setToolTip(UI GuestControlFileManager::tr("Show file/directory sizes in human "173 m_pHumanReabableSizesCheckBox->setText(UIFileManager::tr("Human readable sizes")); 174 m_pHumanReabableSizesCheckBox->setToolTip(UIFileManager::tr("Show file/directory sizes in human " 175 175 "readable format rather than in bytes")); 176 176 } -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerOptionsPanel.h
r76176 r76177 16 16 */ 17 17 18 #ifndef ___UI GuestControlFileManagerOptionsPanel_h___19 #define ___UI GuestControlFileManagerOptionsPanel_h___18 #ifndef ___UIFileManagerOptionsPanel_h___ 19 #define ___UIFileManagerOptionsPanel_h___ 20 20 21 21 /* GUI includes: */ 22 #include "UI GuestControlFileManagerPanel.h"22 #include "UIFileManagerPanel.h" 23 23 24 24 /* Forward declarations: */ … … 27 27 class QLabel; 28 28 class QIToolButton; 29 class UI GuestControlFileManagerOptions;29 class UIFileManagerOptions; 30 30 31 /** UI GuestControlFileManagerPanel extension to change file manager options. It directly32 * modifies the options through the passed UI GuestControlFileManagerOptions instance. */33 class UI GuestControlFileManagerOptionsPanel : public UIGuestControlFileManagerPanel31 /** UIFileManagerPanel extension to change file manager options. It directly 32 * modifies the options through the passed UIFileManagerOptions instance. */ 33 class UIFileManagerOptionsPanel : public UIFileManagerPanel 34 34 { 35 35 Q_OBJECT; … … 37 37 public: 38 38 39 UI GuestControlFileManagerOptionsPanel(UIGuestControlFileManager *pManagerWidget,40 QWidget *pParent, UI GuestControlFileManagerOptions *pFileManagerOptions);39 UIFileManagerOptionsPanel(UIFileManager *pManagerWidget, 40 QWidget *pParent, UIFileManagerOptions *pFileManagerOptions); 41 41 virtual QString panelName() const /* override */; 42 42 /** Reads the file manager options and updates the widget accordingly. This functions is typically called … … 67 67 QCheckBox *m_pDeleteConfirmationCheckBox; 68 68 QCheckBox *m_pHumanReabableSizesCheckBox; 69 UI GuestControlFileManagerOptions *m_pFileManagerOptions;69 UIFileManagerOptions *m_pFileManagerOptions; 70 70 }; 71 71 72 #endif /* !___UI GuestControlFileManagerOptionsPanel_h___ */72 #endif /* !___UIFileManagerOptionsPanel_h___ */ -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerPanel.cpp
r76176 r76177 31 31 # include "QIToolButton.h" 32 32 # include "UIIconPool.h" 33 # include "UI GuestControlFileManager.h"34 # include "UI GuestControlFileManagerPanel.h"33 # include "UIFileManager.h" 34 # include "UIFileManagerPanel.h" 35 35 # ifdef VBOX_WS_MAC 36 36 # include "VBoxUtils-darwin.h" … … 39 39 40 40 41 UI GuestControlFileManagerPanel::UIGuestControlFileManagerPanel(UIGuestControlFileManager *pManagerWidget, QWidget *pParent)41 UIFileManagerPanel::UIFileManagerPanel(UIFileManager *pManagerWidget, QWidget *pParent) 42 42 : QIWithRetranslateUI<QWidget>(pParent) 43 43 , m_pMainLayout(0) … … 48 48 } 49 49 50 void UI GuestControlFileManagerPanel::setCloseButtonShortCut(QKeySequence shortCut)50 void UIFileManagerPanel::setCloseButtonShortCut(QKeySequence shortCut) 51 51 { 52 52 if (!m_pCloseButton) … … 55 55 } 56 56 57 QHBoxLayout* UI GuestControlFileManagerPanel::mainLayout()57 QHBoxLayout* UIFileManagerPanel::mainLayout() 58 58 { 59 59 return m_pMainLayout; 60 60 } 61 61 62 void UI GuestControlFileManagerPanel::prepare()62 void UIFileManagerPanel::prepare() 63 63 { 64 64 prepareWidgets(); … … 67 67 } 68 68 69 void UI GuestControlFileManagerPanel::prepareWidgets()69 void UIFileManagerPanel::prepareWidgets() 70 70 { 71 71 m_pMainLayout = new QHBoxLayout(this); … … 90 90 } 91 91 92 void UI GuestControlFileManagerPanel::prepareConnections()92 void UIFileManagerPanel::prepareConnections() 93 93 { 94 94 if (m_pCloseButton) 95 connect(m_pCloseButton, &QIToolButton::clicked, this, &UI GuestControlFileManagerPanel::hide);95 connect(m_pCloseButton, &QIToolButton::clicked, this, &UIFileManagerPanel::hide); 96 96 } 97 97 98 void UI GuestControlFileManagerPanel::retranslateUi()98 void UIFileManagerPanel::retranslateUi() 99 99 { 100 100 if (m_pCloseButton) 101 m_pCloseButton->setToolTip(UI GuestControlFileManager::tr("Close the pane"));101 m_pCloseButton->setToolTip(UIFileManager::tr("Close the pane")); 102 102 } 103 103 104 bool UI GuestControlFileManagerPanel::eventFilter(QObject *pObject, QEvent *pEvent)104 bool UIFileManagerPanel::eventFilter(QObject *pObject, QEvent *pEvent) 105 105 { 106 106 Q_UNUSED(pObject); … … 110 110 } 111 111 112 void UI GuestControlFileManagerPanel::showEvent(QShowEvent *pEvent)112 void UIFileManagerPanel::showEvent(QShowEvent *pEvent) 113 113 { 114 114 QWidget::showEvent(pEvent); 115 115 } 116 116 117 void UI GuestControlFileManagerPanel::hideEvent(QHideEvent *pEvent)117 void UIFileManagerPanel::hideEvent(QHideEvent *pEvent) 118 118 { 119 119 /* Get focused widget: */ -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerPanel.h
r76176 r76177 16 16 */ 17 17 18 #ifndef ___UI GuestControlFileManagerPanel_h___19 #define ___UI GuestControlFileManagerPanel_h___18 #ifndef ___UIFileManagerPanel_h___ 19 #define ___UIFileManagerPanel_h___ 20 20 21 21 /* Qt includes: */ … … 30 30 class QTextDocument; 31 31 class QIToolButton; 32 class UI GuestControlFileManager;32 class UIFileManager; 33 33 34 34 /** QWidget extension acting as the base class for UIVMLogViewerXXXPanel widgets. */ 35 class UI GuestControlFileManagerPanel : public QIWithRetranslateUI<QWidget>35 class UIFileManagerPanel : public QIWithRetranslateUI<QWidget> 36 36 { 37 37 Q_OBJECT; … … 39 39 public: 40 40 41 UI GuestControlFileManagerPanel(UIGuestControlFileManager *pManagerWidget, QWidget *pParent);41 UIFileManagerPanel(UIFileManager *pManagerWidget, QWidget *pParent); 42 42 void setCloseButtonShortCut(QKeySequence shortCut); 43 43 virtual QString panelName() const = 0; … … 68 68 69 69 /** Holds the reference to VM Log-Viewer this panel belongs to. */ 70 QHBoxLayout *m_pMainLayout;71 QIToolButton *m_pCloseButton;72 UI GuestControlFileManager *m_pFileManager;70 QHBoxLayout *m_pMainLayout; 71 QIToolButton *m_pCloseButton; 72 UIFileManager *m_pFileManager; 73 73 }; 74 74 75 #endif /* !___UI GuestControlFileManagerPanel!_h___ */75 #endif /* !___UIFileManagerPanel!_h___ */ -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerSessionPanel.cpp
r76176 r76177 32 32 # include "QIToolButton.h" 33 33 # include "UIIconPool.h" 34 # include "UI GuestControlFileManager.h"35 # include "UI GuestControlFileManagerSessionPanel.h"34 # include "UIFileManager.h" 35 # include "UIFileManagerSessionPanel.h" 36 36 37 37 #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */ … … 115 115 { 116 116 m_pMainLayout->addWidget(m_pPasswordEdit, 2); 117 m_pPasswordEdit->setPlaceholderText(UI GuestControlFileManager::tr("Password"));117 m_pPasswordEdit->setPlaceholderText(UIFileManager::tr("Password")); 118 118 m_pPasswordEdit->setEchoMode(QLineEdit::Password); 119 119 } … … 122 122 if (m_pShowPasswordCheckBox) 123 123 { 124 m_pShowPasswordCheckBox->setText(UI GuestControlFileManager::tr("Show Password"));124 m_pShowPasswordCheckBox->setText(UIFileManager::tr("Show Password")); 125 125 m_pMainLayout->addWidget(m_pShowPasswordCheckBox); 126 126 connect(m_pShowPasswordCheckBox, &QCheckBox::toggled, … … 165 165 if (m_pUserNameEdit) 166 166 { 167 m_pUserNameEdit->setToolTip(UI GuestControlFileManager::tr("User name to authenticate session creation"));168 m_pUserNameEdit->setPlaceholderText(UI GuestControlFileManager::tr("User Name"));169 170 } 171 if (m_pPasswordEdit) 172 { 173 m_pPasswordEdit->setToolTip(UI GuestControlFileManager::tr("Password to authenticate session creation"));174 m_pPasswordEdit->setPlaceholderText(UI GuestControlFileManager::tr("Password"));175 } 176 177 if (m_pCreateButton) 178 m_pCreateButton->setText(UI GuestControlFileManager::tr("Create Session"));179 if (m_pCloseButton) 180 m_pCloseButton->setText(UI GuestControlFileManager::tr("Close Session"));167 m_pUserNameEdit->setToolTip(UIFileManager::tr("User name to authenticate session creation")); 168 m_pUserNameEdit->setPlaceholderText(UIFileManager::tr("User Name")); 169 170 } 171 if (m_pPasswordEdit) 172 { 173 m_pPasswordEdit->setToolTip(UIFileManager::tr("Password to authenticate session creation")); 174 m_pPasswordEdit->setPlaceholderText(UIFileManager::tr("Password")); 175 } 176 177 if (m_pCreateButton) 178 m_pCreateButton->setText(UIFileManager::tr("Create Session")); 179 if (m_pCloseButton) 180 m_pCloseButton->setText(UIFileManager::tr("Close Session")); 181 181 } 182 182 … … 219 219 220 220 /********************************************************************************************************************************* 221 * UI GuestControlFileManagerSessionPanel implementation. *221 * UIFileManagerSessionPanel implementation. * 222 222 *********************************************************************************************************************************/ 223 223 224 UI GuestControlFileManagerSessionPanel::UIGuestControlFileManagerSessionPanel(UIGuestControlFileManager *pManagerWidget, QWidget *pParent)225 : UI GuestControlFileManagerPanel(pManagerWidget, pParent)224 UIFileManagerSessionPanel::UIFileManagerSessionPanel(UIFileManager *pManagerWidget, QWidget *pParent) 225 : UIFileManagerPanel(pManagerWidget, pParent) 226 226 , m_pSessionCreateWidget(0) 227 227 { … … 229 229 } 230 230 231 void UI GuestControlFileManagerSessionPanel::switchSessionCloseMode()231 void UIFileManagerSessionPanel::switchSessionCloseMode() 232 232 { 233 233 if (m_pSessionCreateWidget) … … 235 235 } 236 236 237 void UI GuestControlFileManagerSessionPanel::switchSessionCreateMode()237 void UIFileManagerSessionPanel::switchSessionCreateMode() 238 238 { 239 239 if (m_pSessionCreateWidget) … … 241 241 } 242 242 243 QString UI GuestControlFileManagerSessionPanel::panelName() const243 QString UIFileManagerSessionPanel::panelName() const 244 244 { 245 245 return "SessionPanel"; 246 246 } 247 247 248 void UI GuestControlFileManagerSessionPanel::prepareWidgets()248 void UIFileManagerSessionPanel::prepareWidgets() 249 249 { 250 250 if (!mainLayout()) … … 255 255 } 256 256 257 void UI GuestControlFileManagerSessionPanel::prepareConnections()257 void UIFileManagerSessionPanel::prepareConnections() 258 258 { 259 259 if (m_pSessionCreateWidget) 260 260 { 261 261 connect(m_pSessionCreateWidget, &UIGuestSessionCreateWidget::sigCreateSession, 262 this, &UI GuestControlFileManagerSessionPanel::sigCreateSession);262 this, &UIFileManagerSessionPanel::sigCreateSession); 263 263 connect(m_pSessionCreateWidget, &UIGuestSessionCreateWidget::sigCloseSession, 264 this, &UI GuestControlFileManagerSessionPanel::sigCloseSession);265 } 266 } 267 268 void UI GuestControlFileManagerSessionPanel::retranslateUi()269 { 270 UI GuestControlFileManagerPanel::retranslateUi();271 272 } 273 274 #include "UI GuestControlFileManagerSessionPanel.moc"264 this, &UIFileManagerSessionPanel::sigCloseSession); 265 } 266 } 267 268 void UIFileManagerSessionPanel::retranslateUi() 269 { 270 UIFileManagerPanel::retranslateUi(); 271 272 } 273 274 #include "UIFileManagerSessionPanel.moc" -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerSessionPanel.h
r76176 r76177 16 16 */ 17 17 18 #ifndef ___UI GuestControlFileManagerSessionPanel_h___19 #define ___UI GuestControlFileManagerSessionPanel_h___18 #ifndef ___UIFileManagerSessionPanel_h___ 19 #define ___UIFileManagerSessionPanel_h___ 20 20 21 21 /* GUI includes: */ 22 #include "UI GuestControlFileManagerPanel.h"22 #include "UIFileManagerPanel.h" 23 23 24 24 /* Forward declarations: */ 25 25 class QTextEdit; 26 class UI GuestControlFileManager;26 class UIFileManager; 27 27 class UIGuestSessionCreateWidget; 28 28 29 /** UI GuestControlFileManagerPanel extension providing GUI for creating/stopping a guest session. */30 class UI GuestControlFileManagerSessionPanel : public UIGuestControlFileManagerPanel29 /** UIFileManagerPanel extension providing GUI for creating/stopping a guest session. */ 30 class UIFileManagerSessionPanel : public UIFileManagerPanel 31 31 { 32 32 Q_OBJECT; … … 34 34 public: 35 35 36 UI GuestControlFileManagerSessionPanel(UIGuestControlFileManager *pManagerWidget, QWidget *pParent);36 UIFileManagerSessionPanel(UIFileManager *pManagerWidget, QWidget *pParent); 37 37 /** @name Enable/disable member widget wrt. guest session status. 38 38 * @{ */ … … 58 58 }; 59 59 60 #endif /* !___UI GuestControlFileManagerSessionPanel_h___ */60 #endif /* !___UIFileManagerSessionPanel_h___ */ -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerTable.cpp
r76176 r76177 1 1 /* $Id$ */ 2 2 /** @file 3 * VBox Qt GUI - UI GuestControlFileTable class implementation.3 * VBox Qt GUI - UIFileManagerTable class implementation. 4 4 */ 5 5 … … 43 43 # include "UIActionPool.h" 44 44 # include "UIErrorString.h" 45 # include "UI GuestFileTable.h"45 # include "UIFileManagerGuestTable.h" 46 46 # include "UIIconPool.h" 47 # include "UI GuestControlFileTable.h"48 # include "UI GuestControlFileManager.h"49 # include "UI GuestControlFileModel.h"47 # include "UIFileManagerTable.h" 48 # include "UIFileManager.h" 49 # include "UIFileManagerModel.h" 50 50 # include "UIToolBar.h" 51 51 … … 420 420 // QString propertyString = m_pInfoEdit->toHtml(); 421 421 // propertyString += "<b>Total Size:</b> " + QString::number(directoryStatistics.m_totalSize) + QString(" bytes"); 422 // if (directoryStatistics.m_totalSize >= UI GuestControlFileTable::m_iKiloByte)423 // propertyString += " (" + UI GuestControlFileTable::humanReadableSize(directoryStatistics.m_totalSize) + ")";422 // if (directoryStatistics.m_totalSize >= UIFileManagerTable::m_iKiloByte) 423 // propertyString += " (" + UIFileManagerTable::humanReadableSize(directoryStatistics.m_totalSize) + ")"; 424 424 // propertyString += "<br/>"; 425 425 // propertyString += "<b>File Count:</b> " + QString::number(directoryStatistics.m_uFileCount); … … 429 429 QString detailsString(m_strProperty); 430 430 detailsString += "<br/>"; 431 detailsString += "<b>" + UI GuestControlFileManager::tr("Total Size") + "</b> " +432 QString::number(directoryStatistics.m_totalSize) + UI GuestControlFileManager::tr(" bytes");433 if (directoryStatistics.m_totalSize >= UI GuestControlFileTable::m_iKiloByte)434 detailsString += " (" + UI GuestControlFileTable::humanReadableSize(directoryStatistics.m_totalSize) + ")";431 detailsString += "<b>" + UIFileManager::tr("Total Size") + "</b> " + 432 QString::number(directoryStatistics.m_totalSize) + UIFileManager::tr(" bytes"); 433 if (directoryStatistics.m_totalSize >= UIFileManagerTable::m_iKiloByte) 434 detailsString += " (" + UIFileManagerTable::humanReadableSize(directoryStatistics.m_totalSize) + ")"; 435 435 detailsString += "<br/>"; 436 436 437 detailsString += "<b>" + UI GuestControlFileManager::tr("File Count") + ":</b> " +437 detailsString += "<b>" + UIFileManager::tr("File Count") + ":</b> " + 438 438 QString::number(directoryStatistics.m_uFileCount); 439 439 … … 586 586 if (!isDirectory()) 587 587 return false; 588 if (data(0) == UI GuestControlFileModel::strUpDirectoryString)588 if (data(0) == UIFileManagerModel::strUpDirectoryString) 589 589 return true; 590 590 return false; … … 646 646 { 647 647 pLayout->addWidget(m_pQuestionLabel); 648 m_pQuestionLabel->setText(UI GuestControlFileManager::tr("Delete the selected file(s) and/or folder(s)"));648 m_pQuestionLabel->setText(UIFileManager::tr("Delete the selected file(s) and/or folder(s)")); 649 649 } 650 650 … … 662 662 if (m_pAskNextTimeCheckBox) 663 663 { 664 UI GuestControlFileManagerOptions *pFileManagerOptions = UIGuestControlFileManagerOptions::instance();664 UIFileManagerOptions *pFileManagerOptions = UIFileManagerOptions::instance(); 665 665 if (pFileManagerOptions) 666 666 m_pAskNextTimeCheckBox->setChecked(pFileManagerOptions->bAskDeleteConfirmation); 667 667 668 668 pLayout->addWidget(m_pAskNextTimeCheckBox); 669 m_pAskNextTimeCheckBox->setText(UI GuestControlFileManager::tr("Ask for this confirmation next time"));670 m_pAskNextTimeCheckBox->setToolTip(UI GuestControlFileManager::tr("Delete confirmation can be "669 m_pAskNextTimeCheckBox->setText(UIFileManager::tr("Ask for this confirmation next time")); 670 m_pAskNextTimeCheckBox->setToolTip(UIFileManager::tr("Delete confirmation can be " 671 671 "disabled/enabled also from the Options panel.")); 672 672 } … … 682 682 683 683 /********************************************************************************************************************************* 684 * UI GuestControlFileTable implementation. *684 * UIFileManagerTable implementation. * 685 685 *********************************************************************************************************************************/ 686 const unsigned UI GuestControlFileTable::m_iKiloByte = 1024; /**< Our kilo bytes are a power of two! (bird) */687 UI GuestControlFileTable::UIGuestControlFileTable(UIActionPool *pActionPool, QWidget *pParent /* = 0 */)686 const unsigned UIFileManagerTable::m_iKiloByte = 1024; /**< Our kilo bytes are a power of two! (bird) */ 687 UIFileManagerTable::UIFileManagerTable(UIActionPool *pActionPool, QWidget *pParent /* = 0 */) 688 688 :QIWithRetranslateUI<QWidget>(pParent) 689 689 , m_eFileOperationType(FileOperationType_None) … … 703 703 } 704 704 705 UI GuestControlFileTable::~UIGuestControlFileTable()705 UIFileManagerTable::~UIFileManagerTable() 706 706 { 707 707 delete m_pRootItem; 708 708 } 709 709 710 void UI GuestControlFileTable::reset()710 void UIFileManagerTable::reset() 711 711 { 712 712 if (m_pModel) … … 719 719 { 720 720 disconnect(m_pLocationComboBox, static_cast<void(QComboBox::*)(const QString&)>(&QComboBox::currentIndexChanged), 721 this, &UI GuestControlFileTable::sltLocationComboCurrentChange);721 this, &UIFileManagerTable::sltLocationComboCurrentChange); 722 722 m_pLocationComboBox->clear(); 723 723 connect(m_pLocationComboBox, static_cast<void(QComboBox::*)(const QString&)>(&QComboBox::currentIndexChanged), 724 this, &UI GuestControlFileTable::sltLocationComboCurrentChange);725 } 726 } 727 728 void UI GuestControlFileTable::emitLogOutput(const QString& strOutput, FileManagerLogType eLogType)724 this, &UIFileManagerTable::sltLocationComboCurrentChange); 725 } 726 } 727 728 void UIFileManagerTable::emitLogOutput(const QString& strOutput, FileManagerLogType eLogType) 729 729 { 730 730 emit sigLogOutput(strOutput, eLogType); 731 731 } 732 732 733 void UI GuestControlFileTable::prepareObjects()733 void UIFileManagerTable::prepareObjects() 734 734 { 735 735 m_pMainLayout = new QGridLayout(); … … 758 758 m_pLocationComboBox->setEditable(false); 759 759 connect(m_pLocationComboBox, static_cast<void(QComboBox::*)(const QString&)>(&QComboBox::currentIndexChanged), 760 this, &UI GuestControlFileTable::sltLocationComboCurrentChange);761 } 762 763 764 m_pModel = new UI GuestControlFileModel(this);760 this, &UIFileManagerTable::sltLocationComboCurrentChange); 761 } 762 763 764 m_pModel = new UIFileManagerModel(this); 765 765 if (!m_pModel) 766 766 return; … … 786 786 787 787 connect(m_pView, &UIGuestControlFileView::doubleClicked, 788 this, &UI GuestControlFileTable::sltItemDoubleClicked);788 this, &UIFileManagerTable::sltItemDoubleClicked); 789 789 connect(m_pView, &UIGuestControlFileView::clicked, 790 this, &UI GuestControlFileTable::sltItemClicked);790 this, &UIFileManagerTable::sltItemClicked); 791 791 connect(m_pView, &UIGuestControlFileView::sigSelectionChanged, 792 this, &UI GuestControlFileTable::sltSelectionChanged);792 this, &UIFileManagerTable::sltSelectionChanged); 793 793 connect(m_pView, &UIGuestControlFileView::customContextMenuRequested, 794 this, &UI GuestControlFileTable::sltCreateFileViewContextMenu);794 this, &UIFileManagerTable::sltCreateFileViewContextMenu); 795 795 796 796 } … … 820 820 m_pSearchLineEdit->setClearButtonEnabled(true); 821 821 connect(m_pSearchLineEdit, &QLineEdit::textChanged, 822 this, &UI GuestControlFileTable::sltSearchTextChanged);823 } 824 } 825 826 void UI GuestControlFileTable::updateCurrentLocationEdit(const QString& strLocation)822 this, &UIFileManagerTable::sltSearchTextChanged); 823 } 824 } 825 826 void UIFileManagerTable::updateCurrentLocationEdit(const QString& strLocation) 827 827 { 828 828 if (!m_pLocationComboBox) … … 838 838 } 839 839 840 void UI GuestControlFileTable::changeLocation(const QModelIndex &index)840 void UIFileManagerTable::changeLocation(const QModelIndex &index) 841 841 { 842 842 if (!index.isValid() || !m_pView) … … 854 854 } 855 855 856 void UI GuestControlFileTable::initializeFileTree()856 void UIFileManagerTable::initializeFileTree() 857 857 { 858 858 if (m_pRootItem) … … 862 862 const QString startPath("/"); 863 863 QVector<QVariant> headData; 864 headData.resize(UI GuestControlFileModelColumn_Max);864 headData.resize(UIFileManagerModelColumn_Max); 865 865 m_pRootItem = new UIFileTableItem(headData, 0, FileObjectType_Directory); 866 866 UIFileTableItem* startItem = new UIFileTableItem(createTreeItemData(startPath, 4096, QDateTime(), … … 877 877 } 878 878 879 void UI GuestControlFileTable::populateStartDirectory(UIFileTableItem *startItem)879 void UIFileManagerTable::populateStartDirectory(UIFileTableItem *startItem) 880 880 { 881 881 determineDriveLetters(); … … 901 901 } 902 902 903 void UI GuestControlFileTable::insertItemsToTree(QMap<QString,UIFileTableItem*> &map,903 void UIFileManagerTable::insertItemsToTree(QMap<QString,UIFileTableItem*> &map, 904 904 UIFileTableItem *parent, bool isDirectoryMap, bool isStartDir) 905 905 { … … 909 909 if (isDirectoryMap) 910 910 { 911 if (!map.contains(UI GuestControlFileModel::strUpDirectoryString) && !isStartDir)911 if (!map.contains(UIFileManagerModel::strUpDirectoryString) && !isStartDir) 912 912 { 913 913 QVector<QVariant> data; 914 UIFileTableItem *item = new UIFileTableItem(createTreeItemData(UI GuestControlFileModel::strUpDirectoryString, 4096,914 UIFileTableItem *item = new UIFileTableItem(createTreeItemData(UIFileManagerModel::strUpDirectoryString, 4096, 915 915 QDateTime(), QString(), QString()) 916 916 , parent, FileObjectType_Directory); 917 917 item->setIsOpened(false); 918 map.insert(UI GuestControlFileModel::strUpDirectoryString, item);918 map.insert(UIFileManagerModel::strUpDirectoryString, item); 919 919 } 920 else if (map.contains(UI GuestControlFileModel::strUpDirectoryString) && isStartDir)920 else if (map.contains(UIFileManagerModel::strUpDirectoryString) && isStartDir) 921 921 { 922 map.remove(UI GuestControlFileModel::strUpDirectoryString);922 map.remove(UIFileManagerModel::strUpDirectoryString); 923 923 } 924 924 } … … 932 932 } 933 933 934 void UI GuestControlFileTable::sltItemDoubleClicked(const QModelIndex &index)934 void UIFileManagerTable::sltItemDoubleClicked(const QModelIndex &index) 935 935 { 936 936 if (!index.isValid() || !m_pModel || !m_pView) … … 940 940 } 941 941 942 void UI GuestControlFileTable::sltItemClicked(const QModelIndex &index)942 void UIFileManagerTable::sltItemClicked(const QModelIndex &index) 943 943 { 944 944 Q_UNUSED(index); … … 946 946 } 947 947 948 void UI GuestControlFileTable::sltGoUp()948 void UIFileManagerTable::sltGoUp() 949 949 { 950 950 if (!m_pView || !m_pModel) … … 965 965 } 966 966 967 void UI GuestControlFileTable::sltGoHome()967 void UIFileManagerTable::sltGoHome() 968 968 { 969 969 goToHomeDirectory(); 970 970 } 971 971 972 void UI GuestControlFileTable::sltRefresh()972 void UIFileManagerTable::sltRefresh() 973 973 { 974 974 refresh(); 975 975 } 976 976 977 void UI GuestControlFileTable::goIntoDirectory(const QModelIndex &itemIndex)977 void UIFileManagerTable::goIntoDirectory(const QModelIndex &itemIndex) 978 978 { 979 979 if (!m_pModel) … … 1006 1006 } 1007 1007 1008 void UI GuestControlFileTable::goIntoDirectory(const QStringList &pathTrail)1008 void UIFileManagerTable::goIntoDirectory(const QStringList &pathTrail) 1009 1009 { 1010 1010 UIFileTableItem *parent = getStartDirectoryItem(); … … 1030 1030 } 1031 1031 1032 void UI GuestControlFileTable::goIntoDirectory(UIFileTableItem *item)1032 void UIFileManagerTable::goIntoDirectory(UIFileTableItem *item) 1033 1033 { 1034 1034 if (!item || !m_pModel) … … 1037 1037 } 1038 1038 1039 UIFileTableItem* UI GuestControlFileTable::indexData(const QModelIndex &index) const1039 UIFileTableItem* UIFileManagerTable::indexData(const QModelIndex &index) const 1040 1040 { 1041 1041 if (!index.isValid()) … … 1044 1044 } 1045 1045 1046 void UI GuestControlFileTable::refresh()1046 void UIFileManagerTable::refresh() 1047 1047 { 1048 1048 if (!m_pView || !m_pModel) … … 1066 1066 } 1067 1067 1068 void UI GuestControlFileTable::relist()1068 void UIFileManagerTable::relist() 1069 1069 { 1070 1070 if (!m_pProxyModel) … … 1073 1073 } 1074 1074 1075 void UI GuestControlFileTable::sltDelete()1075 void UIFileManagerTable::sltDelete() 1076 1076 { 1077 1077 if (!checkIfDeleteOK()) … … 1098 1098 } 1099 1099 1100 void UI GuestControlFileTable::sltRename()1100 void UIFileManagerTable::sltRename() 1101 1101 { 1102 1102 if (!m_pView) … … 1117 1117 } 1118 1118 1119 void UI GuestControlFileTable::sltCreateNewDirectory()1119 void UIFileManagerTable::sltCreateNewDirectory() 1120 1120 { 1121 1121 if (!m_pModel || !m_pView) … … 1140 1140 } 1141 1141 1142 void UI GuestControlFileTable::sltCopy()1142 void UIFileManagerTable::sltCopy() 1143 1143 { 1144 1144 m_copyCutBuffer = selectedItemPathList(); … … 1147 1147 } 1148 1148 1149 void UI GuestControlFileTable::sltCut()1149 void UIFileManagerTable::sltCut() 1150 1150 { 1151 1151 m_copyCutBuffer = selectedItemPathList(); … … 1154 1154 } 1155 1155 1156 void UI GuestControlFileTable::sltPaste()1156 void UIFileManagerTable::sltPaste() 1157 1157 { 1158 1158 m_copyCutBuffer.clear(); … … 1162 1162 } 1163 1163 1164 void UI GuestControlFileTable::sltShowProperties()1164 void UIFileManagerTable::sltShowProperties() 1165 1165 { 1166 1166 showProperties(); 1167 1167 } 1168 1168 1169 void UI GuestControlFileTable::sltSelectionChanged(const QItemSelection & selected, const QItemSelection & deselected)1169 void UIFileManagerTable::sltSelectionChanged(const QItemSelection & selected, const QItemSelection & deselected) 1170 1170 { 1171 1171 Q_UNUSED(selected); … … 1174 1174 } 1175 1175 1176 void UI GuestControlFileTable::sltLocationComboCurrentChange(const QString &strLocation)1176 void UIFileManagerTable::sltLocationComboCurrentChange(const QString &strLocation) 1177 1177 { 1178 1178 QString comboLocation(UIPathOperations::sanitize(strLocation)); … … 1182 1182 } 1183 1183 1184 void UI GuestControlFileTable::sltSelectAll()1184 void UIFileManagerTable::sltSelectAll() 1185 1185 { 1186 1186 if (!m_pModel || !m_pView) … … 1190 1190 } 1191 1191 1192 void UI GuestControlFileTable::sltInvertSelection()1192 void UIFileManagerTable::sltInvertSelection() 1193 1193 { 1194 1194 setSelectionForAll(QItemSelectionModel::Toggle | QItemSelectionModel::Rows); … … 1196 1196 } 1197 1197 1198 void UI GuestControlFileTable::sltSearchTextChanged(const QString &strText)1198 void UIFileManagerTable::sltSearchTextChanged(const QString &strText) 1199 1199 { 1200 1200 performSelectionSearch(strText); 1201 1201 } 1202 1202 1203 void UI GuestControlFileTable::sltCreateFileViewContextMenu(const QPoint &point)1203 void UIFileManagerTable::sltCreateFileViewContextMenu(const QPoint &point) 1204 1204 { 1205 1205 QWidget *pSender = qobject_cast<QWidget*>(sender()); … … 1209 1209 } 1210 1210 1211 void UI GuestControlFileTable::deSelectUpDirectoryItem()1211 void UIFileManagerTable::deSelectUpDirectoryItem() 1212 1212 { 1213 1213 if (!m_pView) … … 1236 1236 } 1237 1237 1238 void UI GuestControlFileTable::setSelectionForAll(QItemSelectionModel::SelectionFlags flags)1238 void UIFileManagerTable::setSelectionForAll(QItemSelectionModel::SelectionFlags flags) 1239 1239 { 1240 1240 if (!m_pView) … … 1257 1257 } 1258 1258 1259 void UI GuestControlFileTable::setSelection(const QModelIndex &indexInProxyModel)1259 void UIFileManagerTable::setSelection(const QModelIndex &indexInProxyModel) 1260 1260 { 1261 1261 if (!m_pView) … … 1268 1268 } 1269 1269 1270 void UI GuestControlFileTable::deleteByIndex(const QModelIndex &itemIndex)1270 void UIFileManagerTable::deleteByIndex(const QModelIndex &itemIndex) 1271 1271 { 1272 1272 UIFileTableItem *treeItem = indexData(itemIndex); … … 1276 1276 } 1277 1277 1278 void UI GuestControlFileTable::retranslateUi()1278 void UIFileManagerTable::retranslateUi() 1279 1279 { 1280 1280 if (m_pRootItem) 1281 1281 { 1282 m_pRootItem->setData(UI GuestControlFileManager::tr("Name"), UIGuestControlFileModelColumn_Name);1283 m_pRootItem->setData(UI GuestControlFileManager::tr("Size"), UIGuestControlFileModelColumn_Size);1284 m_pRootItem->setData(UI GuestControlFileManager::tr("Change Time"), UIGuestControlFileModelColumn_ChangeTime);1285 m_pRootItem->setData(UI GuestControlFileManager::tr("Owner"), UIGuestControlFileModelColumn_Owner);1286 m_pRootItem->setData(UI GuestControlFileManager::tr("Permissions"), UIGuestControlFileModelColumn_Permissions);1282 m_pRootItem->setData(UIFileManager::tr("Name"), UIFileManagerModelColumn_Name); 1283 m_pRootItem->setData(UIFileManager::tr("Size"), UIFileManagerModelColumn_Size); 1284 m_pRootItem->setData(UIFileManager::tr("Change Time"), UIFileManagerModelColumn_ChangeTime); 1285 m_pRootItem->setData(UIFileManager::tr("Owner"), UIFileManagerModelColumn_Owner); 1286 m_pRootItem->setData(UIFileManager::tr("Permissions"), UIFileManagerModelColumn_Permissions); 1287 1287 } 1288 1288 if (m_pWarningLabel) 1289 m_pWarningLabel->setText(UI GuestControlFileManager::tr("No Guest Session"));1290 } 1291 1292 bool UI GuestControlFileTable::eventFilter(QObject *pObject, QEvent *pEvent) /* override */1289 m_pWarningLabel->setText(UIFileManager::tr("No Guest Session")); 1290 } 1291 1292 bool UIFileManagerTable::eventFilter(QObject *pObject, QEvent *pEvent) /* override */ 1293 1293 { 1294 1294 Q_UNUSED(pObject); … … 1349 1349 } 1350 1350 1351 UIFileTableItem *UI GuestControlFileTable::getStartDirectoryItem()1351 UIFileTableItem *UIFileManagerTable::getStartDirectoryItem() 1352 1352 { 1353 1353 if (!m_pRootItem) … … 1359 1359 1360 1360 1361 QString UI GuestControlFileTable::getNewDirectoryName()1361 QString UIFileManagerTable::getNewDirectoryName() 1362 1362 { 1363 1363 UIStringInputDialog *dialog = new UIStringInputDialog(); … … 1372 1372 } 1373 1373 1374 QString UI GuestControlFileTable::currentDirectoryPath() const1374 QString UIFileManagerTable::currentDirectoryPath() const 1375 1375 { 1376 1376 if (!m_pView) … … 1388 1388 } 1389 1389 1390 QStringList UI GuestControlFileTable::selectedItemPathList()1390 QStringList UIFileManagerTable::selectedItemPathList() 1391 1391 { 1392 1392 QItemSelectionModel *selectionModel = m_pView->selectionModel(); … … 1408 1408 } 1409 1409 1410 CGuestFsObjInfo UI GuestControlFileTable::guestFsObjectInfo(const QString& path, CGuestSession &comGuestSession) const1410 CGuestFsObjInfo UIFileManagerTable::guestFsObjectInfo(const QString& path, CGuestSession &comGuestSession) const 1411 1411 { 1412 1412 if (comGuestSession.isNull()) … … 1418 1418 } 1419 1419 1420 void UI GuestControlFileTable::setSelectionDependentActionsEnabled(bool fIsEnabled)1420 void UIFileManagerTable::setSelectionDependentActionsEnabled(bool fIsEnabled) 1421 1421 { 1422 1422 foreach (QAction *pAction, m_selectionDependentActions) … … 1427 1427 1428 1428 1429 QVector<QVariant> UI GuestControlFileTable::createTreeItemData(const QString &strName, ULONG64 size, const QDateTime &changeTime,1429 QVector<QVariant> UIFileManagerTable::createTreeItemData(const QString &strName, ULONG64 size, const QDateTime &changeTime, 1430 1430 const QString &strOwner, const QString &strPermissions) 1431 1431 { 1432 1432 QVector<QVariant> data; 1433 data.resize(UI GuestControlFileModelColumn_Max);1434 data[UI GuestControlFileModelColumn_Name] = strName;1435 data[UI GuestControlFileModelColumn_Size] = (qulonglong)size;1436 data[UI GuestControlFileModelColumn_ChangeTime] = changeTime;1437 data[UI GuestControlFileModelColumn_Owner] = strOwner;1438 data[UI GuestControlFileModelColumn_Permissions] = strPermissions;1433 data.resize(UIFileManagerModelColumn_Max); 1434 data[UIFileManagerModelColumn_Name] = strName; 1435 data[UIFileManagerModelColumn_Size] = (qulonglong)size; 1436 data[UIFileManagerModelColumn_ChangeTime] = changeTime; 1437 data[UIFileManagerModelColumn_Owner] = strOwner; 1438 data[UIFileManagerModelColumn_Permissions] = strPermissions; 1439 1439 return data; 1440 1440 } 1441 1441 1442 bool UI GuestControlFileTable::event(QEvent *pEvent)1442 bool UIFileManagerTable::event(QEvent *pEvent) 1443 1443 { 1444 1444 if (pEvent->type() == QEvent::EnabledChange) … … 1451 1451 } 1452 1452 1453 QString UI GuestControlFileTable::fileTypeString(FileObjectType type)1454 { 1455 QString strType = UI GuestControlFileManager::tr("Unknown");1453 QString UIFileManagerTable::fileTypeString(FileObjectType type) 1454 { 1455 QString strType = UIFileManager::tr("Unknown"); 1456 1456 switch (type) 1457 1457 { 1458 1458 case FileObjectType_File: 1459 strType = UI GuestControlFileManager::tr("File");1459 strType = UIFileManager::tr("File"); 1460 1460 break; 1461 1461 case FileObjectType_Directory: 1462 strType = UI GuestControlFileManager::tr("Directory");1462 strType = UIFileManager::tr("Directory"); 1463 1463 break; 1464 1464 case FileObjectType_SymLink: 1465 strType = UI GuestControlFileManager::tr("Symbolic Link");1465 strType = UIFileManager::tr("Symbolic Link"); 1466 1466 break; 1467 1467 case FileObjectType_Other: 1468 strType = UI GuestControlFileManager::tr("Other");1468 strType = UIFileManager::tr("Other"); 1469 1469 break; 1470 1470 … … 1476 1476 } 1477 1477 1478 /* static */ QString UI GuestControlFileTable::humanReadableSize(ULONG64 size)1478 /* static */ QString UIFileManagerTable::humanReadableSize(ULONG64 size) 1479 1479 { 1480 1480 return vboxGlobal().formatSize(size); 1481 1481 } 1482 1482 1483 void UI GuestControlFileTable::sltReceiveDirectoryStatistics(UIDirectoryStatistics statistics)1483 void UIFileManagerTable::sltReceiveDirectoryStatistics(UIDirectoryStatistics statistics) 1484 1484 { 1485 1485 if (!m_pPropertiesDialog) … … 1488 1488 } 1489 1489 1490 QModelIndex UI GuestControlFileTable::currentRootIndex() const1490 QModelIndex UIFileManagerTable::currentRootIndex() const 1491 1491 { 1492 1492 if (!m_pView) … … 1497 1497 } 1498 1498 1499 void UI GuestControlFileTable::performSelectionSearch(const QString &strSearchText)1499 void UIFileManagerTable::performSelectionSearch(const QString &strSearchText) 1500 1500 { 1501 1501 if (!m_pProxyModel | !m_pView || strSearchText.isEmpty()) … … 1525 1525 } 1526 1526 1527 void UI GuestControlFileTable::disableSelectionSearch()1527 void UIFileManagerTable::disableSelectionSearch() 1528 1528 { 1529 1529 if (!m_pSearchLineEdit) … … 1535 1535 } 1536 1536 1537 bool UI GuestControlFileTable::checkIfDeleteOK()1538 { 1539 UI GuestControlFileManagerOptions *pFileManagerOptions = UIGuestControlFileManagerOptions::instance();1537 bool UIFileManagerTable::checkIfDeleteOK() 1538 { 1539 UIFileManagerOptions *pFileManagerOptions = UIFileManagerOptions::instance(); 1540 1540 if (!pFileManagerOptions) 1541 1541 return true; … … 1562 1562 } 1563 1563 1564 #include "UI GuestControlFileTable.moc"1564 #include "UIFileManagerTable.moc" -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerTable.h
r76176 r76177 1 1 /* $Id$ */ 2 2 /** @file 3 * VBox Qt GUI - UI GuestControlFileTable class declaration.3 * VBox Qt GUI - UIFileManagerTable class declaration. 4 4 */ 5 5 … … 16 16 */ 17 17 18 #ifndef ___UI GuestControlFileTable_h___19 #define ___UI GuestControlFileTable_h___18 #ifndef ___UIFileManagerTable_h___ 19 #define ___UIFileManagerTable_h___ 20 20 21 21 /* Qt includes: */ … … 47 47 class UIActionPool; 48 48 class UIFileTableItem; 49 class UI GuestControlFileModel;49 class UIFileManagerModel; 50 50 class UIGuestControlFileProxyModel; 51 51 class UIGuestControlFileView; … … 161 161 162 162 /** A UIFileTableItem instance is a tree node representing a file object (file, directory, etc). The tree contructed 163 by these instances is the data source for the UI GuestControlFileModel. */163 by these instances is the data source for the UIFileManagerModel. */ 164 164 class UIFileTableItem 165 165 { … … 240 240 /** This class serves a base class for file table. Currently a guest version 241 241 * and a host version are derived from this base. Each of these children 242 * populates the UI GuestControlFileModel by scanning the file system242 * populates the UIFileManagerModel by scanning the file system 243 243 * differently. The file structre kept in this class as a tree. */ 244 class UI GuestControlFileTable : public QIWithRetranslateUI<QWidget>244 class UIFileManagerTable : public QIWithRetranslateUI<QWidget> 245 245 { 246 246 Q_OBJECT; … … 253 253 public: 254 254 255 UI GuestControlFileTable(UIActionPool *pActionPool, QWidget *pParent = 0);256 virtual ~UI GuestControlFileTable();255 UIFileManagerTable(UIActionPool *pActionPool, QWidget *pParent = 0); 256 virtual ~UIFileManagerTable(); 257 257 /** Deletes all the tree nodes */ 258 258 void reset(); … … 341 341 CGuestFsObjInfo guestFsObjectInfo(const QString& path, CGuestSession &comGuestSession) const; 342 342 void setSelectionDependentActionsEnabled(bool fIsEnabled); 343 /** Creates a QList out of the parameters wrt. UI GuestControlFileModelColumn enum */343 /** Creates a QList out of the parameters wrt. UIFileManagerModelColumn enum */ 344 344 QVector<QVariant> createTreeItemData(const QString &strName, ULONG64 size, const QDateTime &changeTime, 345 345 const QString &strOwner, const QString &strPermissions); … … 393 393 bool checkIfDeleteOK(); 394 394 395 UI GuestControlFileModel *m_pModel;395 UIFileManagerModel *m_pModel; 396 396 UIGuestControlFileView *m_pView; 397 397 UIGuestControlFileProxyModel *m_pProxyModel; … … 402 402 QILabel *m_pWarningLabel; 403 403 404 friend class UI GuestControlFileModel;405 }; 406 407 #endif /* !___UI GuestControlFileTable_h___ */404 friend class UIFileManagerModel; 405 }; 406 407 #endif /* !___UIFileManagerTable_h___ */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r75361 r76177 66 66 # include "UIAddDiskEncryptionPasswordDialog.h" 67 67 # include "UIVMInformationDialog.h" 68 # include "UI GuestControlFileManagerDialog.h"68 # include "UIFileManagerDialog.h" 69 69 # include "UIGuestProcessControlDialog.h" 70 70 … … 1109 1109 connect(actionPool()->action(UIActionIndexRT_M_Machine_S_ShowInformation), SIGNAL(triggered()), 1110 1110 this, SLOT(sltShowInformationDialog())); 1111 connect(actionPool()->action(UIActionIndexRT_M_Machine_S_Show GuestControlFileManager), SIGNAL(triggered()),1112 this, SLOT(sltShow GuestControlFileManagerDialog()));1111 connect(actionPool()->action(UIActionIndexRT_M_Machine_S_ShowFileManager), SIGNAL(triggered()), 1112 this, SLOT(sltShowFileManagerDialog())); 1113 1113 connect(actionPool()->action(UIActionIndexRT_M_Machine_S_ShowGuestProcessControl), SIGNAL(triggered()), 1114 1114 this, SLOT(sltShowGuestProcessControlDialog())); … … 1782 1782 } 1783 1783 1784 void UIMachineLogic::sltShow GuestControlFileManagerDialog()1784 void UIMachineLogic::sltShowFileManagerDialog() 1785 1785 { 1786 1786 if (machine().isNull() || !activeMachineWindow()) … … 1792 1792 1793 1793 QIManagerDialog *pFileManagerDialog; 1794 UI GuestControlFileManagerDialogFactory dialogFactory(actionPool(), console().GetGuest(), machine().GetName());1794 UIFileManagerDialogFactory dialogFactory(actionPool(), console().GetGuest(), machine().GetName()); 1795 1795 dialogFactory.prepare(pFileManagerDialog, activeMachineWindow()); 1796 1796 if (pFileManagerDialog) … … 1803 1803 pFileManagerDialog->activateWindow(); 1804 1804 connect(pFileManagerDialog, &QIManagerDialog::sigClose, 1805 this, &UIMachineLogic::sltClose GuestControlFileManagerDialog);1806 } 1807 } 1808 1809 void UIMachineLogic::sltClose GuestControlFileManagerDialog()1805 this, &UIMachineLogic::sltCloseFileManagerDialog); 1806 } 1807 } 1808 1809 void UIMachineLogic::sltCloseFileManagerDialog() 1810 1810 { 1811 1811 QIManagerDialog* pDialog = qobject_cast<QIManagerDialog*>(sender()); … … 1816 1816 m_pFileManagerDialog = 0; 1817 1817 pDialog->close(); 1818 UI GuestControlFileManagerDialogFactory().cleanup(pDialog);1818 UIFileManagerDialogFactory().cleanup(pDialog); 1819 1819 } 1820 1820 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h
r75291 r76177 274 274 void sltTakeSnapshot(); 275 275 void sltShowInformationDialog(); 276 void sltShow GuestControlFileManagerDialog();277 void sltClose GuestControlFileManagerDialog();276 void sltShowFileManagerDialog(); 277 void sltCloseFileManagerDialog(); 278 278 void sltShowGuestProcessControlDialog(); 279 279 void sltCloseGuestProcessControlDialog();
Note:
See TracChangeset
for help on using the changeset viewer.

