Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
PIM Calendar Support
Commits
c15694cd
Commit
c15694cd
authored
Jul 11, 2021
by
Glen Ditchfield
🐛
Browse files
Replace parameters with member references
parent
f5f16157
Pipeline
#69825
passed with stage
in 3 minutes and 55 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/printing/calprintdefaultplugins.cpp
View file @
c15694cd
...
...
@@ -796,10 +796,8 @@ void CalPrintDay::print(QPainter &p, int width, int height)
mEndTime
,
daysBox
,
mSingleLineLimit
,
mShowNoteLines
,
mIncludeDescription
,
mIncludeCategories
,
mUseColors
);
mIncludeCategories
);
}
else
if
(
mDayPrintType
==
SingleTimetable
)
{
drawTimeTable
(
p
,
mFromDate
,
...
...
@@ -1028,8 +1026,8 @@ void CalPrintWeek::print(QPainter &p, int width, int height)
title
=
i18nc
(
"date from-to"
,
"%1\u2013%2"
,
line1
,
line2
);
drawHeader
(
p
,
title
,
curWeek
.
addDays
(
-
6
),
QDate
(),
headerBox
);
drawWeek
(
p
,
curWeek
,
mStartTime
,
mEndTime
,
weekBox
,
mSingleLineLimit
,
mShowNoteLines
,
mIncludeDescription
,
mIncludeCategories
,
mUseColors
);
drawWeek
(
p
,
curWeek
,
mStartTime
,
mEndTime
,
weekBox
,
mSingleLineLimit
,
mIncludeDescription
,
mIncludeCategories
);
if
(
mPrintFooter
)
{
drawFooter
(
p
,
footerBox
);
...
...
@@ -1259,10 +1257,8 @@ void CalPrintMonth::print(QPainter &p, int width, int height)
mRecurDaily
,
mRecurWeekly
,
mSingleLineLimit
,
mShowNoteLines
,
mIncludeDescription
,
mIncludeCategories
,
mUseColors
,
monthBox
);
if
(
mPrintFooter
)
{
...
...
src/printing/calprintpluginbase.cpp
View file @
c15694cd
...
...
@@ -1020,10 +1020,8 @@ void CalPrintPluginBase::drawDayBox(QPainter &p,
bool
printRecurDaily
,
bool
printRecurWeekly
,
bool
singleLineLimit
,
bool
showNoteLines
,
bool
includeDescription
,
bool
includeCategories
,
bool
useColors
)
bool
includeCategories
)
{
QString
dayNumStr
;
const
auto
local
=
QLocale
::
system
();
...
...
@@ -1097,7 +1095,7 @@ void CalPrintPluginBase::drawDayBox(QPainter &p,
timeText
=
local
.
toString
(
currEvent
->
dtStart
().
toLocalTime
().
time
(),
QLocale
::
ShortFormat
)
+
QLatin1Char
(
' '
);
}
p
.
save
();
if
(
u
seColors
)
{
if
(
mU
seColors
)
{
setColorsByIncidenceCategory
(
p
,
currEvent
);
}
QString
summaryStr
=
currEvent
->
summary
();
...
...
@@ -1180,7 +1178,7 @@ void CalPrintPluginBase::drawDayBox(QPainter &p,
p
.
restore
();
}
}
if
(
s
howNoteLines
)
{
if
(
mS
howNoteLines
)
{
drawNoteLines
(
p
,
box
,
box
.
y
()
+
textY
);
}
...
...
@@ -1300,10 +1298,8 @@ void CalPrintPluginBase::drawWeek(QPainter &p,
const
QTime
&
toTime
,
const
QRect
&
box
,
bool
singleLineLimit
,
bool
showNoteLines
,
bool
includeDescription
,
bool
includeCategories
,
bool
useColors
)
bool
includeCategories
)
{
QDate
weekDate
=
qd
;
const
bool
portrait
=
(
box
.
height
()
>
box
.
width
());
...
...
@@ -1339,10 +1335,8 @@ void CalPrintPluginBase::drawWeek(QPainter &p,
true
,
true
,
singleLineLimit
,
showNoteLines
,
includeDescription
,
includeCategories
,
useColors
);
includeCategories
);
}
// for i through all weekdays
}
...
...
@@ -1353,10 +1347,8 @@ void CalPrintPluginBase::drawDays(QPainter &p,
const
QTime
&
toTime
,
const
QRect
&
box
,
bool
singleLineLimit
,
bool
showNoteLines
,
bool
includeDescription
,
bool
includeCategories
,
bool
useColors
)
bool
includeCategories
)
{
const
int
numberOfDays
=
start
.
daysTo
(
end
)
+
1
;
int
vcells
;
...
...
@@ -1390,10 +1382,8 @@ void CalPrintPluginBase::drawDays(QPainter &p,
true
,
true
,
singleLineLimit
,
showNoteLines
,
includeDescription
,
includeCategories
,
useColors
);
includeCategories
);
}
// for i through all selected days
}
...
...
@@ -1754,10 +1744,8 @@ void CalPrintPluginBase::drawMonthTable(QPainter &p,
bool
recurDaily
,
bool
recurWeekly
,
bool
singleLineLimit
,
bool
showNoteLines
,
bool
includeDescription
,
bool
includeCategories
,
bool
useColors
,
const
QRect
&
box
)
{
int
yoffset
=
mSubHeaderHeight
;
...
...
@@ -1824,10 +1812,8 @@ void CalPrintPluginBase::drawMonthTable(QPainter &p,
recurDaily
,
recurWeekly
,
singleLineLimit
,
showNoteLines
,
includeDescription
,
includeCategories
,
useColors
);
includeCategories
);
if
(
darkbg
)
{
p
.
setBackground
(
back
);
darkbg
=
false
;
...
...
src/printing/calprintpluginbase.h
View file @
c15694cd
...
...
@@ -376,7 +376,7 @@ public:
Draw the box containing a list of all events of the given day (with their times,
of course). Used in the Filofax and the month print style.
Obeys configuration options #mExcludeConfidential, #
e
xcludePrivate.
Obeys configuration options #mExcludeConfidential, #
mE
xcludePrivate
, #mShowNoteLines, #mUseColors
.
@param p QPainter of the printout
@param qd The date of the currently printed day. All events of the calendar
that appear on that day will be printed.
...
...
@@ -388,10 +388,8 @@ public:
@param printRecurDaily Whether daily recurring incidences should be printed.
@param printRecurWeekly Whether weekly recurring incidences should be printed.
@param singleLineLimit Whether Incidence text wraps or truncates.
@param showNoteLines Whether note lines are printed.
@param includeDescription Whether to print the event description as well.
@param includeCategories Whether to print the event categories (tags) as well.
@param useColors Whether to use event category colors to draw the events.
*/
void
drawDayBox
(
QPainter
&
p
,
const
QDate
&
qd
,
...
...
@@ -402,10 +400,8 @@ public:
bool
printRecurDaily
=
true
,
bool
printRecurWeekly
=
true
,
bool
singleLineLimit
=
true
,
bool
showNoteLines
=
false
,
bool
includeDescription
=
false
,
bool
includeCategories
=
false
,
bool
useColors
=
true
);
bool
includeCategories
=
false
);
/**
Draw the week (filofax) table of the week containing the date qd. The first
...
...
@@ -413,17 +409,15 @@ public:
the remaining four in the second column, where the last two days of the week
(typically Saturday and Sunday) only get half the height of the other day boxes.
Obeys configuration options #mExcludeConfidential, #
e
xcludePrivate.
Obeys configuration options #mExcludeConfidential, #
mE
xcludePrivate
, #mShowNoteLines, #mUseColors
.
@param p QPainter of the printout
@param qd Arbitrary date within the week to be printed.
@param fromTime Start time of the displayed time range
@param toTime End time of the displayed time range
@param box coordinates of the week box.
@param singleLineLimit Whether Incidence text wraps or truncates.
@param showNoteLines Whether note lines are printed.
@param includeDescription Whether to print the event description as well.
@param includeCategories Whether to print the event categories (tags) as well.
@param useColors Whether to use event category colors to draw the events.
*/
void
drawWeek
(
QPainter
&
p
,
const
QDate
&
qd
,
...
...
@@ -431,15 +425,13 @@ public:
const
QTime
&
toTime
,
const
QRect
&
box
,
bool
singleLineLimit
,
bool
showNoteLines
,
bool
includeDescription
,
bool
includeCategories
,
bool
useColors
);
bool
includeCategories
);
/**
Draw the (filofax) table for a bunch of days, using drawDayBox.
Obeys configuration options #mExcludeConfidential, #
e
xcludePrivate.
Obeys configuration options #mExcludeConfidential, #
mE
xcludePrivate
, #mShowNoteLines, #mUseColors
.
@param p QPainter of the printout
@param start Start date
@param end End date
...
...
@@ -447,10 +439,8 @@ public:
@param toTime End time of the displayed time range
@param box coordinates of the week box.
@param singleLineLimit Whether Incidence text wraps or truncates.
@param showNoteLines Whether note lines are printed.
@param includeDescription Whether to print the event description as well.
@param includeCategories Whether to print the event categories (tags) as well.
@param useColors Whether to use event category colors to draw the events.
*/
void
drawDays
(
QPainter
&
p
,
const
QDate
&
start
,
...
...
@@ -459,10 +449,8 @@ public:
const
QTime
&
toTime
,
const
QRect
&
box
,
bool
singleLineLimit
,
bool
showNoteLines
,
bool
includeDescription
,
bool
includeCategories
,
bool
useColors
);
bool
includeCategories
);
/**
Draw the timetable view of the given time range from fromDate to toDate.
...
...
@@ -503,7 +491,7 @@ public:
week (so it might display some days of the previous and the next month).
Above the matrix there is a bar showing the weekdays (drawn using drawDaysOfWeek).
Obeys configuration options #mExcludeConfidential, #
e
xcludePrivate.
Obeys configuration options #mExcludeConfidential, #
mE
xcludePrivate
, #mShowNoteLines, #mUseColors
.
@param p QPainter of the printout
@param qd Arbitrary date within the month to be printed.
@param fromTime Start time of the displayed time range
...
...
@@ -512,10 +500,8 @@ public:
@param recurDaily Whether daily recurring incidences should be printed.
@param recurWeekly Whether weekly recurring incidences should be printed.
@param singleLineLimit Whether Incidence text wraps or truncates.
@param showNoteLines Whether note lines are printed.
@param includeDescription Whether descriptions are printed.
@param includeCategories Whether to print the event categories (tags) as well.
@param useColors Whether to use event category colors to draw the events.
@param box coordinates of the month.
*/
void
drawMonthTable
(
QPainter
&
p
,
...
...
@@ -526,10 +512,8 @@ public:
bool
recurDaily
,
bool
recurWeekly
,
bool
singleLineLimit
,
bool
showNoteLines
,
bool
includeDescription
,
bool
includeCategories
,
bool
useColors
,
const
QRect
&
box
);
/**
...
...
@@ -669,11 +653,11 @@ protected:
bool
connectSubTodos
);
protected:
bool
mUseColors
;
bool
mPrintFooter
;
bool
mShowNoteLines
;
bool
mExcludeConfidential
;
bool
mExcludePrivate
;
bool
mUseColors
;
/**< Whether or not to use event category colors to draw the events. */
bool
mPrintFooter
;
/**< Whether or not to print a footer at the bottoms of pages. */
bool
mShowNoteLines
;
/**< Whether or not to print horizontal lines in note areas. */
bool
mExcludeConfidential
;
/**< Whether or not to print incidences with secrecy "confidential". */
bool
mExcludePrivate
;
/**< Whether or not to print incidences with secrecy "private". */
int
mHeaderHeight
;
int
mSubHeaderHeight
;
int
mFooterHeight
;
...
...
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