MCPcopy Create free account
hub / github.com/Faster3ck/Converseen / selectGeometryUnit

Method selectGeometryUnit

src/mainwindowimpl.cpp:1152–1172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1150}
1151
1152void MainWindowImpl::selectGeometryUnit(QString unit)
1153{
1154 if (unit == "px") {
1155 spin_geoWidth->setDecimals(0);
1156 spin_geoWidth->setSuffix(" px");
1157 spin_geoWidth->setValue((double)img_width);
1158
1159 spin_geoHeight->setDecimals(0);
1160 spin_geoHeight->setSuffix(" px");
1161 spin_geoHeight->setValue((double)img_height);
1162 }
1163 if (unit == "%") {
1164 spin_geoWidth->setDecimals(2);
1165 spin_geoWidth->setSuffix(" %");
1166 spin_geoWidth->setValue(100.00);
1167
1168 spin_geoHeight->setDecimals(2);
1169 spin_geoHeight->setSuffix(" %");
1170 spin_geoHeight->setValue(100.00);
1171 }
1172}
1173
1174void MainWindowImpl::showNewSizePreview()
1175{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected