Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
KDE Pim
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Unmaintained
KDE Pim
Commits
5206a9b2
Commit
5206a9b2
authored
Aug 22, 2015
by
Volker Krause
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Port event printing away from KDELibs4Support.
parent
d5dc5b09
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
11 deletions
+7
-11
calendarsupport/printing/calprinter.cpp
calendarsupport/printing/calprinter.cpp
+6
-5
korganizer/actionmanager.cpp
korganizer/actionmanager.cpp
+1
-6
No files found.
calendarsupport/printing/calprinter.cpp
View file @
5206a9b2
...
...
@@ -28,9 +28,7 @@
//#include <calendarviews/prefs.h>
#include <KDEPrintDialog>
#include <KMessageBox>
#include <KPrintPreview>
#include <KStandardGuiItem>
#include <QVBoxLayout>
...
...
@@ -38,6 +36,7 @@
#include <QGridLayout>
#include <QGroupBox>
#include <QPrintDialog>
#include <QPrintPreviewDialog>
#include <QSplitter>
#include <QStackedWidget>
#include <KConfigGroup>
...
...
@@ -155,12 +154,14 @@ void CalPrinter::doPrint(PrintPlugin *selectedStyle,
}
if
(
preview
)
{
QPointer
<
KPrintPreview
>
printPreview
=
new
KPrintPreview
(
&
printer
);
selectedStyle
->
doPrint
(
&
printer
);
QPointer
<
QPrintPreviewDialog
>
printPreview
=
new
QPrintPreviewDialog
(
&
printer
);
connect
(
printPreview
.
data
(),
&
QPrintPreviewDialog
::
paintRequested
,
this
,
[
selectedStyle
,
&
printer
]()
{
selectedStyle
->
doPrint
(
&
printer
);
});
printPreview
->
exec
();
delete
printPreview
;
}
else
{
QPointer
<
QPrintDialog
>
printDialog
=
KdePrint
::
create
PrintDialog
(
&
printer
,
mParent
);
QPointer
<
QPrintDialog
>
printDialog
=
new
Q
PrintDialog
(
&
printer
,
mParent
);
if
(
printDialog
->
exec
()
==
QDialog
::
Accepted
)
{
selectedStyle
->
doPrint
(
&
printer
);
}
...
...
korganizer/actionmanager.cpp
View file @
5206a9b2
...
...
@@ -268,15 +268,10 @@ void ActionManager::initActions()
mACollection
->
addAction
(
QStringLiteral
(
"korganizer_print"
),
a
);
a
=
mACollection
->
addAction
(
KStandardAction
::
PrintPreview
,
mCalendarView
,
SLOT
(
print
()));
mACollection
->
addAction
(
QStringLiteral
(
"korganizer_print_preview"
),
a
);
a
->
setEnabled
(
!
KMimeTypeTrader
::
self
()
->
query
(
QStringLiteral
(
"application/pdf"
),
QStringLiteral
(
"KParts/ReadOnlyPart"
)).
isEmpty
());
}
else
{
KStandardAction
::
open
(
this
,
SLOT
(
file_open
()),
mACollection
);
KStandardAction
::
print
(
mCalendarView
,
SLOT
(
print
()),
mACollection
);
QAction
*
preview
=
KStandardAction
::
printPreview
(
mCalendarView
,
SLOT
(
printPreview
()),
mACollection
);
preview
->
setEnabled
(
!
KMimeTypeTrader
::
self
()
->
query
(
QStringLiteral
(
"application/pdf"
),
QStringLiteral
(
"KParts/ReadOnlyPart"
)).
isEmpty
());
KStandardAction
::
printPreview
(
mCalendarView
,
SLOT
(
printPreview
()),
mACollection
);
}
//~~~~~~~~~~~~~~~~~~~~~~~~ IMPORT / EXPORT ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
...
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