Changeset 93992 in vbox
- Timestamp:
- Feb 28, 2022 5:56:58 PM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIAdvancedSlider.cpp
r93115 r93992 284 284 } 285 285 286 void QIAdvancedSlider::setToolTip(const QString &strToolTip) 287 { 288 m_pSlider->setToolTip(strToolTip); 289 } 290 286 291 void QIAdvancedSlider::setOrientation(Qt::Orientation enmOrientation) 287 292 { -
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIAdvancedSlider.h
r93115 r93992 104 104 void setErrorHint(int iMin, int iMax); 105 105 106 /** Defines slider @a strToolTip. */ 107 void setToolTip(const QString &strToolTip); 108 106 109 public slots: 107 110 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIMaximumGuestScreenSizeEditor.cpp
r93115 r93992 53 53 *********************************************************************************************************************************/ 54 54 55 UIMaximumGuestScreenSizeEditor::UIMaximumGuestScreenSizeEditor(QWidget *pParent /* = 0 */ , bool fWithLabels /* = false */)55 UIMaximumGuestScreenSizeEditor::UIMaximumGuestScreenSizeEditor(QWidget *pParent /* = 0 */) 56 56 : QIWithRetranslateUI<QWidget>(pParent) 57 , m_ fWithLabels(fWithLabels)57 , m_pLayout(0) 58 58 , m_pLabelPolicy(0) 59 59 , m_pComboPolicy(0) … … 116 116 } 117 117 118 int UIMaximumGuestScreenSizeEditor::minimumLabelHorizontalHint() const 119 { 120 int iMinimumHint = 0; 121 iMinimumHint = qMax(iMinimumHint, m_pLabelPolicy->minimumSizeHint().width()); 122 iMinimumHint = qMax(iMinimumHint, m_pLabelMaxWidth->minimumSizeHint().width()); 123 iMinimumHint = qMax(iMinimumHint, m_pLabelMaxHeight->minimumSizeHint().width()); 124 return iMinimumHint; 125 } 126 127 void UIMaximumGuestScreenSizeEditor::setMinimumLayoutIndent(int iIndent) 128 { 129 if (m_pLayout) 130 m_pLayout->setColumnMinimumWidth(0, iIndent); 131 } 132 118 133 void UIMaximumGuestScreenSizeEditor::retranslateUi() 119 134 { … … 123 138 m_pLabelMaxWidth->setText(tr("&Width:")); 124 139 if (m_pSpinboxMaxWidth) 125 m_pSpinboxMaxWidth->set WhatsThis(tr("Holds the maximum width which we would like the guest to use."));140 m_pSpinboxMaxWidth->setToolTip(tr("Holds the maximum width which we would like the guest to use.")); 126 141 if (m_pLabelMaxHeight) 127 142 m_pLabelMaxHeight->setText(tr("&Height:")); 128 143 if (m_pSpinboxMaxHeight) 129 m_pSpinboxMaxHeight->setWhatsThis(tr("Holds the maximum height which we would like the guest to use.")); 130 131 if (m_pComboPolicy) 132 { 144 m_pSpinboxMaxHeight->setToolTip(tr("Holds the maximum height which we would like the guest to use.")); 145 146 if (m_pComboPolicy) 147 { 148 m_pComboPolicy->setToolTip(tr("Selects maximum guest screen size policy.")); 133 149 for (int i = 0; i < m_pComboPolicy->count(); ++i) 134 150 { 135 151 const MaximumGuestScreenSizePolicy enmType = m_pComboPolicy->itemData(i).value<MaximumGuestScreenSizePolicy>(); 136 152 m_pComboPolicy->setItemText(i, gpConverter->toString(enmType)); 137 switch (enmType)138 {139 case MaximumGuestScreenSizePolicy_Automatic:140 m_pComboPolicy->setItemData(i,141 tr("Suggest a reasonable maximum screen size to the guest. The guest "142 "will only see this suggestion when guest additions are installed."),143 Qt::ToolTipRole);144 break;145 case MaximumGuestScreenSizePolicy_Any:146 m_pComboPolicy->setItemData(i,147 tr("Do not attempt to limit the size of the guest screen."),148 Qt::ToolTipRole);149 break;150 case MaximumGuestScreenSizePolicy_Fixed:151 m_pComboPolicy->setItemData(i,152 tr("Suggest a maximum screen size to the guest. The guest will only see "153 "this suggestion when guest additions are installed."),154 Qt::ToolTipRole);155 break;156 }157 153 } 158 154 } … … 198 194 { 199 195 /* Create main layout: */ 200 QGridLayout *pLayoutMain = new QGridLayout(this); 201 if (pLayoutMain) 202 { 203 pLayoutMain->setContentsMargins(0, 0, 0, 0); 196 m_pLayout = new QGridLayout(this); 197 if (m_pLayout) 198 { 199 m_pLayout->setContentsMargins(0, 0, 0, 0); 200 m_pLayout->setColumnStretch(1, 1); 204 201 205 202 const int iMinWidth = 640; … … 207 204 const int iMaxSize = 16 * _1K; 208 205 209 int iColumn = 0; 210 if (m_fWithLabels) 211 { 212 /* Prepare policy label: */ 213 m_pLabelPolicy = new QLabel(this); 214 if (m_pLabelPolicy) 215 { 216 m_pLabelPolicy->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 217 pLayoutMain->addWidget(m_pLabelPolicy, 0, iColumn++); 218 } 206 /* Prepare policy label: */ 207 m_pLabelPolicy = new QLabel(this); 208 if (m_pLabelPolicy) 209 { 210 m_pLabelPolicy->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 211 m_pLayout->addWidget(m_pLabelPolicy, 0, 0); 219 212 } 220 213 /* Prepare policy combo: */ … … 227 220 this, &UIMaximumGuestScreenSizeEditor::sltHandleCurrentPolicyIndexChanged); 228 221 229 pLayoutMain->addWidget(m_pComboPolicy, 0, iColumn++); 230 } 231 232 iColumn = 0; 233 if (m_fWithLabels) 234 { 235 /* Prepare max width label: */ 236 m_pLabelMaxWidth = new QLabel(this); 237 if (m_pLabelMaxWidth) 238 { 239 m_pLabelMaxWidth->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 240 pLayoutMain->addWidget(m_pLabelMaxWidth, 1, iColumn++); 241 } 222 m_pLayout->addWidget(m_pComboPolicy, 0, 1); 223 } 224 225 /* Prepare max width label: */ 226 m_pLabelMaxWidth = new QLabel(this); 227 if (m_pLabelMaxWidth) 228 { 229 m_pLabelMaxWidth->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 230 m_pLayout->addWidget(m_pLabelMaxWidth, 1, 0); 242 231 } 243 232 /* Prepare max width spinbox: */ … … 252 241 this, &UIMaximumGuestScreenSizeEditor::sltHandleSizeChanged); 253 242 254 pLayoutMain->addWidget(m_pSpinboxMaxWidth, 1, iColumn++); 255 } 256 257 iColumn = 0; 258 if (m_fWithLabels) 259 { 260 /* Prepare max height label: */ 261 m_pLabelMaxHeight = new QLabel(this); 262 if (m_pLabelMaxHeight) 263 { 264 m_pLabelMaxHeight->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 265 pLayoutMain->addWidget(m_pLabelMaxHeight, 2, iColumn++); 266 } 243 m_pLayout->addWidget(m_pSpinboxMaxWidth, 1, 1); 244 } 245 246 /* Prepare max height label: */ 247 m_pLabelMaxHeight = new QLabel(this); 248 if (m_pLabelMaxHeight) 249 { 250 m_pLabelMaxHeight->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 251 m_pLayout->addWidget(m_pLabelMaxHeight, 2, 0); 267 252 } 268 253 /* Prepare max width spinbox: */ … … 277 262 this, &UIMaximumGuestScreenSizeEditor::sltHandleSizeChanged); 278 263 279 pLayoutMain->addWidget(m_pSpinboxMaxHeight, 2, iColumn++);264 m_pLayout->addWidget(m_pSpinboxMaxHeight, 2, 1); 280 265 } 281 266 } -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIMaximumGuestScreenSizeEditor.h
r93990 r93992 31 31 32 32 /* Forward declarations: */ 33 class QGridLayout; 33 34 class QLabel; 34 35 class QSpinBox; … … 70 71 public: 71 72 72 /** Constructs maximum guest screen size editor passing @a pParent to the base-class. 73 * @param fWithLabels Brings whether we should add labels ourselves. */ 74 UIMaximumGuestScreenSizeEditor(QWidget *pParent = 0, bool fWithLabels = false); 73 /** Constructs maximum guest screen size editor passing @a pParent to the base-class. */ 74 UIMaximumGuestScreenSizeEditor(QWidget *pParent = 0); 75 75 76 76 /** Returns focus proxy 1. */ … … 85 85 /** Returns editor value. */ 86 86 UIMaximumGuestScreenSizeValue value() const; 87 88 /** Returns minimum layout hint. */ 89 int minimumLabelHorizontalHint() const; 90 /** Defines minimum layout @a iIndent. */ 91 void setMinimumLayoutIndent(int iIndent); 87 92 88 93 protected: … … 105 110 void populateCombo(); 106 111 107 /** Holds whether descriptive labels should be created. */108 bool m_fWithLabels;109 110 112 /** Holds the value to be selected. */ 111 113 UIMaximumGuestScreenSizeValue m_guiValue; 112 114 115 /** Holds the main layout: */ 116 QGridLayout *m_pLayout; 113 117 /** Holds the policy label instance. */ 114 QLabel *m_pLabelPolicy;118 QLabel *m_pLabelPolicy; 115 119 /** Holds the policy combo instance. */ 116 QIComboBox *m_pComboPolicy;120 QIComboBox *m_pComboPolicy; 117 121 /** Holds the max width label instance. */ 118 QLabel *m_pLabelMaxWidth;122 QLabel *m_pLabelMaxWidth; 119 123 /** Holds the max width spinbox instance. */ 120 QSpinBox *m_pSpinboxMaxWidth;124 QSpinBox *m_pSpinboxMaxWidth; 121 125 /** Holds the max height label instance. */ 122 QLabel *m_pLabelMaxHeight;126 QLabel *m_pLabelMaxHeight; 123 127 /** Holds the max height spinbox instance. */ 124 QSpinBox *m_pSpinboxMaxHeight;128 QSpinBox *m_pSpinboxMaxHeight; 125 129 }; 126 130 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIScaleFactorEditor.cpp
r93115 r93992 33 33 34 34 35 UIScaleFactorEditor::UIScaleFactorEditor(QWidget *pParent )35 UIScaleFactorEditor::UIScaleFactorEditor(QWidget *pParent, bool fWithLabels /* = false */) 36 36 : QIWithRetranslateUI<QWidget>(pParent) 37 , m_pMainLayout(0) 37 , m_fWithLabels(fWithLabels) 38 , m_pLayout(0) 39 , m_pLabel(0) 38 40 , m_pMonitorComboBox(0) 39 41 , m_pScaleSlider(0) … … 161 163 } 162 164 165 int UIScaleFactorEditor::minimumLabelHorizontalHint() const 166 { 167 return m_pLabel ? m_pLabel->minimumSizeHint().width() : 0; 168 } 169 170 void UIScaleFactorEditor::setMinimumLayoutIndent(int iIndent) 171 { 172 if (m_pLayout) 173 m_pLayout->setColumnMinimumWidth(0, iIndent); 174 } 175 163 176 void UIScaleFactorEditor::retranslateUi() 164 177 { 165 if (m_pMonitorComboBox && m_pMonitorComboBox->count() > 0) 166 { 167 m_pMonitorComboBox->setItemText(0, tr("All Monitors")); 168 for (int i = 1; i < m_pMonitorComboBox->count(); ++i) 169 m_pMonitorComboBox->setItemText(i, tr("Monitor %1").arg(i)); 170 } 171 setToolTip(tr("Controls the guest screen scale factor.")); 172 173 m_pMinScaleLabel->setText(tr("%1%").arg(m_pScaleSlider->minimum())); 174 m_pMaxScaleLabel->setText(tr("%1%").arg(m_pScaleSlider->maximum())); 178 if (m_pLabel) 179 m_pLabel->setText(tr("Scale &Factor:")); 180 181 if (m_pMonitorComboBox) 182 { 183 if (m_pMonitorComboBox->count() > 0) 184 { 185 m_pMonitorComboBox->setItemText(0, tr("All Monitors")); 186 for (int i = 1; i < m_pMonitorComboBox->count(); ++i) 187 m_pMonitorComboBox->setItemText(i, tr("Monitor %1").arg(i)); 188 } 189 m_pMonitorComboBox->setToolTip(tr("Selects the index of monitor guest screen scale factor being defined for.")); 190 } 191 192 if (m_pScaleSlider) 193 m_pScaleSlider->setToolTip(tr("Holds the guest screen scale factor.")); 194 if (m_pScaleSpinBox) 195 m_pScaleSpinBox->setToolTip(tr("Holds the guest screen scale factor.")); 196 197 if (m_pMinScaleLabel) 198 { 199 m_pMinScaleLabel->setText(tr("%1%").arg(m_pScaleSlider->minimum())); 200 m_pMinScaleLabel->setToolTip(tr("Minimum possible scale factor.")); 201 } 202 if (m_pMaxScaleLabel) 203 { 204 m_pMaxScaleLabel->setText(tr("%1%").arg(m_pScaleSlider->maximum())); 205 m_pMaxScaleLabel->setToolTip(tr("Maximum possible scale factor.")); 206 } 175 207 } 176 208 … … 196 228 void UIScaleFactorEditor::prepare() 197 229 { 198 m_pMainLayout = new QGridLayout(this); 199 if (m_pMainLayout) 200 { 201 m_pMainLayout->setContentsMargins(0, 0, 0, 0); 202 203 m_pMonitorComboBox = new QComboBox; 230 m_pLayout = new QGridLayout(this); 231 if (m_pLayout) 232 { 233 m_pLayout->setContentsMargins(0, 0, 0, 0); 234 m_pLayout->setColumnStretch(1, 1); 235 m_pLayout->setColumnStretch(2, 1); 236 237 /* Prepare label: */ 238 if (m_fWithLabels) 239 { 240 m_pLabel = new QLabel(this); 241 if (m_pLabel) 242 { 243 m_pLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 244 m_pLayout->addWidget(m_pLabel, 0, 0); 245 } 246 } 247 248 m_pMonitorComboBox = new QComboBox(this); 204 249 if (m_pMonitorComboBox) 205 250 { … … 207 252 connect(m_pMonitorComboBox ,static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged), 208 253 this, &UIScaleFactorEditor::sltMonitorComboIndexChanged); 209 m_pMainLayout->addWidget(m_pMonitorComboBox, 0, 0); 210 } 211 212 QGridLayout *pSliderLayout = new QGridLayout; 213 if (pSliderLayout) 214 { 215 m_pScaleSlider = new QIAdvancedSlider; 216 { 217 m_pScaleSlider->setPageStep(10); 218 m_pScaleSlider->setSingleStep(1); 219 m_pScaleSlider->setTickInterval(10); 220 m_pScaleSlider->setSnappingEnabled(true); 221 connect(m_pScaleSlider, static_cast<void(QIAdvancedSlider::*)(int)>(&QIAdvancedSlider::valueChanged), 222 this, &UIScaleFactorEditor::sltScaleSliderValueChanged); 223 pSliderLayout->addWidget(m_pScaleSlider, 0, 0, 1, 3); 224 } 225 226 m_pMinScaleLabel = new QLabel; 227 if (m_pMinScaleLabel) 228 pSliderLayout->addWidget(m_pMinScaleLabel, 1, 0); 229 230 QSpacerItem *pSpacer = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum); 231 if (pSpacer) 232 pSliderLayout->addItem(pSpacer, 1, 1); 233 234 m_pMaxScaleLabel = new QLabel; 235 if (m_pMaxScaleLabel) 236 pSliderLayout->addWidget(m_pMaxScaleLabel, 1, 2); 237 238 m_pMainLayout->addLayout(pSliderLayout, 0, 1, 2, 1); 239 } 240 241 m_pScaleSpinBox = new QSpinBox; 254 255 m_pLayout->addWidget(m_pMonitorComboBox, 0, 1); 256 } 257 258 m_pScaleSlider = new QIAdvancedSlider(this); 259 { 260 if (m_pLabel) 261 m_pLabel->setBuddy(m_pScaleSlider); 262 m_pScaleSlider->setPageStep(10); 263 m_pScaleSlider->setSingleStep(1); 264 m_pScaleSlider->setTickInterval(10); 265 m_pScaleSlider->setSnappingEnabled(true); 266 connect(m_pScaleSlider, static_cast<void(QIAdvancedSlider::*)(int)>(&QIAdvancedSlider::valueChanged), 267 this, &UIScaleFactorEditor::sltScaleSliderValueChanged); 268 269 m_pLayout->addWidget(m_pScaleSlider, 0, 2, 1, 2); 270 } 271 272 m_pScaleSpinBox = new QSpinBox(this); 242 273 if (m_pScaleSpinBox) 243 274 { … … 246 277 connect(m_pScaleSpinBox ,static_cast<void(QSpinBox::*)(int)>(&QSpinBox::valueChanged), 247 278 this, &UIScaleFactorEditor::sltScaleSpinBoxValueChanged); 248 m_pMainLayout->addWidget(m_pScaleSpinBox, 0, 3); 249 } 279 m_pLayout->addWidget(m_pScaleSpinBox, 0, 4); 280 } 281 282 m_pMinScaleLabel = new QLabel(this); 283 if (m_pMinScaleLabel) 284 m_pLayout->addWidget(m_pMinScaleLabel, 1, 2); 285 286 m_pMaxScaleLabel = new QLabel(this); 287 if (m_pMaxScaleLabel) 288 m_pLayout->addWidget(m_pMaxScaleLabel, 1, 3); 250 289 } 251 290 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIScaleFactorEditor.h
r93990 r93992 43 43 public: 44 44 45 /** Creates scale factor editor passing @a pParent to the base-class. */ 46 UIScaleFactorEditor(QWidget *pParent); 45 /** Creates scale factor editor passing @a pParent to the base-class. 46 * @param fWithLabels Brings whether we should add labels ourselves. */ 47 UIScaleFactorEditor(QWidget *pParent, bool fWithLabels = false); 47 48 48 49 /** Defines @a iMonitorCount. */ … … 59 60 /** Defines minimum width @a iHint for internal spin-box. */ 60 61 void setSpinBoxWidthHint(int iHint); 62 63 /** Returns minimum layout hint. */ 64 int minimumLabelHorizontalHint() const; 65 /** Defines minimum layout @a iIndent. */ 66 void setMinimumLayoutIndent(int iIndent); 61 67 62 68 protected: … … 95 101 /** @name Member widgets. 96 102 * @{ */ 97 QGridLayout *m_pMainLayout; 103 bool m_fWithLabels; 104 QGridLayout *m_pLayout; 105 QLabel *m_pLabel; 98 106 QComboBox *m_pMonitorComboBox; 99 107 QIAdvancedSlider *m_pScaleSlider; -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsDisplay.cpp
r93819 r93992 76 76 UIGlobalSettingsDisplay::UIGlobalSettingsDisplay() 77 77 : m_pCache(0) 78 , m_pLabelMaximumGuestScreenSizePolicy(0)79 , m_pLabelMaximumGuestScreenWidth(0)80 , m_pLabelMaximumGuestScreenHeight(0)81 78 , m_pEditorMaximumGuestScreenSize(0) 82 , m_pLabelScaleFactor(0)83 79 , m_pEditorScaleFactor(0) 84 , m_pLabel MachineWindows(0)80 , m_pLabelExtendedFeatures(0) 85 81 , m_pCheckBoxActivateOnMouseHover(0) 86 82 , m_pCheckBoxDisableHostScreenSaver(0) … … 157 153 void UIGlobalSettingsDisplay::retranslateUi() 158 154 { 159 m_pLabelMaximumGuestScreenSizePolicy->setText(tr("Maximum Guest Screen &Size:")); 160 m_pLabelMaximumGuestScreenWidth->setText(tr("&Width:")); 161 m_pLabelMaximumGuestScreenHeight->setText(tr("&Height:")); 162 m_pLabelScaleFactor->setText(tr("Scale &Factor:")); 163 m_pLabelMachineWindows->setText(tr("Extended Features:")); 155 m_pLabelExtendedFeatures->setText(tr("Extended Features:")); 164 156 m_pCheckBoxActivateOnMouseHover->setToolTip(tr("When checked, machine windows will be raised " 165 157 "when the mouse pointer moves over them.")); … … 170 162 m_pCheckBoxDisableHostScreenSaver->setText(tr("&Disable Host Screen Saver")); 171 163 } 164 165 /* These editors have own labels, but we want them to be properly layouted according to each other: */ 166 int iMinimumLayoutHint = 0; 167 iMinimumLayoutHint = qMax(iMinimumLayoutHint, m_pEditorMaximumGuestScreenSize->minimumLabelHorizontalHint()); 168 iMinimumLayoutHint = qMax(iMinimumLayoutHint, m_pEditorScaleFactor->minimumLabelHorizontalHint()); 169 iMinimumLayoutHint = qMax(iMinimumLayoutHint, m_pLabelExtendedFeatures->minimumSizeHint().width()); 170 m_pEditorMaximumGuestScreenSize->setMinimumLayoutIndent(iMinimumLayoutHint); 171 m_pEditorScaleFactor->setMinimumLayoutIndent(iMinimumLayoutHint); 172 m_pLayout->setColumnMinimumWidth(0, iMinimumLayoutHint); 172 173 } 173 174 … … 188 189 { 189 190 /* Prepare main layout: */ 190 QGridLayout *pLayoutMain = new QGridLayout(this); 191 if (pLayoutMain) 192 { 193 pLayoutMain->setColumnStretch(1, 1); 194 pLayoutMain->setRowStretch(7, 1); 195 196 /* Prepare maximum guest screen size label: */ 197 m_pLabelMaximumGuestScreenSizePolicy = new QLabel(this); 198 if (m_pLabelMaximumGuestScreenSizePolicy) 199 { 200 m_pLabelMaximumGuestScreenSizePolicy->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 201 pLayoutMain->addWidget(m_pLabelMaximumGuestScreenSizePolicy, 0, 0); 202 } 203 /* Prepare maximum guest screen width label: */ 204 m_pLabelMaximumGuestScreenWidth = new QLabel(this); 205 if (m_pLabelMaximumGuestScreenWidth) 206 { 207 m_pLabelMaximumGuestScreenWidth->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 208 pLayoutMain->addWidget(m_pLabelMaximumGuestScreenWidth, 1, 0); 209 } 210 /* Prepare maximum guest screen height label: */ 211 m_pLabelMaximumGuestScreenHeight = new QLabel(this); 212 if (m_pLabelMaximumGuestScreenHeight) 213 { 214 m_pLabelMaximumGuestScreenHeight->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 215 pLayoutMain->addWidget(m_pLabelMaximumGuestScreenHeight, 2, 0); 216 } 191 m_pLayout = new QGridLayout(this); 192 if (m_pLayout) 193 { 194 m_pLayout->setColumnStretch(1, 1); 195 m_pLayout->setRowStretch(4, 1); 196 217 197 /* Prepare maximum guest screen size editor: */ 218 198 m_pEditorMaximumGuestScreenSize = new UIMaximumGuestScreenSizeEditor(this); 219 199 if (m_pEditorMaximumGuestScreenSize) 200 m_pLayout->addWidget(m_pEditorMaximumGuestScreenSize, 0, 0, 1, 3); 201 202 /* Prepare scale-factor editor: */ 203 m_pEditorScaleFactor = new UIScaleFactorEditor(this, true /* with label */); 204 if (m_pEditorScaleFactor) 205 m_pLayout->addWidget(m_pEditorScaleFactor, 1, 0, 1, 3); 206 207 /* Prepare 'machine-windows' label: */ 208 m_pLabelExtendedFeatures = new QLabel(this); 209 if (m_pLabelExtendedFeatures) 220 210 { 221 if (m_pLabelMaximumGuestScreenSizePolicy) 222 m_pLabelMaximumGuestScreenSizePolicy->setBuddy(m_pEditorMaximumGuestScreenSize->focusProxy1()); 223 if (m_pLabelMaximumGuestScreenWidth) 224 m_pLabelMaximumGuestScreenWidth->setBuddy(m_pEditorMaximumGuestScreenSize->focusProxy2()); 225 if (m_pLabelMaximumGuestScreenHeight) 226 m_pLabelMaximumGuestScreenHeight->setBuddy(m_pEditorMaximumGuestScreenSize->focusProxy3()); 227 pLayoutMain->addWidget(m_pEditorMaximumGuestScreenSize, 0, 1, 3, 2); 228 } 229 230 /* Prepare scale-factor label: */ 231 m_pLabelScaleFactor = new QLabel(this); 232 if (m_pLabelScaleFactor) 233 { 234 m_pLabelScaleFactor->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 235 pLayoutMain->addWidget(m_pLabelScaleFactor, 3, 0); 236 } 237 /* Prepare scale-factor editor: */ 238 m_pEditorScaleFactor = new UIScaleFactorEditor(this); 239 if (m_pEditorScaleFactor) 240 { 241 if (m_pLabelScaleFactor) 242 m_pLabelScaleFactor->setBuddy(m_pEditorScaleFactor->focusProxy()); 243 pLayoutMain->addWidget(m_pEditorScaleFactor, 3, 1, 2, 2); 244 } 245 246 /* Prepare 'machine-windows' label: */ 247 m_pLabelMachineWindows = new QLabel(this); 248 if (m_pLabelMachineWindows) 249 { 250 m_pLabelMachineWindows->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 251 pLayoutMain->addWidget(m_pLabelMachineWindows, 5, 0); 211 m_pLabelExtendedFeatures->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 212 m_pLayout->addWidget(m_pLabelExtendedFeatures, 2, 0); 252 213 } 253 214 /* Prepare 'activate on mouse hover' check-box: */ 254 215 m_pCheckBoxActivateOnMouseHover = new QCheckBox(this); 255 216 if (m_pCheckBoxActivateOnMouseHover) 256 pLayoutMain->addWidget(m_pCheckBoxActivateOnMouseHover, 5, 1);217 m_pLayout->addWidget(m_pCheckBoxActivateOnMouseHover, 2, 1); 257 218 258 219 /* Prepare 'disable host screen saver' check-box: */ … … 262 223 if (NativeWindowSubsystem::X11CheckDBusScreenSaverServices()) 263 224 m_pCheckBoxDisableHostScreenSaver = new QCheckBox(this); 264 #endif 225 #endif /* VBOX_WS_X11 */ 265 226 if (m_pCheckBoxDisableHostScreenSaver) 266 pLayoutMain->addWidget(m_pCheckBoxDisableHostScreenSaver, 6, 1); 267 227 m_pLayout->addWidget(m_pCheckBoxDisableHostScreenSaver, 3, 1); 268 228 } 269 229 } -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsDisplay.h
r93990 r93992 27 27 /* Forward declarations: */ 28 28 class QCheckBox; 29 class QGridLayout; 29 30 class QLabel; 30 31 class UIMaximumGuestScreenSizeEditor; … … 81 82 /** @name Widgets 82 83 * @{ */ 83 /** Holds the maximum guest screen size label instance. */ 84 QLabel *m_pLabelMaximumGuestScreenSizePolicy; 85 /** Holds the maximum guest screen width label instance. */ 86 QLabel *m_pLabelMaximumGuestScreenWidth; 87 /** Holds the maximum guest screen height label instance. */ 88 QLabel *m_pLabelMaximumGuestScreenHeight; 84 /** Holds the main layout instance. */ 85 QGridLayout *m_pLayout; 86 89 87 /** Holds the maximum guest screen size editor instance. */ 90 88 UIMaximumGuestScreenSizeEditor *m_pEditorMaximumGuestScreenSize; 91 /** Holds the scale-factor label instance. */ 92 QLabel *m_pLabelScaleFactor; 89 93 90 /** Holds the scale-factor editor instance. */ 94 UIScaleFactorEditor *m_pEditorScaleFactor; 95 /** Holds the 'machine-windows' label instance. */ 96 QLabel *m_pLabelMachineWindows; 91 UIScaleFactorEditor *m_pEditorScaleFactor; 92 93 /** Holds the 'extended features' label instance. */ 94 QLabel *m_pLabelExtendedFeatures; 97 95 /** Holds the 'activate on mouse hover' check-box instance. */ 98 QCheckBox 96 QCheckBox *m_pCheckBoxActivateOnMouseHover; 99 97 /** Holds the 'disable host screen saver' check-box instance. */ 100 QCheckBox 98 QCheckBox *m_pCheckBoxDisableHostScreenSaver; 101 99 /** @} */ 102 100 };
Note:
See TracChangeset
for help on using the changeset viewer.