Commit a84799df authored by Laurent Montel's avatar Laurent Montel 😁

improve print support

parent fcb9207e
......@@ -46,9 +46,11 @@ set(libwebengineviewer_webengine_SRCS
webenginepage.cpp
webenginescript.cpp
webengineview.cpp
webengineaccesskey/webengineaccesskey.cpp
webengineaccesskey/webengineaccesskeyanchor.cpp
webengineaccesskey/webengineaccesskeyutils.cpp
webengineprintmessagebox.cpp
)
set(libwebengineviewer_findbar_SRCS
......
......@@ -11,3 +11,10 @@ ecm_add_test(zoomactionmenutest.cpp
LINK_LIBRARIES Qt5::Test KF5::WebEngineViewer KF5::XmlGui
)
ecm_add_test(webengineprintmessageboxtest.cpp
TEST_NAME webengineprintmessageboxtest
NAME_PREFIX "webengineviewer-"
LINK_LIBRARIES Qt5::Test KF5::WebEngineViewer
)
/*
Copyright (c) 2016 Montel Laurent <montel@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "webengineprintmessageboxtest.h"
#include <QTest>
WebEnginePrintMessageBoxTest::WebEnginePrintMessageBoxTest(QObject *parent)
: QObject(parent)
{
}
WebEnginePrintMessageBoxTest::~WebEnginePrintMessageBoxTest()
{
}
QTEST_MAIN(WebEnginePrintMessageBoxTest)
/*
Copyright (c) 2016 Montel Laurent <montel@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef WEBENGINEPRINTMESSAGEBOXTEST_H
#define WEBENGINEPRINTMESSAGEBOXTEST_H
#include <QObject>
class WebEnginePrintMessageBoxTest : public QObject
{
Q_OBJECT
public:
explicit WebEnginePrintMessageBoxTest(QObject *parent = Q_NULLPTR);
~WebEnginePrintMessageBoxTest();
};
#endif // WEBENGINEPRINTMESSAGEBOXTEST_H
/*
Copyright (c) 2016 Montel Laurent <montel@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "webengineprintmessagebox.h"
#include <KLocalizedString>
#include <QDialogButtonBox>
#include <QVBoxLayout>
#include <QLabel>
using namespace WebEngineViewer;
WebEnginePrintMessageBox::WebEnginePrintMessageBox(QWidget *parent)
: QDialog(parent)
{
QVBoxLayout *mainLayout = new QVBoxLayout;
setLayout(mainLayout);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Cancel);
buttonBox->setObjectName(QStringLiteral("buttonbox"));
connect(buttonBox, &QDialogButtonBox::rejected, this, &WebEnginePrintMessageBox::reject);
}
WebEnginePrintMessageBox::~WebEnginePrintMessageBox()
{
}
/*
Copyright (c) 2016 Montel Laurent <montel@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef WEBENGINEPRINTMESSAGEBOX_H
#define WEBENGINEPRINTMESSAGEBOX_H
#include <QDialog>
namespace WebEngineViewer
{
class WebEnginePrintMessageBox : public QDialog
{
Q_OBJECT
public:
explicit WebEnginePrintMessageBox(QWidget *parent = Q_NULLPTR);
~WebEnginePrintMessageBox();
};
}
#endif // WEBENGINEPRINTMESSAGEBOX_H
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment