Changeset 75196 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Oct 30, 2018 6:35:27 PM (6 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.cpp
r75192 r75196 1247 1247 setShortcutScope(QApplication::translate("UIActionPool", "Log Viewer")); 1248 1248 setStatusTip(QApplication::translate("UIActionPool", "Open pane with searching options")); 1249 setToolTip( tr("Open Find Pane (%1)").arg(shortcut().toString()));1249 setToolTip(QApplication::translate("UIActionPool", "Open Find Pane (%1)").arg(shortcut().toString())); 1250 1250 } 1251 1251 }; … … 1286 1286 setShortcutScope(QApplication::translate("UIActionPool", "Log Viewer")); 1287 1287 setStatusTip(QApplication::translate("UIActionPool", "Open pane with filtering options")); 1288 setToolTip( tr("Open Filter Pane (%1)").arg(shortcut().toString()));1288 setToolTip(QApplication::translate("UIActionPool", "Open Filter Pane (%1)").arg(shortcut().toString())); 1289 1289 } 1290 1290 }; … … 1325 1325 setShortcutScope(QApplication::translate("UIActionPool", "Log Viewer")); 1326 1326 setStatusTip(QApplication::translate("UIActionPool", "Open pane with bookmarking options")); 1327 setToolTip( tr("Open Bookmark Pane (%1)").arg(shortcut().toString()));1327 setToolTip(QApplication::translate("UIActionPool", "Open Bookmark Pane (%1)").arg(shortcut().toString())); 1328 1328 } 1329 1329 }; … … 1364 1364 setShortcutScope(QApplication::translate("UIActionPool", "Log Viewer")); 1365 1365 setStatusTip(QApplication::translate("UIActionPool", "Open pane with log viewer settings")); 1366 setToolTip( tr("Open Settings Pane (%1)").arg(shortcut().toString()));1366 setToolTip(QApplication::translate("UIActionPool", "Open Settings Pane (%1)").arg(shortcut().toString())); 1367 1367 } 1368 1368 }; … … 1403 1403 setShortcutScope(QApplication::translate("UIActionPool", "Log Viewer")); 1404 1404 setStatusTip(QApplication::translate("UIActionPool", "Refresh selected virtual machine log")); 1405 setToolTip( tr("Refresh Virtual Machine Log (%1)").arg(shortcut().toString()));1405 setToolTip(QApplication::translate("UIActionPool", "Refresh Virtual Machine Log (%1)").arg(shortcut().toString())); 1406 1406 } 1407 1407 }; … … 1442 1442 setShortcutScope(QApplication::translate("UIActionPool", "Log Viewer")); 1443 1443 setStatusTip(QApplication::translate("UIActionPool", "Save selected virtual machine log")); 1444 setToolTip( tr("Save Virtual Machine Log (%1)").arg(shortcut().toString()));1444 setToolTip(QApplication::translate("UIActionPool", "Save Virtual Machine Log (%1)").arg(shortcut().toString())); 1445 1445 } 1446 1446 }; … … 1529 1529 1530 1530 1531 /** Simple action extension, used as 'Copy to Guest' in guest control file manager action class. */ 1532 class UIActionMenuGuestControlFileManagerCopyToGuest : public UIActionSimple 1533 { 1534 Q_OBJECT; 1535 1536 public: 1537 1538 /** Constructs action passing @a pParent to the base-class. */ 1539 UIActionMenuGuestControlFileManagerCopyToGuest(UIActionPool *pParent) 1540 : UIActionSimple(pParent, ":/arrow_left_10px_x2.png", ":/arrow_left_disabled_10px_x2.png") 1541 {} 1542 1543 protected: 1544 1545 /** Returns shortcut extra-data ID. */ 1546 virtual QString shortcutExtraDataID() const /* override */ 1547 { 1548 return QString("FileManagerCopyToGuest"); 1549 } 1550 1551 /** Returns default shortcut. */ 1552 virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */ 1553 { 1554 return QKeySequence(); 1555 } 1556 1557 /** Handles translation event. */ 1558 virtual void retranslateUi() /* override */ 1559 { 1560 setName(QApplication::translate("UIActionPool", "Copy the selected object(s) from host to guest")); 1561 setShortcutScope(QApplication::translate("UIActionPool", "Guest Control File Manager")); 1562 setToolTip(QApplication::translate("UIActionPool", "Copy the Selected Object(s) from Host to Guest")); 1563 setStatusTip(QApplication::translate("UIActionPool", "Copy the selected object(s) from host to guest")); 1564 } 1565 }; 1566 1567 /** Simple action extension, used as 'Copy to Host' in guest control file manager action class. */ 1568 class UIActionMenuGuestControlFileManagerCopyToHost : public UIActionSimple 1569 { 1570 Q_OBJECT; 1571 1572 public: 1573 1574 /** Constructs action passing @a pParent to the base-class. */ 1575 UIActionMenuGuestControlFileManagerCopyToHost(UIActionPool *pParent) 1576 : UIActionSimple(pParent, ":/arrow_right_10px_x2.png", ":/arrow_right_disabled_10px_x2.png") 1577 {} 1578 1579 protected: 1580 1581 /** Returns shortcut extra-data ID. */ 1582 virtual QString shortcutExtraDataID() const /* override */ 1583 { 1584 return QString("FileManagerCopyToHost"); 1585 } 1586 1587 /** Returns default shortcut. */ 1588 virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */ 1589 { 1590 return QKeySequence(); 1591 } 1592 1593 /** Handles translation event. */ 1594 virtual void retranslateUi() /* override */ 1595 { 1596 setName(QApplication::translate("UIActionPool", "Copy the selected object(s) from guest to host")); 1597 setShortcutScope(QApplication::translate("UIActionPool", "Guest Control File Manager")); 1598 setToolTip(QApplication::translate("UIActionPool", "Copy the Selected Object(s) from Guest to Host")); 1599 setStatusTip(QApplication::translate("UIActionPool", "Copy the selected object(s) from guest to host")); 1600 } 1601 }; 1602 1603 1531 1604 /** Simple action extension, used as 'File Manager Settings' in guest control file manager action class. */ 1532 1605 class UIActionMenuGuestControlFileManagerSettings : public UIActionSimple … … 1561 1634 setShortcutScope(QApplication::translate("UIActionPool", "Guest Control File Manager")); 1562 1635 setStatusTip(QApplication::translate("UIActionPool", "Modify file manager settings")); 1563 setToolTip( tr("Modify File Manager Settings"));1636 setToolTip(QApplication::translate("UIActionPool", "Modify File Manager Settings")); 1564 1637 } 1565 1638 }; … … 1596 1669 setShortcutScope(QApplication::translate("UIActionPool", "Guest Control File Manager")); 1597 1670 setStatusTip(QApplication::translate("UIActionPool", "Go one level up to parent folder")); 1598 setToolTip( tr("Go One Level Up to Parent Folder"));1671 setToolTip(QApplication::translate("UIActionPool", "Go One Level Up to Parent Folder")); 1599 1672 } 1600 1673 }; … … 1633 1706 setShortcutScope(QApplication::translate("UIActionPool", "Guest Control File Manager")); 1634 1707 setStatusTip(QApplication::translate("UIActionPool", "Go to home folder")); 1635 setToolTip( tr("Go to Home Folder"));1708 setToolTip(QApplication::translate("UIActionPool", "Go to Home Folder")); 1636 1709 } 1637 1710 }; … … 1670 1743 setShortcutScope(QApplication::translate("UIActionPool", "Guest Control File Manager")); 1671 1744 setStatusTip(QApplication::translate("UIActionPool", "Delete selected file object(s)")); 1672 setToolTip( tr("Delete Selected File Object(s)"));1745 setToolTip(QApplication::translate("UIActionPool", "Delete Selected File Object(s)")); 1673 1746 } 1674 1747 }; … … 1706 1779 setShortcutScope(QApplication::translate("UIActionPool", "Guest Control File Manager")); 1707 1780 setStatusTip(QApplication::translate("UIActionPool", "Refresh")); 1708 setToolTip( tr("Refresh"));1781 setToolTip(QApplication::translate("UIActionPool", "Refresh")); 1709 1782 } 1710 1783 }; … … 1742 1815 setShortcutScope(QApplication::translate("UIActionPool", "Guest Control File Manager")); 1743 1816 setStatusTip(QApplication::translate("UIActionPool", "Rename")); 1744 setToolTip( tr("Rename"));1817 setToolTip(QApplication::translate("UIActionPool", "Rename")); 1745 1818 } 1746 1819 }; … … 1777 1850 setShortcutScope(QApplication::translate("UIActionPool", "Guest Control File Manager")); 1778 1851 setStatusTip(QApplication::translate("UIActionPool", "Create New Directory")); 1779 setToolTip( tr("Create New Directory"));1852 setToolTip(QApplication::translate("UIActionPool", "Create New Directory")); 1780 1853 } 1781 1854 }; … … 1813 1886 setShortcutScope(QApplication::translate("UIActionPool", "Guest Control File Manager")); 1814 1887 setStatusTip(QApplication::translate("UIActionPool", "Copy selected file object(s)")); 1815 setToolTip( tr("Copy Selected File Object(s)"));1888 setToolTip(QApplication::translate("UIActionPool", "Copy Selected File Object(s)")); 1816 1889 } 1817 1890 }; … … 1848 1921 setShortcutScope(QApplication::translate("UIActionPool", "Guest Control File Manager")); 1849 1922 setStatusTip(QApplication::translate("UIActionPool", "Cut selected file object(s)")); 1850 setToolTip( tr("Cut Selected File Object(s)"));1923 setToolTip(QApplication::translate("UIActionPool", "Cut Selected File Object(s)")); 1851 1924 } 1852 1925 }; … … 1883 1956 setShortcutScope(QApplication::translate("UIActionPool", "Guest Control File Manager")); 1884 1957 setStatusTip(QApplication::translate("UIActionPool", "Paste copied/cut file object(s)")); 1885 setToolTip( tr("Paste Copied/Cut File Object(s)"));1958 setToolTip(QApplication::translate("UIActionPool", "Paste Copied/Cut File Object(s)")); 1886 1959 } 1887 1960 }; … … 1918 1991 setShortcutScope(QApplication::translate("UIActionPool", "Guest Control File Manager")); 1919 1992 setStatusTip(QApplication::translate("UIActionPool", "Select all files objects")); 1920 setToolTip( tr("Select All Files Objects"));1993 setToolTip(QApplication::translate("UIActionPool", "Select All Files Objects")); 1921 1994 } 1922 1995 }; … … 1954 2027 setShortcutScope(QApplication::translate("UIActionPool", "Guest Control File Manager")); 1955 2028 setStatusTip(QApplication::translate("UIActionPool", "Invert the current selection")); 1956 setToolTip( tr("Invert The Current Selection"));2029 setToolTip(QApplication::translate("UIActionPool", "Invert The Current Selection")); 1957 2030 } 1958 2031 }; … … 1990 2063 setShortcutScope(QApplication::translate("UIActionPool", "Guest Control File Manager")); 1991 2064 setStatusTip(QApplication::translate("UIActionPool", "Show the properties of currently selected file object(s)")); 1992 setToolTip( tr("Show the Properties of Currently Selected File Object(s)"));2065 setToolTip(QApplication::translate("UIActionPool", "Show the Properties of Currently Selected File Object(s)")); 1993 2066 } 1994 2067 }; … … 2207 2280 m_pool[UIActionIndex_M_GuestControlFileManager_M_HostSubmenu] = new UIActionMenuGuestControlFileManagerHostSubmenu(this); 2208 2281 m_pool[UIActionIndex_M_GuestControlFileManager_M_GuestSubmenu] = new UIActionMenuGuestControlFileManagerGuestSubmenu(this); 2282 m_pool[UIActionIndex_M_GuestControlFileManager_S_CopyToGuest] = new UIActionMenuGuestControlFileManagerCopyToGuest(this); 2283 m_pool[UIActionIndex_M_GuestControlFileManager_S_CopyToHost] = new UIActionMenuGuestControlFileManagerCopyToHost(this); 2284 2209 2285 m_pool[UIActionIndex_M_GuestControlFileManager_S_Settings] = new UIActionMenuGuestControlFileManagerSettings(this); 2210 2286 m_pool[UIActionIndex_M_GuestControlFileManager_S_Host_GoUp] = new UIActionMenuGuestControlFileManagerGoUp(this); -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.h
r75136 r75196 102 102 UIActionIndex_M_GuestControlFileManager_M_HostSubmenu, 103 103 UIActionIndex_M_GuestControlFileManager_M_GuestSubmenu, 104 UIActionIndex_M_GuestControlFileManager_S_CopyToGuest, 105 UIActionIndex_M_GuestControlFileManager_S_CopyToHost, 104 106 UIActionIndex_M_GuestControlFileManager_S_Settings, 105 107 UIActionIndex_M_GuestControlFileManager_S_Host_GoUp, -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileManager.cpp
r75193 r75196 353 353 , m_pLogOutput(0) 354 354 , m_pToolBar(0) 355 , m_pCopyGuestToHost(0)356 , m_pCopyHostToGuest(0)357 355 , m_pFileTableContainerWidget(0) 358 356 , m_pFileTableContainerLayout(0) … … 392 390 void UIGuestControlFileManager::retranslateUi() 393 391 { 394 if (m_pCopyGuestToHost)395 {396 m_pCopyGuestToHost->setText(QApplication::translate("UIGuestProcessControlWidget", "Copy the selected object(s) from guest to host"));397 m_pCopyGuestToHost->setToolTip(QApplication::translate("UIGuestProcessControlWidget", "Copy the selected object(s) from guest to host"));398 m_pCopyGuestToHost->setStatusTip(QApplication::translate("UIGuestProcessControlWidget", "Copy the selected object(s) from guest to host"));399 }400 401 if (m_pCopyHostToGuest)402 {403 m_pCopyHostToGuest->setText(QApplication::translate("UIGuestProcessControlWidget", "Copy the selected object(s) from host to guest"));404 m_pCopyHostToGuest->setToolTip(QApplication::translate("UIGuestProcessControlWidget", "Copy the selected object(s) from host to guest"));405 m_pCopyHostToGuest->setStatusTip(QApplication::translate("UIGuestProcessControlWidget", "Copy the selected object(s) from host to guest"));406 }407 408 409 392 m_pTabWidget->setTabText(0, QApplication::translate("UIGuestProcessControlWidget", "Log")); 410 393 m_pTabWidget->setTabText(1, QApplication::translate("UIGuestProcessControlWidget", "File Operations")); 411 394 m_pTabWidget->setTabText(2, QApplication::translate("UIGuestProcessControlWidget", "Terminal")); 412 413 395 } 414 396 … … 523 505 bottomSpacerWidget->setVisible(true); 524 506 525 m_pCopyGuestToHost = new QAction(this);526 if(m_pCopyGuestToHost)527 {528 m_pCopyGuestToHost->setIcon(UIIconPool::iconSet(QString(":/arrow_left_10px_x2.png")));529 connect(m_pCopyGuestToHost, &QAction::triggered, this, &UIGuestControlFileManager::sltCopyGuestToHost);530 }531 532 m_pCopyHostToGuest = new QAction(this);533 if (m_pCopyHostToGuest)534 {535 m_pCopyHostToGuest->setIcon(UIIconPool::iconSet(QString(":/arrow_right_10px_x2.png")));536 connect(m_pCopyHostToGuest, &QAction::triggered, this, &UIGuestControlFileManager::sltCopyHostToGuest);537 }538 539 507 m_pToolBar->addWidget(topSpacerWidget); 540 m_pToolBar->addAction(m_p CopyGuestToHost);541 m_pToolBar->addAction(m_p CopyHostToGuest);508 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_GuestControlFileManager_S_CopyToHost)); 509 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_GuestControlFileManager_S_CopyToGuest)); 542 510 m_pToolBar->addWidget(bottomSpacerWidget); 511 512 connect(m_pActionPool->action(UIActionIndex_M_GuestControlFileManager_S_CopyToHost), &QAction::triggered, 513 this, &UIGuestControlFileManager::sltCopyHostToGuest); 514 connect(m_pActionPool->action(UIActionIndex_M_GuestControlFileManager_S_CopyToGuest), &QAction::triggered, 515 this, &UIGuestControlFileManager::sltCopyGuestToHost); 543 516 544 517 m_pFileTableContainerLayout->addWidget(m_pToolBar); -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileManager.h
r75184 r75196 128 128 QTextEdit *m_pLogOutput; 129 129 UIToolBar *m_pToolBar; 130 QAction *m_pCopyGuestToHost;131 QAction *m_pCopyHostToGuest;130 // QAction *m_pCopyGuestToHost; 131 // QAction *m_pCopyHostToGuest; 132 132 QWidget *m_pFileTableContainerWidget; 133 133 QHBoxLayout *m_pFileTableContainerLayout;
Note:
See TracChangeset
for help on using the changeset viewer.