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
a8598bbf
Commit
a8598bbf
authored
Jun 28, 2021
by
Glen Ditchfield
🐛
Committed by
Glen Ditchfield
Jun 29, 2021
Browse files
Add an Extend Time Range option to the Print Week dialog
parent
94ffd6e4
Pipeline
#68020
passed with stage
in 5 minutes and 37 seconds
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
src/printing/calprintdefaultplugins.cpp
View file @
a8598bbf
...
...
@@ -901,6 +901,7 @@ void CalPrintWeek::readSettingsWidget()
mStartTime
=
cfg
->
mFromTime
->
time
();
mEndTime
=
cfg
->
mToTime
->
time
();
mIncludeAllEvents
=
cfg
->
mIncludeAllEvents
->
isChecked
();
mShowNoteLines
=
cfg
->
mShowNoteLines
->
isChecked
();
mSingleLineLimit
=
cfg
->
mSingleLineLimit
->
isChecked
();
...
...
@@ -928,6 +929,7 @@ void CalPrintWeek::setSettingsWidget()
cfg
->
mFromTime
->
setTime
(
mStartTime
);
cfg
->
mToTime
->
setTime
(
mEndTime
);
cfg
->
mIncludeAllEvents
->
setChecked
(
mIncludeAllEvents
);
cfg
->
mShowNoteLines
->
setChecked
(
mShowNoteLines
);
cfg
->
mSingleLineLimit
->
setChecked
(
mSingleLineLimit
);
...
...
@@ -955,6 +957,7 @@ void CalPrintWeek::loadConfig()
mShowNoteLines
=
grp
.
readEntry
(
"Note Lines"
,
false
);
mSingleLineLimit
=
grp
.
readEntry
(
"Single line limit"
,
false
);
mIncludeTodos
=
grp
.
readEntry
(
"Include todos"
,
false
);
mIncludeAllEvents
=
grp
.
readEntry
(
"Include all events"
,
false
);
mWeekPrintType
=
(
eWeekPrintType
)(
grp
.
readEntry
(
"Print type"
,
(
int
)
Filofax
));
mIncludeDescription
=
grp
.
readEntry
(
"Include Description"
,
false
);
mIncludeCategories
=
grp
.
readEntry
(
"Include categories"
,
false
);
...
...
@@ -978,6 +981,7 @@ void CalPrintWeek::saveConfig()
grp
.
writeEntry
(
"Note Lines"
,
mShowNoteLines
);
grp
.
writeEntry
(
"Single line limit"
,
mSingleLineLimit
);
grp
.
writeEntry
(
"Include todos"
,
mIncludeTodos
);
grp
.
writeEntry
(
"Include all events"
,
mIncludeAllEvents
);
grp
.
writeEntry
(
"Print type"
,
int
(
mWeekPrintType
));
grp
.
writeEntry
(
"Include Description"
,
mIncludeDescription
);
grp
.
writeEntry
(
"Include categories"
,
mIncludeCategories
);
...
...
@@ -1068,7 +1072,7 @@ void CalPrintWeek::print(QPainter &p, int width, int height)
}
drawHeader
(
p
,
title
,
curWeek
,
QDate
(),
headerBox
);
drawTimeTable
(
p
,
fromWeek
,
curWeek
,
false
,
mStartTime
,
mEndTime
,
weekBox
,
mIncludeDescription
,
drawTimeTable
(
p
,
fromWeek
,
curWeek
,
mIncludeAllEvents
,
mStartTime
,
mEndTime
,
weekBox
,
mIncludeDescription
,
mIncludeCategories
,
mExcludeTime
,
mExcludeConfidential
,
mExcludePrivate
);
if
(
mPrintFooter
)
{
...
...
@@ -1094,7 +1098,7 @@ void CalPrintWeek::print(QPainter &p, int width, int height)
int
hh
=
headerHeight
();
drawSplitHeaderRight
(
p
,
fromWeek
,
curWeek
,
QDate
(),
width
,
hh
);
drawTimeTable
(
p
,
fromWeek
,
endLeft
,
false
,
mStartTime
,
mEndTime
,
weekBox
,
mIncludeDescription
,
drawTimeTable
(
p
,
fromWeek
,
endLeft
,
mIncludeAllEvents
,
mStartTime
,
mEndTime
,
weekBox
,
mIncludeDescription
,
mIncludeCategories
,
mExcludeTime
,
mExcludeConfidential
,
mExcludePrivate
);
if
(
mPrintFooter
)
{
drawFooter
(
p
,
footerBox
);
...
...
@@ -1104,7 +1108,7 @@ void CalPrintWeek::print(QPainter &p, int width, int height)
drawTimeTable
(
p
,
endLeft
.
addDays
(
1
),
curWeek
,
false
,
mIncludeAllEvents
,
mStartTime
,
mEndTime
,
weekBox1
,
...
...
src/printing/calprintdefaultplugins.h
View file @
a8598bbf
...
...
@@ -180,6 +180,7 @@ protected:
bool
mIncludeTodos
;
bool
mIncludeDescription
;
bool
mIncludeCategories
;
bool
mIncludeAllEvents
;
bool
mExcludeTime
;
bool
mExcludeConfidential
;
bool
mExcludePrivate
;
...
...
src/printing/calprintweekconfig_base.ui
View file @
a8598bbf
...
...
@@ -213,6 +213,16 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item
row=
"2"
column=
"0"
colspan=
"5"
>
<widget
class=
"QCheckBox"
name=
"mIncludeAllEvents"
>
<property
name=
"whatsThis"
>
<string>
Check this option to automatically determine the required time range, so all events will be shown.
</string>
</property>
<property
name=
"text"
>
<string>
E
&
xtend time range to include all events
</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
...
...
@@ -448,6 +458,7 @@ p, li { white-space: pre-wrap; }
<tabstop>
mFromTime
</tabstop>
<tabstop>
mToDate
</tabstop>
<tabstop>
mToTime
</tabstop>
<tabstop>
mIncludeAllEvents
</tabstop>
<tabstop>
mPrintTypeFilofax
</tabstop>
<tabstop>
mPrintTypeTimetable
</tabstop>
<tabstop>
mPrintTypeSplitWeek
</tabstop>
...
...
Write
Preview
Supports
Markdown
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