summaryrefslogtreecommitdiff
path: root/vcl/inc
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/inc')
-rw-r--r--vcl/inc/qt5/Qt5Frame.hxx12
-rw-r--r--vcl/inc/qt5/Qt5MainWindow.hxx41
-rw-r--r--vcl/inc/qt5/Qt5Widget.hxx2
3 files changed, 51 insertions, 4 deletions
diff --git a/vcl/inc/qt5/Qt5Frame.hxx b/vcl/inc/qt5/Qt5Frame.hxx
index 310298879e52..04ade0b38b2d 100644
--- a/vcl/inc/qt5/Qt5Frame.hxx
+++ b/vcl/inc/qt5/Qt5Frame.hxx
@@ -31,7 +31,9 @@ class Qt5Graphics;
class Qt5Instance;
class Qt5Menu;
class QWidget;
+class Qt5MainWindow;
class QPaintDevice;
+class QScreen;
class QImage;
class SvpSalGraphics;
@@ -39,7 +41,8 @@ class VCLPLUG_QT5_PUBLIC Qt5Frame : public SalFrame
{
friend class VclQtMixinBase;
- std::unique_ptr<QWidget> m_pQWidget;
+ QWidget* m_pQWidget;
+ Qt5MainWindow* m_pTopLevel;
const bool m_bUseCairo;
std::unique_ptr<QImage> m_pQImage;
@@ -76,6 +79,10 @@ class VCLPLUG_QT5_PUBLIC Qt5Frame : public SalFrame
return bool(m_nStyle & nMask);
}
+ bool isWindow();
+ QWindow* windowHandle();
+ QScreen* screen();
+
void TriggerPaintEvent();
void TriggerPaintEvent(QRect aRect);
@@ -83,7 +90,8 @@ public:
Qt5Frame(Qt5Frame* pParent, SalFrameStyleFlags nSalFrameStyle, bool bUseCairo);
virtual ~Qt5Frame() override;
- QWidget* GetQWidget() const { return m_pQWidget.get(); }
+ QWidget* GetQWidget() const { return m_pQWidget; }
+ Qt5MainWindow* GetTopLevelWindow() const { return m_pTopLevel; }
void Damage(sal_Int32 nExtentsX, sal_Int32 nExtentsY, sal_Int32 nExtentsWidth,
sal_Int32 nExtentsHeight) const;
diff --git a/vcl/inc/qt5/Qt5MainWindow.hxx b/vcl/inc/qt5/Qt5MainWindow.hxx
new file mode 100644
index 000000000000..caac2299c4bc
--- /dev/null
+++ b/vcl/inc/qt5/Qt5MainWindow.hxx
@@ -0,0 +1,41 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <QtWidgets/QWidget>
+#include <QtWidgets/QMainWindow>
+
+#include "Qt5Frame.hxx"
+
+class Qt5MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+ Qt5Frame* m_pFrame;
+
+ virtual void closeEvent(QCloseEvent* pEvent) override;
+
+public:
+ Qt5MainWindow(Qt5Frame& rFrame, QWidget* parent = Q_NULLPTR,
+ Qt::WindowFlags f = Qt::WindowFlags());
+ virtual ~Qt5MainWindow() override;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/qt5/Qt5Widget.hxx b/vcl/inc/qt5/Qt5Widget.hxx
index efe71bd3f644..206b8b2d1d6e 100644
--- a/vcl/inc/qt5/Qt5Widget.hxx
+++ b/vcl/inc/qt5/Qt5Widget.hxx
@@ -25,6 +25,4 @@
QWidget* createQt5Widget(Qt5Frame& rFrame, Qt::WindowFlags f);
-QWidget* createQMainWindow(Qt5Frame& rFrame, Qt::WindowFlags f);
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */