VirtualBox

Changeset 2354 in vbox


Ignore:
Timestamp:
Apr 26, 2007 1:48:04 PM (18 years ago)
Author:
vboxsync
Message:

FE/Qt: Renamed class VMGlobalSettings to VBoxGlobalSettings.

Location:
trunk/src/VBox/Frontends/VirtualBox
Files:
18 edited
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/Makefile

    r2311 r2354  
    6767        include/QIMessageBox.h \
    6868        include/QIRichLabel.h \
    69         include/VMGlobalSettings.h \
     69        include/VBoxGlobalSettings.h \
    7070        include/VBoxUtils.h \
    7171        include/VBoxGlobal.h \
     
    127127        src/QIMessageBox.cpp \
    128128        src/QIRichLabel.cpp \
    129         src/VMGlobalSettings.cpp \
     129        src/VBoxGlobalSettings.cpp \
    130130        src/VBoxGlobal.cpp \
    131131        src/VBoxMediaComboBox.cpp \
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxConsoleView.h

    r2221 r2354  
    2727
    2828#include "VBoxDefs.h"
    29 #include "VMGlobalSettings.h"
     29#include "VBoxGlobalSettings.h"
    3030
    3131#include <qdatetime.h>
     
    180180    CConsole cconsole;
    181181
    182     const VMGlobalSettings &gs;
     182    const VBoxGlobalSettings &gs;
    183183
    184184    CEnums::MachineState last_state;
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxGlobal.h

    r2319 r2354  
    2626#include "COMDefs.h"
    2727
    28 #include "VMGlobalSettings.h"
     28#include "VBoxGlobalSettings.h"
    2929
    3030#include <qapplication.h>
     
    154154    CVirtualBox virtualBox() const { return vbox; }
    155155
    156     const VMGlobalSettings &settings() const { return gset; }
    157     bool setSettings (const VMGlobalSettings &gs);
     156    const VBoxGlobalSettings &settings() const { return gset; }
     157    bool setSettings (const VBoxGlobalSettings &gs);
    158158
    159159    VBoxSelectorWnd &selectorWnd();
     
    483483    CVirtualBox vbox;
    484484
    485     VMGlobalSettings gset;
     485    VBoxGlobalSettings gset;
    486486
    487487    VBoxSelectorWnd *selector_wnd;
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxGlobalSettings.h

    r2349 r2354  
    22 *
    33 * VBox frontends: Qt GUI ("VirtualBox"):
    4  * VMGlobalSettingsData, VMGlobalSettings class declarations
     4 * VBoxGlobalSettingsData, VBoxGlobalSettings class declarations
    55 */
    66
     
    2121 */
    2222
    23 #ifndef __VMGlobalSettings_h__
    24 #define __VMGlobalSettings_h__
     23#ifndef __VBoxGlobalSettings_h__
     24#define __VBoxGlobalSettings_h__
    2525
    2626#include "CIShared.h"
     
    3030class CVirtualBox;
    3131
    32 class VMGlobalSettingsData
     32class VBoxGlobalSettingsData
    3333{
    3434public:
    3535
    36     VMGlobalSettingsData();
    37     VMGlobalSettingsData( const VMGlobalSettingsData &that );
    38     virtual ~VMGlobalSettingsData();
    39     bool operator==( const VMGlobalSettingsData &that ) const;
     36    VBoxGlobalSettingsData();
     37    VBoxGlobalSettingsData( const VBoxGlobalSettingsData &that );
     38    virtual ~VBoxGlobalSettingsData();
     39    bool operator==( const VBoxGlobalSettingsData &that ) const;
    4040
    4141private:
     
    4646    QString languageId;
    4747
    48     friend class VMGlobalSettings;
     48    friend class VBoxGlobalSettings;
    4949};
    5050
    5151/////////////////////////////////////////////////////////////////////////////
    5252
    53 class VMGlobalSettings : public QObject, public CIShared <VMGlobalSettingsData>
     53class VBoxGlobalSettings : public QObject, public CIShared <VBoxGlobalSettingsData>
    5454{
    5555    Q_OBJECT
     
    6161public:
    6262
    63     VMGlobalSettings (bool null = true)
    64         : CIShared <VMGlobalSettingsData> (null) {}
    65     VMGlobalSettings (const VMGlobalSettings &that)
    66         : QObject(), CIShared <VMGlobalSettingsData> (that) {}
    67     VMGlobalSettings &operator= (const VMGlobalSettings &that) {
    68         CIShared <VMGlobalSettingsData>::operator= (that);
     63    VBoxGlobalSettings (bool null = true)
     64        : CIShared <VBoxGlobalSettingsData> (null) {}
     65    VBoxGlobalSettings (const VBoxGlobalSettings &that)
     66        : QObject(), CIShared <VBoxGlobalSettingsData> (that) {}
     67    VBoxGlobalSettings &operator= (const VBoxGlobalSettings &that) {
     68        CIShared <VBoxGlobalSettingsData>::operator= (that);
    6969        return *this;
    7070    }
     
    132132};
    133133
    134 #endif // __VMGlobalSettings_h__
     134#endif // __VBoxGlobalSettings_h__
  • trunk/src/VBox/Frontends/VirtualBox/nls/VirtualBox_de.ts

    r2352 r2354  
    37553755</context>
    37563756<context>
    3757     <name>VMGlobalSettings</name>
     3757    <name>VBoxGlobalSettings</name>
    37583758    <message>
    37593759        <source>&apos;%1 (0x%2)&apos; is an invalid host key code.</source>
  • trunk/src/VBox/Frontends/VirtualBox/nls/VirtualBox_es.ts

    r2352 r2354  
    38803880</context>
    38813881<context>
    3882     <name>VMGlobalSettings</name>
     3882    <name>VBoxGlobalSettings</name>
    38833883    <message>
    38843884        <source>&apos;%1 (0x%2)&apos; is an invalid host key code.</source>
  • trunk/src/VBox/Frontends/VirtualBox/nls/VirtualBox_fr.ts

    r2352 r2354  
    41354135</context>
    41364136<context>
    4137     <name>VMGlobalSettings</name>
     4137    <name>VBoxGlobalSettings</name>
    41384138    <message>
    41394139        <source>&apos;%1 (0x%2)&apos; is an invalid host key code.</source>
  • trunk/src/VBox/Frontends/VirtualBox/nls/VirtualBox_it.ts

    r2352 r2354  
    42094209</context>
    42104210<context>
    4211     <name>VMGlobalSettings</name>
     4211    <name>VBoxGlobalSettings</name>
    42124212    <message>
    42134213        <source>&apos;%1 (0x%2)&apos; is an invalid host key code.</source>
  • trunk/src/VBox/Frontends/VirtualBox/nls/VirtualBox_ro.ts

    r2352 r2354  
    42434243</context>
    42444244<context>
    4245     <name>VMGlobalSettings</name>
     4245    <name>VBoxGlobalSettings</name>
    42464246    <message>
    42474247        <source>&apos;%1 (0x%2)&apos; is an invalid host key code.</source>
  • trunk/src/VBox/Frontends/VirtualBox/nls/VirtualBox_ru.ts

    r2353 r2354  
    38133813</context>
    38143814<context>
    3815     <name>VMGlobalSettings</name>
     3815    <name>VBoxGlobalSettings</name>
    38163816    <message>
    38173817        <source>&apos;%1 (0x%2)&apos; is an invalid host key code.</source>
  • trunk/src/VBox/Frontends/VirtualBox/nls/VirtualBox_xx_YY.ts

    r2352 r2354  
    37383738</context>
    37393739<context>
    3740     <name>VMGlobalSettings</name>
     3740    <name>VBoxGlobalSettings</name>
    37413741    <message>
    37423742        <source>&apos;%1 (0x%2)&apos; is an invalid host key code.</source>
  • trunk/src/VBox/Frontends/VirtualBox/nls/VirtualBox_zh_CN.ts

    r2352 r2354  
    40384038</context>
    40394039<context>
    4040     <name>VMGlobalSettings</name>
     4040    <name>VBoxGlobalSettings</name>
    40414041    <message>
    40424042        <source>&apos;%1 (0x%2)&apos; is an invalid host key code.</source>
  • trunk/src/VBox/Frontends/VirtualBox/nls/VirtualBox_zh_TW.ts

    r2352 r2354  
    48644864</context>
    48654865<context>
    4866     <name>VMGlobalSettings</name>
     4866    <name>VBoxGlobalSettings</name>
    48674867    <message>
    48684868        <source>&apos;%1 (0x%2)&apos; is an invalid host key code.</source>
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp

    r2349 r2354  
    714714void VBoxConsoleWnd::loadGuiCustomizations()
    715715{
    716     VMGlobalSettings settings = vboxGlobal().settings();
     716    VBoxGlobalSettings settings = vboxGlobal().settings();
    717717    /* Process known keys */
    718718    menuBar()->setHidden (settings.isFeatureActive ("noMenuBar"));
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp

    r2328 r2354  
    185185            {
    186186                // try to set the global setting to check its syntax
    187                 VMGlobalSettings gs (false /* non-null */);
     187                VBoxGlobalSettings gs (false /* non-null */);
    188188                if (gs.setPublicProperty (sKey, sVal))
    189189                {
     
    609609 *  Sets the new global settings and saves them to the VirtualBox server.
    610610 */
    611 bool VBoxGlobal::setSettings (const VMGlobalSettings &gs)
     611bool VBoxGlobal::setSettings (const VBoxGlobalSettings &gs)
    612612{
    613613    gs.save (vbox);
     
    18561856/**
    18571857 *  Returns the loaded (active) language ID.
    1858  *  Note that it may not match with VMGlobalSettings::languageId() if the
     1858 *  Note that it may not match with VBoxGlobalSettings::languageId() if the
    18591859 *  specified language cannot be loaded.
    18601860 *  If the built-in language is active, this method returns "C".
     
    29552955
    29562956    // create default non-null global settings
    2957     gset = VMGlobalSettings (false);
     2957    gset = VBoxGlobalSettings (false);
    29582958
    29592959    // try to load global settings
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobalSettings.cpp

    r2349 r2354  
    22 *
    33 * VBox frontends: Qt GUI ("VirtualBox"):
    4  * VMGlobalSettingsData, VMGlobalSettings class implementation
     4 * VBoxGlobalSettingsData, VBoxGlobalSettings class implementation
    55 */
    66
     
    2525#include <qregexp.h>
    2626
    27 #include "VMGlobalSettings.h"
     27#include "VBoxGlobalSettings.h"
    2828#include "QIHotKeyEdit.h"
    2929#include "COMDefs.h"
     
    3131#include <qvariant.h>
    3232
    33 /** @class VMGlobalSettingsData
    34  *
    35  *  The VMGlobalSettingsData class incapsulates the global settings
     33/** @class VBoxGlobalSettingsData
     34 *
     35 *  The VBoxGlobalSettingsData class incapsulates the global settings
    3636 *  of the VirtualBox.
    3737 */
    3838
    39 VMGlobalSettingsData::VMGlobalSettingsData()
     39VBoxGlobalSettingsData::VBoxGlobalSettingsData()
    4040{
    4141    /* default settings */
     
    5959}
    6060
    61 VMGlobalSettingsData::VMGlobalSettingsData( const VMGlobalSettingsData &that ) {
     61VBoxGlobalSettingsData::VBoxGlobalSettingsData( const VBoxGlobalSettingsData &that ) {
    6262    hostkey = that.hostkey;
    6363    autoCapture = that.autoCapture;
     
    6666}
    6767
    68 VMGlobalSettingsData::~VMGlobalSettingsData()
    69 {
    70 }
    71 
    72 bool VMGlobalSettingsData::operator==( const VMGlobalSettingsData &that ) const
     68VBoxGlobalSettingsData::~VBoxGlobalSettingsData()
     69{
     70}
     71
     72bool VBoxGlobalSettingsData::operator==( const VBoxGlobalSettingsData &that ) const
    7373{
    7474    return this == &that || (
     
    8080}
    8181
    82 /** @class VMGlobalSettings
    83  *
    84  *  The VMGlobalSettings class is a wrapper class for VMGlobalSettingsData
     82/** @class VBoxGlobalSettings
     83 *
     84 *  The VBoxGlobalSettings class is a wrapper class for VBoxGlobalSettingsData
    8585 *  to implement implicit sharing of VirtualBox global data.
    8686 */
     
    104104};
    105105
    106 void VMGlobalSettings::setHostKey (int key)
     106void VBoxGlobalSettings::setHostKey (int key)
    107107{
    108108    if (!QIHotKeyEdit::isValidKey (key))
     
    117117}
    118118
    119 bool VMGlobalSettings::isFeatureActive (const char *aFeature) const
     119bool VBoxGlobalSettings::isFeatureActive (const char *aFeature) const
    120120{
    121121    QStringList featureList = QStringList::split (',', data()->guiFeatures);
     
    136136 *  @note   This method emits the #propertyChanged() signal.
    137137 */
    138 void VMGlobalSettings::load (CVirtualBox &vbox)
     138void VBoxGlobalSettings::load (CVirtualBox &vbox)
    139139{
    140140    for (size_t i = 0; i < SIZEOF_ARRAY (gPropertyMap); i++)
     
    160160 *  vbox.isOk() will be false to indicate this).
    161161 */
    162 void VMGlobalSettings::save (CVirtualBox &vbox) const
     162void VBoxGlobalSettings::save (CVirtualBox &vbox) const
    163163{
    164164    for (size_t i = 0; i < SIZEOF_ARRAY (gPropertyMap); i++)
     
    177177 *  or QString::null if there is no such public property.
    178178 */
    179 QString VMGlobalSettings::publicProperty (const QString &publicName) const
     179QString VBoxGlobalSettings::publicProperty (const QString &publicName) const
    180180{
    181181    for (size_t i = 0; i < SIZEOF_ARRAY (gPropertyMap); i++)
     
    209209 *  @note   This method emits the #propertyChanged() signal.
    210210 */
    211 bool VMGlobalSettings::setPublicProperty (const QString &publicName, const QString &value)
     211bool VBoxGlobalSettings::setPublicProperty (const QString &publicName, const QString &value)
    212212{
    213213    for (size_t i = 0; i < SIZEOF_ARRAY (gPropertyMap); i++)
     
    223223}
    224224
    225 void VMGlobalSettings::setPropertyPrivate (int index, const QString &value)
     225void VBoxGlobalSettings::setPropertyPrivate (int index, const QString &value)
    226226{
    227227    if (value.isNull())
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxSelectorWnd.cpp

    r2351 r2354  
    635635void VBoxSelectorWnd::fileSettings()
    636636{
    637     VMGlobalSettings settings = vboxGlobal().settings();
     637    VBoxGlobalSettings settings = vboxGlobal().settings();
    638638    CSystemProperties props = vboxGlobal().virtualBox().GetSystemProperties();
    639639
     
    643643    if (dlg.exec() == QDialog::Accepted)
    644644    {
    645         VMGlobalSettings s = settings;
     645        VBoxGlobalSettings s = settings;
    646646        dlg.putBackTo (props, s);
    647647        if (!props.isOk())
  • trunk/src/VBox/Frontends/VirtualBox/src/main.cpp

    r2309 r2354  
    170170    if (vboxGlobal().isValid())
    171171    {
    172         VMGlobalSettings settings = vboxGlobal().settings();
     172        VBoxGlobalSettings settings = vboxGlobal().settings();
    173173        /* Process known keys */
    174174        bool noSelector = settings.isFeatureActive ("noSelector");
  • trunk/src/VBox/Frontends/VirtualBox/ui/VBoxGlobalSettingsDlg.ui

    r2351 r2354  
    12021202    <include location="local" impldecl="in declaration">QIWidgetValidator.h</include>
    12031203    <include location="local" impldecl="in declaration">QIHotKeyEdit.h</include>
    1204     <include location="local" impldecl="in declaration">VMGlobalSettings.h</include>
     1204    <include location="local" impldecl="in declaration">VBoxGlobalSettings.h</include>
    12051205    <include location="local" impldecl="in implementation">VBoxUtils.h</include>
    12061206    <include location="local" impldecl="in implementation">VBoxGlobal.h</include>
     
    12511251    <function access="private" returnType="bool">event( QEvent * )</function>
    12521252    <function access="protected">showEvent( QShowEvent * )</function>
    1253     <function>getFrom( const CSystemProperties &amp; props, const VMGlobalSettings &amp; gs )</function>
    1254     <function>putBackTo( CSystemProperties &amp; props, VMGlobalSettings &amp; gs )</function>
     1253    <function>getFrom( const CSystemProperties &amp; props, const VBoxGlobalSettings &amp; gs )</function>
     1254    <function>putBackTo( CSystemProperties &amp; props, VBoxGlobalSettings &amp; gs )</function>
    12551255    <function access="protected">setWarning( const QString &amp; )</function>
    12561256    <function returnType="bool">eventFilter( QObject * watched, QEvent * e )</function>
  • trunk/src/VBox/Frontends/VirtualBox/ui/VBoxGlobalSettingsDlg.ui.h

    r2350 r2354  
    553553
    554554/**
    555  *  Reads global settings from the given VMGlobalSettings instance
     555 *  Reads global settings from the given VBoxGlobalSettings instance
    556556 *  and from the given CSystemProperties object.
    557557 */
    558558void VBoxGlobalSettingsDlg::getFrom (const CSystemProperties &props,
    559                                      const VMGlobalSettings &gs)
     559                                     const VBoxGlobalSettings &gs)
    560560{
    561561    /* default folders */
     
    629629
    630630/**
    631  *  Writes global settings to the given VMGlobalSettings instance
     631 *  Writes global settings to the given VBoxGlobalSettings instance
    632632 *  and to the given CSystemProperties object.
    633633 */
    634634void VBoxGlobalSettingsDlg::putBackTo (CSystemProperties &props,
    635                                        VMGlobalSettings &gs)
     635                                       VBoxGlobalSettings &gs)
    636636{
    637637    /* default folders */
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