Changeset 104928 in vbox
- Timestamp:
- Jun 14, 2024 3:51:01 PM (10 months ago)
- svn:sync-xref-src-repo-rev:
- 163530
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/widgets
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMediumSizeEditor.cpp
r104926 r104928 30 30 #include <QLabel> 31 31 #include <QRegularExpressionValidator> 32 #include <QSlider>33 32 34 33 /* GUI includes: */ … … 44 43 45 44 46 /* static */ 47 const qulonglong UIMediumSizeEditor::s_uSectorSize = 512; 48 49 UIMediumSizeEditor::UIMediumSizeEditor(QWidget *pParent, qulonglong uMinimumSize /* = _4M */) 50 : QWidget(pParent) 51 , m_uSizeMin(uMinimumSize) 52 , m_uSizeMax(gpGlobalSession->virtualBox().GetSystemProperties().GetInfoVDSize()) 53 , m_iSliderScale(calculateSliderScale(m_uSizeMax)) 54 , m_uSize(0) 55 , m_pSlider(0) 56 , m_pLabelMinSize(0) 57 , m_pLabelMaxSize(0) 58 , m_pEditor(0) 59 { 60 prepare(); 61 } 62 63 void UIMediumSizeEditor::setMediumSize(qulonglong uSize) 64 { 65 /* Remember the new size: */ 66 m_uSize = uSize; 67 68 /* And assign it to the slider & editor: */ 69 m_pSlider->blockSignals(true); 70 m_pSlider->setValue(sizeMBToSlider(m_uSize, m_iSliderScale)); 71 m_pSlider->blockSignals(false); 72 m_pEditor->blockSignals(true); 73 m_pEditor->setText(UITranslator::formatSize(m_uSize)); 74 m_strSizeSuffix = gpConverter->toString(UITranslator::parseSizeSuffix(m_pEditor->text())); 75 m_pEditor->blockSignals(false); 76 updateSizeToolTips(m_uSize); 77 } 78 79 void UIMediumSizeEditor::sltRetranslateUI() 80 { 81 /* Translate labels: */ 82 m_pLabelMinSize->setText(UITranslator::formatSize(m_uSizeMin)); 83 m_pLabelMaxSize->setText(UITranslator::formatSize(m_uSizeMax)); 84 85 /* Translate fields: */ 86 m_pSlider->setToolTip(tr("Holds the size of this medium.")); 87 m_pEditor->setToolTip(tr("Holds the size of this medium.")); 88 m_pLabelMinSize->setToolTip(tr("Minimum size for this medium.")); 89 m_pLabelMaxSize->setToolTip(tr("Maximum size for this medium.")); 90 } 91 92 void UIMediumSizeEditor::sltSizeSliderChanged(int iValue) 93 { 94 /* Update the current size: */ 95 m_uSize = sliderToSizeMB(iValue, m_iSliderScale); 96 /* Update the other widget: */ 97 m_pEditor->blockSignals(true); 98 m_pEditor->setText(UITranslator::formatSize(m_uSize)); 99 m_strSizeSuffix = gpConverter->toString(UITranslator::parseSizeSuffix(m_pEditor->text())); 100 m_pEditor->blockSignals(false); 101 updateSizeToolTips(m_uSize); 102 /* Notify the listeners: */ 103 emit sigSizeChanged(m_uSize); 104 } 105 106 void UIMediumSizeEditor::sltSizeEditorTextChanged() 107 { 108 QString strSizeString = ensureSizeSuffix(m_pEditor->text()); 109 110 m_pEditor->blockSignals(true); 111 int iCursorPosition = m_pEditor->cursorPosition(); 112 m_pEditor->setText(strSizeString); 113 m_pEditor->setCursorPosition(iCursorPosition); 114 m_pEditor->blockSignals(false); 115 116 /* Update the current size: */ 117 m_uSize = checkSectorSizeAlignment(UITranslator::parseSize(strSizeString)); 118 119 /* Update the other widget: */ 120 m_pSlider->blockSignals(true); 121 m_pSlider->setValue(sizeMBToSlider(m_uSize, m_iSliderScale)); 122 m_pSlider->blockSignals(false); 123 updateSizeToolTips(m_uSize); 124 /* Notify the listeners: */ 125 emit sigSizeChanged(m_uSize); 126 } 127 128 void UIMediumSizeEditor::prepare() 129 { 130 /* Configure reg-exp: */ 131 m_regExNonDigitOrSeparator = QRegularExpression(QString("[^\\d%1]").arg(UITranslator::decimalSep())); 132 133 /* Create layout: */ 134 QGridLayout *pLayout = new QGridLayout(this); 135 if (pLayout) 136 { 137 /* Configure layout: */ 138 pLayout->setContentsMargins(0, 0, 0, 0); 139 pLayout->setColumnStretch(0, 1); 140 pLayout->setColumnStretch(1, 1); 141 pLayout->setColumnStretch(2, 0); 142 143 /* Create size slider: */ 144 m_pSlider = new QSlider(this); 145 if (m_pSlider) 146 { 147 /* Configure slider: */ 148 m_pSlider->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); 149 m_pSlider->setOrientation(Qt::Horizontal); 150 m_pSlider->setTickPosition(QSlider::TicksBelow); 151 m_pSlider->setFocusPolicy(Qt::StrongFocus); 152 m_pSlider->setPageStep(m_iSliderScale); 153 m_pSlider->setSingleStep(m_iSliderScale / 8); 154 m_pSlider->setTickInterval(0); 155 m_pSlider->setMinimum(sizeMBToSlider(m_uSizeMin, m_iSliderScale)); 156 m_pSlider->setMaximum(sizeMBToSlider(m_uSizeMax, m_iSliderScale)); 157 connect(m_pSlider, &QSlider::valueChanged, 158 this, &UIMediumSizeEditor::sltSizeSliderChanged); 159 160 /* Add into layout: */ 161 pLayout->addWidget(m_pSlider, 0, 0, 1, 2, Qt::AlignTop); 162 } 163 164 /* Create minimum size label: */ 165 m_pLabelMinSize = new QLabel; 166 if (m_pLabelMinSize) 167 { 168 /* Configure label: */ 169 m_pLabelMinSize->setAlignment(Qt::AlignLeft | Qt::AlignVCenter); 170 171 /* Add into layout: */ 172 pLayout->addWidget(m_pLabelMinSize, 1, 0); 173 } 174 175 /* Create maximum size label: */ 176 m_pLabelMaxSize = new QLabel; 177 if (m_pLabelMaxSize) 178 { 179 /* Configure label: */ 180 m_pLabelMaxSize->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 181 182 /* Add into layout: */ 183 pLayout->addWidget(m_pLabelMaxSize, 1, 1); 184 } 185 186 /* Create size editor: */ 187 m_pEditor = new QILineEdit; 188 if (m_pEditor) 189 { 190 /* Configure editor: */ 191 m_pEditor->installEventFilter(this); 192 m_pEditor->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); 193 m_pEditor->setFixedWidthByText("88888.88 MB"); 194 m_pEditor->setAlignment(Qt::AlignRight); 195 m_pEditor->setValidator(new QRegularExpressionValidator(QRegularExpression(UITranslator::sizeRegexp()), this)); 196 connect(m_pEditor, &QILineEdit::textChanged, 197 this, &UIMediumSizeEditor::sltSizeEditorTextChanged); 198 199 /* Add into layout: */ 200 pLayout->addWidget(m_pEditor, 0, 2, Qt::AlignTop); 201 } 202 } 203 204 /* Apply language settings: */ 205 sltRetranslateUI(); 206 connect(&translationEventListener(), &UITranslationEventListener::sigRetranslateUI, 207 this, &UIMediumSizeEditor::sltRetranslateUI); 208 } 209 210 /* static */ 211 int UIMediumSizeEditor::calculateSliderScale(qulonglong uMaximumMediumSize) 45 /********************************************************************************************************************************* 46 * Class UIMediumSizeSlider implementation. * 47 *********************************************************************************************************************************/ 48 49 UIMediumSizeSlider::UIMediumSizeSlider(qulonglong uSizeMax, QWidget *pParent /* = 0 */) 50 : QSlider(pParent) 51 , m_iSliderScale(calculateSliderScale(uSizeMax)) 52 , m_uScaledMinimum(0) 53 , m_uScaledMaximum(100) 54 , m_uScaledValue(0) 55 { 56 /* Configure basic properties: */ 57 setFocusPolicy(Qt::StrongFocus); 58 setOrientation(Qt::Horizontal); 59 setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); 60 61 /* Configure tick look&feel: */ 62 setTickPosition(QSlider::TicksBelow); 63 setTickInterval(0); 64 65 /* Configure scaling: */ 66 setPageStep(m_iSliderScale); 67 setSingleStep(m_iSliderScale / 8); 68 69 /* Connection converting usual value into scaled one: */ 70 connect(this, &UIMediumSizeSlider::valueChanged, 71 this, &UIMediumSizeSlider::sltValueChanged); 72 } 73 74 void UIMediumSizeSlider::setScaledMinimum(qulonglong uMinimum) 75 { 76 /* Make sure something got changed and save the change: */ 77 if (m_uScaledMinimum == uMinimum) 78 return; 79 m_uScaledMinimum = uMinimum; 80 /* Call to base-class: */ 81 QSlider::setMinimum(sizeMBToSlider(m_uScaledMinimum, m_iSliderScale)); 82 } 83 84 void UIMediumSizeSlider::setScaledMaximum(qulonglong uMaximum) 85 { 86 /* Make sure something got changed and save the change: */ 87 if (m_uScaledMaximum == uMaximum) 88 return; 89 m_uScaledMaximum = uMaximum; 90 /* Call to base-class: */ 91 QSlider::setMaximum(sizeMBToSlider(m_uScaledMaximum, m_iSliderScale)); 92 } 93 94 void UIMediumSizeSlider::setScaledValue(qulonglong uValue) 95 { 96 /* Make sure something got changed and save the change: */ 97 if (m_uScaledValue == uValue) 98 return; 99 m_uScaledValue = uValue; 100 /* Call to base-class: */ 101 QSlider::setValue(sizeMBToSlider(m_uScaledValue, m_iSliderScale)); 102 } 103 104 void UIMediumSizeSlider::sltValueChanged(int iValue) 105 { 106 /* Convert from usual to scaled value: */ 107 emit sigScaledValueChanged(sliderToSizeMB(iValue, m_iSliderScale)); 108 } 109 110 /* static */ 111 int UIMediumSizeSlider::calculateSliderScale(qulonglong uMaximumMediumSize) 212 112 { 213 113 /* Detect how many steps to recognize between adjacent powers of 2 214 114 * to ensure that the last slider step is exactly that we need: */ 215 115 int iSliderScale = 0; 216 int iPower = log2i(uMaximumMediumSize);116 const int iPower = log2i(uMaximumMediumSize); 217 117 qulonglong uTickMB = (qulonglong)1 << iPower; 218 118 if (uTickMB < uMaximumMediumSize) … … 235 135 236 136 /* static */ 237 int UIMediumSize Editor::log2i(qulonglong uValue)137 int UIMediumSizeSlider::log2i(qulonglong uValue) 238 138 { 239 139 if (!uValue) … … 249 149 250 150 /* static */ 251 int UIMediumSize Editor::sizeMBToSlider(qulonglong uValue, int iSliderScale)151 int UIMediumSizeSlider::sizeMBToSlider(qulonglong uValue, int iSliderScale) 252 152 { 253 153 /* Make sure *any* slider value is multiple of s_uSectorSize: */ 254 uValue /= s_uSectorSize;154 uValue /= UIMediumSizeEditor::s_uSectorSize; 255 155 256 156 /* Calculate result: */ 257 int iPower = log2i(uValue);258 qulonglong uTickMB = qulonglong (1) << iPower;259 qulonglong uTickMBNext = qulonglong (1) << (iPower + 1);260 int iStep = (uValue - uTickMB) * iSliderScale / (uTickMBNext - uTickMB);261 int iResult = iPower * iSliderScale + iStep;157 const int iPower = log2i(uValue); 158 const qulonglong uTickMB = qulonglong (1) << iPower; 159 const qulonglong uTickMBNext = qulonglong (1) << (iPower + 1); 160 const int iStep = (uValue - uTickMB) * iSliderScale / (uTickMBNext - uTickMB); 161 const int iResult = iPower * iSliderScale + iStep; 262 162 263 163 /* Return result: */ … … 266 166 267 167 /* static */ 268 qulonglong UIMediumSize Editor::sliderToSizeMB(int uValue, int iSliderScale)168 qulonglong UIMediumSizeSlider::sliderToSizeMB(int uValue, int iSliderScale) 269 169 { 270 170 /* Calculate result: */ 271 int iPower = uValue / iSliderScale;272 int iStep = uValue % iSliderScale;273 qulonglong uTickMB = qulonglong (1) << iPower;274 qulonglong uTickMBNext = qulonglong (1) << (iPower + 1);171 const int iPower = uValue / iSliderScale; 172 const int iStep = uValue % iSliderScale; 173 const qulonglong uTickMB = qulonglong (1) << iPower; 174 const qulonglong uTickMBNext = qulonglong (1) << (iPower + 1); 275 175 qulonglong uResult = uTickMB + (uTickMBNext - uTickMB) * iStep / iSliderScale; 276 176 277 177 /* Make sure *any* slider value is multiple of s_uSectorSize: */ 278 uResult *= s_uSectorSize;178 uResult *= UIMediumSizeEditor::s_uSectorSize; 279 179 280 180 /* Return result: */ 281 181 return uResult; 182 } 183 184 185 /********************************************************************************************************************************* 186 * Class UIMediumSizeEditor implementation. * 187 *********************************************************************************************************************************/ 188 189 /* static */ 190 const qulonglong UIMediumSizeEditor::s_uSectorSize = 512; 191 192 UIMediumSizeEditor::UIMediumSizeEditor(QWidget *pParent, qulonglong uMinimumSize /* = _4M */) 193 : QWidget(pParent) 194 , m_uSizeMin(uMinimumSize) 195 , m_uSizeMax(gpGlobalSession->virtualBox().GetSystemProperties().GetInfoVDSize()) 196 , m_uSize(0) 197 , m_pSlider(0) 198 , m_pLabelMinSize(0) 199 , m_pLabelMaxSize(0) 200 , m_pEditor(0) 201 { 202 prepare(); 203 } 204 205 void UIMediumSizeEditor::setMediumSize(qulonglong uSize) 206 { 207 /* Remember the new size: */ 208 m_uSize = uSize; 209 210 /* And assign it to the slider & editor: */ 211 m_pSlider->blockSignals(true); 212 m_pSlider->setScaledValue(m_uSize); 213 m_pSlider->blockSignals(false); 214 m_pEditor->blockSignals(true); 215 m_pEditor->setText(UITranslator::formatSize(m_uSize)); 216 m_strSizeSuffix = gpConverter->toString(UITranslator::parseSizeSuffix(m_pEditor->text())); 217 m_pEditor->blockSignals(false); 218 updateSizeToolTips(m_uSize); 219 } 220 221 void UIMediumSizeEditor::sltRetranslateUI() 222 { 223 /* Translate labels: */ 224 m_pLabelMinSize->setText(UITranslator::formatSize(m_uSizeMin)); 225 m_pLabelMaxSize->setText(UITranslator::formatSize(m_uSizeMax)); 226 227 /* Translate fields: */ 228 m_pSlider->setToolTip(tr("Holds the size of this medium.")); 229 m_pEditor->setToolTip(tr("Holds the size of this medium.")); 230 m_pLabelMinSize->setToolTip(tr("Minimum size for this medium.")); 231 m_pLabelMaxSize->setToolTip(tr("Maximum size for this medium.")); 232 } 233 234 void UIMediumSizeEditor::sltSizeSliderChanged(qulonglong uValue) 235 { 236 /* Update the current size: */ 237 m_uSize = uValue; 238 /* Update the other widget: */ 239 m_pEditor->blockSignals(true); 240 m_pEditor->setText(UITranslator::formatSize(m_uSize)); 241 m_strSizeSuffix = gpConverter->toString(UITranslator::parseSizeSuffix(m_pEditor->text())); 242 m_pEditor->blockSignals(false); 243 updateSizeToolTips(m_uSize); 244 /* Notify the listeners: */ 245 emit sigSizeChanged(m_uSize); 246 } 247 248 void UIMediumSizeEditor::sltSizeEditorTextChanged() 249 { 250 QString strSizeString = ensureSizeSuffix(m_pEditor->text()); 251 252 m_pEditor->blockSignals(true); 253 int iCursorPosition = m_pEditor->cursorPosition(); 254 m_pEditor->setText(strSizeString); 255 m_pEditor->setCursorPosition(iCursorPosition); 256 m_pEditor->blockSignals(false); 257 258 /* Update the current size: */ 259 m_uSize = checkSectorSizeAlignment(UITranslator::parseSize(strSizeString)); 260 261 /* Update the other widget: */ 262 m_pSlider->blockSignals(true); 263 m_pSlider->setScaledValue(m_uSize); 264 m_pSlider->blockSignals(false); 265 updateSizeToolTips(m_uSize); 266 /* Notify the listeners: */ 267 emit sigSizeChanged(m_uSize); 268 } 269 270 void UIMediumSizeEditor::prepare() 271 { 272 /* Configure reg-exp: */ 273 m_regExNonDigitOrSeparator = QRegularExpression(QString("[^\\d%1]").arg(UITranslator::decimalSep())); 274 275 /* Create layout: */ 276 QGridLayout *pLayout = new QGridLayout(this); 277 if (pLayout) 278 { 279 /* Configure layout: */ 280 pLayout->setContentsMargins(0, 0, 0, 0); 281 pLayout->setColumnStretch(0, 1); 282 pLayout->setColumnStretch(1, 1); 283 pLayout->setColumnStretch(2, 0); 284 285 /* Create size slider: */ 286 m_pSlider = new UIMediumSizeSlider(m_uSizeMax, this); 287 if (m_pSlider) 288 { 289 /* Configure slider: */ 290 m_pSlider->setScaledMinimum(m_uSizeMin); 291 m_pSlider->setScaledMaximum(m_uSizeMax); 292 connect(m_pSlider, &UIMediumSizeSlider::sigScaledValueChanged, 293 this, &UIMediumSizeEditor::sltSizeSliderChanged); 294 295 /* Add into layout: */ 296 pLayout->addWidget(m_pSlider, 0, 0, 1, 2, Qt::AlignTop); 297 } 298 299 /* Create minimum size label: */ 300 m_pLabelMinSize = new QLabel; 301 if (m_pLabelMinSize) 302 { 303 /* Configure label: */ 304 m_pLabelMinSize->setAlignment(Qt::AlignLeft | Qt::AlignVCenter); 305 306 /* Add into layout: */ 307 pLayout->addWidget(m_pLabelMinSize, 1, 0); 308 } 309 310 /* Create maximum size label: */ 311 m_pLabelMaxSize = new QLabel; 312 if (m_pLabelMaxSize) 313 { 314 /* Configure label: */ 315 m_pLabelMaxSize->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 316 317 /* Add into layout: */ 318 pLayout->addWidget(m_pLabelMaxSize, 1, 1); 319 } 320 321 /* Create size editor: */ 322 m_pEditor = new QILineEdit; 323 if (m_pEditor) 324 { 325 /* Configure editor: */ 326 m_pEditor->installEventFilter(this); 327 m_pEditor->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); 328 m_pEditor->setFixedWidthByText("88888.88 MB"); 329 m_pEditor->setAlignment(Qt::AlignRight); 330 m_pEditor->setValidator(new QRegularExpressionValidator(QRegularExpression(UITranslator::sizeRegexp()), this)); 331 connect(m_pEditor, &QILineEdit::textChanged, 332 this, &UIMediumSizeEditor::sltSizeEditorTextChanged); 333 334 /* Add into layout: */ 335 pLayout->addWidget(m_pEditor, 0, 2, Qt::AlignTop); 336 } 337 } 338 339 /* Apply language settings: */ 340 sltRetranslateUI(); 341 connect(&translationEventListener(), &UITranslationEventListener::sigRetranslateUI, 342 this, &UIMediumSizeEditor::sltRetranslateUI); 282 343 } 283 344 -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMediumSizeEditor.h
r104926 r104928 34 34 /* Qt includes: */ 35 35 #include <QRegularExpression> 36 #include <QSlider> 36 37 #include <QWidget> 37 38 … … 41 42 /* Forward declarations: */ 42 43 class QLabel; 43 class QSlider;44 44 class QString; 45 45 class QWidget; 46 46 class QILineEdit; 47 48 /** QSlider sub-class used as logarithmic-scaled medium size editor. */ 49 class UIMediumSizeSlider : public QSlider 50 { 51 Q_OBJECT; 52 53 signals: 54 55 /** Notifies about scaled @a uValue change. */ 56 void sigScaledValueChanged(qulonglong uValue); 57 58 public: 59 60 /** Constructs medium size slider passing @a pParent to the base-class. 61 * @param uSizeMax Brings the maximum value to adjust slider scaling accordingly. */ 62 UIMediumSizeSlider(qulonglong uSizeMax, QWidget *pParent = 0); 63 64 /** Defines scaled @a uMinimum. */ 65 void setScaledMinimum(qulonglong uMinimum); 66 /** Defines scaled @a uMaximum. */ 67 void setScaledMaximum(qulonglong uMaximum); 68 /** Defines scaled @a uValue. */ 69 void setScaledValue(qulonglong uValue); 70 71 private slots: 72 73 /** Handles the signal about @a iValue change. */ 74 void sltValueChanged(int iValue); 75 76 private: 77 78 /** Calculates slider scale according to passed @a uMaximumMediumSize. */ 79 static int calculateSliderScale(qulonglong uMaximumMediumSize); 80 /** Returns log2 for passed @a uValue. */ 81 static int log2i(qulonglong uValue); 82 83 /** Converts passed bytes @a uValue to slides scaled value using @a iSliderScale. */ 84 static int sizeMBToSlider(qulonglong uValue, int iSliderScale); 85 /** Converts passed slider @a uValue to bytes unscaled value using @a iSliderScale. */ 86 static qulonglong sliderToSizeMB(int uValue, int iSliderScale); 87 88 /** Holds the slider scale. */ 89 const int m_iSliderScale; 90 91 /** Holds the scaled minimum. */ 92 qulonglong m_uScaledMinimum; 93 /** Holds the scaled maximum. */ 94 qulonglong m_uScaledMaximum; 95 /** Holds the scaled value. */ 96 qulonglong m_uScaledValue; 97 }; 47 98 48 99 /** Medium size editor widget. */ … … 57 108 58 109 public: 110 111 /* Holds the block size. We force m_uSize to be multiple of this number. */ 112 static const qulonglong s_uSectorSize; 59 113 60 114 /** Constructs medium size editor passing @a pParent to the base-class. */ … … 72 126 73 127 /** Handles size slider change. */ 74 void sltSizeSliderChanged( int iValue);128 void sltSizeSliderChanged(qulonglong uValue); 75 129 /** Handles size editor text edit finished signal. */ 76 130 void sltSizeEditorTextChanged(); … … 81 135 void prepare(); 82 136 83 /** Calculates slider scale according to passed @a uMaximumMediumSize. */84 static int calculateSliderScale(qulonglong uMaximumMediumSize);85 /** Returns log2 for passed @a uValue. */86 static int log2i(qulonglong uValue);87 /** Converts passed bytes @a uValue to slides scaled value using @a iSliderScale. */88 static int sizeMBToSlider(qulonglong uValue, int iSliderScale);89 /** Converts passed slider @a uValue to bytes unscaled value using @a iSliderScale. */90 static qulonglong sliderToSizeMB(int uValue, int iSliderScale);91 137 /** Updates slider/editor tool-tips. */ 92 138 void updateSizeToolTips(qulonglong uSize); … … 96 142 QString ensureSizeSuffix(const QString &strSizeString); 97 143 98 /* Holds the block size. We force m_uSize to be multiple of this number. */99 static const qulonglong s_uSectorSize;100 144 /** Holds the minimum medium size. */ 101 145 const qulonglong m_uSizeMin; 102 146 /** Holds the maximum medium size. */ 103 147 const qulonglong m_uSizeMax; 104 /** Holds the slider scale. */105 const int m_iSliderScale;106 148 /** Holds the current medium size. */ 107 149 qulonglong m_uSize; … … 110 152 111 153 /** Holds the size slider. */ 112 QSlider*m_pSlider;154 UIMediumSizeSlider *m_pSlider; 113 155 /** Holds the minimum size label. */ 114 QLabel *m_pLabelMinSize;156 QLabel *m_pLabelMinSize; 115 157 /** Holds the maximum size label. */ 116 QLabel *m_pLabelMaxSize;158 QLabel *m_pLabelMaxSize; 117 159 /** Holds the size editor. */ 118 QILineEdit *m_pEditor;160 QILineEdit *m_pEditor; 119 161 120 162 /* A regular expression used to remove any character from a QString which is neither a digit nor decimal separator. */
Note:
See TracChangeset
for help on using the changeset viewer.