File indexing completed on 2024-09-22 04:48:56

0001 /*
0002     SPDX-FileCopyrightText: 2010 Casey Link <unnamedrambler@gmail.com>
0003     SPDX-FileCopyrightText: 2009-2010 Klaralvdalens Datakonsult AB, a KDAB Group company <info@kdab.net>
0004 
0005     Refactored from earlier code by:
0006     SPDX-FileCopyrightText: 2010 Volker Krause <vkrause@kde.org>
0007     SPDX-FileCopyrightText: 2004 Cornelius Schumacher <schumacher@kde.org>
0008 
0009     SPDX-License-Identifier: LGPL-2.0-or-later
0010 */
0011 
0012 #include "multiplyingline.h"
0013 
0014 #include <QKeyEvent>
0015 
0016 using namespace KPIM;
0017 
0018 MultiplyingLine::MultiplyingLine(QWidget *parent)
0019     : QWidget(parent)
0020 {
0021 }
0022 
0023 void MultiplyingLine::slotReturnPressed()
0024 {
0025     Q_EMIT returnPressed(this);
0026 }
0027 
0028 void MultiplyingLine::slotPropagateDeletion()
0029 {
0030     Q_EMIT deleteLine(this);
0031 }
0032 
0033 void MultiplyingLine::slotFocusUp()
0034 {
0035     Q_EMIT upPressed(this);
0036 }
0037 
0038 void MultiplyingLine::slotFocusDown()
0039 {
0040     Q_EMIT downPressed(this);
0041 }
0042 
0043 void MultiplyingLine::keyPressEvent(QKeyEvent *ev)
0044 {
0045     if (ev->key() == Qt::Key_Up) {
0046         Q_EMIT upPressed(this);
0047     } else if (ev->key() == Qt::Key_Down) {
0048         Q_EMIT downPressed(this);
0049     }
0050 }
0051 
0052 void MultiplyingLine::aboutToBeDeleted()
0053 {
0054 }
0055 
0056 #include "moc_multiplyingline.cpp"