Perceptual Color

languagechangeeventfilter.cpp
1// SPDX-FileCopyrightText: Lukas Sommer <sommerluk@gmail.com>
2// SPDX-License-Identifier: BSD-2-Clause OR MIT
3
4// Own headers
5// First the interface, which forces the header to be self-contained.
6#include "languagechangeeventfilter.h"
7
8#include <qcoreevent.h>
9
10namespace PerceptualColor
11{
12
13/** @brief Constructor
14 *
15 * @param parent The parent of the widget, if any */
16LanguageChangeEventFilter::LanguageChangeEventFilter(QObject *parent)
17 : QObject(parent)
18{
19}
20
21/** @brief Destructor */
22LanguageChangeEventFilter::~LanguageChangeEventFilter()
23{
24}
25
26/** @brief Filters events if this object has been installed as an event filter
27 * for the watched object.
28 *
29 * Reimplemented from base class.
30 *
31 * @param obj Pointer to the object for which we are filtering events
32 * @param event The event that we are filtering
33 *
34 * @returns <tt>true</tt> (which means “discard”) for
35 * <tt>QEvent::LanguageChange</tt> events. <tt>false</tt> otherwise. */
36bool LanguageChangeEventFilter::eventFilter(QObject *obj, QEvent *event)
37{
38 Q_UNUSED(obj)
39 if (event->type() == QEvent::LanguageChange) {
40 return true;
41 }
42 return false;
43}
44
45} // namespace PerceptualColor
AKONADI_CALENDAR_EXPORT KCalendarCore::Event::Ptr event(const Akonadi::Item &item)
The namespace of this library.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 24 2024 11:48:43 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.