Changeset 85813 in vbox
- Timestamp:
- Aug 18, 2020 10:45:09 AM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/VBoxUI.pro
r85808 r85813 23 23 FORMS = \ 24 24 src/settings/UISettingsDialog.ui \ 25 src/settings/global/UIGlobalSettingsGeneral.ui \26 25 src/settings/global/UIGlobalSettingsLanguage.ui \ 27 26 src/settings/global/UIGlobalSettingsExtension.ui \ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsGeneral.cpp
r82968 r85813 17 17 18 18 /* Qt includes: */ 19 #include <QCheckBox> 19 20 #include <QDir> 21 #include <QGridLayout> 22 #include <QLabel> 20 23 21 24 /* GUI includes: */ 25 #include "UICommon.h" 26 #include "UIErrorString.h" 27 #include "UIExtraDataManager.h" 28 #include "UIFilePathSelector.h" 22 29 #include "UIGlobalSettingsGeneral.h" 23 #include "UIExtraDataManager.h"24 #include "UIErrorString.h"25 #include "UICommon.h"26 30 27 31 … … 62 66 UIGlobalSettingsGeneral::UIGlobalSettingsGeneral() 63 67 : m_pCache(0) 68 , m_pSelectorMachineFolder(0) 69 , m_pSelectorVRDPLibName(0) 70 , m_pCheckBoxHostScreenSaver(0) 71 , m_pLabelMachineFolder(0) 72 , m_pLabelHostScreenSaver(0) 73 , m_pLabelVRDPLibName(0) 64 74 { 65 75 /* Prepare: */ … … 135 145 void UIGlobalSettingsGeneral::retranslateUi() 136 146 { 137 /* Translate uic generated strings: */ 138 Ui::UIGlobalSettingsGeneral::retranslateUi(this); 147 m_pLabelMachineFolder->setText(tr("Default &Machine Folder:")); 148 m_pSelectorMachineFolder->setWhatsThis(tr("Holds the path to the default virtual machine folder. This folder is used, " 149 "if not explicitly specified otherwise, when creating new virtual machines.")); 150 m_pLabelVRDPLibName->setText(tr("V&RDP Authentication Library:")); 151 m_pSelectorVRDPLibName->setWhatsThis(tr("Holds the path to the library that provides authentication for Remote Display (VRDP) clients.")); 152 m_pLabelHostScreenSaver->setText(tr("Host Screensaver:")); 153 m_pCheckBoxHostScreenSaver->setWhatsThis(tr("When checked, the host screensaver will be disabled whenever a virtual machine is running.")); 154 m_pCheckBoxHostScreenSaver->setText(tr("&Disable When Running Virtual Machines")); 139 155 } 140 156 141 157 void UIGlobalSettingsGeneral::prepare() 142 158 { 143 /* Apply UI decorations: */ 144 Ui::UIGlobalSettingsGeneral::setupUi(this); 159 prepareWidgets(); 145 160 146 161 /* Prepare cache: */ … … 167 182 /* Apply language settings: */ 168 183 retranslateUi(); 184 } 185 186 void UIGlobalSettingsGeneral::prepareWidgets() 187 { 188 if (objectName().isEmpty()) 189 setObjectName(QStringLiteral("UIGlobalSettingsGeneral")); 190 QGridLayout *pMainLayout = new QGridLayout(this); 191 pMainLayout->setContentsMargins(0, 0, 0, 0); 192 pMainLayout->setObjectName(QStringLiteral("pMainLayout")); 193 m_pLabelMachineFolder = new QLabel(); 194 m_pLabelMachineFolder->setObjectName(QStringLiteral("m_pLabelMachineFolder")); 195 m_pLabelMachineFolder->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); 196 pMainLayout->addWidget(m_pLabelMachineFolder, 0, 0, 1, 1); 197 198 m_pSelectorMachineFolder = new UIFilePathSelector(); 199 m_pSelectorMachineFolder->setObjectName(QStringLiteral("m_pSelectorMachineFolder")); 200 QSizePolicy sizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); 201 sizePolicy.setHorizontalStretch(0); 202 sizePolicy.setVerticalStretch(0); 203 sizePolicy.setHeightForWidth(m_pSelectorMachineFolder->sizePolicy().hasHeightForWidth()); 204 m_pSelectorMachineFolder->setSizePolicy(sizePolicy); 205 pMainLayout->addWidget(m_pSelectorMachineFolder, 0, 1, 1, 2); 206 207 m_pLabelVRDPLibName = new QLabel(); 208 m_pLabelVRDPLibName->setObjectName(QStringLiteral("m_pLabelVRDPLibName")); 209 m_pLabelVRDPLibName->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); 210 pMainLayout->addWidget(m_pLabelVRDPLibName, 1, 0, 1, 1); 211 212 m_pSelectorVRDPLibName = new UIFilePathSelector(); 213 m_pSelectorVRDPLibName->setObjectName(QStringLiteral("m_pSelectorVRDPLibName")); 214 sizePolicy.setHeightForWidth(m_pSelectorVRDPLibName->sizePolicy().hasHeightForWidth()); 215 m_pSelectorVRDPLibName->setSizePolicy(sizePolicy); 216 pMainLayout->addWidget(m_pSelectorVRDPLibName, 1, 1, 1, 2); 217 218 m_pLabelHostScreenSaver = new QLabel(); 219 m_pLabelHostScreenSaver->setObjectName(QStringLiteral("m_pLabelHostScreenSaver")); 220 m_pLabelHostScreenSaver->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); 221 pMainLayout->addWidget(m_pLabelHostScreenSaver, 2, 0, 1, 1); 222 223 m_pCheckBoxHostScreenSaver = new QCheckBox(); 224 m_pCheckBoxHostScreenSaver->setObjectName(QStringLiteral("m_pCheckBoxHostScreenSaver")); 225 pMainLayout->addWidget(m_pCheckBoxHostScreenSaver, 2, 1, 1, 1); 226 227 QSpacerItem *pSpacerItem = new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding); 228 pMainLayout->addItem(pSpacerItem, 3, 0, 1, 3); 229 230 m_pLabelMachineFolder->setBuddy(m_pSelectorMachineFolder); 231 m_pLabelVRDPLibName->setBuddy(m_pSelectorVRDPLibName); 232 m_pLabelHostScreenSaver->setBuddy(m_pCheckBoxHostScreenSaver); 169 233 } 170 234 … … 214 278 return fSuccess; 215 279 } 216 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsGeneral.h
r82968 r85813 24 24 /* GUI includes: */ 25 25 #include "UISettingsPage.h" 26 #include "UIGlobalSettingsGeneral.gen.h"27 26 28 27 /* Forward declarations: */ 28 class QCheckBox; 29 class QLabel; 30 class UIFilePathSelector; 29 31 struct UIDataSettingsGlobalGeneral; 30 32 typedef UISettingsCache<UIDataSettingsGlobalGeneral> UISettingsCacheGlobalGeneral; 31 33 32 34 /** Global settings: General page. */ 33 class SHARED_LIBRARY_STUFF UIGlobalSettingsGeneral : public UISettingsPageGlobal, 34 public Ui::UIGlobalSettingsGeneral 35 class SHARED_LIBRARY_STUFF UIGlobalSettingsGeneral : public UISettingsPageGlobal 35 36 { 36 37 Q_OBJECT; … … 66 67 /** Prepares all. */ 67 68 void prepare(); 69 /** Prepares widgets. */ 70 void prepareWidgets(); 68 71 /** Cleanups all. */ 69 72 void cleanup(); … … 74 77 /** Holds the page data cache instance. */ 75 78 UISettingsCacheGlobalGeneral *m_pCache; 79 80 /** @name Widgets 81 * @{ */ 82 UIFilePathSelector *m_pSelectorMachineFolder; 83 UIFilePathSelector *m_pSelectorVRDPLibName; 84 QCheckBox *m_pCheckBoxHostScreenSaver; 85 QLabel *m_pLabelMachineFolder; 86 QLabel *m_pLabelHostScreenSaver; 87 QLabel *m_pLabelVRDPLibName; 88 /** @} */ 76 89 }; 77 90
Note:
See TracChangeset
for help on using the changeset viewer.