Libkdepim

multiplyingline.cpp
1/*
2 SPDX-FileCopyrightText: 2010 Casey Link <unnamedrambler@gmail.com>
3 SPDX-FileCopyrightText: 2009-2010 Klaralvdalens Datakonsult AB, a KDAB Group company <info@kdab.net>
4
5 Refactored from earlier code by:
6 SPDX-FileCopyrightText: 2010 Volker Krause <vkrause@kde.org>
7 SPDX-FileCopyrightText: 2004 Cornelius Schumacher <schumacher@kde.org>
8
9 SPDX-License-Identifier: LGPL-2.0-or-later
10*/
11
12#include "multiplyingline.h"
13
14#include <QKeyEvent>
15
16using namespace KPIM;
17
18MultiplyingLine::MultiplyingLine(QWidget *parent)
19 : QWidget(parent)
20{
21}
22
23MultiplyingLine::~MultiplyingLine() = default;
24
25void MultiplyingLine::slotReturnPressed()
26{
28}
29
30void MultiplyingLine::slotPropagateDeletion()
31{
32 Q_EMIT deleteLine(this);
33}
34
35void MultiplyingLine::slotFocusUp()
36{
37 Q_EMIT upPressed(this);
38}
39
40void MultiplyingLine::slotFocusDown()
41{
42 Q_EMIT downPressed(this);
43}
44
46{
47 if (ev->key() == Qt::Key_Up) {
48 Q_EMIT upPressed(this);
49 } else if (ev->key() == Qt::Key_Down) {
50 Q_EMIT downPressed(this);
51 }
52}
53
57
58#include "moc_multiplyingline.cpp"
virtual void aboutToBeDeleted()
Re implement this method if you need to do something before a line is deleted.
void upPressed(KPIM::MultiplyingLine *)
Emitted when the up key is pressed.
void returnPressed(KPIM::MultiplyingLine *)
Emitted when the return/enter key is pressed.
void keyPressEvent(QKeyEvent *) override
Handles key press events on this line.
void deleteLine(KPIM::MultiplyingLine *)
Should be emitted when the line should be deleted.
void downPressed(KPIM::MultiplyingLine *)
Emitted when the down key is pressed.
Class KCheckComboBox::KCheckComboBoxPrivate.
int key() const const
Q_EMITQ_EMIT
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:36:49 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.