Changeset 88785 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Apr 29, 2021 2:02:38 PM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 144115
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r88780 r88785 1627 1627 1628 1628 /* Create the soft keyboard only once: */ 1629 if (!m_pSoftKeyboardDialog) 1630 { 1631 QWidget *pCenterWidget = windowManager().realParentWindow(activeMachineWindow()); 1632 m_pSoftKeyboardDialog = new UISoftKeyboard(0, uisession(), pCenterWidget, machine().GetName()); 1633 connect(m_pSoftKeyboardDialog, &UISoftKeyboard::sigClose, this, &UIMachineLogic::sltCloseSoftKeyboard); 1634 } 1635 1629 1636 if (m_pSoftKeyboardDialog) 1630 1637 { … … 1633 1640 m_pSoftKeyboardDialog->setWindowState(m_pSoftKeyboardDialog->windowState() & ~Qt::WindowMinimized); 1634 1641 m_pSoftKeyboardDialog->activateWindow(); 1635 return; 1636 } 1637 QWidget *pCenterWidget = windowManager().realParentWindow(activeMachineWindow()); 1638 m_pSoftKeyboardDialog = new UISoftKeyboard(0, uisession(), pCenterWidget, machine().GetName()); 1639 if (m_pSoftKeyboardDialog) 1640 { 1641 connect(m_pSoftKeyboardDialog, &QMainWindow::destroyed, this, &UIMachineLogic::sltSoftKeyboardClosed); 1642 m_pSoftKeyboardDialog->show(); 1643 } 1644 } 1645 1646 void UIMachineLogic::sltSoftKeyboardClosed() 1647 { 1642 } 1643 } 1644 1645 void UIMachineLogic::sltCloseSoftKeyboard() 1646 { 1647 delete m_pSoftKeyboardDialog; 1648 1648 m_pSoftKeyboardDialog = 0; 1649 1649 } … … 2810 2810 sltCloseFileManagerDialog(); 2811 2811 sltCloseVMInformationDialog(); 2812 sltCloseSoftKeyboard(); 2812 2813 } 2813 2814 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h
r88741 r88785 268 268 void sltShowKeyboardSettings(); 269 269 void sltShowSoftKeyboard(); 270 void slt SoftKeyboardClosed();270 void sltCloseSoftKeyboard(); 271 271 void sltToggleMouseIntegration(bool fEnabled); 272 272 void sltTypeCAD(); -
trunk/src/VBox/Frontends/VirtualBox/src/softkeyboard/UISoftKeyboard.cpp
r87001 r88785 3849 3849 { 3850 3850 setWindowTitle(QString("%1 - %2").arg(m_strMachineName).arg(tr("Soft Keyboard"))); 3851 setAttribute(Qt::WA_DeleteOnClose);3852 3851 prepareObjects(); 3853 3852 prepareConnections(); … … 3888 3887 { 3889 3888 QString strJoinedString = strNameList.join("<br/>"); 3890 if ( msgCenter().questionBinary(this, MessageType_Warning,3889 if (!msgCenter().questionBinary(this, MessageType_Warning, 3891 3890 tr("<p>Following layouts are edited/copied but not saved:</p>%1" 3892 3891 "<p>Closing this dialog will cause loosing the changes. Proceed?</p>").arg(strJoinedString), 3893 3892 0 /* auto-confirm id */, 3894 3893 "Ok", "Cancel")) 3895 QMainWindowWithRestorableGeometryAndRetranslateUi::closeEvent(event); 3896 else 3894 { 3897 3895 event->ignore(); 3898 return; 3899 } 3900 QMainWindowWithRestorableGeometryAndRetranslateUi::closeEvent(event); 3896 return; 3897 } 3898 } 3899 emit sigClose(); 3900 event->ignore(); 3901 3901 } 3902 3902 -
trunk/src/VBox/Frontends/VirtualBox/src/softkeyboard/UISoftKeyboard.h
r86995 r88785 57 57 58 58 void sigHelpRequested(const QString &strHelpKeyword); 59 void sigClose(); 59 60 60 61 public:
Note:
See TracChangeset
for help on using the changeset viewer.