File indexing completed on 2024-05-12 05:14:50

0001 /*
0002  *  mainwindowbase.cpp  -  base class for main application windows
0003  *  Program:  kalarm
0004  *  SPDX-FileCopyrightText: 2002, 2003, 2007, 2015 David Jarvie <djarvie@kde.org>
0005  *
0006  *  SPDX-License-Identifier: GPL-2.0-or-later
0007  */
0008 
0009 #include "mainwindowbase.h"
0010 
0011 #include "kalarmapp.h"
0012 
0013 
0014 MainWindowBase::MainWindowBase(QWidget* parent, Qt::WindowFlags f)
0015     : KXmlGuiWindow(parent, f)
0016 {
0017     setWindowModality(Qt::WindowModal);
0018 }
0019 
0020 /******************************************************************************
0021 * Called when the mouse cursor enters the window.
0022 * Activates this window if an Edit Alarm Dialog has activated itself.
0023 * This is only required on Ubuntu's Unity desktop, which doesn't transfer
0024 * keyboard focus properly between Edit Alarm Dialog windows and MessageWindow
0025 * windows.
0026 */
0027 void MainWindowBase::enterEvent(QEnterEvent* e)
0028 {
0029     if (theApp()->needWindowFocusFix())
0030         QApplication::setActiveWindow(this);
0031     KXmlGuiWindow::enterEvent(e);
0032 }
0033 
0034 #include "moc_mainwindowbase.cpp"
0035 
0036 // vim: et sw=4: