Commit 7cb419a5 authored by Laurent Montel's avatar Laurent Montel 😁

Look at to implement printwebengineviewjob

parent bd0dd379
......@@ -15,3 +15,9 @@ ecm_add_test(printpreviewpagewidgettest.cpp ../printpreviewpagewidget.cpp ../pr
NAME_PREFIX "webengineviewer-print-"
LINK_LIBRARIES Qt5::Test Qt5::Widgets Qt5::Gui KF5::I18n KF5::WidgetsAddons Poppler::Qt5 KF5::ConfigCore
)
ecm_add_test(printwebengineviewjobtest.cpp ../printwebengineviewjob.cpp
TEST_NAME printwebengineviewjobtest
NAME_PREFIX "webengineviewer-print-"
LINK_LIBRARIES Qt5::Test Qt5::Widgets
)
/*
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 "printwebengineviewjobtest.h"
#include <QTest>
PrintWebEngineViewJobTest::PrintWebEngineViewJobTest(QObject *parent)
: QObject(parent)
{
}
PrintWebEngineViewJobTest::~PrintWebEngineViewJobTest()
{
}
QTEST_MAIN(PrintWebEngineViewJobTest)
/*
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 PRINTWEBENGINEVIEWJOBTEST_H
#define PRINTWEBENGINEVIEWJOBTEST_H
#include <QObject>
class PrintWebEngineViewJobTest : public QObject
{
Q_OBJECT
public:
explicit PrintWebEngineViewJobTest(QObject *parent = Q_NULLPTR);
~PrintWebEngineViewJobTest();
};
#endif // PRINTWEBENGINEVIEWJOBTEST_H
......@@ -20,7 +20,8 @@
using namespace WebEngineViewer;
PrintWebEngineViewJob::PrintWebEngineViewJob(QObject *parent)
: QObject(parent)
: QObject(parent),
mEngineView(Q_NULLPTR)
{
}
......@@ -29,3 +30,18 @@ PrintWebEngineViewJob::~PrintWebEngineViewJob()
{
}
void PrintWebEngineViewJob::start()
{
//TODO
}
QWebEngineView *PrintWebEngineViewJob::engineView() const
{
return mEngineView;
}
void PrintWebEngineViewJob::setEngineView(QWebEngineView *engineView)
{
mEngineView = engineView;
}
......@@ -20,6 +20,7 @@
#include <QObject>
class QWebEngineView;
namespace WebEngineViewer
{
class PrintWebEngineViewJob : public QObject
......@@ -28,6 +29,14 @@ class PrintWebEngineViewJob : public QObject
public:
explicit PrintWebEngineViewJob(QObject *parent = Q_NULLPTR);
~PrintWebEngineViewJob();
void start();
QWebEngineView *engineView() const;
void setEngineView(QWebEngineView *engineView);
private:
QWebEngineView *mEngineView;
};
}
#endif // PRINTWEBENGINEVIEWJOB_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