Changeset 46455 in vbox
- Timestamp:
- Jun 10, 2013 8:40:27 AM (11 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/settings/machine
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp
r46418 r46455 387 387 setTabOrder(m_pComboVideoCaptureSize, m_pEditorVideoCaptureWidth); 388 388 setTabOrder(m_pEditorVideoCaptureWidth, m_pEditorVideoCaptureHeight); 389 setTabOrder(m_pEditorVideoCaptureHeight, m_p ComboVideoCaptureFrameRate);390 setTabOrder(m_p ComboVideoCaptureFrameRate, m_pEditorVideoCaptureFrameRate);389 setTabOrder(m_pEditorVideoCaptureHeight, m_pSliderVideoCaptureFrameRate); 390 setTabOrder(m_pSliderVideoCaptureFrameRate, m_pEditorVideoCaptureFrameRate); 391 391 setTabOrder(m_pEditorVideoCaptureFrameRate, m_pComboVideoCaptureBitRate); 392 392 setTabOrder(m_pComboVideoCaptureBitRate, m_pEditorVideoCaptureBitRate); … … 401 401 CSystemProperties sys = vboxGlobal().virtualBox().GetSystemProperties(); 402 402 m_pLabelMemoryMin->setText(tr("<qt>%1 MB</qt>").arg(m_iMinVRAM)); 403 m_pLabelMemoryM in->setText(tr("<qt>%1 MB</qt>").arg(m_iMaxVRAMVisible));403 m_pLabelMemoryMax->setText(tr("<qt>%1 MB</qt>").arg(m_iMaxVRAMVisible)); 404 404 m_pLabelScreensMin->setText(tr("<qt>%1</qt>").arg(1)); 405 405 m_pLabelScreensMax->setText(tr("<qt>%1</qt>").arg(sys.GetMaxGuestMonitors())); … … 412 412 /* Video Capture stuff: */ 413 413 m_pComboVideoCaptureSize->setItemText(0, tr("User Defined")); 414 m_pComboVideoCaptureFrameRate->setItemText(0, tr("User Defined")); 414 m_pLabelVideoCaptureFrameRateMin->setText(tr("%1 fps").arg(m_pSliderVideoCaptureFrameRate->minimum())); 415 m_pLabelVideoCaptureFrameRateMax->setText(tr("%1 fps").arg(m_pSliderVideoCaptureFrameRate->maximum())); 416 m_pLabelVideoCaptureFrameRateUnits->setText(tr("fps")); 415 417 m_pComboVideoCaptureBitRate->setItemText(0, tr("User Defined")); 418 m_pComboVideoCaptureBitRate->setItemText(1, tr("%1 kbps").arg(32)); 419 m_pComboVideoCaptureBitRate->setItemText(2, tr("%1 kbps").arg(64)); 420 m_pComboVideoCaptureBitRate->setItemText(3, tr("%1 kbps").arg(128)); 421 m_pComboVideoCaptureBitRate->setItemText(4, tr("%1 kbps").arg(160)); 422 m_pComboVideoCaptureBitRate->setItemText(5, tr("%1 kbps").arg(256)); 423 m_pComboVideoCaptureBitRate->setItemText(6, tr("%1 kbps").arg(320)); 424 m_pComboVideoCaptureBitRate->setItemText(7, tr("%1 kbps").arg(512)); 425 m_pComboVideoCaptureBitRate->setItemText(8, tr("%1 kbps").arg(1024)); 426 m_pComboVideoCaptureBitRate->setItemText(9, tr("%1 kbps").arg(2048)); 427 m_pLabelVideoCaptureBitRateUnits->setText(tr("kbps")); 416 428 } 417 429 … … 474 486 } 475 487 476 void UIMachineSettingsDisplay::sltHandleVideoCaptureFrameRateChange(int iCurrentIndex) 477 { 478 /* Get the proposed frame-rate: */ 479 int iVideoCaptureFrameRate = m_pComboVideoCaptureFrameRate->itemData(iCurrentIndex).toInt(); 480 481 /* Make sure its valid: */ 482 if (iVideoCaptureFrameRate == 0) 483 return; 484 488 void UIMachineSettingsDisplay::sltHandleVideoCaptureFrameRateChange(int iFrameRate) 489 { 485 490 /* Apply proposed frame-rate: */ 486 m_pEditorVideoCaptureFrameRate->setValue(i VideoCaptureFrameRate);491 m_pEditorVideoCaptureFrameRate->setValue(iFrameRate); 487 492 } 488 493 … … 496 501 return; 497 502 498 /* Apply proposed frame-rate: */503 /* Apply proposed bit-rate: */ 499 504 m_pEditorVideoCaptureBitRate->setValue(iVideoCaptureBitRate); 500 505 } … … 514 519 void UIMachineSettingsDisplay::sltHandleVideoCaptureFrameRateChange() 515 520 { 516 /* Look for preset: */517 lookForCorrespondingFrameRatePreset();521 /* Apply proposed frame-rate: */ 522 m_pSliderVideoCaptureFrameRate->setValue(m_pEditorVideoCaptureFrameRate->value()); 518 523 } 519 524 … … 638 643 connect(m_pEditorVideoCaptureHeight, SIGNAL(valueChanged(int)), this, SLOT(sltHandleVideoCaptureHeightChange())); 639 644 640 /* Prepare frame-rate combo-box: */ 641 m_pComboVideoCaptureFrameRate->addItem(""); /* User Defined */ 642 m_pComboVideoCaptureFrameRate->addItem("1", QVariant(1)); 643 m_pComboVideoCaptureFrameRate->addItem("2", QVariant(2)); 644 m_pComboVideoCaptureFrameRate->addItem("5", QVariant(5)); 645 m_pComboVideoCaptureFrameRate->addItem("10", QVariant(10)); 646 m_pComboVideoCaptureFrameRate->addItem("15", QVariant(15)); 647 m_pComboVideoCaptureFrameRate->addItem("20", QVariant(20)); 648 m_pComboVideoCaptureFrameRate->addItem("25", QVariant(25)); 649 m_pComboVideoCaptureFrameRate->addItem("30", QVariant(30)); 650 connect(m_pComboVideoCaptureFrameRate, SIGNAL(currentIndexChanged(int)), this, SLOT(sltHandleVideoCaptureFrameRateChange(int))); 645 /* Prepare frame-rate slider: */ 646 m_pSliderVideoCaptureFrameRate->setMinimum(1); 647 m_pSliderVideoCaptureFrameRate->setMaximum(30); 648 m_pSliderVideoCaptureFrameRate->setPageStep(1); 649 m_pSliderVideoCaptureFrameRate->setSingleStep(1); 650 m_pSliderVideoCaptureFrameRate->setTickInterval(1); 651 m_pSliderVideoCaptureFrameRate->setSnappingEnabled(true); 652 m_pSliderVideoCaptureFrameRate->setOptimalHint(1, 25); 653 m_pSliderVideoCaptureFrameRate->setWarningHint(25, 30); 654 connect(m_pSliderVideoCaptureFrameRate, SIGNAL(valueChanged(int)), this, SLOT(sltHandleVideoCaptureFrameRateChange(int))); 651 655 652 656 /* Prepare frame-rate spin-box: */ … … 657 661 658 662 /* Prepare bit-rate combo-box: */ 659 m_pComboVideoCaptureBitRate-> addItem(""); /* User Defined */660 m_pComboVideoCaptureBitRate-> addItem("32",QVariant(32));661 m_pComboVideoCaptureBitRate-> addItem("64",QVariant(64));662 m_pComboVideoCaptureBitRate-> addItem("128",QVariant(128));663 m_pComboVideoCaptureBitRate-> addItem("160",QVariant(160));664 m_pComboVideoCaptureBitRate-> addItem("256",QVariant(256));665 m_pComboVideoCaptureBitRate-> addItem("320",QVariant(320));666 m_pComboVideoCaptureBitRate-> addItem("512",QVariant(512));667 m_pComboVideoCaptureBitRate-> addItem("1024", QVariant(1024));668 m_pComboVideoCaptureBitRate-> addItem("2048", QVariant(2048));663 m_pComboVideoCaptureBitRate->insertItem(0, QString()); /* User Defined */ 664 m_pComboVideoCaptureBitRate->insertItem(1, QString(), QVariant(32)); 665 m_pComboVideoCaptureBitRate->insertItem(2, QString(), QVariant(64)); 666 m_pComboVideoCaptureBitRate->insertItem(3, QString(), QVariant(128)); 667 m_pComboVideoCaptureBitRate->insertItem(4, QString(), QVariant(160)); 668 m_pComboVideoCaptureBitRate->insertItem(5, QString(), QVariant(256)); 669 m_pComboVideoCaptureBitRate->insertItem(6, QString(), QVariant(320)); 670 m_pComboVideoCaptureBitRate->insertItem(7, QString(), QVariant(512)); 671 m_pComboVideoCaptureBitRate->insertItem(8, QString(), QVariant(1024)); 672 m_pComboVideoCaptureBitRate->insertItem(9, QString(), QVariant(2048)); 669 673 connect(m_pComboVideoCaptureBitRate, SIGNAL(currentIndexChanged(int)), this, SLOT(sltHandleVideoCaptureBitRateChange(int))); 670 674 … … 716 720 m_pSliderMemory->setOptimalHint(uNeedMBytes, m_iMaxVRAMVisible); 717 721 m_pEditorMemory->setValidator(new QIntValidator(m_iMinVRAM, m_iMaxVRAMVisible, this)); 718 m_pLabelMemoryM in->setText(tr("<qt>%1 MB</qt>").arg(m_iMaxVRAMVisible));722 m_pLabelMemoryMax->setText(tr("<qt>%1 MB</qt>").arg(m_iMaxVRAMVisible)); 719 723 } 720 724 … … 755 759 } 756 760 757 void UIMachineSettingsDisplay::lookForCorrespondingFrameRatePreset()758 {759 /* Look for video-capture frame-rate preset: */760 lookForCorrespondingPreset(m_pComboVideoCaptureFrameRate,761 m_pEditorVideoCaptureFrameRate->value());762 }763 764 761 void UIMachineSettingsDisplay::lookForCorrespondingBitRatePreset() 765 762 { -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.h
r46418 r46455 168 168 /* Handlers: Video Capture stuff: */ 169 169 void sltHandleVideoCaptureSizeChange(int iCurrentIndex); 170 void sltHandleVideoCaptureFrameRateChange(int i CurrentIndex);170 void sltHandleVideoCaptureFrameRateChange(int iFrameRate); 171 171 void sltHandleVideoCaptureBitRateChange(int iCurrentIndex); 172 172 void sltHandleVideoCaptureWidthChange(); … … 190 190 /* Helpers: Video Capture stuff: */ 191 191 void lookForCorrespondingSizePreset(); 192 void lookForCorrespondingFrameRatePreset();193 192 void lookForCorrespondingBitRatePreset(); 194 193 static void lookForCorrespondingPreset(QComboBox *pWhere, const QVariant &whichData); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.ui
r46418 r46455 68 68 <layout class="QHBoxLayout" name="m_pLayoutLegendMemory"> 69 69 <item> 70 <widget class="QLabel" name="m_pLabelMemoryMin"> 71 <property name="sizePolicy"> 72 <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> 73 <horstretch>0</horstretch> 74 <verstretch>0</verstretch> 75 </sizepolicy> 76 </property> 77 </widget> 70 <widget class="QLabel" name="m_pLabelMemoryMin"/> 78 71 </item> 79 72 <item> … … 91 84 </item> 92 85 <item> 93 <widget class="QLabel" name="m_pLabelMemoryMax"> 94 <property name="sizePolicy"> 95 <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> 96 <horstretch>0</horstretch> 97 <verstretch>0</verstretch> 98 </sizepolicy> 99 </property> 100 </widget> 86 <widget class="QLabel" name="m_pLabelMemoryMax"/> 101 87 </item> 102 88 </layout> … … 535 521 </item> 536 522 <item row="2" column="0"> 537 <widget class="QLabel" name="m_pLabelVideoCaptureF PS">523 <widget class="QLabel" name="m_pLabelVideoCaptureFrameRate"> 538 524 <property name="text"> 539 525 <string>&Frame Rate:</string> … … 543 529 </property> 544 530 <property name="buddy"> 545 <cstring>m_pComboVideoCaptureFrameRate</cstring> 546 </property> 547 </widget> 548 </item> 549 <item row="2" column="1"> 550 <widget class="QComboBox" name="m_pComboVideoCaptureFrameRate"> 551 <property name="sizePolicy"> 552 <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> 553 <horstretch>1</horstretch> 554 <verstretch>0</verstretch> 555 </sizepolicy> 556 </property> 557 <property name="whatsThis"> 558 <string>This setting determines the maximum number of <b>frames per second</b>. Frames with a higher frequency will be skipped. Reducing this value increses the number of skipped frames but reduces the file size.</string> 559 </property> 560 </widget> 531 <cstring>m_pSliderVideoCaptureFrameRate</cstring> 532 </property> 533 </widget> 534 </item> 535 <item row="2" column="1" rowspan="2"> 536 <layout class="QGridLayout" name="m_pSliderLayoutVideoCaptureFrameRate"> 537 <property name="spacing"> 538 <number>0</number> 539 </property> 540 <item row="0" column="0" colspan="3"> 541 <widget class="QIAdvancedSlider" name="m_pSliderVideoCaptureFrameRate"> 542 <property name="whatsThis"> 543 <string>This setting determines the maximum number of <b>frames per second</b>. Frames with a higher frequency will be skipped. Reducing this value increses the number of skipped frames but reduces the file size.</string> 544 </property> 545 <property name="orientation"> 546 <enum>Qt::Horizontal</enum> 547 </property> 548 <property name="tickPosition"> 549 <enum>QSlider::TicksBelow</enum> 550 </property> 551 </widget> 552 </item> 553 <item row="1" column="0"> 554 <widget class="QLabel" name="m_pLabelVideoCaptureFrameRateMin"/> 555 </item> 556 <item row="1" column="1"> 557 <spacer name="m_pStretchVideoCaptureFrameRate"> 558 <property name="orientation"> 559 <enum>Qt::Horizontal</enum> 560 </property> 561 <property name="sizeHint" stdset="0"> 562 <size> 563 <width>0</width> 564 <height>0</height> 565 </size> 566 </property> 567 </spacer> 568 </item> 569 <item row="1" column="2"> 570 <widget class="QLabel" name="m_pLabelVideoCaptureFrameRateMax"/> 571 </item> 572 </layout> 561 573 </item> 562 574 <item row="2" column="2"> … … 567 579 </widget> 568 580 </item> 569 <item row="3" column="0"> 581 <item row="2" column="3"> 582 <widget class="QLabel" name="m_pLabelVideoCaptureFrameRateUnits"/> 583 </item> 584 <item row="4" column="0"> 570 585 <widget class="QLabel" name="m_pLabelVideoCaptureRate"> 571 586 <property name="text"> … … 580 595 </widget> 581 596 </item> 582 <item row=" 3" column="1">597 <item row="4" column="1"> 583 598 <widget class="QComboBox" name="m_pComboVideoCaptureBitRate"> 584 599 <property name="sizePolicy"> … … 593 608 </widget> 594 609 </item> 595 <item row=" 3" column="2">610 <item row="4" column="2"> 596 611 <widget class="QSpinBox" name="m_pEditorVideoCaptureBitRate"> 597 612 <property name="whatsThis"> … … 599 614 </property> 600 615 </widget> 616 </item> 617 <item row="4" column="3"> 618 <widget class="QLabel" name="m_pLabelVideoCaptureBitRateUnits"/> 601 619 </item> 602 620 </layout>
Note:
See TracChangeset
for help on using the changeset viewer.