VirtualBox

Changeset 88910 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
May 6, 2021 5:28:11 PM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:8161. Saving softkeyboard dialog geometry immediately as it changes.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/softkeyboard
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/softkeyboard/UISoftKeyboard.cpp

    r88874 r88910  
    38993899}
    39003900
     3901void UISoftKeyboard::resizeEvent(QResizeEvent *pEvent)
     3902{
     3903    QMainWindowWithRestorableGeometryAndRetranslateUi::resizeEvent(pEvent);
     3904    saveDialogGeometry();
     3905}
     3906
     3907void UISoftKeyboard
     3908::moveEvent(QMoveEvent *pEvent)
     3909{
     3910    QMainWindowWithRestorableGeometryAndRetranslateUi::moveEvent(pEvent);
     3911    saveDialogGeometry();
     3912}
     3913
    39013914bool UISoftKeyboard::event(QEvent *pEvent)
    39023915{
     
    42194232}
    42204233
    4221 void UISoftKeyboard::sltSaveSettings()
    4222 {
    4223     /* Save geometry to extradata: */
     4234void UISoftKeyboard::saveDialogGeometry()
     4235{
    42244236    const QRect geo = currentGeometry();
    42254237    LogRel2(("GUI: UISoftKeyboard: Saving geometry as: Origin=%dx%d, Size=%dx%d\n",
    42264238             geo.x(), geo.y(), geo.width(), geo.height()));
    42274239    gEDataManager->setSoftKeyboardDialogGeometry(geo, isCurrentlyMaximized());
    4228 
     4240}
     4241
     4242void UISoftKeyboard::sltSaveSettings()
     4243{
    42294244    /* Save other settings: */
    42304245    if (m_pKeyboardWidget)
  • trunk/src/VBox/Frontends/VirtualBox/src/softkeyboard/UISoftKeyboard.h

    r88874 r88910  
    7070    virtual bool shouldBeMaximized() const /* override */;
    7171    virtual void closeEvent(QCloseEvent *event) /* override */;
     72    virtual void resizeEvent(QResizeEvent *pEvent) /* override */;
     73    virtual void moveEvent(QMoveEvent *pEvent) /* override */;
    7274    bool event(QEvent *pEvent) /* override */;
    7375
     
    112114    void prepareConnections();
    113115    void loadSettings();
     116    void saveDialogGeometry();
    114117    void configure();
    115118    void updateStatusBarMessage(const QString &strLayoutName);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette