remove superfluous 'and'
[kdepim.git] / calendarviews / prefs.h
blobc210bd51b5e8745eeca6f25db10faa8a7df30e43
1 /*
2 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
4 Copyright (C) 2010 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.net
5 Author: Kevin Krammer, krake@kdab.com
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License along
18 with this program; if not, write to the Free Software Foundation, Inc.,
19 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 As a special exception, permission is given to link this program
22 with any edition of Qt, and distribute the resulting executable,
23 without including the source code for Qt in the source distribution.
25 #ifndef EVENTVIEWS_PREFS_H
26 #define EVENTVIEWS_PREFS_H
28 #include "eventviews_export.h"
29 #include "eventview.h"
31 #include <KConfigSkeleton>
32 #include <KDateTime>
34 namespace boost {
35 template <typename T> class shared_ptr;
38 namespace EventViews {
40 class EVENTVIEWS_EXPORT Prefs
42 public:
43 /**
44 Creates an instance of Prefs with just base config
46 Prefs();
48 /**
49 Creates an instance of Prefs with base config and application override config
51 The passed @p appConfig will be queried for matching items whenever one of the
52 accessors is called. If one is found it is used for setting/getting the value
53 otherwise the one from the eventviews base config is used.
55 explicit Prefs( KCoreConfigSkeleton *appConfig );
57 ~Prefs();
59 void readConfig();
60 void writeConfig();
62 public:
63 void setMarcusBainsShowSeconds( bool showSeconds );
64 bool marcusBainsShowSeconds() const;
66 void setAgendaMarcusBainsLineLineColor( const QColor &color );
67 QColor agendaMarcusBainsLineLineColor() const;
69 void setMarcusBainsEnabled( bool enabled );
70 bool marcusBainsEnabled() const;
72 void setAgendaMarcusBainsLineFont( const QFont &font );
73 QFont agendaMarcusBainsLineFont() const;
75 void setHourSize( int size );
76 int hourSize() const;
78 void setDayBegins( const QDateTime &dateTime );
79 QDateTime dayBegins() const;
81 void setWorkingHoursStart( const QDateTime &dateTime );
82 QDateTime workingHoursStart() const;
84 void setWorkingHoursEnd( const QDateTime &dateTime );
85 QDateTime workingHoursEnd() const;
87 void setSelectionStartsEditor( bool startEditor );
88 bool selectionStartsEditor() const;
90 void setAgendaGridWorkHoursBackgroundColor( const QColor &color );
91 QColor agendaGridWorkHoursBackgroundColor() const;
93 void setAgendaGridHighlightColor( const QColor &color );
94 QColor agendaGridHighlightColor() const;
96 void setAgendaGridBackgroundColor( const QColor &color );
97 QColor agendaGridBackgroundColor() const;
99 void setEnableAgendaItemIcons( bool enable );
100 bool enableAgendaItemIcons() const;
102 void setTodosUseCategoryColors( bool useColors );
103 bool todosUseCategoryColors() const;
105 void setAgendaHolidaysBackgroundColor( const QColor &color ) const;
106 QColor agendaHolidaysBackgroundColor() const;
108 void setAgendaViewColors( int colors );
109 int agendaViewColors() const;
111 void setAgendaViewFont( const QFont &font );
112 QFont agendaViewFont() const;
114 void setMonthViewFont( const QFont &font );
115 QFont monthViewFont() const;
117 QColor monthGridBackgroundColor() const;
118 void setMonthGridBackgroundColor( const QColor &color );
120 QColor monthGridWorkHoursBackgroundColor() const;
121 void monthGridWorkHoursBackgroundColor( const QColor &color );
123 void setMonthViewColors( int colors ) const;
124 int monthViewColors() const;
126 bool enableMonthItemIcons() const;
127 void setEnableMonthItemIcons( bool enable );
129 bool showTimeInMonthView() const;
130 void setShowTimeInMonthView( bool show );
132 bool showTodosMonthView() const;
133 void setShowTodosMonthView( bool show );
135 bool showJournalsMonthView() const;
136 void setShowJournalsMonthView( bool show );
138 bool fullViewMonth() const;
139 void setFullViewMonth( bool fullView );
141 bool sortCompletedTodosSeparately() const;
142 void setSortCompletedTodosSeparately( bool sort );
144 void setEnableToolTips( bool enable );
145 bool enableToolTips() const;
147 void setShowTodosAgendaView( bool show );
148 bool showTodosAgendaView() const;
150 void setAgendaTimeLabelsFont( const QFont &font );
151 QFont agendaTimeLabelsFont() const;
153 KConfigSkeleton::ItemFont *fontItem( const QString &name ) const;
155 void setResourceColor ( const QString &, const QColor & );
156 QColor resourceColor( const QString & );
158 void setTimeSpec( const KDateTime::Spec &spec );
159 KDateTime::Spec timeSpec() const;
161 QStringList timeScaleTimezones() const;
162 void setTimeScaleTimezones( const QStringList &list );
164 QStringList selectedPlugins() const;
165 void setSelectedPlugins( const QStringList &);
167 QStringList decorationsAtAgendaViewTop() const;
168 void setDecorationsAtAgendaViewTop( const QStringList & );
170 QStringList decorationsAtAgendaViewBottom() const;
171 void setDecorationsAtAgendaViewBottom( const QStringList & );
173 bool colorAgendaBusyDays() const;
174 void setColorAgendaBusyDays( bool enable );
176 bool colorMonthBusyDays() const;
177 void setColorMonthBusyDays( bool enable );
179 QColor viewBgBusyColor() const;
180 void setViewBgBusyColor( const QColor & );
182 QColor holidayColor() const;
183 void setHolidayColor( const QColor &color );
185 QColor agendaViewBackgroundColor() const;
186 void setAgendaViewBackgroundColor( const QColor &color );
188 QColor workingHoursColor() const;
189 void setWorkingHoursColor( const QColor &color );
191 QColor todoDueTodayColor() const;
192 void setTodoDueTodayColor( const QColor &color );
194 QColor todoOverdueColor() const;
195 void setTodoOverdueColor( const QColor &color );
197 QSet<EventViews::EventView::ItemIcon> agendaViewIcons() const;
198 void setAgendaViewIcons( const QSet<EventViews::EventView::ItemIcon> &icons );
200 QSet<EventViews::EventView::ItemIcon> monthViewIcons() const;
201 void setMonthViewIcons( const QSet<EventViews::EventView::ItemIcon> &icons );
203 void setFlatListTodo( bool );
204 bool flatListTodo() const;
206 void setFullViewTodo( bool );
207 bool fullViewTodo() const;
209 bool enableTodoQuickSearch() const;
210 void setEnableTodoQuickSearch( bool enable );
212 bool enableQuickTodo() const;
213 void setEnableQuickTodo( bool enable );
215 bool highlightTodos() const;
216 void setHighlightTodos( bool );
218 KConfig *config() const;
220 private:
221 class Private;
222 Private *const d;
225 typedef boost::shared_ptr<Prefs> PrefsPtr;
229 #endif
231 // kate: space-indent on; indent-width 2; replace-tabs on;