1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
11 #include <QtMainWindow.hxx>
12 #include <QtMainWindow.moc>
13 #include <QtAccessibleWidget.hxx>
15 #include <QtGui/QAccessible>
16 #include <QtGui/QCloseEvent>
18 QtMainWindow::QtMainWindow(QtFrame
& rFrame
, Qt::WindowFlags f
)
19 : QMainWindow(nullptr, f
)
23 QAccessible::installFactory(QtAccessibleWidget::customFactory
);
27 void QtMainWindow::closeEvent(QCloseEvent
* pEvent
)
30 bRet
= m_rFrame
.CallCallback(SalEvent::Close
, nullptr);
34 // SalEvent::Close returning false may mean that user has vetoed
35 // closing the frame ("you have unsaved changes" dialog for example)
36 // We shouldn't process the event in such case
41 void QtMainWindow::moveEvent(QMoveEvent
* pEvent
) { m_rFrame
.handleMoveEvent(pEvent
); }