Changeset 66190 in vbox
- Timestamp:
- Mar 22, 2017 10:07:31 AM (8 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/settings
- Files:
-
- 24 edited
-
global/UIGlobalSettingsDisplay.h (modified) (1 diff)
-
global/UIGlobalSettingsExtension.h (modified) (1 diff)
-
global/UIGlobalSettingsGeneral.h (modified) (1 diff)
-
global/UIGlobalSettingsInput.h (modified) (1 diff)
-
global/UIGlobalSettingsLanguage.h (modified) (1 diff)
-
global/UIGlobalSettingsNetwork.h (modified) (1 diff)
-
global/UIGlobalSettingsProxy.h (modified) (1 diff)
-
global/UIGlobalSettingsUpdate.h (modified) (1 diff)
-
machine/UIMachineSettingsAudio.h (modified) (1 diff)
-
machine/UIMachineSettingsDisplay.h (modified) (1 diff)
-
machine/UIMachineSettingsGeneral.cpp (modified) (2 diffs)
-
machine/UIMachineSettingsGeneral.h (modified) (2 diffs)
-
machine/UIMachineSettingsInterface.h (modified) (1 diff)
-
machine/UIMachineSettingsNetwork.cpp (modified) (2 diffs)
-
machine/UIMachineSettingsNetwork.h (modified) (2 diffs)
-
machine/UIMachineSettingsParallel.h (modified) (1 diff)
-
machine/UIMachineSettingsSF.cpp (modified) (2 diffs)
-
machine/UIMachineSettingsSF.h (modified) (3 diffs)
-
machine/UIMachineSettingsSerial.h (modified) (1 diff)
-
machine/UIMachineSettingsStorage.cpp (modified) (3 diffs)
-
machine/UIMachineSettingsStorage.h (modified) (2 diffs)
-
machine/UIMachineSettingsSystem.h (modified) (1 diff)
-
machine/UIMachineSettingsUSB.cpp (modified) (2 diffs)
-
machine/UIMachineSettingsUSB.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsDisplay.h
r66169 r66190 44 44 /** Loads data into the cache from corresponding external object(s), 45 45 * this task COULD be performed in other than the GUI thread. */ 46 v oid loadToCacheFrom(QVariant &data);46 virtual void loadToCacheFrom(QVariant &data) /* override */; 47 47 /** Loads data into corresponding widgets from the cache, 48 48 * this task SHOULD be performed in the GUI thread only. */ 49 v oid getFromCache();49 virtual void getFromCache() /* override */; 50 50 51 51 /** Saves data from corresponding widgets to the cache, 52 52 * this task SHOULD be performed in the GUI thread only. */ 53 v oid putToCache();53 virtual void putToCache() /* override */; 54 54 /** Saves data from the cache to corresponding external object(s), 55 55 * this task COULD be performed in other than the GUI thread. */ 56 v oid saveFromCacheTo(QVariant &data);56 virtual void saveFromCacheTo(QVariant &data) /* overrride */; 57 57 58 58 /** Defines TAB order. */ 59 v oid setOrderAfter(QWidget *pWidget);59 virtual void setOrderAfter(QWidget *pWidget) /* override */; 60 60 61 61 /** Handles translation event. */ 62 v oid retranslateUi();62 virtual void retranslateUi() /* override */; 63 63 64 64 protected slots: -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsExtension.h
r66169 r66190 47 47 /** Loads data into the cache from corresponding external object(s), 48 48 * this task COULD be performed in other than the GUI thread. */ 49 v oid loadToCacheFrom(QVariant &data);49 virtual void loadToCacheFrom(QVariant &data) /* override */; 50 50 /** Loads data into corresponding widgets from the cache, 51 51 * this task SHOULD be performed in the GUI thread only. */ 52 v oid getFromCache();52 virtual void getFromCache() /* override */; 53 53 54 54 /** Saves data from corresponding widgets to the cache, 55 55 * this task SHOULD be performed in the GUI thread only. */ 56 v oid putToCache();56 virtual void putToCache() /* override */; 57 57 /** Saves data from the cache to corresponding external object(s), 58 58 * this task COULD be performed in other than the GUI thread. */ 59 v oid saveFromCacheTo(QVariant &data);59 virtual void saveFromCacheTo(QVariant &data) /* overrride */; 60 60 61 61 /** Defines TAB order. */ 62 v oid setOrderAfter(QWidget *pWidget);62 virtual void setOrderAfter(QWidget *pWidget) /* override */; 63 63 64 64 /** Handles translation event. */ 65 v oid retranslateUi();65 virtual void retranslateUi() /* override */; 66 66 67 67 private slots: -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsGeneral.h
r66169 r66190 44 44 /** Loads data into the cache from corresponding external object(s), 45 45 * this task COULD be performed in other than the GUI thread. */ 46 v oid loadToCacheFrom(QVariant &data);46 virtual void loadToCacheFrom(QVariant &data) /* override */; 47 47 /** Loads data into corresponding widgets from the cache, 48 48 * this task SHOULD be performed in the GUI thread only. */ 49 v oid getFromCache();49 virtual void getFromCache() /* override */; 50 50 51 51 /** Saves data from corresponding widgets to the cache, 52 52 * this task SHOULD be performed in the GUI thread only. */ 53 v oid putToCache();53 virtual void putToCache() /* override */; 54 54 /** Saves data from the cache to corresponding external object(s), 55 55 * this task COULD be performed in other than the GUI thread. */ 56 v oid saveFromCacheTo(QVariant &data);56 virtual void saveFromCacheTo(QVariant &data) /* overrride */; 57 57 58 58 /** Defines TAB order. */ 59 v oid setOrderAfter(QWidget *pWidget);59 virtual void setOrderAfter(QWidget *pWidget) /* override */; 60 60 61 61 /** Handles translation event. */ 62 v oid retranslateUi();62 virtual void retranslateUi() /* override */; 63 63 64 64 private: -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInput.h
r66169 r66190 55 55 /** Loads data into the cache from corresponding external object(s), 56 56 * this task COULD be performed in other than the GUI thread. */ 57 v oid loadToCacheFrom(QVariant &data);57 virtual void loadToCacheFrom(QVariant &data) /* override */; 58 58 /** Loads data into corresponding widgets from the cache, 59 59 * this task SHOULD be performed in the GUI thread only. */ 60 v oid getFromCache();60 virtual void getFromCache() /* override */; 61 61 62 62 /** Saves data from corresponding widgets to the cache, 63 63 * this task SHOULD be performed in the GUI thread only. */ 64 v oid putToCache();64 virtual void putToCache() /* override */; 65 65 /** Saves data from the cache to corresponding external object(s), 66 66 * this task COULD be performed in other than the GUI thread. */ 67 v oid saveFromCacheTo(QVariant &data);67 virtual void saveFromCacheTo(QVariant &data) /* overrride */; 68 68 69 69 /** Performs validation, updates @a messages list if something is wrong. */ 70 bool validate(QList<UIValidationMessage> &messages);70 virtual bool validate(QList<UIValidationMessage> &messages) /* override */; 71 71 72 72 /** Defines TAB order. */ 73 v oid setOrderAfter(QWidget *pWidget);73 virtual void setOrderAfter(QWidget *pWidget) /* override */; 74 74 75 75 /** Handles translation event. */ 76 v oid retranslateUi();76 virtual void retranslateUi() /* override */; 77 77 78 78 private: -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsLanguage.h
r66169 r66190 44 44 /** Loads data into the cache from corresponding external object(s), 45 45 * this task COULD be performed in other than the GUI thread. */ 46 v oid loadToCacheFrom(QVariant &data);46 virtual void loadToCacheFrom(QVariant &data) /* override */; 47 47 /** Loads data into corresponding widgets from the cache, 48 48 * this task SHOULD be performed in the GUI thread only. */ 49 v oid getFromCache();49 virtual void getFromCache() /* override */; 50 50 51 51 /** Saves data from corresponding widgets to the cache, 52 52 * this task SHOULD be performed in the GUI thread only. */ 53 v oid putToCache();53 virtual void putToCache() /* override */; 54 54 /** Saves data from the cache to corresponding external object(s), 55 55 * this task COULD be performed in other than the GUI thread. */ 56 v oid saveFromCacheTo(QVariant &data);56 virtual void saveFromCacheTo(QVariant &data) /* overrride */; 57 57 58 58 /** Defines TAB order. */ 59 v oid setOrderAfter(QWidget *pWidget);59 virtual void setOrderAfter(QWidget *pWidget) /* override */; 60 60 61 61 /** Handles translation event. */ 62 v oid retranslateUi();62 virtual void retranslateUi() /* override */; 63 63 64 64 /** Handles show @a pEvent. */ 65 v oid showEvent(QShowEvent *pEvent);65 virtual void showEvent(QShowEvent *pEvent) /* override */; 66 66 /** Performs final page polishing. */ 67 v oid polishEvent(QShowEvent *pEvent);67 virtual void polishEvent(QShowEvent *pEvent) /* override */; 68 68 69 69 private slots: -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetwork.h
r66169 r66190 48 48 /** Loads data into the cache from corresponding external object(s), 49 49 * this task COULD be performed in other than the GUI thread. */ 50 v oid loadToCacheFrom(QVariant &data);50 virtual void loadToCacheFrom(QVariant &data) /* override */; 51 51 /** Loads data into corresponding widgets from the cache, 52 52 * this task SHOULD be performed in the GUI thread only. */ 53 v oid getFromCache();53 virtual void getFromCache() /* override */; 54 54 55 55 /** Saves data from corresponding widgets to the cache, 56 56 * this task SHOULD be performed in the GUI thread only. */ 57 v oid putToCache();57 virtual void putToCache() /* override */; 58 58 /** Saves data from the cache to corresponding external object(s), 59 59 * this task COULD be performed in other than the GUI thread. */ 60 v oid saveFromCacheTo(QVariant &data);60 virtual void saveFromCacheTo(QVariant &data) /* overrride */; 61 61 62 62 /** Performs validation, updates @a messages list if something is wrong. */ 63 bool validate(QList<UIValidationMessage> &messages);63 virtual bool validate(QList<UIValidationMessage> &messages) /* override */; 64 64 65 65 /** Defines TAB order. */ 66 v oid setOrderAfter(QWidget *pWidget);66 virtual void setOrderAfter(QWidget *pWidget) /* override */; 67 67 68 68 /** Handles translation event. */ 69 v oid retranslateUi();69 virtual void retranslateUi() /* override */; 70 70 71 71 private slots: -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.h
r66169 r66190 45 45 /** Loads data into the cache from corresponding external object(s), 46 46 * this task COULD be performed in other than the GUI thread. */ 47 v oid loadToCacheFrom(QVariant &data);47 virtual void loadToCacheFrom(QVariant &data) /* override */; 48 48 /** Loads data into corresponding widgets from the cache, 49 49 * this task SHOULD be performed in the GUI thread only. */ 50 v oid getFromCache();50 virtual void getFromCache() /* override */; 51 51 52 52 /** Saves data from corresponding widgets to the cache, 53 53 * this task SHOULD be performed in the GUI thread only. */ 54 v oid putToCache();54 virtual void putToCache() /* override */; 55 55 /** Saves data from the cache to corresponding external object(s), 56 56 * this task COULD be performed in other than the GUI thread. */ 57 v oid saveFromCacheTo(QVariant &data);57 virtual void saveFromCacheTo(QVariant &data) /* overrride */; 58 58 59 59 /** Performs validation, updates @a messages list if something is wrong. */ 60 bool validate(QList<UIValidationMessage> &messages);60 virtual bool validate(QList<UIValidationMessage> &messages) /* override */; 61 61 62 62 /** Defines TAB order. */ 63 v oid setOrderAfter(QWidget *pWidget);63 virtual void setOrderAfter(QWidget *pWidget) /* override */; 64 64 65 65 /** Handles translation event. */ 66 v oid retranslateUi();66 virtual void retranslateUi() /* override */; 67 67 68 68 private slots: -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsUpdate.h
r66169 r66190 45 45 /** Loads data into the cache from corresponding external object(s), 46 46 * this task COULD be performed in other than the GUI thread. */ 47 v oid loadToCacheFrom(QVariant &data);47 virtual void loadToCacheFrom(QVariant &data) /* override */; 48 48 /** Loads data into corresponding widgets from the cache, 49 49 * this task SHOULD be performed in the GUI thread only. */ 50 v oid getFromCache();50 virtual void getFromCache() /* override */; 51 51 52 52 /** Saves data from corresponding widgets to the cache, 53 53 * this task SHOULD be performed in the GUI thread only. */ 54 v oid putToCache();54 virtual void putToCache() /* override */; 55 55 /** Saves data from the cache to corresponding external object(s), 56 56 * this task COULD be performed in other than the GUI thread. */ 57 v oid saveFromCacheTo(QVariant &data);57 virtual void saveFromCacheTo(QVariant &data) /* overrride */; 58 58 59 59 /** Defines TAB order. */ 60 v oid setOrderAfter(QWidget *pWidget);60 virtual void setOrderAfter(QWidget *pWidget) /* override */; 61 61 62 62 /** Handles translation event. */ 63 v oid retranslateUi();63 virtual void retranslateUi() /* override */; 64 64 65 65 private slots: -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsAudio.h
r66183 r66190 44 44 45 45 /** Returns whether the page content was changed. */ 46 bool changed() const /* override */;46 virtual bool changed() const /* override */; 47 47 48 48 /** Loads data into the cache from corresponding external object(s), 49 49 * this task COULD be performed in other than the GUI thread. */ 50 v oid loadToCacheFrom(QVariant &data);50 virtual void loadToCacheFrom(QVariant &data) /* override */; 51 51 /** Loads data into corresponding widgets from the cache, 52 52 * this task SHOULD be performed in the GUI thread only. */ 53 v oid getFromCache();53 virtual void getFromCache() /* override */; 54 54 55 55 /** Saves data from corresponding widgets to the cache, 56 56 * this task SHOULD be performed in the GUI thread only. */ 57 v oid putToCache();57 virtual void putToCache() /* override */; 58 58 /** Saves data from the cache to corresponding external object(s), 59 59 * this task COULD be performed in other than the GUI thread. */ 60 v oid saveFromCacheTo(QVariant &data);60 virtual void saveFromCacheTo(QVariant &data) /* overrride */; 61 61 62 62 /** Defines TAB order. */ 63 v oid setOrderAfter(QWidget *pWidget);63 virtual void setOrderAfter(QWidget *pWidget) /* override */; 64 64 65 65 /** Handles translation event. */ 66 v oid retranslateUi();66 virtual void retranslateUi() /* override */; 67 67 68 68 /** Performs final page polishing. */ 69 v oid polishPage();69 virtual void polishPage() /* override */; 70 70 71 71 private: -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.h
r66183 r66190 54 54 55 55 /** Returns whether the page content was changed. */ 56 bool changed() const /* override */;56 virtual bool changed() const /* override */; 57 57 58 58 /** Loads data into the cache from corresponding external object(s), 59 59 * this task COULD be performed in other than the GUI thread. */ 60 v oid loadToCacheFrom(QVariant &data);60 virtual void loadToCacheFrom(QVariant &data) /* override */; 61 61 /** Loads data into corresponding widgets from the cache, 62 62 * this task SHOULD be performed in the GUI thread only. */ 63 v oid getFromCache();63 virtual void getFromCache() /* override */; 64 64 65 65 /** Saves data from corresponding widgets to the cache, 66 66 * this task SHOULD be performed in the GUI thread only. */ 67 v oid putToCache();67 virtual void putToCache() /* override */; 68 68 /** Saves data from the cache to corresponding external object(s), 69 69 * this task COULD be performed in other than the GUI thread. */ 70 v oid saveFromCacheTo(QVariant &data);70 virtual void saveFromCacheTo(QVariant &data) /* overrride */; 71 71 72 72 /** Performs validation, updates @a messages list if something is wrong. */ 73 bool validate(QList<UIValidationMessage> &messages);73 virtual bool validate(QList<UIValidationMessage> &messages) /* override */; 74 74 75 75 /** Defines TAB order. */ 76 v oid setOrderAfter(QWidget *pWidget);76 virtual void setOrderAfter(QWidget *pWidget) /* override */; 77 77 78 78 /** Handles translation event. */ 79 v oid retranslateUi();79 virtual void retranslateUi() /* override */; 80 80 81 81 /** Performs final page polishing. */ 82 v oid polishPage();82 virtual void polishPage() /* override */; 83 83 84 84 private slots: -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsGeneral.cpp
r66183 r66190 594 594 } 595 595 596 void UIMachineSettingsGeneral::prepare()597 {598 /* Apply UI decorations: */599 Ui::UIMachineSettingsGeneral::setupUi(this);600 601 /* Prepare tabs: */602 prepareTabBasic();603 prepareTabAdvanced();604 prepareTabDescription();605 prepareTabEncryption();606 }607 608 void UIMachineSettingsGeneral::prepareTabBasic()609 {610 /* Name and OS Type widget was created in the .ui file: */611 AssertPtrReturnVoid(m_pNameAndSystemEditor);612 {613 /* Configure Name and OS Type widget: */614 m_pNameAndSystemEditor->nameEditor()->setValidator(new QRegExpValidator(QRegExp(".+"), this));615 connect(m_pNameAndSystemEditor, SIGNAL(sigOsTypeChanged()), this, SLOT(revalidate()));616 connect(m_pNameAndSystemEditor, SIGNAL(sigNameChanged(const QString&)), this, SLOT(revalidate()));617 }618 }619 620 void UIMachineSettingsGeneral::prepareTabAdvanced()621 {622 /* Shared Clipboard mode combo was created in the .ui file: */623 AssertPtrReturnVoid(mCbClipboard);624 {625 /* Configure Shared Clipboard mode combo: */626 mCbClipboard->addItem(""); /* KClipboardMode_Disabled */627 mCbClipboard->addItem(""); /* KClipboardMode_HostToGuest */628 mCbClipboard->addItem(""); /* KClipboardMode_GuestToHost */629 mCbClipboard->addItem(""); /* KClipboardMode_Bidirectional */630 }631 /* Drag&drop mode combo was created in the .ui file: */632 AssertPtrReturnVoid(mCbDragAndDrop);633 {634 /* Configure Drag&drop mode combo: */635 mCbDragAndDrop->addItem(""); /* KDnDMode_Disabled */636 mCbDragAndDrop->addItem(""); /* KDnDMode_HostToGuest */637 mCbDragAndDrop->addItem(""); /* KDnDMode_GuestToHost */638 mCbDragAndDrop->addItem(""); /* KDnDMode_Bidirectional */639 }640 }641 642 void UIMachineSettingsGeneral::prepareTabDescription()643 {644 /* Description text editor was created in the .ui file: */645 AssertPtrReturnVoid(mTeDescription);646 {647 /* Configure Description text editor: */648 #ifdef VBOX_WS_MAC649 mTeDescription->setMinimumHeight(150);650 #endif /* VBOX_WS_MAC */651 }652 }653 654 void UIMachineSettingsGeneral::prepareTabEncryption()655 {656 /* Encryption check-box was created in the .ui file: */657 AssertPtrReturnVoid(m_pCheckBoxEncryption);658 {659 /* Configure Encryption check-box: */660 connect(m_pCheckBoxEncryption, SIGNAL(toggled(bool)),661 this, SLOT(revalidate()));662 }663 /* Encryption Cipher combo was created in the .ui file: */664 AssertPtrReturnVoid(m_pComboCipher);665 {666 /* Configure Encryption Cipher combo: */667 m_encryptionCiphers << QString()668 << "AES-XTS256-PLAIN64"669 << "AES-XTS128-PLAIN64";670 m_pComboCipher->addItems(m_encryptionCiphers);671 connect(m_pComboCipher, SIGNAL(currentIndexChanged(int)),672 this, SLOT(sltMarkEncryptionCipherChanged()));673 connect(m_pComboCipher, SIGNAL(currentIndexChanged(int)),674 this, SLOT(revalidate()));675 }676 /* Encryption Password editor was created in the .ui file: */677 AssertPtrReturnVoid(m_pEditorEncryptionPassword);678 {679 /* Configure Encryption Password editor: */680 m_pEditorEncryptionPassword->setEchoMode(QLineEdit::Password);681 connect(m_pEditorEncryptionPassword, SIGNAL(textEdited(const QString&)),682 this, SLOT(sltMarkEncryptionPasswordChanged()));683 connect(m_pEditorEncryptionPassword, SIGNAL(textEdited(const QString&)),684 this, SLOT(revalidate()));685 }686 /* Encryption Password Confirmation editor was created in the .ui file: */687 AssertPtrReturnVoid(m_pEditorEncryptionPasswordConfirm);688 {689 /* Configure Encryption Password Confirmation editor: */690 m_pEditorEncryptionPasswordConfirm->setEchoMode(QLineEdit::Password);691 connect(m_pEditorEncryptionPasswordConfirm, SIGNAL(textEdited(const QString&)),692 this, SLOT(sltMarkEncryptionPasswordChanged()));693 connect(m_pEditorEncryptionPasswordConfirm, SIGNAL(textEdited(const QString&)),694 this, SLOT(revalidate()));695 }696 }697 698 596 void UIMachineSettingsGeneral::polishPage() 699 597 { … … 727 625 } 728 626 627 void UIMachineSettingsGeneral::prepare() 628 { 629 /* Apply UI decorations: */ 630 Ui::UIMachineSettingsGeneral::setupUi(this); 631 632 /* Prepare tabs: */ 633 prepareTabBasic(); 634 prepareTabAdvanced(); 635 prepareTabDescription(); 636 prepareTabEncryption(); 637 } 638 639 void UIMachineSettingsGeneral::prepareTabBasic() 640 { 641 /* Name and OS Type widget was created in the .ui file: */ 642 AssertPtrReturnVoid(m_pNameAndSystemEditor); 643 { 644 /* Configure Name and OS Type widget: */ 645 m_pNameAndSystemEditor->nameEditor()->setValidator(new QRegExpValidator(QRegExp(".+"), this)); 646 connect(m_pNameAndSystemEditor, SIGNAL(sigOsTypeChanged()), this, SLOT(revalidate())); 647 connect(m_pNameAndSystemEditor, SIGNAL(sigNameChanged(const QString&)), this, SLOT(revalidate())); 648 } 649 } 650 651 void UIMachineSettingsGeneral::prepareTabAdvanced() 652 { 653 /* Shared Clipboard mode combo was created in the .ui file: */ 654 AssertPtrReturnVoid(mCbClipboard); 655 { 656 /* Configure Shared Clipboard mode combo: */ 657 mCbClipboard->addItem(""); /* KClipboardMode_Disabled */ 658 mCbClipboard->addItem(""); /* KClipboardMode_HostToGuest */ 659 mCbClipboard->addItem(""); /* KClipboardMode_GuestToHost */ 660 mCbClipboard->addItem(""); /* KClipboardMode_Bidirectional */ 661 } 662 /* Drag&drop mode combo was created in the .ui file: */ 663 AssertPtrReturnVoid(mCbDragAndDrop); 664 { 665 /* Configure Drag&drop mode combo: */ 666 mCbDragAndDrop->addItem(""); /* KDnDMode_Disabled */ 667 mCbDragAndDrop->addItem(""); /* KDnDMode_HostToGuest */ 668 mCbDragAndDrop->addItem(""); /* KDnDMode_GuestToHost */ 669 mCbDragAndDrop->addItem(""); /* KDnDMode_Bidirectional */ 670 } 671 } 672 673 void UIMachineSettingsGeneral::prepareTabDescription() 674 { 675 /* Description text editor was created in the .ui file: */ 676 AssertPtrReturnVoid(mTeDescription); 677 { 678 /* Configure Description text editor: */ 679 #ifdef VBOX_WS_MAC 680 mTeDescription->setMinimumHeight(150); 681 #endif /* VBOX_WS_MAC */ 682 } 683 } 684 685 void UIMachineSettingsGeneral::prepareTabEncryption() 686 { 687 /* Encryption check-box was created in the .ui file: */ 688 AssertPtrReturnVoid(m_pCheckBoxEncryption); 689 { 690 /* Configure Encryption check-box: */ 691 connect(m_pCheckBoxEncryption, SIGNAL(toggled(bool)), 692 this, SLOT(revalidate())); 693 } 694 /* Encryption Cipher combo was created in the .ui file: */ 695 AssertPtrReturnVoid(m_pComboCipher); 696 { 697 /* Configure Encryption Cipher combo: */ 698 m_encryptionCiphers << QString() 699 << "AES-XTS256-PLAIN64" 700 << "AES-XTS128-PLAIN64"; 701 m_pComboCipher->addItems(m_encryptionCiphers); 702 connect(m_pComboCipher, SIGNAL(currentIndexChanged(int)), 703 this, SLOT(sltMarkEncryptionCipherChanged())); 704 connect(m_pComboCipher, SIGNAL(currentIndexChanged(int)), 705 this, SLOT(revalidate())); 706 } 707 /* Encryption Password editor was created in the .ui file: */ 708 AssertPtrReturnVoid(m_pEditorEncryptionPassword); 709 { 710 /* Configure Encryption Password editor: */ 711 m_pEditorEncryptionPassword->setEchoMode(QLineEdit::Password); 712 connect(m_pEditorEncryptionPassword, SIGNAL(textEdited(const QString&)), 713 this, SLOT(sltMarkEncryptionPasswordChanged())); 714 connect(m_pEditorEncryptionPassword, SIGNAL(textEdited(const QString&)), 715 this, SLOT(revalidate())); 716 } 717 /* Encryption Password Confirmation editor was created in the .ui file: */ 718 AssertPtrReturnVoid(m_pEditorEncryptionPasswordConfirm); 719 { 720 /* Configure Encryption Password Confirmation editor: */ 721 m_pEditorEncryptionPasswordConfirm->setEchoMode(QLineEdit::Password); 722 connect(m_pEditorEncryptionPasswordConfirm, SIGNAL(textEdited(const QString&)), 723 this, SLOT(sltMarkEncryptionPasswordChanged())); 724 connect(m_pEditorEncryptionPasswordConfirm, SIGNAL(textEdited(const QString&)), 725 this, SLOT(revalidate())); 726 } 727 } 728 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsGeneral.h
r66183 r66190 57 57 58 58 /** Returns whether the page content was changed. */ 59 bool changed() const /* override */;59 virtual bool changed() const /* override */; 60 60 61 61 /** Loads data into the cache from the corresponding external object(s). 62 62 * @note This task COULD be performed in other than GUI thread. */ 63 v oid loadToCacheFrom(QVariant &data);63 virtual void loadToCacheFrom(QVariant &data) /* override */; 64 64 /** Loads data into the corresponding widgets from the cache, 65 65 * @note This task SHOULD be performed in GUI thread only! */ 66 v oid getFromCache();66 virtual void getFromCache() /* override */; 67 67 68 68 /** Saves the data from the corresponding widgets into the cache, 69 69 * @note This task SHOULD be performed in GUI thread only! */ 70 v oid putToCache();70 virtual void putToCache() /* override */; 71 71 /** Save data from the cache into the corresponding external object(s). 72 72 * @note This task COULD be performed in other than GUI thread. */ 73 v oid saveFromCacheTo(QVariant &data);73 virtual void saveFromCacheTo(QVariant &data) /* overrride */; 74 74 75 75 /** Validation routine. */ 76 bool validate(QList<UIValidationMessage> &messages);76 virtual bool validate(QList<UIValidationMessage> &messages) /* override */; 77 77 78 78 /** Tab-order assignment routine. */ 79 v oid setOrderAfter(QWidget *aWidget);79 virtual void setOrderAfter(QWidget *pWidget) /* override */; 80 80 81 81 /** Translation routine. */ 82 void retranslateUi(); 82 virtual void retranslateUi() /* override */; 83 84 /** Polish routine. */ 85 virtual void polishPage() /* override */; 83 86 84 87 private slots: … … 101 104 /** Prepare 'Encryption' tab routine. */ 102 105 void prepareTabEncryption(); 103 104 /** Polish routine. */105 void polishPage();106 106 107 107 /** Holds whether HW virtualization extension is enabled. */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsInterface.h
r66183 r66190 45 45 46 46 /** Returns whether the page content was changed. */ 47 bool changed() const /* override */;47 virtual bool changed() const /* override */; 48 48 49 49 /** Loads data into the cache from corresponding external object(s), 50 50 * this task COULD be performed in other than the GUI thread. */ 51 v oid loadToCacheFrom(QVariant &data);51 virtual void loadToCacheFrom(QVariant &data) /* override */; 52 52 /** Loads data into corresponding widgets from the cache, 53 53 * this task SHOULD be performed in the GUI thread only. */ 54 v oid getFromCache();54 virtual void getFromCache() /* override */; 55 55 56 56 /** Saves data from corresponding widgets to the cache, 57 57 * this task SHOULD be performed in the GUI thread only. */ 58 v oid putToCache();58 virtual void putToCache() /* override */; 59 59 /** Saves data from the cache to corresponding external object(s), 60 60 * this task COULD be performed in other than the GUI thread. */ 61 v oid saveFromCacheTo(QVariant &data);61 virtual void saveFromCacheTo(QVariant &data) /* overrride */; 62 62 63 63 /** Defines TAB order. */ 64 v oid setOrderAfter(QWidget *pWidget);64 virtual void setOrderAfter(QWidget *pWidget) /* override */; 65 65 66 66 /** Handles translation event. */ 67 v oid retranslateUi();67 virtual void retranslateUi() /* override */; 68 68 69 69 /** Performs final page polishing. */ 70 v oid polishPage();70 virtual void polishPage() /* override */; 71 71 72 72 private: -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsNetwork.cpp
r66183 r66190 1253 1253 } 1254 1254 1255 void UIMachineSettingsNetworkPage::sltHandleUpdatedTab()1256 {1257 /* Determine the sender: */1258 UIMachineSettingsNetwork *pSender = qobject_cast<UIMachineSettingsNetwork*>(sender());1259 AssertMsg(pSender, ("This slot should be called only through signal<->slot mechanism from one of UIMachineSettingsNetwork tabs!\n"));1260 1261 /* Determine sender's attachment type: */1262 KNetworkAttachmentType senderAttachmentType = pSender->attachmentType();1263 switch (senderAttachmentType)1264 {1265 case KNetworkAttachmentType_Internal:1266 {1267 refreshInternalNetworkList();1268 break;1269 }1270 case KNetworkAttachmentType_Generic:1271 {1272 refreshGenericDriverList();1273 break;1274 }1275 default:1276 break;1277 }1278 1279 /* Update all the tabs except the sender: */1280 for (int iSlot = 0; iSlot < m_pTwAdapters->count(); ++iSlot)1281 {1282 /* Get the iterated tab: */1283 UIMachineSettingsNetwork *pTab = qobject_cast<UIMachineSettingsNetwork*>(m_pTwAdapters->widget(iSlot));1284 AssertMsg(pTab, ("All the tabs of m_pTwAdapters should be of the UIMachineSettingsNetwork type!\n"));1285 1286 /* Update all the tabs (except sender) with the same attachment type as sender have: */1287 if (pTab != pSender && pTab->attachmentType() == senderAttachmentType)1288 pTab->reloadAlternative();1289 }1290 }1291 1292 void UIMachineSettingsNetworkPage::sltHandleAdvancedButtonStateChange(bool fExpanded)1293 {1294 /* Update the advanced button states for all the pages: */1295 for (int iSlot = 0; iSlot < m_pTwAdapters->count(); ++iSlot)1296 {1297 UIMachineSettingsNetwork *pTab = qobject_cast<UIMachineSettingsNetwork*>(m_pTwAdapters->widget(iSlot));1298 pTab->setAdvancedButtonState(fExpanded);1299 }1300 }1301 1302 1255 void UIMachineSettingsNetworkPage::polishPage() 1303 1256 { … … 1310 1263 UIMachineSettingsNetwork *pTab = qobject_cast<UIMachineSettingsNetwork*>(m_pTwAdapters->widget(iSlot)); 1311 1264 pTab->polishTab(); 1265 } 1266 } 1267 1268 void UIMachineSettingsNetworkPage::sltHandleUpdatedTab() 1269 { 1270 /* Determine the sender: */ 1271 UIMachineSettingsNetwork *pSender = qobject_cast<UIMachineSettingsNetwork*>(sender()); 1272 AssertMsg(pSender, ("This slot should be called only through signal<->slot mechanism from one of UIMachineSettingsNetwork tabs!\n")); 1273 1274 /* Determine sender's attachment type: */ 1275 KNetworkAttachmentType senderAttachmentType = pSender->attachmentType(); 1276 switch (senderAttachmentType) 1277 { 1278 case KNetworkAttachmentType_Internal: 1279 { 1280 refreshInternalNetworkList(); 1281 break; 1282 } 1283 case KNetworkAttachmentType_Generic: 1284 { 1285 refreshGenericDriverList(); 1286 break; 1287 } 1288 default: 1289 break; 1290 } 1291 1292 /* Update all the tabs except the sender: */ 1293 for (int iSlot = 0; iSlot < m_pTwAdapters->count(); ++iSlot) 1294 { 1295 /* Get the iterated tab: */ 1296 UIMachineSettingsNetwork *pTab = qobject_cast<UIMachineSettingsNetwork*>(m_pTwAdapters->widget(iSlot)); 1297 AssertMsg(pTab, ("All the tabs of m_pTwAdapters should be of the UIMachineSettingsNetwork type!\n")); 1298 1299 /* Update all the tabs (except sender) with the same attachment type as sender have: */ 1300 if (pTab != pSender && pTab->attachmentType() == senderAttachmentType) 1301 pTab->reloadAlternative(); 1302 } 1303 } 1304 1305 void UIMachineSettingsNetworkPage::sltHandleAdvancedButtonStateChange(bool fExpanded) 1306 { 1307 /* Update the advanced button states for all the pages: */ 1308 for (int iSlot = 0; iSlot < m_pTwAdapters->count(); ++iSlot) 1309 { 1310 UIMachineSettingsNetwork *pTab = qobject_cast<UIMachineSettingsNetwork*>(m_pTwAdapters->widget(iSlot)); 1311 pTab->setAdvancedButtonState(fExpanded); 1312 1312 } 1313 1313 } -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsNetwork.h
r66183 r66190 59 59 60 60 /** Returns whether the page content was changed. */ 61 bool changed() const /* override */;61 virtual bool changed() const /* override */; 62 62 63 63 /** Loads data into the cache from corresponding external object(s), 64 64 * this task COULD be performed in other than the GUI thread. */ 65 v oid loadToCacheFrom(QVariant &data);65 virtual void loadToCacheFrom(QVariant &data) /* override */; 66 66 /** Loads data into corresponding widgets from the cache, 67 67 * this task SHOULD be performed in the GUI thread only. */ 68 v oid getFromCache();68 virtual void getFromCache() /* override */; 69 69 70 70 /** Saves data from corresponding widgets to the cache, 71 71 * this task SHOULD be performed in the GUI thread only. */ 72 v oid putToCache();72 virtual void putToCache() /* override */; 73 73 /** Saves data from the cache to corresponding external object(s), 74 74 * this task COULD be performed in other than the GUI thread. */ 75 v oid saveFromCacheTo(QVariant &data);75 virtual void saveFromCacheTo(QVariant &data) /* overrride */; 76 76 77 77 /** Performs validation, updates @a messages list if something is wrong. */ 78 bool validate(QList<UIValidationMessage> &messages);78 virtual bool validate(QList<UIValidationMessage> &messages) /* override */; 79 79 80 80 /** Handles translation event. */ 81 void retranslateUi(); 81 virtual void retranslateUi() /* override */; 82 83 /** Performs final page polishing. */ 84 virtual void polishPage() /* override */; 82 85 83 86 private slots: … … 92 95 93 96 /* Private helpers: */ 94 void polishPage();95 97 void refreshBridgedAdapterList(); 96 98 void refreshInternalNetworkList(bool fFullRefresh = false); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsParallel.h
r66183 r66190 47 47 48 48 /** Returns whether the page content was changed. */ 49 bool changed() const /* override */;49 virtual bool changed() const /* override */; 50 50 51 51 /** Loads data into the cache from corresponding external object(s), 52 52 * this task COULD be performed in other than the GUI thread. */ 53 v oid loadToCacheFrom(QVariant &data);53 virtual void loadToCacheFrom(QVariant &data) /* override */; 54 54 /** Loads data into corresponding widgets from the cache, 55 55 * this task SHOULD be performed in the GUI thread only. */ 56 v oid getFromCache();56 virtual void getFromCache() /* override */; 57 57 58 58 /** Saves data from corresponding widgets to the cache, 59 59 * this task SHOULD be performed in the GUI thread only. */ 60 v oid putToCache();60 virtual void putToCache() /* override */; 61 61 /** Saves data from the cache to corresponding external object(s), 62 62 * this task COULD be performed in other than the GUI thread. */ 63 v oid saveFromCacheTo(QVariant &data);63 virtual void saveFromCacheTo(QVariant &data) /* overrride */; 64 64 65 65 /** Performs validation, updates @a messages list if something is wrong. */ 66 bool validate(QList<UIValidationMessage> &messages);66 virtual bool validate(QList<UIValidationMessage> &messages) /* override */; 67 67 68 68 /** Handles translation event. */ 69 void retranslateUi(); 69 virtual void retranslateUi() /* override */; 70 71 /** Performs final page polishing. */ 72 virtual void polishPage() /* override */; 70 73 71 74 private: 72 73 void polishPage();74 75 75 76 QITabWidget *mTabWidget; -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSF.cpp
r66183 r66190 503 503 } 504 504 505 void UIMachineSettingsSF::polishPage() 506 { 507 /* Update widgets availability: */ 508 mNameSeparator->setEnabled(isMachineInValidMode()); 509 m_pFoldersToolBar->setEnabled(isMachineInValidMode()); 510 m_pFoldersToolBar->setEnabled(isMachineInValidMode()); 511 512 /* Update root items visibility: */ 513 updateRootItemsVisibility(); 514 } 515 505 516 void UIMachineSettingsSF::addTriggered() 506 517 { … … 772 783 } 773 784 774 void UIMachineSettingsSF::polishPage()775 {776 /* Update widgets availability: */777 mNameSeparator->setEnabled(isMachineInValidMode());778 m_pFoldersToolBar->setEnabled(isMachineInValidMode());779 m_pFoldersToolBar->setEnabled(isMachineInValidMode());780 781 /* Update root items visibility: */782 updateRootItemsVisibility();783 }784 785 785 CSharedFolderVector UIMachineSettingsSF::getSharedFolders(UISharedFolderType sharedFoldersType) 786 786 { -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSF.h
r66183 r66190 53 53 54 54 /** Returns whether the page content was changed. */ 55 bool changed() const /* override */;55 virtual bool changed() const /* override */; 56 56 57 57 /** Loads data into the cache from corresponding external object(s), 58 58 * this task COULD be performed in other than the GUI thread. */ 59 v oid loadToCacheFrom(QVariant &data);59 virtual void loadToCacheFrom(QVariant &data) /* override */; 60 60 void loadToCacheFrom(UISharedFolderType sharedFoldersType); 61 61 /** Loads data into corresponding widgets from the cache, 62 62 * this task SHOULD be performed in the GUI thread only. */ 63 v oid getFromCache();63 virtual void getFromCache() /* override */; 64 64 65 65 /** Saves data from corresponding widgets to the cache, 66 66 * this task SHOULD be performed in the GUI thread only. */ 67 v oid putToCache();67 virtual void putToCache() /* override */; 68 68 /** Saves data from the cache to corresponding external object(s), 69 69 * this task COULD be performed in other than the GUI thread. */ 70 v oid saveFromCacheTo(QVariant &data);70 virtual void saveFromCacheTo(QVariant &data) /* overrride */; 71 71 /** Saves data of @a sharedFoldersType from the cache to corresponding external object(s), 72 72 * this task COULD be performed in other than the GUI thread. */ … … 74 74 75 75 /** Defines TAB order. */ 76 v oid setOrderAfter(QWidget *pWidget);76 virtual void setOrderAfter(QWidget *pWidget) /* override */; 77 77 78 78 /** Handles translation event. */ 79 void retranslateUi(); 79 virtual void retranslateUi() /* override */; 80 81 /** Performs final page polishing. */ 82 virtual void polishPage() /* override */; 80 83 81 84 private slots: … … 105 108 void setRootItemVisible(UISharedFolderType sharedFolderType, bool fVisible); 106 109 107 void polishPage();108 109 110 CSharedFolderVector getSharedFolders(UISharedFolderType sharedFoldersType); 110 111 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSerial.h
r66183 r66190 47 47 48 48 /** Returns whether the page content was changed. */ 49 bool changed() const /* override */;49 virtual bool changed() const /* override */; 50 50 51 51 /** Loads data into the cache from corresponding external object(s), 52 52 * this task COULD be performed in other than the GUI thread. */ 53 v oid loadToCacheFrom(QVariant &data);53 virtual void loadToCacheFrom(QVariant &data) /* override */; 54 54 /** Loads data into corresponding widgets from the cache, 55 55 * this task SHOULD be performed in the GUI thread only. */ 56 v oid getFromCache();56 virtual void getFromCache() /* override */; 57 57 58 58 /** Saves data from corresponding widgets to the cache, 59 59 * this task SHOULD be performed in the GUI thread only. */ 60 v oid putToCache();60 virtual void putToCache() /* override */; 61 61 /** Saves data from the cache to corresponding external object(s), 62 62 * this task COULD be performed in other than the GUI thread. */ 63 v oid saveFromCacheTo(QVariant &data);63 virtual void saveFromCacheTo(QVariant &data) /* overrride */; 64 64 65 65 /** Performs validation, updates @a messages list if something is wrong. */ 66 bool validate(QList<UIValidationMessage> &messages);66 virtual bool validate(QList<UIValidationMessage> &messages) /* override */; 67 67 68 68 /** Handles translation event. */ 69 void retranslateUi(); 69 virtual void retranslateUi() /* override */; 70 71 /** Performs final page polishing. */ 72 virtual void polishPage() /* override */; 70 73 71 74 private: 72 73 void polishPage();74 75 75 76 QITabWidget *mTabWidget; -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.cpp
r66183 r66190 2649 2649 } 2650 2650 2651 void UIMachineSettingsStorage::showEvent (QShowEvent *aEvent) 2651 void UIMachineSettingsStorage::polishPage() 2652 { 2653 /* Declare required variables: */ 2654 QModelIndex index = mTwStorageTree->currentIndex(); 2655 KDeviceType device = mStorageModel->data(index, StorageModel::R_AttDevice).value<KDeviceType>(); 2656 2657 /* Left pane: */ 2658 mLsLeftPane->setEnabled(isMachineInValidMode()); 2659 mTwStorageTree->setEnabled(isMachineInValidMode()); 2660 /* Empty information pane: */ 2661 mLsEmpty->setEnabled(isMachineInValidMode()); 2662 mLbInfo->setEnabled(isMachineInValidMode()); 2663 /* Controllers pane: */ 2664 mLsParameters->setEnabled(isMachineInValidMode()); 2665 mLbName->setEnabled(isMachineOffline()); 2666 mLeName->setEnabled(isMachineOffline()); 2667 mLbType->setEnabled(isMachineOffline()); 2668 mCbType->setEnabled(isMachineOffline()); 2669 mLbPortCount->setEnabled(isMachineOffline()); 2670 mSbPortCount->setEnabled(isMachineOffline()); 2671 mCbIoCache->setEnabled(isMachineOffline()); 2672 /* Attachments pane: */ 2673 mLsAttributes->setEnabled(isMachineInValidMode()); 2674 mLbMedium->setEnabled(isMachineOffline() || (isMachineOnline() && device != KDeviceType_HardDisk)); 2675 mCbSlot->setEnabled(isMachineOffline()); 2676 mTbOpen->setEnabled(isMachineOffline() || (isMachineOnline() && device != KDeviceType_HardDisk)); 2677 mCbPassthrough->setEnabled(isMachineOffline()); 2678 mCbTempEject->setEnabled(isMachineInValidMode()); 2679 mCbNonRotational->setEnabled(isMachineOffline()); 2680 m_pCheckBoxHotPluggable->setEnabled(isMachineOffline()); 2681 mLsInformation->setEnabled(isMachineInValidMode()); 2682 mLbHDFormat->setEnabled(isMachineInValidMode()); 2683 mLbHDFormatValue->setEnabled(isMachineInValidMode()); 2684 mLbCDFDType->setEnabled(isMachineInValidMode()); 2685 mLbCDFDTypeValue->setEnabled(isMachineInValidMode()); 2686 mLbHDVirtualSize->setEnabled(isMachineInValidMode()); 2687 mLbHDVirtualSizeValue->setEnabled(isMachineInValidMode()); 2688 mLbHDActualSize->setEnabled(isMachineInValidMode()); 2689 mLbHDActualSizeValue->setEnabled(isMachineInValidMode()); 2690 mLbSize->setEnabled(isMachineInValidMode()); 2691 mLbSizeValue->setEnabled(isMachineInValidMode()); 2692 mLbHDDetails->setEnabled(isMachineInValidMode()); 2693 mLbHDDetailsValue->setEnabled(isMachineInValidMode()); 2694 mLbLocation->setEnabled(isMachineInValidMode()); 2695 mLbLocationValue->setEnabled(isMachineInValidMode()); 2696 mLbUsage->setEnabled(isMachineInValidMode()); 2697 mLbUsageValue->setEnabled(isMachineInValidMode()); 2698 m_pLabelEncryption->setEnabled(isMachineInValidMode()); 2699 m_pLabelEncryptionValue->setEnabled(isMachineInValidMode()); 2700 2701 /* Update action states: */ 2702 updateActionsState(); 2703 } 2704 2705 void UIMachineSettingsStorage::showEvent(QShowEvent *pEvent) 2652 2706 { 2653 2707 if (!mIsPolished) … … 2675 2729 #endif 2676 2730 } 2677 UISettingsPageMachine::showEvent (aEvent);2731 UISettingsPageMachine::showEvent(pEvent); 2678 2732 } 2679 2733 … … 4139 4193 } 4140 4194 4141 void UIMachineSettingsStorage::polishPage()4142 {4143 /* Declare required variables: */4144 QModelIndex index = mTwStorageTree->currentIndex();4145 KDeviceType device = mStorageModel->data(index, StorageModel::R_AttDevice).value<KDeviceType>();4146 4147 /* Left pane: */4148 mLsLeftPane->setEnabled(isMachineInValidMode());4149 mTwStorageTree->setEnabled(isMachineInValidMode());4150 /* Empty information pane: */4151 mLsEmpty->setEnabled(isMachineInValidMode());4152 mLbInfo->setEnabled(isMachineInValidMode());4153 /* Controllers pane: */4154 mLsParameters->setEnabled(isMachineInValidMode());4155 mLbName->setEnabled(isMachineOffline());4156 mLeName->setEnabled(isMachineOffline());4157 mLbType->setEnabled(isMachineOffline());4158 mCbType->setEnabled(isMachineOffline());4159 mLbPortCount->setEnabled(isMachineOffline());4160 mSbPortCount->setEnabled(isMachineOffline());4161 mCbIoCache->setEnabled(isMachineOffline());4162 /* Attachments pane: */4163 mLsAttributes->setEnabled(isMachineInValidMode());4164 mLbMedium->setEnabled(isMachineOffline() || (isMachineOnline() && device != KDeviceType_HardDisk));4165 mCbSlot->setEnabled(isMachineOffline());4166 mTbOpen->setEnabled(isMachineOffline() || (isMachineOnline() && device != KDeviceType_HardDisk));4167 mCbPassthrough->setEnabled(isMachineOffline());4168 mCbTempEject->setEnabled(isMachineInValidMode());4169 mCbNonRotational->setEnabled(isMachineOffline());4170 m_pCheckBoxHotPluggable->setEnabled(isMachineOffline());4171 mLsInformation->setEnabled(isMachineInValidMode());4172 mLbHDFormat->setEnabled(isMachineInValidMode());4173 mLbHDFormatValue->setEnabled(isMachineInValidMode());4174 mLbCDFDType->setEnabled(isMachineInValidMode());4175 mLbCDFDTypeValue->setEnabled(isMachineInValidMode());4176 mLbHDVirtualSize->setEnabled(isMachineInValidMode());4177 mLbHDVirtualSizeValue->setEnabled(isMachineInValidMode());4178 mLbHDActualSize->setEnabled(isMachineInValidMode());4179 mLbHDActualSizeValue->setEnabled(isMachineInValidMode());4180 mLbSize->setEnabled(isMachineInValidMode());4181 mLbSizeValue->setEnabled(isMachineInValidMode());4182 mLbHDDetails->setEnabled(isMachineInValidMode());4183 mLbHDDetailsValue->setEnabled(isMachineInValidMode());4184 mLbLocation->setEnabled(isMachineInValidMode());4185 mLbLocationValue->setEnabled(isMachineInValidMode());4186 mLbUsage->setEnabled(isMachineInValidMode());4187 mLbUsageValue->setEnabled(isMachineInValidMode());4188 m_pLabelEncryption->setEnabled(isMachineInValidMode());4189 m_pLabelEncryptionValue->setEnabled(isMachineInValidMode());4190 4191 /* Update action states: */4192 updateActionsState();4193 }4194 4195 4195 # include "UIMachineSettingsStorage.moc" 4196 4196 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.h
r66183 r66190 618 618 619 619 /** Returns whether the page content was changed. */ 620 bool changed() const /* override */;620 virtual bool changed() const /* override */; 621 621 622 622 /** Loads data into the cache from corresponding external object(s), 623 623 * this task COULD be performed in other than the GUI thread. */ 624 v oid loadToCacheFrom(QVariant &data);624 virtual void loadToCacheFrom(QVariant &data) /* override */; 625 625 /** Loads data into corresponding widgets from the cache, 626 626 * this task SHOULD be performed in the GUI thread only. */ 627 v oid getFromCache();627 virtual void getFromCache() /* override */; 628 628 629 629 /** Saves data from corresponding widgets to the cache, 630 630 * this task SHOULD be performed in the GUI thread only. */ 631 v oid putToCache();631 virtual void putToCache() /* override */; 632 632 /** Saves data from the cache to corresponding external object(s), 633 633 * this task COULD be performed in other than the GUI thread. */ 634 v oid saveFromCacheTo(QVariant &data);634 virtual void saveFromCacheTo(QVariant &data) /* overrride */; 635 635 636 636 /** Performs validation, updates @a messages list if something is wrong. */ 637 bool validate(QList<UIValidationMessage> &messages);637 virtual bool validate(QList<UIValidationMessage> &messages) /* override */; 638 638 639 639 /** Handles translation event. */ 640 void retranslateUi(); 640 virtual void retranslateUi() /* override */; 641 642 /** Performs final page polishing. */ 643 virtual void polishPage() /* override */; 641 644 642 645 /** Handles show @a pEvent. */ 643 v oid showEvent(QShowEvent *pEvent);646 virtual void showEvent(QShowEvent *pEvent) /* override */; 644 647 645 648 private slots: … … 721 724 /** Defines configuration access level. */ 722 725 void setConfigurationAccessLevel(ConfigurationAccessLevel configurationAccessLevel); 723 724 void polishPage();725 726 726 727 QString m_strMachineId; -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.h
r66183 r66190 50 50 51 51 /** Returns whether the page content was changed. */ 52 bool changed() const /* override */;52 virtual bool changed() const /* override */; 53 53 54 54 /** Loads data into the cache from corresponding external object(s), 55 55 * this task COULD be performed in other than the GUI thread. */ 56 v oid loadToCacheFrom(QVariant &data);56 virtual void loadToCacheFrom(QVariant &data) /* override */; 57 57 /** Loads data into corresponding widgets from the cache, 58 58 * this task SHOULD be performed in the GUI thread only. */ 59 v oid getFromCache();59 virtual void getFromCache() /* override */; 60 60 61 61 /** Saves data from corresponding widgets to the cache, 62 62 * this task SHOULD be performed in the GUI thread only. */ 63 v oid putToCache();63 virtual void putToCache() /* override */; 64 64 /** Saves data from the cache to corresponding external object(s), 65 65 * this task COULD be performed in other than the GUI thread. */ 66 v oid saveFromCacheTo(QVariant &data);66 virtual void saveFromCacheTo(QVariant &data) /* overrride */; 67 67 68 68 /** Performs validation, updates @a messages list if something is wrong. */ 69 bool validate(QList<UIValidationMessage> &messages);69 virtual bool validate(QList<UIValidationMessage> &messages) /* override */; 70 70 71 71 /** Defines TAB order. */ 72 v oid setOrderAfter(QWidget *pWidget);72 virtual void setOrderAfter(QWidget *pWidget) /* override */; 73 73 74 74 /** Handles translation event. */ 75 v oid retranslateUi();75 virtual void retranslateUi() /* override */; 76 76 77 77 /** Performs final page polishing. */ 78 v oid polishPage();78 virtual void polishPage() /* override */; 79 79 80 80 private slots: -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSB.cpp
r66183 r66190 736 736 } 737 737 738 void UIMachineSettingsUSB::polishPage() 739 { 740 mGbUSB->setEnabled(isMachineOffline()); 741 mUSBChild->setEnabled(isMachineInValidMode() && mGbUSB->isChecked()); 742 mRbUSB1->setEnabled(isMachineOffline() && mGbUSB->isChecked()); 743 mRbUSB2->setEnabled(isMachineOffline() && mGbUSB->isChecked()); 744 mRbUSB3->setEnabled(isMachineOffline() && mGbUSB->isChecked()); 745 } 746 738 747 void UIMachineSettingsUSB::usbAdapterToggled(bool fEnabled) 739 748 { … … 1036 1045 } 1037 1046 1038 void UIMachineSettingsUSB::polishPage()1039 {1040 mGbUSB->setEnabled(isMachineOffline());1041 mUSBChild->setEnabled(isMachineInValidMode() && mGbUSB->isChecked());1042 mRbUSB1->setEnabled(isMachineOffline() && mGbUSB->isChecked());1043 mRbUSB2->setEnabled(isMachineOffline() && mGbUSB->isChecked());1044 mRbUSB3->setEnabled(isMachineOffline() && mGbUSB->isChecked());1045 }1046 1047 1047 #include "UIMachineSettingsUSB.moc" 1048 1048 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSB.h
r66183 r66190 57 57 58 58 /** Returns whether the page content was changed. */ 59 bool changed() const /* override */;59 virtual bool changed() const /* override */; 60 60 61 61 /** Loads data into the cache from corresponding external object(s), 62 62 * this task COULD be performed in other than the GUI thread. */ 63 v oid loadToCacheFrom(QVariant &data);63 virtual void loadToCacheFrom(QVariant &data) /* override */; 64 64 /** Loads data into corresponding widgets from the cache, 65 65 * this task SHOULD be performed in the GUI thread only. */ 66 v oid getFromCache();66 virtual void getFromCache() /* override */; 67 67 68 68 /** Saves data from corresponding widgets to the cache, 69 69 * this task SHOULD be performed in the GUI thread only. */ 70 v oid putToCache();70 virtual void putToCache() /* override */; 71 71 /** Saves data from the cache to corresponding external object(s), 72 72 * this task COULD be performed in other than the GUI thread. */ 73 v oid saveFromCacheTo(QVariant &data);73 virtual void saveFromCacheTo(QVariant &data) /* overrride */; 74 74 75 75 /** Performs validation, updates @a messages list if something is wrong. */ 76 bool validate(QList<UIValidationMessage> &messages);76 virtual bool validate(QList<UIValidationMessage> &messages) /* override */; 77 77 78 78 /** Defines TAB order. */ 79 v oid setOrderAfter(QWidget *pWidget);79 virtual void setOrderAfter(QWidget *pWidget) /* override */; 80 80 81 81 /** Handles translation event. */ 82 void retranslateUi(); 82 virtual void retranslateUi() /* override */; 83 84 /** Performs final page polishing. */ 85 virtual void polishPage() /* override */; 83 86 84 87 private slots: … … 107 110 static QString toolTipFor(const UIDataSettingsMachineUSBFilter &data); 108 111 109 void polishPage();110 111 112 /* Other variables: */ 112 113 UIToolBar *m_pToolBar;
Note:
See TracChangeset
for help on using the changeset viewer.

