Changeset 89042 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- May 14, 2021 12:43:04 PM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/softkeyboard
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/softkeyboard/UISoftKeyboard.cpp
r88922 r89042 3854 3854 , m_pSettingsWidget(0) 3855 3855 , m_pStatusBarWidget(0) 3856 , m_iGeometrySaveTimerId(-1) 3856 3857 { 3857 3858 setWindowTitle(QString("%1 - %2").arg(m_strMachineName).arg(tr("Soft Keyboard"))); … … 3907 3908 } 3908 3909 3909 void UISoftKeyboard::resizeEvent(QResizeEvent *pEvent)3910 {3911 QMainWindowWithRestorableGeometryAndRetranslateUi::resizeEvent(pEvent);3912 saveDialogGeometry();3913 }3914 3915 void UISoftKeyboard3916 ::moveEvent(QMoveEvent *pEvent)3917 {3918 QMainWindowWithRestorableGeometryAndRetranslateUi::moveEvent(pEvent);3919 saveDialogGeometry();3920 }3921 3922 3910 bool UISoftKeyboard::event(QEvent *pEvent) 3923 3911 { … … 3936 3924 } 3937 3925 } 3926 else if (pEvent->type() == QEvent::Resize || 3927 pEvent->type() == QEvent::Move) 3928 { 3929 if (m_iGeometrySaveTimerId != -1) 3930 killTimer(m_iGeometrySaveTimerId); 3931 m_iGeometrySaveTimerId = startTimer(300); 3932 } 3933 else if (pEvent->type() == QEvent::Timer) 3934 { 3935 QTimerEvent *pTimerEvent = static_cast<QTimerEvent*>(pEvent); 3936 if (pTimerEvent->timerId() == m_iGeometrySaveTimerId) 3937 { 3938 killTimer(m_iGeometrySaveTimerId); 3939 m_iGeometrySaveTimerId = -1; 3940 saveDialogGeometry(); 3941 } 3942 } 3943 3938 3944 return QMainWindowWithRestorableGeometryAndRetranslateUi::event(pEvent); 3939 3945 } -
trunk/src/VBox/Frontends/VirtualBox/src/softkeyboard/UISoftKeyboard.h
r88912 r89042 70 70 virtual bool shouldBeMaximized() const /* override */; 71 71 virtual void closeEvent(QCloseEvent *event) /* override */; 72 virtual void resizeEvent(QResizeEvent *pEvent) /* override */;73 virtual void moveEvent(QMoveEvent *pEvent) /* override */;74 72 bool event(QEvent *pEvent) /* override */; 75 73 … … 135 133 UISoftKeyboardSettingsWidget *m_pSettingsWidget; 136 134 UISoftKeyboardStatusBarWidget *m_pStatusBarWidget; 135 int m_iGeometrySaveTimerId; 137 136 }; 138 137
Note:
See TracChangeset
for help on using the changeset viewer.