| 115 | } |
| 116 | |
| 117 | QLayout *FrameHandler::createFrameHandlerControls(bool isSizeFixed) |
| 118 | { |
| 119 | // Absolutely always only call this function once! |
| 120 | assert(!ui.created()); |
| 121 | |
| 122 | ui.setupUi(); |
| 123 | |
| 124 | // Set default values |
| 125 | ui.widthSpinBox->setMaximum(100000); |
| 126 | ui.widthSpinBox->setValue(frameSize.width); |
| 127 | ui.widthSpinBox->setEnabled(!isSizeFixed); |
| 128 | ui.heightSpinBox->setMaximum(100000); |
| 129 | ui.heightSpinBox->setValue(frameSize.height); |
| 130 | ui.heightSpinBox->setEnabled(!isSizeFixed); |
| 131 | ui.frameSizeComboBox->addItems(presetFrameSizes.getFormattedNames()); |
| 132 | int idx = presetFrameSizes.findSize(frameSize); |
| 133 | ui.frameSizeComboBox->setCurrentIndex(idx); |
| 134 | ui.frameSizeComboBox->setEnabled(!isSizeFixed); |
| 135 | |
| 136 | // Connect all the change signals from the controls to "connectWidgetSignals()" |
| 137 | connect(ui.widthSpinBox, |
| 138 | QOverload<int>::of(&QSpinBox::valueChanged), |
| 139 | this, |
| 140 | &FrameHandler::slotVideoControlChanged); |
| 141 | connect(ui.heightSpinBox, |
| 142 | QOverload<int>::of(&QSpinBox::valueChanged), |
| 143 | this, |
| 144 | &FrameHandler::slotVideoControlChanged); |
| 145 | connect(ui.frameSizeComboBox, |
| 146 | QOverload<int>::of(&QComboBox::currentIndexChanged), |
| 147 | this, |
| 148 | &FrameHandler::slotVideoControlChanged); |
| 149 | |
| 150 | return ui.frameHandlerLayout; |
| 151 | } |
| 152 | |
| 153 | void FrameHandler::setFrameSize(Size newSize) |
| 154 | { |
no test coverage detected