summaryrefslogtreecommitdiffstats
path: root/tests/manual/xembed-raster
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual/xembed-raster')
-rw-r--r--tests/manual/xembed-raster/CMakeLists.txt17
-rwxr-xr-xtests/manual/xembed-raster/gtk-embedder.py61
-rw-r--r--tests/manual/xembed-raster/main.cpp54
-rw-r--r--tests/manual/xembed-raster/rasterwindow.cpp95
-rw-r--r--tests/manual/xembed-raster/rasterwindow.h57
-rw-r--r--tests/manual/xembed-raster/xembed-raster.pro9
6 files changed, 0 insertions, 293 deletions
diff --git a/tests/manual/xembed-raster/CMakeLists.txt b/tests/manual/xembed-raster/CMakeLists.txt
deleted file mode 100644
index 20ec90e2c6..0000000000
--- a/tests/manual/xembed-raster/CMakeLists.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-# Generated from xembed-raster.pro.
-
-#####################################################################
-## tst_manual_rasterwindow Binary:
-#####################################################################
-
-qt_internal_add_manual_test(tst_manual_rasterwindow
- GUI
- SOURCES
- main.cpp
- rasterwindow.cpp rasterwindow.h
- PUBLIC_LIBRARIES
- Qt::Gui
-)
-
-#### Keys ignored in scope 1:.:.:xembed-raster.pro:<TRUE>:
-# TEMPLATE = "app"
diff --git a/tests/manual/xembed-raster/gtk-embedder.py b/tests/manual/xembed-raster/gtk-embedder.py
deleted file mode 100755
index 5c37fd445f..0000000000
--- a/tests/manual/xembed-raster/gtk-embedder.py
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/usr/bin/python
-#############################################################################
-##
-## Copyright (C) 2013 Canonical Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-from gi.repository import Gtk
-from subprocess import Popen
-
-window = Gtk.Window()
-
-box = Gtk.VBox(False, 0)
-window.add(box)
-
-child = None
-def on_button_clicked(button, socket):
- global child
- child = Popen(['./rasterwindow', str(socket.get_id())])
-
-button = Gtk.Button("Press me to embed a Qt client")
-box.pack_start(button, False, False, 0)
-
-socket = Gtk.Socket()
-socket.set_size_request(200, 200)
-box.add(socket)
-
-button.connect("clicked", on_button_clicked, socket)
-window.connect("destroy", Gtk.main_quit)
-
-def plugged_event(widget):
- print("A window was embedded!")
-
-socket.connect("plug-added", plugged_event)
-
-window.show_all()
-Gtk.main()
-if child:
- child.terminate()
diff --git a/tests/manual/xembed-raster/main.cpp b/tests/manual/xembed-raster/main.cpp
deleted file mode 100644
index 9b13b88047..0000000000
--- a/tests/manual/xembed-raster/main.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "rasterwindow.h"
-#include <QDebug>
-
-int main(int argc, char **argv)
-{
- QGuiApplication app(argc, argv);
-
- QStringList args = app.arguments();
-
- WId winId = 0;
- if (args.count() > 1) {
- bool ok;
- winId = args[1].toUInt(&ok);
- Q_ASSERT(ok);
- }
-
- RasterWindow window;
- window.show();
-
- QWindow *foreign = QWindow::fromWinId(winId);
- Q_ASSERT(foreign != 0);
-
- window.setParent(foreign);
-
- return app.exec();
-}
diff --git a/tests/manual/xembed-raster/rasterwindow.cpp b/tests/manual/xembed-raster/rasterwindow.cpp
deleted file mode 100644
index 0da33add8a..0000000000
--- a/tests/manual/xembed-raster/rasterwindow.cpp
+++ /dev/null
@@ -1,95 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "rasterwindow.h"
-
-RasterWindow::RasterWindow(QWindow *parent)
- : QWindow(parent)
- , m_update_pending(false)
-{
- m_backingStore = new QBackingStore(this);
- create();
-
- setGeometry(100, 100, 300, 200);
-}
-
-
-bool RasterWindow::event(QEvent *event)
-{
- if (event->type() == QEvent::UpdateRequest) {
- m_update_pending = false;
- renderNow();
- return true;
- }
- return QWindow::event(event);
-}
-
-void RasterWindow::renderLater()
-{
- if (!m_update_pending) {
- m_update_pending = true;
- QCoreApplication::postEvent(this, new QEvent(QEvent::UpdateRequest));
- }
-}
-
-void RasterWindow::resizeEvent(QResizeEvent *resizeEvent)
-{
- m_backingStore->resize(resizeEvent->size());
- if (isExposed())
- renderNow();
-}
-
-void RasterWindow::exposeEvent(QExposeEvent *)
-{
- if (isExposed()) {
- renderNow();
- }
-}
-
-void RasterWindow::renderNow()
-{
- if (!isExposed())
- return;
-
- QRect rect(0, 0, width(), height());
- m_backingStore->beginPaint(rect);
-
- QPaintDevice *device = m_backingStore->paintDevice();
- QPainter painter(device);
-
- painter.fillRect(0, 0, width(), height(), Qt::white);
- render(&painter);
-
- m_backingStore->endPaint();
- m_backingStore->flush(rect);
-}
-
-void RasterWindow::render(QPainter *painter)
-{
- painter->drawText(QRectF(0, 0, width(), height()), Qt::AlignCenter, QStringLiteral("QWindow"));
-}
diff --git a/tests/manual/xembed-raster/rasterwindow.h b/tests/manual/xembed-raster/rasterwindow.h
deleted file mode 100644
index faa44f49cc..0000000000
--- a/tests/manual/xembed-raster/rasterwindow.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef RASTERWINDOW_H
-#define RASTERWINDOW_H
-
-#include <QtGui>
-
-class RasterWindow : public QWindow
-{
- Q_OBJECT
-public:
- explicit RasterWindow(QWindow *parent = nullptr);
-
- virtual void render(QPainter *painter);
-
-public slots:
- void renderLater();
- void renderNow();
-
-protected:
- bool event(QEvent *event);
-
- void resizeEvent(QResizeEvent *event);
- void exposeEvent(QExposeEvent *event);
-
-private:
- QBackingStore *m_backingStore;
- bool m_update_pending;
-};
-
-#endif // RASTERWINDOW_H
diff --git a/tests/manual/xembed-raster/xembed-raster.pro b/tests/manual/xembed-raster/xembed-raster.pro
deleted file mode 100644
index 4c9fee07b8..0000000000
--- a/tests/manual/xembed-raster/xembed-raster.pro
+++ /dev/null
@@ -1,9 +0,0 @@
-TEMPLATE = app
-TARGET= tst_manual_rasterwindow
-QT += gui
-
-SOURCES += \
- main.cpp \
- rasterwindow.cpp
-HEADERS += \
- rasterwindow.h