Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
PIM
PIM Messagelib
Commits
0d23c4b9
Commit
0d23c4b9
authored
May 13, 2016
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Return pagelayout
parent
8e1dfe01
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
0 deletions
+27
-0
webengineviewer/src/print/autotests/printwebengineviewjobtest.cpp
...eviewer/src/print/autotests/printwebengineviewjobtest.cpp
+2
-0
webengineviewer/src/print/printconfiguredialog.cpp
webengineviewer/src/print/printconfiguredialog.cpp
+5
-0
webengineviewer/src/print/printconfiguredialog.h
webengineviewer/src/print/printconfiguredialog.h
+3
-0
webengineviewer/src/print/printwebengineviewjob.cpp
webengineviewer/src/print/printwebengineviewjob.cpp
+10
-0
webengineviewer/src/print/printwebengineviewjob.h
webengineviewer/src/print/printwebengineviewjob.h
+7
-0
No files found.
webengineviewer/src/print/autotests/printwebengineviewjobtest.cpp
View file @
0d23c4b9
...
...
@@ -18,6 +18,7 @@
#include "printwebengineviewjobtest.h"
#include "../printwebengineviewjob.h"
#include <QTest>
#include <QPageLayout>
PrintWebEngineViewJobTest
::
PrintWebEngineViewJobTest
(
QObject
*
parent
)
:
QObject
(
parent
)
...
...
@@ -34,6 +35,7 @@ void PrintWebEngineViewJobTest::shouldHaveDefaultValue()
{
WebEngineViewer
::
PrintWebEngineViewJob
job
;
QVERIFY
(
!
job
.
engineView
());
QVERIFY
(
!
job
.
pageLayout
().
isValid
());
}
QTEST_MAIN
(
PrintWebEngineViewJobTest
)
webengineviewer/src/print/printconfiguredialog.cpp
View file @
0d23c4b9
...
...
@@ -46,3 +46,8 @@ PrintConfigureDialog::~PrintConfigureDialog()
{
}
QPageLayout
PrintConfigureDialog
::
currentPageLayout
()
const
{
return
mConfigureWidget
->
currentPageLayout
();
}
webengineviewer/src/print/printconfiguredialog.h
View file @
0d23c4b9
...
...
@@ -19,6 +19,8 @@
#define PRINTCONFIGUREDIALOG_H
#include <QDialog>
#include <QPageLayout>
namespace
WebEngineViewer
{
class
PrintConfigureWidget
;
...
...
@@ -28,6 +30,7 @@ class PrintConfigureDialog : public QDialog
public:
explicit
PrintConfigureDialog
(
QWidget
*
parent
=
Q_NULLPTR
);
~
PrintConfigureDialog
();
QPageLayout
currentPageLayout
()
const
;
private:
PrintConfigureWidget
*
mConfigureWidget
;
};
...
...
webengineviewer/src/print/printwebengineviewjob.cpp
View file @
0d23c4b9
...
...
@@ -73,6 +73,11 @@ void PrintWebEngineViewJob::slotHandlePdfPrinted(const QByteArray &result)
//TODO
}
QPageLayout
PrintWebEngineViewJob
::
pageLayout
()
const
{
return
mPageLayout
;
}
QWebEngineView
*
PrintWebEngineViewJob
::
engineView
()
const
{
return
mEngineView
;
...
...
@@ -82,3 +87,8 @@ void PrintWebEngineViewJob::setEngineView(QWebEngineView *engineView)
{
mEngineView
=
engineView
;
}
void
PrintWebEngineViewJob
::
setPageLayout
(
const
QPageLayout
&
pageLayout
)
{
mPageLayout
=
pageLayout
;
}
webengineviewer/src/print/printwebengineviewjob.h
View file @
0d23c4b9
...
...
@@ -19,6 +19,7 @@
#define PRINTWEBENGINEVIEWJOB_H
#include <QObject>
#include <QPageLayout>
#include <QTemporaryFile>
class
QWebEngineView
;
...
...
@@ -36,6 +37,11 @@ public:
QWebEngineView
*
engineView
()
const
;
void
setEngineView
(
QWebEngineView
*
engineView
);
void
setPageLayout
(
const
QPageLayout
&
pageLayout
);
QPageLayout
pageLayout
()
const
;
Q_SIGNALS:
void
failed
();
void
success
();
...
...
@@ -44,6 +50,7 @@ private Q_SLOTS:
void
slotHandlePdfPrinted
(
const
QByteArray
&
result
);
private:
QPageLayout
mPageLayout
;
QTemporaryFile
mTemporaryFile
;
QWebEngineView
*
mEngineView
;
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment