VirtualBox

Ignore:
Timestamp:
Nov 1, 2010 6:35:05 AM (14 years ago)
Author:
vboxsync
Message:

FE/Qt: Async settings mechanism. Global and Machine settings reworked to use cache loaded and saved in parallel thread.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/vm/VBoxVMSettingsGeneral.h

    r33599 r33631  
    66
    77/*
    8  * Copyright (C) 2006-2008 Oracle Corporation
     8 * Copyright (C) 2006-2010 Oracle Corporation
    99 *
    1010 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    2424#include "COMDefs.h"
    2525
    26 class VBoxVMSettingsGeneral : public UISettingsPage,
     26/* Machine settings / General page / Cache: */
     27struct UISettingsCacheMachineGeneral
     28{
     29    QString m_strName;
     30    QString m_strGuestOsTypeId;
     31    bool m_fSaveMountedAtRuntime;
     32    bool m_fShowMiniToolBar;
     33    bool m_fMiniToolBarAtTop;
     34    QString m_strSnapshotsFolder;
     35    QString m_strSnapshotsHomeDir;
     36    KClipboardMode m_clipboardMode;
     37    QString m_strDescription;
     38};
     39
     40/* Machine settings / General page: */
     41class VBoxVMSettingsGeneral : public UISettingsPageMachine,
    2742                              public Ui::VBoxVMSettingsGeneral
    2843{
     
    4560protected:
    4661
    47     void getFrom (const CMachine &aMachine);
    48     void putBackTo();
     62    /* Load data to cashe from corresponding external object(s),
     63     * this task COULD be performed in other than GUI thread: */
     64    void loadToCacheFrom(QVariant &data);
     65    /* Load data to corresponding widgets from cache,
     66     * this task SHOULD be performed in GUI thread only: */
     67    void getFromCache();
     68
     69    /* Save data from corresponding widgets to cache,
     70     * this task SHOULD be performed in GUI thread only: */
     71    void putToCache();
     72    /* Save data from cache to corresponding external object(s),
     73     * this task COULD be performed in other than GUI thread: */
     74    void saveFromCacheTo(QVariant &data);
    4975
    5076    void setValidator (QIWidgetValidator *aVal);
     
    5884    void showEvent (QShowEvent *aEvent);
    5985
    60     CMachine mMachine;
    6186    QIWidgetValidator *mValidator;
     87
     88    /* Cache: */
     89    UISettingsCacheMachineGeneral m_cache;
    6290};
    6391
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