Changeset 33926 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Nov 10, 2010 9:02:39 AM (14 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/settings/global
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsGeneral.cpp
r33882 r33926 25 25 #include "VBoxGlobal.h" 26 26 27 /* General page constructor: */ 27 28 UIGlobalSettingsGeneral::UIGlobalSettingsGeneral() 28 29 { 29 /* Apply UI decorations */30 Ui::UIGlobalSettingsGeneral::setupUi 30 /* Apply UI decorations: */ 31 Ui::UIGlobalSettingsGeneral::setupUi(this); 31 32 32 33 #ifndef VBOX_GUI_WITH_SYSTRAY 33 m CbCheckTrayIcon->hide();34 m WtSpacer1->hide();34 m_pEnableTrayIconCheckbox->hide(); 35 m_pSpacerWidget1->hide(); 35 36 #endif /* !VBOX_GUI_WITH_SYSTRAY */ 36 37 #ifndef Q_WS_MAC 37 m CbCheckPresentationMode->hide();38 m WtSpacer2->hide();38 m_pEnablePresentationModeCheckbox->hide(); 39 m_pSpacerWidget2->hide(); 39 40 #endif /* !Q_WS_MAC */ 40 41 //#ifndef Q_WS_WIN /* Checkbox hidden for now! */ 41 m CbDisableHostScreenSaver->hide();42 m WtSpacer3->hide();42 m_pDisableHostScreenSaverCheckbox->hide(); 43 m_pSpacerWidget3->hide(); 43 44 //#endif /* !Q_WS_WIN */ 44 45 45 if (mCbCheckTrayIcon->isHidden() && 46 mCbCheckPresentationMode->isHidden() && 47 mCbDisableHostScreenSaver->isHidden()) 48 mLnSeparator2->hide(); 46 /* If all checkboxes hidden, hide separator too: */ 47 if (m_pEnableTrayIconCheckbox->isHidden() && 48 m_pEnablePresentationModeCheckbox->isHidden() && 49 m_pDisableHostScreenSaverCheckbox->isHidden()) 50 m_pLineSeparator2->hide(); 49 51 50 mPsMach->setHomeDir (vboxGlobal().virtualBox().GetHomeFolder()); 51 mPsVRDP->setHomeDir (vboxGlobal().virtualBox().GetHomeFolder()); 52 mPsVRDP->setMode (VBoxFilePathSelectorWidget::Mode_File_Open); 52 /* Setup widgets: */ 53 m_pMachineFolderSelector->setHomeDir(vboxGlobal().virtualBox().GetHomeFolder()); 54 m_pVRDPLibNameSelector->setHomeDir(vboxGlobal().virtualBox().GetHomeFolder()); 55 m_pVRDPLibNameSelector->setMode(VBoxFilePathSelectorWidget::Mode_File_Open); 53 56 54 /* Apply ing language settings*/57 /* Apply language settings: */ 55 58 retranslateUi(); 56 59 } … … 81 84 { 82 85 /* Fetch from cache: */ 83 m PsMach->setPath(m_cache.m_strDefaultMachineFolder);84 m PsVRDP->setPath(m_cache.m_strVRDEAuthLibrary);85 m CbCheckTrayIcon->setChecked(m_cache.m_fTrayIconEnabled);86 m_pMachineFolderSelector->setPath(m_cache.m_strDefaultMachineFolder); 87 m_pVRDPLibNameSelector->setPath(m_cache.m_strVRDEAuthLibrary); 88 m_pEnableTrayIconCheckbox->setChecked(m_cache.m_fTrayIconEnabled); 86 89 #ifdef Q_WS_MAC 87 m CbCheckPresentationMode->setChecked(m_cache.m_fPresentationModeEnabled);90 m_pEnablePresentationModeCheckbox->setChecked(m_cache.m_fPresentationModeEnabled); 88 91 #endif /* Q_WS_MAC */ 89 m CbDisableHostScreenSaver->setChecked(m_cache.m_fHostScreenSaverDisables);92 m_pDisableHostScreenSaverCheckbox->setChecked(m_cache.m_fHostScreenSaverDisables); 90 93 } 91 94 … … 95 98 { 96 99 /* Upload to cache: */ 97 m_cache.m_strDefaultMachineFolder = m PsMach->path();98 m_cache.m_strVRDEAuthLibrary = m PsVRDP->path();99 m_cache.m_fTrayIconEnabled = m CbCheckTrayIcon->isChecked();100 m_cache.m_strDefaultMachineFolder = m_pMachineFolderSelector->path(); 101 m_cache.m_strVRDEAuthLibrary = m_pVRDPLibNameSelector->path(); 102 m_cache.m_fTrayIconEnabled = m_pEnableTrayIconCheckbox->isChecked(); 100 103 #ifdef Q_WS_MAC 101 m_cache.m_fPresentationModeEnabled = m CbCheckPresentationMode->isChecked();104 m_cache.m_fPresentationModeEnabled = m_pEnablePresentationModeCheckbox->isChecked(); 102 105 #endif /* Q_WS_MAC */ 103 m_cache.m_fHostScreenSaverDisables = m CbDisableHostScreenSaver->isChecked();106 m_cache.m_fHostScreenSaverDisables = m_pDisableHostScreenSaverCheckbox->isChecked(); 104 107 } 105 108 … … 112 115 113 116 /* Save from cache: */ 114 if (m_properties.isOk() && m PsMach->isModified())117 if (m_properties.isOk() && m_pMachineFolderSelector->isModified()) 115 118 m_properties.SetDefaultMachineFolder(m_cache.m_strDefaultMachineFolder); 116 if (m_properties.isOk() && m PsVRDP->isModified())119 if (m_properties.isOk() && m_pVRDPLibNameSelector->isModified()) 117 120 m_properties.SetVRDEAuthLibrary(m_cache.m_strVRDEAuthLibrary); 118 121 m_settings.setTrayIconEnabled(m_cache.m_fTrayIconEnabled); … … 126 129 } 127 130 128 void UIGlobalSettingsGeneral::setOrderAfter (QWidget *aWidget) 131 /* Navigation stuff: */ 132 void UIGlobalSettingsGeneral::setOrderAfter(QWidget *pWidget) 129 133 { 130 setTabOrder (aWidget, mPsMach);131 setTabOrder (mPsMach, mPsVRDP);132 setTabOrder (mPsVRDP, mCbCheckTrayIcon);133 setTabOrder (mCbCheckTrayIcon, mCbCheckPresentationMode);134 setTabOrder (mCbCheckPresentationMode, mCbDisableHostScreenSaver);134 setTabOrder(pWidget, m_pMachineFolderSelector); 135 setTabOrder(m_pMachineFolderSelector, m_pVRDPLibNameSelector); 136 setTabOrder(m_pVRDPLibNameSelector, m_pEnableTrayIconCheckbox); 137 setTabOrder(m_pEnableTrayIconCheckbox, m_pEnablePresentationModeCheckbox); 138 setTabOrder(m_pEnablePresentationModeCheckbox, m_pDisableHostScreenSaverCheckbox); 135 139 } 136 140 141 /* Translation stuff: */ 137 142 void UIGlobalSettingsGeneral::retranslateUi() 138 143 { 139 /* Translate uic generated strings */140 Ui::UIGlobalSettingsGeneral::retranslateUi 144 /* Translate uic generated strings: */ 145 Ui::UIGlobalSettingsGeneral::retranslateUi(this); 141 146 142 m PsMach->setWhatsThis (tr("Displays the path to the default virtual "143 "machine folder. This folder is used, if not "144 "explicitly specified otherwise, when creating "145 "new virtual machines."));146 m PsVRDP->setWhatsThis (tr("Displays the path to the library that "147 "provides authentication for Remote Display "148 "(VRDP) clients."));147 m_pMachineFolderSelector->setWhatsThis(tr("Displays the path to the default virtual " 148 "machine folder. This folder is used, if not " 149 "explicitly specified otherwise, when creating " 150 "new virtual machines.")); 151 m_pVRDPLibNameSelector->setWhatsThis(tr("Displays the path to the library that " 152 "provides authentication for Remote Display " 153 "(VRDP) clients.")); 149 154 } 150 155 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsGeneral.h
r33882 r33926 20 20 #define __UIGlobalSettingsGeneral_h__ 21 21 22 /* Local includes */ 22 23 #include "UISettingsPage.h" 23 24 #include "UIGlobalSettingsGeneral.gen.h" … … 36 37 37 38 /* Global settings / General page: */ 38 class UIGlobalSettingsGeneral : public UISettingsPageGlobal, 39 public Ui::UIGlobalSettingsGeneral 39 class UIGlobalSettingsGeneral : public UISettingsPageGlobal, public Ui::UIGlobalSettingsGeneral 40 40 { 41 41 Q_OBJECT; … … 43 43 public: 44 44 45 /* Constructor: */ 45 46 UIGlobalSettingsGeneral(); 46 47 … … 61 62 void saveFromCacheTo(QVariant &data); 62 63 64 /* Navigation stuff: */ 63 65 void setOrderAfter (QWidget *aWidget); 64 66 67 /* Translation stuff: */ 65 68 void retranslateUi(); 66 69 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsGeneral.ui
r33882 r33926 1 <?xml version="1.0" encoding="UTF-8"?>2 1 <ui version="4.0"> 3 2 <comment> 4 VBox frontends: Qt4 GUI ( "VirtualBox"):3 VBox frontends: Qt4 GUI ("VirtualBox"): 5 4 6 5 Copyright (C) 2008-2010 Oracle Corporation … … 29 28 </property> 30 29 <item row="0" column="0" colspan="2"> 31 <widget class="QLabel" name="m LbMach">30 <widget class="QLabel" name="m_pMachineFolderLabel"> 32 31 <property name="text"> 33 32 <string>Default &Machine Folder:</string> … … 37 36 </property> 38 37 <property name="buddy"> 39 <cstring>m PsMach</cstring>38 <cstring>m_pMachineFolderSelector</cstring> 40 39 </property> 41 40 </widget> 42 41 </item> 43 42 <item row="0" column="2"> 44 <widget class="VBoxFilePathSelectorWidget" name="m PsMach">43 <widget class="VBoxFilePathSelectorWidget" name="m_pMachineFolderSelector"> 45 44 <property name="sizePolicy"> 46 45 <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> … … 52 51 </item> 53 52 <item row="1" column="0" colspan="3"> 54 <widget class="Line" name="m LnSeparator">53 <widget class="Line" name="m_pLineSeparator1"> 55 54 <property name="orientation"> 56 55 <enum>Qt::Horizontal</enum> … … 59 58 </item> 60 59 <item row="2" column="0" colspan="2"> 61 <widget class="QLabel" name="m LbVRDP">60 <widget class="QLabel" name="m_pVRDPLibLabel"> 62 61 <property name="text"> 63 62 <string>V&RDP Authentication Library:</string> … … 67 66 </property> 68 67 <property name="buddy"> 69 <cstring>m PsVRDP</cstring>68 <cstring>m_pVRDPLibNameSelector</cstring> 70 69 </property> 71 70 </widget> 72 71 </item> 73 72 <item row="2" column="2"> 74 <widget class="VBoxFilePathSelectorWidget" name="m PsVRDP">73 <widget class="VBoxFilePathSelectorWidget" name="m_pVRDPLibNameSelector"> 75 74 <property name="sizePolicy"> 76 75 <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> … … 82 81 </item> 83 82 <item row="3" column="0" colspan="3"> 84 <widget class="Line" name="m LnSeparator2">83 <widget class="Line" name="m_pLineSeparator2"> 85 84 <property name="orientation"> 86 85 <enum>Qt::Horizontal</enum> … … 89 88 </item> 90 89 <item row="4" column="0"> 91 <widget class="QWidget" name="m WtSpacer1">90 <widget class="QWidget" name="m_pSpacerWidget1"> 92 91 <property name="sizePolicy"> 93 92 <sizepolicy hsizetype="Fixed" vsizetype="Minimum"> … … 102 101 </item> 103 102 <item row="4" column="1" colspan="2"> 104 <widget class="QCheckBox" name="m CbCheckTrayIcon">103 <widget class="QCheckBox" name="m_pEnableTrayIconCheckbox"> 105 104 <property name="whatsThis"> 106 105 <string>When checked, the application will provide an icon with the context menu in the system tray.</string> … … 115 114 </item> 116 115 <item row="5" column="0"> 117 <widget class="QWidget" name="m WtSpacer2">116 <widget class="QWidget" name="m_pSpacerWidget2"> 118 117 <property name="sizePolicy"> 119 118 <sizepolicy hsizetype="Fixed" vsizetype="Minimum"> … … 128 127 </item> 129 128 <item row="5" column="1" colspan="2"> 130 <widget class="QCheckBox" name="m CbCheckPresentationMode">129 <widget class="QCheckBox" name="m_pEnablePresentationModeCheckbox"> 131 130 <property name="text"> 132 131 <string>&Auto show Dock and Menubar in fullscreen</string> … … 135 134 </item> 136 135 <item row="6" column="0"> 137 <widget class="QWidget" name="m WtSpacer3">136 <widget class="QWidget" name="m_pSpacerWidget3"> 138 137 <property name="sizePolicy"> 139 138 <sizepolicy hsizetype="Fixed" vsizetype="Minimum"> … … 148 147 </item> 149 148 <item row="6" column="1" colspan="2"> 150 <widget class="QCheckBox" name="m CbDisableHostScreenSaver">149 <widget class="QCheckBox" name="m_pDisableHostScreenSaverCheckbox"> 151 150 <property name="whatsThis"> 152 151 <string>When checked, the host screen saver will be disabled whenever a virtual machine is running.</string>
Note:
See TracChangeset
for help on using the changeset viewer.