2 * mainwindowbase.cpp - base class for main application windows
4 * Copyright © 2002,2003,2007,2015 by David Jarvie <djarvie@kde.org>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 #include "kalarmapp.h"
23 #include "mainwindowbase.h"
27 MainWindowBase::MainWindowBase(QWidget
* parent
, Qt::WindowFlags f
)
28 : KXmlGuiWindow(parent
, f
)
30 setWindowModality(Qt::WindowModal
);
33 /******************************************************************************
34 * Called when the mouse cursor enters the window.
35 * Activates this window if an Edit Alarm Dialog has activated itself.
36 * This is only required on Ubuntu's Unity desktop, which doesn't transfer
37 * keyboard focus properly between Edit Alarm Dialog windows and MessageWin
40 void MainWindowBase::enterEvent(QEvent
* e
)
42 if (theApp()->needWindowFocusFix())
43 QApplication::setActiveWindow(this);
44 KXmlGuiWindow::enterEvent(e
);