MCPcopy Create free account
hub / github.com/Zalafina/QKeyMapper / refreshOriginalKeyRelatedUI

Method refreshOriginalKeyRelatedUI

QKeyMapper/qitemsetupdialog.cpp:2186–2455  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2184}
2185
2186void QItemSetupDialog::refreshOriginalKeyRelatedUI()
2187{
2188 if (m_ItemRow >= 0 && m_ItemRow < QKeyMapper::KeyMappingDataList->size()) {
2189 const MAP_KEYDATA previousKeymapData = QKeyMapper::KeyMappingDataList->at(m_ItemRow);
2190 MAP_KEYDATA keymapdata = QKeyMapper::KeyMappingDataList->at(m_ItemRow);
2191#ifdef DEBUG_LOGOUT_ON
2192 qDebug().nospace().noquote() << "[QItemSetupDialog::refreshOriginalKeyRelatedUI]" << "Load Key Mapping Data[" << m_ItemRow << "] ->" << keymapdata;
2193#endif
2194 /* Load Original Key String */
2195 QString originalkey_str = keymapdata.Original_Key;
2196 ui->originalKeyLineEdit->setText(originalkey_str);
2197
2198 /* Load Disabled */
2199 if (true == keymapdata.Disabled) {
2200 ui->disabledCheckBox->setChecked(true);
2201 }
2202 else {
2203 ui->disabledCheckBox->setChecked(false);
2204 }
2205
2206 /* Load Burst */
2207 if (true == keymapdata.Burst) {
2208 ui->burstCheckBox->setChecked(true);
2209 }
2210 else {
2211 ui->burstCheckBox->setChecked(false);
2212 }
2213
2214 /* Load Burst press time */
2215 if (BURST_TIME_MIN <= keymapdata.BurstPressTime && keymapdata.BurstPressTime <= BURST_TIME_MAX) {
2216 ui->burstpressSpinBox->setValue(keymapdata.BurstPressTime);
2217 }
2218 else {
2219 ui->burstpressSpinBox->setValue(BURST_PRESS_TIME_DEFAULT);
2220 }
2221
2222 /* Load Burst release time */
2223 if (BURST_TIME_MIN <= keymapdata.BurstReleaseTime && keymapdata.BurstReleaseTime <= BURST_TIME_MAX) {
2224 ui->burstreleaseSpinBox->setValue(keymapdata.BurstReleaseTime);
2225 }
2226 else {
2227 ui->burstreleaseSpinBox->setValue(BURST_RELEASE_TIME_DEFAULT);
2228 }
2229
2230 /* Load Lock */
2231 if (true == keymapdata.Lock) {
2232 ui->lockCheckBox->setChecked(true);
2233 ui->mappingKeyUnlockCheckBox->setEnabled(true);
2234 ui->disableOriginalKeyUnlockCheckBox->setEnabled(true);
2235 }
2236 else {
2237 ui->lockCheckBox->setChecked(false);
2238 ui->mappingKeyUnlockCheckBox->setEnabled(false);
2239 ui->disableOriginalKeyUnlockCheckBox->setEnabled(false);
2240 }
2241
2242 /* Load MappingKeyUnlock */
2243 if (true == keymapdata.MappingKeyUnlock) {

Callers

nothing calls this directly

Calls 4

isKeySequenceFunction · 0.85
sizeMethod · 0.80
containsMethod · 0.80
notifySaveSettingDirtyFunction · 0.70

Tested by

no test coverage detected