File indexing completed on 2023-10-01 09:17:00

0001 /*
0002    SPDX-FileCopyrightText: 2008 Michael Jansen <kde@michael-jansen.biz>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #include "hotkeys_widget_iface.h"
0008 
0009 HotkeysWidgetIFace::HotkeysWidgetIFace(QWidget *parent)
0010     : QWidget(parent)
0011     , _changedSignals(new QSignalMapper(this))
0012 {
0013     // Listen to the signal mapper, but not yet
0014     connect(_changedSignals, SIGNAL(mapped(QString)), this, SLOT(slotChanged(QString)));
0015     _changedSignals->blockSignals(true);
0016 }
0017 
0018 HotkeysWidgetIFace::~HotkeysWidgetIFace()
0019 {
0020 }
0021 
0022 void HotkeysWidgetIFace::apply()
0023 {
0024     copyToObject();
0025 }
0026 
0027 void HotkeysWidgetIFace::copyFromObject()
0028 {
0029     _changedSignals->blockSignals(true);
0030     doCopyFromObject();
0031     _changedSignals->blockSignals(false);
0032 }
0033 
0034 void HotkeysWidgetIFace::copyToObject()
0035 {
0036     doCopyToObject();
0037 }
0038 
0039 void HotkeysWidgetIFace::slotChanged(const QString & /* what */)
0040 {
0041     emit changed(isChanged());
0042 }
0043 
0044 #include "moc_hotkeys_widget_iface.cpp"