11#include "eventviews_export.h"
13#include <KConfigSkeleton>
23class EVENTVIEWS_EXPORT Prefs
46 void setMarcusBainsShowSeconds(
bool showSeconds);
47 [[nodiscard]]
bool marcusBainsShowSeconds()
const;
49 void setAgendaMarcusBainsLineLineColor(
const QColor &color);
50 [[nodiscard]]
QColor agendaMarcusBainsLineLineColor()
const;
52 void setMarcusBainsEnabled(
bool enabled);
53 [[nodiscard]]
bool marcusBainsEnabled()
const;
55 void setAgendaMarcusBainsLineFont(
const QFont &font);
56 [[nodiscard]]
QFont agendaMarcusBainsLineFont()
const;
58 void setHourSize(
int size);
59 [[nodiscard]]
int hourSize()
const;
61 void setDayBegins(
const QDateTime &dateTime);
62 [[nodiscard]]
QDateTime dayBegins()
const;
64 void setWorkingHoursStart(
const QDateTime &dateTime);
65 [[nodiscard]]
QDateTime workingHoursStart()
const;
67 void setWorkingHoursEnd(
const QDateTime &dateTime);
68 [[nodiscard]]
QDateTime workingHoursEnd()
const;
70 void setSelectionStartsEditor(
bool startEditor);
71 [[nodiscard]]
bool selectionStartsEditor()
const;
73 void setUseSystemColor(
bool useSystemColor);
74 [[nodiscard]]
bool useSystemColor()
const;
76 void setAgendaGridWorkHoursBackgroundColor(
const QColor &color);
77 [[nodiscard]]
QColor agendaGridWorkHoursBackgroundColor()
const;
79 void setAgendaGridHighlightColor(
const QColor &color);
80 [[nodiscard]]
QColor agendaGridHighlightColor()
const;
82 void setAgendaGridBackgroundColor(
const QColor &color);
83 [[nodiscard]]
QColor agendaGridBackgroundColor()
const;
85 void setEnableAgendaItemIcons(
bool enable);
86 [[nodiscard]]
bool enableAgendaItemIcons()
const;
88 void setTodosUseCategoryColors(
bool useColors);
89 [[nodiscard]]
bool todosUseCategoryColors()
const;
91 void setAgendaHolidaysBackgroundColor(
const QColor &color)
const;
92 [[nodiscard]]
QColor agendaHolidaysBackgroundColor()
const;
94 void setAgendaViewColors(
int colors);
95 [[nodiscard]]
int agendaViewColors()
const;
97 void setAgendaViewFont(
const QFont &font);
98 [[nodiscard]]
QFont agendaViewFont()
const;
100 void setMonthViewFont(
const QFont &font);
101 [[nodiscard]]
QFont monthViewFont()
const;
103 [[nodiscard]]
QColor monthGridBackgroundColor()
const;
104 void setMonthGridBackgroundColor(
const QColor &color);
106 [[nodiscard]]
QColor monthGridWorkHoursBackgroundColor()
const;
107 void monthGridWorkHoursBackgroundColor(
const QColor &color);
109 void setMonthViewColors(
int colors)
const;
110 [[nodiscard]]
int monthViewColors()
const;
112 [[nodiscard]]
bool enableMonthItemIcons()
const;
113 void setEnableMonthItemIcons(
bool enable);
115 [[nodiscard]]
bool showTimeInMonthView()
const;
116 void setShowTimeInMonthView(
bool show);
118 [[nodiscard]]
bool showTodosMonthView()
const;
119 void setShowTodosMonthView(
bool show);
121 [[nodiscard]]
bool showJournalsMonthView()
const;
122 void setShowJournalsMonthView(
bool show);
124 [[nodiscard]]
bool fullViewMonth()
const;
125 void setFullViewMonth(
bool fullView);
127 [[nodiscard]]
bool sortCompletedTodosSeparately()
const;
128 void setSortCompletedTodosSeparately(
bool sort);
130 void setEnableToolTips(
bool enable);
131 [[nodiscard]]
bool enableToolTips()
const;
133 void setShowTodosAgendaView(
bool show);
134 [[nodiscard]]
bool showTodosAgendaView()
const;
136 void setAgendaTimeLabelsFont(
const QFont &font);
137 [[nodiscard]]
QFont agendaTimeLabelsFont()
const;
143 [[nodiscard]]
QColor resourceColorKnown(
const QString &)
const;
145 [[nodiscard]]
QTimeZone timeZone()
const;
147 [[nodiscard]]
QStringList timeScaleTimezones()
const;
148 void setTimeScaleTimezones(
const QStringList &list);
153 [[nodiscard]]
QStringList decorationsAtAgendaViewTop()
const;
154 void setDecorationsAtAgendaViewTop(
const QStringList &);
156 [[nodiscard]]
QStringList decorationsAtAgendaViewBottom()
const;
157 void setDecorationsAtAgendaViewBottom(
const QStringList &);
159 [[nodiscard]]
bool colorAgendaBusyDays()
const;
160 void setColorAgendaBusyDays(
bool enable);
162 [[nodiscard]]
bool colorMonthBusyDays()
const;
163 void setColorMonthBusyDays(
bool enable);
165 [[nodiscard]]
QColor viewBgBusyColor()
const;
166 void setViewBgBusyColor(
const QColor &);
168 [[nodiscard]]
QColor holidayColor()
const;
169 void setHolidayColor(
const QColor &color);
171 [[nodiscard]]
QColor agendaViewBackgroundColor()
const;
172 void setAgendaViewBackgroundColor(
const QColor &color);
174 [[nodiscard]]
QColor workingHoursColor()
const;
175 void setWorkingHoursColor(
const QColor &color);
177 [[nodiscard]]
QColor todoDueTodayColor()
const;
178 void setTodoDueTodayColor(
const QColor &color);
180 [[nodiscard]]
QColor todoOverdueColor()
const;
181 void setTodoOverdueColor(
const QColor &color);
189 void setFlatListTodo(
bool);
190 [[nodiscard]]
bool flatListTodo()
const;
192 void setFullViewTodo(
bool);
193 [[nodiscard]]
bool fullViewTodo()
const;
195 [[nodiscard]]
bool enableTodoQuickSearch()
const;
196 void setEnableTodoQuickSearch(
bool enable);
198 [[nodiscard]]
bool enableQuickTodo()
const;
199 void setEnableQuickTodo(
bool enable);
201 [[nodiscard]]
bool highlightTodos()
const;
202 void setHighlightTodos(
bool);
204 void setFirstDayOfWeek(
const int day);
205 [[nodiscard]]
int firstDayOfWeek()
const;
210 std::unique_ptr<PrefsPrivate>
const d;
Namespace EventViews provides facilities for displaying incidences, including events,...
EVENTVIEWS_EXPORT QColor resourceColor(const Akonadi::Collection &collection, const PrefsPtr &preferences)
This method returns the proper resource / subresource color for the view.
EVENTVIEWS_EXPORT void setResourceColor(const Akonadi::Collection &collection, const QColor &color, const PrefsPtr &preferences)
This method sets the resource color as an Akonadi collection attribute and in the local preferences.