MCPcopy Create free account
hub / github.com/IENT/YUView / createFrameHandlerControls

Method createFrameHandlerControls

YUViewLib/src/video/FrameHandler.cpp:117–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115}
116
117QLayout *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
153void FrameHandler::setFrameSize(Size newSize)
154{

Callers 1

Calls 4

createdMethod · 0.80
setupUiMethod · 0.80
findSizeMethod · 0.80
getFormattedNamesMethod · 0.45

Tested by

no test coverage detected