Changeset 75370 in vbox
- Timestamp:
- Nov 9, 2018 4:41:58 PM (6 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/widgets
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIScaleFactorEditor.cpp
r75343 r75370 100 100 } 101 101 102 / / Insert 0th element as the global scalar value102 /* Insert 0th element as the global scalar value: */ 103 103 m_scaleFactors.append(m_dDefaultScaleFactor); 104 104 m_scaleFactors.append(scaleFactors); -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIScaleFactorEditor.h
r75340 r75370 19 19 #define ___UIScaleFactorEditor_h___ 20 20 21 /* GUI includes:*/21 /** GUI includes. */ 22 22 #include "QIWithRetranslateUI.h" 23 23 #include "UILibraryDefs.h" 24 24 25 25 26 /* Forward declarations:*/26 /** Forward declarations. */ 27 27 class QComboBox; 28 28 class QGridLayout; … … 33 33 34 34 /** QWidget reimplementation providing GUI with monitor scale factor editing functionality. 35 * It includes a combo box to select a monitor, a slider, and a spinbox to display/modify values.36 * The first item in the combo box is used to change the scale factor of all monitors.*/35 * It includes a combo box to select a monitor, a slider, and a spinbox to display/modify values. 36 * The first item in the combo box is used to change the scale factor of all monitors. */ 37 37 class SHARED_LIBRARY_STUFF UIScaleFactorEditor : public QIWithRetranslateUI<QWidget> 38 38 { … … 42 42 43 43 UIScaleFactorEditor(QWidget *pParent); 44 /** Configures the internal variables (m_pMonitorComboBox items , m_scaleFactors' size, etc) 45 * wrt. @p iMonitorCount. */ 44 46 void setMonitorCount(int iMonitorCount); 45 47 void setScaleFactors(const QList<double> &scaleFactors); 46 /* Returns either a single global scale factor or a list of scale factor for each monitor. */48 /** Returns either a single global scale factor or a list of scale factor for each monitor. */ 47 49 QList<double> scaleFactors() const; 48 50 void setDefaultScaleFactor(double dDefaultScaleFactor); … … 56 58 private slots: 57 59 58 void sltScaleSpinBoxValueChanged(int value); 59 void sltScaleSliderValueChanged(int value); 60 void sltMonitorComboIndexChanged(int index); 60 /** @name Internal slots handling respective widget's value update. 61 * @{ */ 62 void sltScaleSpinBoxValueChanged(int value); 63 void sltScaleSliderValueChanged(int value); 64 void sltMonitorComboIndexChanged(int index); 65 /** @} */ 61 66 62 67 private: … … 65 70 void setIsGlobalScaleFactor(bool bFlag); 66 71 void setScaleFactor(int iMonitorIndex, int iScaleFactor); 67 /* Blocks slider's signals before settting thevalue. */72 /** Blocks slider's signals before settting the slider value. */ 68 73 void setSliderValue(int iValue); 69 /* Blocks slider's signals before settting the value. */74 /** Blocks spinbox's signals before settting the value. */ 70 75 void setSpinBoxValue(int iValue); 71 /* Set the spinbox and slider to scale factor of currently selected monitor. */76 /** Set the spinbox and slider to scale factor of currently selected monitor. */ 72 77 void updateValuesAfterMonitorChange(); 73 QSpinBox *m_pScaleSpinBox; 74 QGridLayout *m_pMainLayout; 75 QComboBox *m_pMonitorComboBox; 76 QIAdvancedSlider *m_pScaleSlider; 77 QLabel *m_pMaxScaleLabel; 78 QLabel *m_pMinScaleLabel; 79 /* Stores the per-monitor scale factors. The 0th item is for all monitors (global). */ 78 79 /** @name Member widgets. 80 * @{ */ 81 QSpinBox *m_pScaleSpinBox; 82 QGridLayout *m_pMainLayout; 83 QComboBox *m_pMonitorComboBox; 84 QIAdvancedSlider *m_pScaleSlider; 85 QLabel *m_pMaxScaleLabel; 86 QLabel *m_pMinScaleLabel; 87 /** @} */ 88 89 /** Stores the per-monitor scale factors. The 0th item is for all monitors (global). */ 80 90 QList<double> m_scaleFactors; 81 91 double m_dDefaultScaleFactor;
Note:
See TracChangeset
for help on using the changeset viewer.