- Timestamp:
- Feb 8, 2017 1:27:21 PM (8 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/settings/global
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsDisplay.cpp
r62493 r65678 5 5 6 6 /* 7 * Copyright (C) 2012-201 6Oracle Corporation7 * Copyright (C) 2012-2017 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 27 27 28 28 29 /* Display page constructor: */30 29 UIGlobalSettingsDisplay::UIGlobalSettingsDisplay() 31 30 { … … 49 48 } 50 49 51 /* Load data to cache from corresponding external object(s),52 * this task COULD be performed in other than GUI thread: */53 50 void UIGlobalSettingsDisplay::loadToCacheFrom(QVariant &data) 54 51 { … … 64 61 } 65 62 66 /* Load data to corresponding widgets from cache,67 * this task SHOULD be performed in GUI thread only: */68 63 void UIGlobalSettingsDisplay::getFromCache() 69 64 { … … 91 86 m_pResolutionHeightSpin->setValue(iHeight); 92 87 } 93 /* Set state for corresponding check-box: */94 88 m_pCheckBoxActivateOnMouseHover->setChecked(m_cache.m_fActivateHoveredMachineWindow); 95 89 } 96 90 97 /* Save data from corresponding widgets to cache,98 * this task SHOULD be performed in GUI thread only: */99 91 void UIGlobalSettingsDisplay::putToCache() 100 92 { … … 117 109 m_cache.m_strMaxGuestResolution = QString("%1,%2").arg(m_pResolutionWidthSpin->value()).arg(m_pResolutionHeightSpin->value()); 118 110 } 119 /* Acquire state from corresponding check-box: */120 111 m_cache.m_fActivateHoveredMachineWindow = m_pCheckBoxActivateOnMouseHover->isChecked(); 121 112 } 122 113 123 /* Save data from cache to corresponding external object(s),124 * this task COULD be performed in other than GUI thread: */125 114 void UIGlobalSettingsDisplay::saveFromCacheTo(QVariant &data) 126 115 { -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsDisplay.h
r62493 r65678 5 5 6 6 /* 7 * Copyright (C) 2012-201 6Oracle Corporation7 * Copyright (C) 2012-2017 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 16 16 */ 17 17 18 #ifndef __ UIGlobalSettingsDisplay_h__19 #define __ UIGlobalSettingsDisplay_h__18 #ifndef ___UIGlobalSettingsDisplay_h___ 19 #define ___UIGlobalSettingsDisplay_h___ 20 20 21 /* Localincludes: */21 /* GUI includes: */ 22 22 #include "UISettingsPage.h" 23 23 #include "UIGlobalSettingsDisplay.gen.h" 24 24 25 /* Global settings / Display page / Cache: */ 25 26 /** Global settings: Display page cache structure. */ 26 27 struct UISettingsCacheGlobalDisplay 27 28 { 29 /** Holds the maximum guest resolution or preset name. */ 28 30 QString m_strMaxGuestResolution; 31 /** Holds whether we should automatically activate machine window under the mouse cursor. */ 29 32 bool m_fActivateHoveredMachineWindow; 30 33 }; 31 34 32 /* Global settings / Display page: */ 35 36 /** Global settings: Display page. */ 33 37 class UIGlobalSettingsDisplay : public UISettingsPageGlobal, public Ui::UIGlobalSettingsDisplay 34 38 { … … 76 80 }; 77 81 78 #endif / / __UIGlobalSettingsDisplay_h__82 #endif /* !___UIGlobalSettingsDisplay_h___ */ 79 83 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsExtension.cpp
r64778 r65678 5 5 6 6 /* 7 * Copyright (C) 2010-201 6Oracle Corporation7 * Copyright (C) 2010-2017 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 63 63 if (m_data.m_strVersion.contains(QRegExp("[-_]"))) 64 64 strAppend = m_data.m_strVersion.section(QRegExp("[-_]"), 1, -1, QString::SectionIncludeLeadingSep); 65 setText(2, QString("%1r%2%3").arg(strVersion).arg(m_data.m_ strRevision).arg(strAppend));65 setText(2, QString("%1r%2%3").arg(strVersion).arg(m_data.m_uRevision).arg(strAppend)); 66 66 67 67 /* Tool-tip: */ … … 97 97 }; 98 98 99 /* Extension page constructor: */ 99 100 100 UIGlobalSettingsExtension::UIGlobalSettingsExtension() 101 101 : m_pActionAdd(0), m_pActionRemove(0) … … 237 237 } 238 238 239 /* Load data to cache from corresponding external object(s),240 * this task COULD be performed in other than GUI thread: */241 239 void UIGlobalSettingsExtension::loadToCacheFrom(QVariant &data) 242 240 { … … 254 252 } 255 253 256 /* Load data to corresponding widgets from cache,257 * this task SHOULD be performed in GUI thread only: */258 254 void UIGlobalSettingsExtension::getFromCache() 259 255 { … … 268 264 } 269 265 270 /* Save data from corresponding widgets to cache,271 * this task SHOULD be performed in GUI thread only: */272 266 void UIGlobalSettingsExtension::putToCache() 273 267 { 274 /* Nothing to put to cache... */ 275 } 276 277 /* Save data from cache to corresponding external object(s), 278 * this task COULD be performed in other than GUI thread: */ 268 /* Nothing to upload to cache... */ 269 } 270 279 271 void UIGlobalSettingsExtension::saveFromCacheTo(QVariant &data) 280 272 { … … 467 459 item.m_strDescription = package.GetDescription(); 468 460 item.m_strVersion = package.GetVersion(); 469 item.m_ strRevision = package.GetRevision();461 item.m_uRevision = package.GetRevision(); 470 462 item.m_fIsUsable = package.GetUsable(); 471 463 if (!item.m_fIsUsable) -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsExtension.h
r62493 r65678 5 5 6 6 /* 7 * Copyright (C) 2010-201 6Oracle Corporation7 * Copyright (C) 2010-2017 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 16 16 */ 17 17 18 #ifndef __ UIGlobalSettingsExtension_h__19 #define __ UIGlobalSettingsExtension_h__18 #ifndef ___UIGlobalSettingsExtension_h___ 19 #define ___UIGlobalSettingsExtension_h___ 20 20 21 /* Local includes*/21 /* GUI includes: */ 22 22 #include "UISettingsPage.h" 23 23 #include "UIGlobalSettingsExtension.gen.h" 24 24 25 /* Global settings / Extension page / Cache Item: */ 25 26 /** Global settings: Extension page item cache structure. */ 26 27 struct UISettingsCacheGlobalExtensionItem 27 28 { 29 /** Holds the extension item name. */ 28 30 QString m_strName; 31 /** Holds the extension item description. */ 29 32 QString m_strDescription; 33 /** Holds the extension item version. */ 30 34 QString m_strVersion; 31 ULONG m_strRevision; 35 /** Holds the extension item revision. */ 36 ULONG m_uRevision; 37 /** Holds whether the extension item usable. */ 32 38 bool m_fIsUsable; 39 /** Holds why the extension item is unusable. */ 33 40 QString m_strWhyUnusable; 34 41 }; 35 42 36 /* Global settings / Extension page / Cache: */ 43 44 /** Global settings: Extension page cache structure. */ 37 45 struct UISettingsCacheGlobalExtension 38 46 { 47 /** Holds the extension items. */ 39 48 QList<UISettingsCacheGlobalExtensionItem> m_items; 40 49 }; 41 50 42 /* Global settings / Extension page: */ 51 52 /** Global settings: Extension page. */ 43 53 class UIGlobalSettingsExtension : public UISettingsPageGlobal, public Ui::UIGlobalSettingsExtension 44 54 { … … 97 107 }; 98 108 99 #endif / / __UIGlobalSettingsExtension_h__109 #endif /* !___UIGlobalSettingsExtension_h___ */ 100 110 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsGeneral.cpp
r62493 r65678 5 5 6 6 /* 7 * Copyright (C) 2006-201 6Oracle Corporation7 * Copyright (C) 2006-2017 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 48 48 } 49 49 50 /* Load data to cache from corresponding external object(s),51 * this task COULD be performed in other than GUI thread: */52 50 void UIGlobalSettingsGeneral::loadToCacheFrom(QVariant &data) 53 51 { … … 64 62 } 65 63 66 /* Load data to corresponding widgets from cache,67 * this task SHOULD be performed in GUI thread only: */68 64 void UIGlobalSettingsGeneral::getFromCache() 69 65 { … … 74 70 } 75 71 76 /* Save data from corresponding widgets to cache,77 * this task SHOULD be performed in GUI thread only: */78 72 void UIGlobalSettingsGeneral::putToCache() 79 73 { … … 84 78 } 85 79 86 /* Save data from cache to corresponding external object(s),87 * this task COULD be performed in other than GUI thread: */88 80 void UIGlobalSettingsGeneral::saveFromCacheTo(QVariant &data) 89 81 { -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsGeneral.h
r62493 r65678 5 5 6 6 /* 7 * Copyright (C) 2006-201 6Oracle Corporation7 * Copyright (C) 2006-2017 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 16 16 */ 17 17 18 #ifndef __ UIGlobalSettingsGeneral_h__19 #define __ UIGlobalSettingsGeneral_h__18 #ifndef ___UIGlobalSettingsGeneral_h___ 19 #define ___UIGlobalSettingsGeneral_h___ 20 20 21 /* Local includes*/21 /* GUI includes: */ 22 22 #include "UISettingsPage.h" 23 23 #include "UIGlobalSettingsGeneral.gen.h" 24 24 25 /* Global settings / General page / Cache: */ 25 26 /** Global settings: General page cache structure. */ 26 27 struct UISettingsCacheGlobalGeneral 27 28 { 29 /** Holds the default machine folder path. */ 28 30 QString m_strDefaultMachineFolder; 31 /** Holds the VRDE authentication library name. */ 29 32 QString m_strVRDEAuthLibrary; 33 /** Holds whether host screen-saver should be disabled. */ 30 34 bool m_fHostScreenSaverDisabled; 31 35 }; 32 36 33 /* Global settings / General page: */ 37 38 /** Global settings: General page. */ 34 39 class UIGlobalSettingsGeneral : public UISettingsPageGlobal, public Ui::UIGlobalSettingsGeneral 35 40 { … … 69 74 }; 70 75 71 #endif // __UIGlobalSettingsGeneral_h__ 76 #endif /* !___UIGlobalSettingsGeneral_h___ */ 77 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInput.cpp
r64266 r65678 5 5 6 6 /* 7 * Copyright (C) 2006-201 6Oracle Corporation7 * Copyright (C) 2006-2017 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 30 30 # include "QIStyledItemDelegate.h" 31 31 # include "QITableView.h" 32 # include "UIActionPool.h" 32 33 # include "UIGlobalSettingsInput.h" 33 34 # include "UIShortcutPool.h" … … 53 54 54 55 55 /** Global settings / Input page / Shortcut table cell. */56 /** Global settings: Input page: Shortcut cell cache structure. */ 56 57 class UIShortcutCacheCell : public QITableViewCell 57 58 { … … 78 79 79 80 80 /** Global settings / Input page / Shortcut table row. */81 /** Global settings: Input page: Shortcut cache structure. */ 81 82 class UIShortcutCacheRow : public QITableViewRow 82 83 { … … 214 215 QPair<UIShortcutCacheCell*, UIShortcutCacheCell*> m_cells; 215 216 }; 216 217 218 /** Global settings / Input page / Cache / Shortcut cache. */219 217 typedef QList<UIShortcutCacheRow> UIShortcutCache; 220 218 221 219 222 /** Global settings / Input page / Cache. */220 /** Global settings: Input page cache structure. */ 223 221 class UISettingsCacheGlobalInput : public QObject 224 222 { … … 251 249 252 250 253 /** Global settings / Input page / Cache / Shortcut cache itemsort functor. */251 /** Global settings: Input page: Shortcut cache sort functor. */ 254 252 class UIShortcutCacheItemFunctor 255 253 { … … 869 867 } 870 868 871 /* Load data to cache from corresponding external object(s),872 * this task COULD be performed in other than GUI thread: */873 869 void UIGlobalSettingsInput::loadToCacheFrom(QVariant &data) 874 870 { … … 876 872 UISettingsPageGlobal::fetchData(data); 877 873 878 /* Load host-combo shortcutto cache: */874 /* Load to cache: */ 879 875 m_pCache->shortcuts() << UIShortcutCacheRow(m_pMachineTable, UIHostCombo::hostComboCacheKey(), tr("Host Key Combination"), m_settings.hostCombo(), QString()); 880 /* Load all other shortcuts to cache: */881 876 const QMap<QString, UIShortcut>& shortcuts = gShortcutPool->shortcuts(); 882 877 const QList<QString> shortcutKeys = shortcuts.keys(); … … 891 886 shortcut.defaultSequence().toString(QKeySequence::NativeText)); 892 887 } 893 /* Load other things to cache: */894 888 m_pCache->setAutoCapture(m_settings.autoCapture()); 895 889 … … 898 892 } 899 893 900 /* Load data to corresponding widgets from cache,901 * this task SHOULD be performed in GUI thread only: */902 894 void UIGlobalSettingsInput::getFromCache() 903 895 { … … 911 903 } 912 904 913 /* Save data from corresponding widgets to cache,914 * this task SHOULD be performed in GUI thread only: */915 905 void UIGlobalSettingsInput::putToCache() 916 906 { … … 921 911 } 922 912 923 /* Save data from cache to corresponding external object(s),924 * this task COULD be performed in other than GUI thread: */925 913 void UIGlobalSettingsInput::saveFromCacheTo(QVariant &data) 926 914 { … … 928 916 UISettingsPageGlobal::fetchData(data); 929 917 930 /* Save host-combo shortcutfrom cache: */918 /* Save from cache: */ 931 919 UIShortcutCacheRow fakeHostComboItem(0, UIHostCombo::hostComboCacheKey(), QString(), QString(), QString()); 932 920 int iIndexOfHostComboItem = m_pCache->shortcuts().indexOf(fakeHostComboItem); 933 921 if (iIndexOfHostComboItem != -1) 934 922 m_settings.setHostCombo(m_pCache->shortcuts()[iIndexOfHostComboItem].currentSequence()); 935 /* Iterate over cached shortcuts: */936 923 QMap<QString, QString> sequences; 937 924 foreach (const UIShortcutCacheRow &item, m_pCache->shortcuts()) 938 925 sequences.insert(item.key(), item.currentSequence()); 939 /* Save shortcut sequences from cache: */940 926 gShortcutPool->setOverrides(sequences); 941 /* Save other things from cache: */942 927 m_settings.setAutoCapture(m_pCache->autoCapture()); 943 928 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInput.h
r64259 r65678 5 5 6 6 /* 7 * Copyright (C) 2006-201 6Oracle Corporation7 * Copyright (C) 2006-2017 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 16 16 */ 17 17 18 #ifndef __UIGlobalSettingsInput_h__ 19 #define __UIGlobalSettingsInput_h__ 20 21 /* Qt includes: */ 22 #include <QAbstractTableModel> 18 #ifndef ___UIGlobalSettingsInput_h___ 19 #define ___UIGlobalSettingsInput_h___ 23 20 24 21 /* GUI includes: */ 25 22 #include "UISettingsPage.h" 26 23 #include "UIGlobalSettingsInput.gen.h" 27 #include "UIActionPool.h"28 24 29 25 /* Forward declartions: */ … … 35 31 36 32 37 /* Global settings / Input page:*/33 /** Global settings: Input page. */ 38 34 class UIGlobalSettingsInput : public UISettingsPageGlobal, public Ui::UIGlobalSettingsInput 39 35 { … … 94 90 }; 95 91 96 #endif / / __UIGlobalSettingsInput_h__92 #endif /* !___UIGlobalSettingsInput_h___ */ 97 93 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsLanguage.cpp
r64127 r65678 5 5 6 6 /* 7 * Copyright (C) 2006-201 6Oracle Corporation7 * Copyright (C) 2006-2017 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 46 46 extern const char *gVBoxLangIDRegExp; 47 47 extern const char *gVBoxBuiltInLangName; 48 48 49 49 50 /* Language item: */ … … 176 177 }; 177 178 179 178 180 /* Language page constructor: */ 179 181 UIGlobalSettingsLanguage::UIGlobalSettingsLanguage() … … 203 205 } 204 206 205 /* Load data to cache from corresponding external object(s),206 * this task COULD be performed in other than GUI thread: */207 207 void UIGlobalSettingsLanguage::loadToCacheFrom(QVariant &data) 208 208 { … … 217 217 } 218 218 219 /* Load data to corresponding widgets from cache,220 * this task SHOULD be performed in GUI thread only: */221 219 void UIGlobalSettingsLanguage::getFromCache() 222 220 { … … 225 223 } 226 224 227 /* Save data from corresponding widgets to cache,228 * this task SHOULD be performed in GUI thread only: */229 225 void UIGlobalSettingsLanguage::putToCache() 230 226 { -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsLanguage.h
r62493 r65678 5 5 6 6 /* 7 * Copyright (C) 2006-201 6Oracle Corporation7 * Copyright (C) 2006-2017 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 16 16 */ 17 17 18 #ifndef __ UIGlobalSettingsLanguage_h__19 #define __ UIGlobalSettingsLanguage_h__18 #ifndef ___UIGlobalSettingsLanguage_h___ 19 #define ___UIGlobalSettingsLanguage_h___ 20 20 21 21 /* GUI includes: */ … … 23 23 #include "UIGlobalSettingsLanguage.gen.h" 24 24 25 /* Global settings / Language page / Cache: */ 25 26 /** Global settings: Language page cache structure. */ 26 27 struct UISettingsCacheGlobalLanguage 27 28 { 29 /** Holds the current language id. */ 28 30 QString m_strLanguageId; 29 31 }; 30 32 31 /* Global settings / Language page: */ 33 34 /** Global settings: Language page. */ 32 35 class UIGlobalSettingsLanguage : public UISettingsPageGlobal, public Ui::UIGlobalSettingsLanguage 33 36 { … … 86 89 }; 87 90 88 #endif // __UIGlobalSettingsLanguage_h__ 91 #endif /* !___UIGlobalSettingsLanguage_h___ */ 92 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetwork.cpp
r65629 r65678 5 5 6 6 /* 7 * Copyright (C) 2009-201 6Oracle Corporation7 * Copyright (C) 2009-2017 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 41 41 #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */ 42 42 43 /* COM includes: */ 43 44 #include "CDHCPServer.h" 44 45 45 46 46 … … 517 517 UISettingsPageGlobal::fetchData(data); 518 518 519 /* Load NAT networksto cache: */519 /* Load to cache: */ 520 520 m_cache.m_networksNAT.clear(); 521 521 const CNATNetworkVector &networks = vboxGlobal().virtualBox().GetNATNetworks(); 522 522 foreach (const CNATNetwork &network, networks) 523 523 m_cache.m_networksNAT << generateDataNetworkNAT(network); 524 525 /* Load Host networks to cache: */526 524 m_cache.m_networksHost.clear(); 527 525 const CHostNetworkInterfaceVector &interfaces = vboxGlobal().host().GetNetworkInterfaces(); … … 536 534 void UIGlobalSettingsNetwork::getFromCache() 537 535 { 538 /* Fetch NAT networksfrom cache: */536 /* Fetch from cache: */ 539 537 foreach (const UIDataSettingsGlobalNetworkNAT &network, m_cache.m_networksNAT) 540 538 createTreeItemNetworkNAT(network); … … 542 540 m_pTreeNetworkNAT->setCurrentItem(m_pTreeNetworkNAT->topLevelItem(0)); 543 541 sltHandleCurrentItemChangeNetworkNAT(); 544 545 /* Fetch Host networks from cache: */546 542 foreach (const UIDataSettingsGlobalNetworkHost &network, m_cache.m_networksHost) 547 543 createTreeItemNetworkHost(network); … … 556 552 void UIGlobalSettingsNetwork::putToCache() 557 553 { 558 /* Upload NAT networksto cache: */554 /* Upload to cache: */ 559 555 m_cache.m_networksNAT.clear(); 560 556 for (int iNetworkIndex = 0; iNetworkIndex < m_pTreeNetworkNAT->topLevelItemCount(); ++iNetworkIndex) … … 565 561 m_cache.m_networksNAT << data; 566 562 } 567 568 /* Upload Host networks to cache: */569 563 m_cache.m_networksHost.clear(); 570 564 for (int iNetworkIndex = 0; iNetworkIndex < m_pTreeNetworkHost->topLevelItemCount(); ++iNetworkIndex) … … 586 580 UISettingsPageGlobal::fetchData(data); 587 581 588 /* Save NAT networksfrom cache: */582 /* Save from cache: */ 589 583 foreach (const UIDataSettingsGlobalNetworkNAT &data, m_cache.m_networksNAT) 590 584 saveCacheItemNetworkNAT(data); 591 592 /* Save Host networks from cache: */593 585 foreach (const UIDataSettingsGlobalNetworkHost &data, m_cache.m_networksHost) 594 586 saveCacheItemNetworkHost(data); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetwork.h
-
Property svn:keywords
set to
Date Revision Author Id
r65629 r65678 1 /* $Id :$ */1 /* $Id$ */ 2 2 /** @file 3 3 * VBox Qt GUI - UIGlobalSettingsNetwork class declaration. … … 5 5 6 6 /* 7 * Copyright (C) 2009-201 6Oracle Corporation7 * Copyright (C) 2009-2017 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 16 16 */ 17 17 18 #ifndef __ UIGlobalSettingsNetwork_h__19 #define __ UIGlobalSettingsNetwork_h__18 #ifndef ___UIGlobalSettingsNetwork_h___ 19 #define ___UIGlobalSettingsNetwork_h___ 20 20 21 21 /* GUI includes: */ … … 29 29 30 30 31 /* Global settings / Network page / NAT network data:*/31 /** Global settings: Network page: NAT network cache structure. */ 32 32 struct UIDataSettingsGlobalNetworkNAT 33 33 { 34 /* NAT Network:*/34 /** Holds whether this network enabled. */ 35 35 bool m_fEnabled; 36 /** Holds network name. */ 36 37 QString m_strName; 38 /** Holds new network name. */ 37 39 QString m_strNewName; 40 /** Holds network CIDR. */ 38 41 QString m_strCIDR; 42 /** Holds whether this network supports DHCP. */ 39 43 bool m_fSupportsDHCP; 44 /** Holds whether this network supports IPv6. */ 40 45 bool m_fSupportsIPv6; 46 /** Holds whether this network advertised as default IPv6 route. */ 41 47 bool m_fAdvertiseDefaultIPv6Route; 48 /** Holds IPv4 port forwarding rules. */ 42 49 UIPortForwardingDataList m_ipv4rules; 50 /** Holds IPv6 port forwarding rules. */ 43 51 UIPortForwardingDataList m_ipv6rules; 52 53 /** Returns whether the @a other passed data is equal to this one. */ 44 54 bool operator==(const UIDataSettingsGlobalNetworkNAT &other) const 45 55 { 46 return m_fEnabled == other.m_fEnabled && 47 m_strName == other.m_strName && 48 m_strNewName == other.m_strNewName && 49 m_strCIDR == other.m_strCIDR && 50 m_fSupportsDHCP == other.m_fSupportsDHCP && 51 m_fSupportsIPv6 == other.m_fSupportsIPv6 && 52 m_fAdvertiseDefaultIPv6Route == other.m_fAdvertiseDefaultIPv6Route && 53 m_ipv4rules == other.m_ipv4rules && 54 m_ipv6rules == other.m_ipv6rules; 55 } 56 }; 57 58 59 /* Global settings / Network page / Host interface data: */ 56 return true 57 && (m_fEnabled == other.m_fEnabled) 58 && (m_strName == other.m_strName) 59 && (m_strNewName == other.m_strNewName) 60 && (m_strCIDR == other.m_strCIDR) 61 && (m_fSupportsDHCP == other.m_fSupportsDHCP) 62 && (m_fSupportsIPv6 == other.m_fSupportsIPv6) 63 && (m_fAdvertiseDefaultIPv6Route == other.m_fAdvertiseDefaultIPv6Route) 64 && (m_ipv4rules == other.m_ipv4rules) 65 && (m_ipv6rules == other.m_ipv6rules) 66 ; 67 } 68 }; 69 70 71 /** Global settings: Network page: Host interface cache structure. */ 60 72 struct UIDataSettingsGlobalNetworkHostInterface 61 73 { 62 /* Host Interface:*/74 /** Holds host interface name. */ 63 75 QString m_strName; 76 /** Holds whether DHCP client enabled. */ 64 77 bool m_fDhcpClientEnabled; 78 /** Holds IPv4 interface address. */ 65 79 QString m_strInterfaceAddress; 80 /** Holds IPv4 interface mask. */ 66 81 QString m_strInterfaceMask; 82 /** Holds whether IPv6 protocol supported. */ 67 83 bool m_fIpv6Supported; 84 /** Holds IPv6 interface address. */ 68 85 QString m_strInterfaceAddress6; 86 /** Holds IPv6 interface mask length. */ 69 87 QString m_strInterfaceMaskLength6; 88 89 /** Returns whether the @a other passed data is equal to this one. */ 70 90 bool operator==(const UIDataSettingsGlobalNetworkHostInterface &other) const 71 91 { 72 return m_strName == other.m_strName && 73 m_fDhcpClientEnabled == other.m_fDhcpClientEnabled && 74 m_strInterfaceAddress == other.m_strInterfaceAddress && 75 m_strInterfaceMask == other.m_strInterfaceMask && 76 m_fIpv6Supported == other.m_fIpv6Supported && 77 m_strInterfaceAddress6 == other.m_strInterfaceAddress6 && 78 m_strInterfaceMaskLength6 == other.m_strInterfaceMaskLength6; 79 } 80 }; 81 82 /* Global settings / Network page / Host DHCP server data: */ 92 return true 93 && (m_strName == other.m_strName) 94 && (m_fDhcpClientEnabled == other.m_fDhcpClientEnabled) 95 && (m_strInterfaceAddress == other.m_strInterfaceAddress) 96 && (m_strInterfaceMask == other.m_strInterfaceMask) 97 && (m_fIpv6Supported == other.m_fIpv6Supported) 98 && (m_strInterfaceAddress6 == other.m_strInterfaceAddress6) 99 && (m_strInterfaceMaskLength6 == other.m_strInterfaceMaskLength6) 100 ; 101 } 102 }; 103 104 105 /** Global settings: Network page: DHCP server cache structure. */ 83 106 struct UIDataSettingsGlobalNetworkDHCPServer 84 107 { 85 /* DHCP Server:*/108 /** Holds whether DHCP server enabled. */ 86 109 bool m_fDhcpServerEnabled; 110 /** Holds DHCP server address. */ 87 111 QString m_strDhcpServerAddress; 112 /** Holds DHCP server mask. */ 88 113 QString m_strDhcpServerMask; 114 /** Holds DHCP server lower address. */ 89 115 QString m_strDhcpLowerAddress; 116 /** Holds DHCP server upper address. */ 90 117 QString m_strDhcpUpperAddress; 118 119 /** Returns whether the @a other passed data is equal to this one. */ 91 120 bool operator==(const UIDataSettingsGlobalNetworkDHCPServer &other) const 92 121 { 93 return m_fDhcpServerEnabled == other.m_fDhcpServerEnabled && 94 m_strDhcpServerAddress == other.m_strDhcpServerAddress && 95 m_strDhcpServerMask == other.m_strDhcpServerMask && 96 m_strDhcpLowerAddress == other.m_strDhcpLowerAddress && 97 m_strDhcpUpperAddress == other.m_strDhcpUpperAddress; 98 } 99 }; 100 101 /* Global settings / Network page / Host network data: */ 122 return true 123 && (m_fDhcpServerEnabled == other.m_fDhcpServerEnabled) 124 && (m_strDhcpServerAddress == other.m_strDhcpServerAddress) 125 && (m_strDhcpServerMask == other.m_strDhcpServerMask) 126 && (m_strDhcpLowerAddress == other.m_strDhcpLowerAddress) 127 && (m_strDhcpUpperAddress == other.m_strDhcpUpperAddress) 128 ; 129 } 130 }; 131 132 133 /** Global settings: Network page: Host network cache structure. */ 102 134 struct UIDataSettingsGlobalNetworkHost 103 135 { 136 /** Holds the host interface data. */ 104 137 UIDataSettingsGlobalNetworkHostInterface m_interface; 138 /** Holds the DHCP server data. */ 105 139 UIDataSettingsGlobalNetworkDHCPServer m_dhcpserver; 140 141 /** Returns whether the @a other passed data is equal to this one. */ 106 142 bool operator==(const UIDataSettingsGlobalNetworkHost &other) const 107 143 { 108 return m_interface == other.m_interface && 109 m_dhcpserver == other.m_dhcpserver; 110 } 111 }; 112 113 114 /* Global settings / Network page / Global network cache: */ 144 return true 145 && (m_interface == other.m_interface) 146 && (m_dhcpserver == other.m_dhcpserver) 147 ; 148 } 149 }; 150 151 152 /** Global settings: Network page cache structure. */ 115 153 struct UISettingsCacheGlobalNetwork 116 154 { 155 /** Holds the NAT network data. */ 117 156 QList<UIDataSettingsGlobalNetworkNAT> m_networksNAT; 157 /** Holds the host network data. */ 118 158 QList<UIDataSettingsGlobalNetworkHost> m_networksHost; 119 159 }; 120 160 121 161 122 /* Global settings / Network page:*/162 /** Global settings: Network page. */ 123 163 class UIGlobalSettingsNetwork : public UISettingsPageGlobal, public Ui::UIGlobalSettingsNetwork 124 164 { … … 211 251 }; 212 252 213 #endif // __UIGlobalSettingsNetwork_h__ 253 #endif /* !___UIGlobalSettingsNetwork_h___ */ 254 -
Property svn:keywords
set to
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.cpp
r62493 r65678 5 5 6 6 /* 7 * Copyright (C) 2011-201 6Oracle Corporation7 * Copyright (C) 2011-2017 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 20 20 #else /* !VBOX_WITH_PRECOMPILED_HEADERS */ 21 21 22 /* Global includes*/22 /* Qt includes: */ 23 23 # include <QRegExpValidator> 24 24 25 /* Local includes*/25 /* GUI includes: */ 26 26 # include "QIWidgetValidator.h" 27 27 # include "UIGlobalSettingsProxy.h" … … 31 31 32 32 33 /* General page constructor: */34 33 UIGlobalSettingsProxy::UIGlobalSettingsProxy() 35 34 { … … 55 54 } 56 55 57 /* Load data to cache from corresponding external object(s),58 * this task COULD be performed in other than GUI thread: */59 56 void UIGlobalSettingsProxy::loadToCacheFrom(QVariant &data) 60 57 { … … 72 69 } 73 70 74 /* Load data to corresponding widgets from cache,75 * this task SHOULD be performed in GUI thread only: */76 71 void UIGlobalSettingsProxy::getFromCache() 77 72 { … … 91 86 } 92 87 93 /* Save data from corresponding widgets to cache,94 * this task SHOULD be performed in GUI thread only: */95 88 void UIGlobalSettingsProxy::putToCache() 96 89 { … … 103 96 } 104 97 105 /* Save data from cache to corresponding external object(s),106 * this task COULD be performed in other than GUI thread: */107 98 void UIGlobalSettingsProxy::saveFromCacheTo(QVariant &data) 108 99 { … … 110 101 UISettingsPageGlobal::fetchData(data); 111 102 103 /* Save from cache: */ 112 104 UIProxyManager proxyManager; 113 105 proxyManager.setProxyState(m_cache.m_enmProxyState); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.h
r62493 r65678 5 5 6 6 /* 7 * Copyright (C) 2011-201 6Oracle Corporation7 * Copyright (C) 2011-2017 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 16 16 */ 17 17 18 #ifndef __ UIGlobalSettingsProxy_h__19 #define __ UIGlobalSettingsProxy_h__18 #ifndef ___UIGlobalSettingsProxy_h___ 19 #define ___UIGlobalSettingsProxy_h___ 20 20 21 /* Local includes */ 22 #include "VBoxUtils.h" 21 /* GUI includes: */ 23 22 #include "UISettingsPage.h" 24 23 #include "UIGlobalSettingsProxy.gen.h" 24 #include "VBoxUtils.h" 25 25 26 /* Global settings / Proxy page / Cache: */ 26 27 /** Global settings: Proxy page cache structure. */ 27 28 struct UISettingsCacheGlobalProxy 28 29 { 30 /** Constructs data. */ 29 31 UISettingsCacheGlobalProxy() 30 32 : m_enmProxyState(UIProxyManager::ProxyState_Auto) 33 , m_strProxyHost(QString()) 34 , m_strProxyPort(QString()) 31 35 {} 36 37 /** Holds the proxy state. */ 32 38 UIProxyManager::ProxyState m_enmProxyState; 39 /** Holds the proxy host. */ 33 40 QString m_strProxyHost; 41 /** Holds the proxy port. */ 34 42 QString m_strProxyPort; 35 43 }; 36 44 37 /* Global settings / Proxy page: */ 45 46 /** Global settings: Proxy page. */ 38 47 class UIGlobalSettingsProxy : public UISettingsPageGlobal, public Ui::UIGlobalSettingsProxy 39 48 { … … 81 90 }; 82 91 83 #endif / / __UIGlobalSettingsProxy_h__92 #endif /* !___UIGlobalSettingsProxy_h___ */ 84 93 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsUpdate.cpp
r62493 r65678 5 5 6 6 /* 7 * Copyright (C) 2006-201 6Oracle Corporation7 * Copyright (C) 2006-2017 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 46 46 } 47 47 48 /* Load data to cache from corresponding external object(s),49 * this task COULD be performed in other than GUI thread: */50 48 void UIGlobalSettingsUpdate::loadToCacheFrom(QVariant &data) 51 49 { … … 53 51 UISettingsPageGlobal::fetchData(data); 54 52 55 /* Fill internal variables with corresponding values: */53 /* Load to cache: */ 56 54 VBoxUpdateData updateData(gEDataManager->applicationUpdateData()); 57 55 m_cache.m_fCheckEnabled = !updateData.isNoNeedToCheck(); … … 64 62 } 65 63 66 /* Load data to corresponding widgets from cache,67 * this task SHOULD be performed in GUI thread only: */68 64 void UIGlobalSettingsUpdate::getFromCache() 69 65 { 70 /* Apply internal variables data to QWidget(s): */66 /* Fetch from cache: */ 71 67 m_pCheckBoxUpdate->setChecked(m_cache.m_fCheckEnabled); 72 68 if (m_pCheckBoxUpdate->isChecked()) … … 87 83 } 88 84 89 /* Save data from corresponding widgets to cache,90 * this task SHOULD be performed in GUI thread only: */91 85 void UIGlobalSettingsUpdate::putToCache() 92 86 { 93 /* Gather internal variables data from QWidget(s): */87 /* Upload to cache: */ 94 88 m_cache.m_periodIndex = periodType(); 95 89 m_cache.m_branchIndex = branchType(); 96 90 } 97 91 98 /* Save data from cache to corresponding external object(s),99 * this task COULD be performed in other than GUI thread: */100 92 void UIGlobalSettingsUpdate::saveFromCacheTo(QVariant &data) 101 93 { … … 107 99 UISettingsPageGlobal::fetchData(data); 108 100 109 /* Gather corresponding values from internal variables: */101 /* Save from cache: */ 110 102 VBoxUpdateData newData(m_cache.m_periodIndex, m_cache.m_branchIndex); 111 103 gEDataManager->setApplicationUpdateData(newData.data()); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsUpdate.h
r62493 r65678 5 5 6 6 /* 7 * Copyright (C) 2006-201 6Oracle Corporation7 * Copyright (C) 2006-2017 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 16 16 */ 17 17 18 #ifndef __ UIGlobalSettingsUpdate_h__19 #define __ UIGlobalSettingsUpdate_h__18 #ifndef ___UIGlobalSettingsUpdate_h___ 19 #define ___UIGlobalSettingsUpdate_h___ 20 20 21 21 /* GUI includes: */ … … 24 24 #include "UIUpdateDefs.h" 25 25 26 /* Global settings / Update page / Cache: */ 26 27 /** Global settings: Update page cache structure. */ 27 28 struct UISettingsCacheGlobalUpdate 28 29 { 30 /** Holds whether the update check is enabled. */ 29 31 bool m_fCheckEnabled; 32 /** Holds the update check period. */ 30 33 VBoxUpdateData::PeriodType m_periodIndex; 34 /** Holds the update branch type. */ 31 35 VBoxUpdateData::BranchType m_branchIndex; 36 /** Holds the next update date. */ 32 37 QString m_strDate; 33 38 }; 34 39 35 /* Global settings / Update page: */ 40 41 /** Global settings: Update page. */ 36 42 class UIGlobalSettingsUpdate : public UISettingsPageGlobal, public Ui::UIGlobalSettingsUpdate 37 43 { … … 86 92 }; 87 93 88 #endif // __UIGlobalSettingsUpdate_h__ 94 #endif /* !___UIGlobalSettingsUpdate_h___ */ 95
Note:
See TracChangeset
for help on using the changeset viewer.