Commit a8598bbf authored by Glen Ditchfield's avatar Glen Ditchfield 🐛 Committed by Glen Ditchfield
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
......@@ -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,
......
......@@ -180,6 +180,7 @@ protected:
bool mIncludeTodos;
bool mIncludeDescription;
bool mIncludeCategories;
bool mIncludeAllEvents;
bool mExcludeTime;
bool mExcludeConfidential;
bool mExcludePrivate;
......
......@@ -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&amp;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>
......
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