EventViews
Classes | |
class | AgendaItem |
class | AgendaView |
class | EventView |
class | JournalView |
class | ListView |
class | MonthCell |
class | MonthGraphicsItem |
class | MonthGraphicsView |
class | MonthItem |
class | MonthView |
class | MultiAgendaView |
class | ScrollIndicator |
class | TimelineView |
class | TodoView |
class | WhatsNextView |
Typedefs | |
using | KCalPrefsPtr = QSharedPointer<CalendarSupport::KCalPrefs> |
using | PrefsPtr = QSharedPointer<Prefs> |
Enumerations | |
enum | { BUSY_BACKGROUND_ALPHA = 70 } |
Functions | |
QPixmap | cachedSmallIcon (const QString &name) |
QColor | getTextColor (const QColor &c) |
bool | isColorDark (const QColor &color) |
EVENTVIEWS_EXPORT QColor | resourceColor (const Akonadi::Collection &collection, const PrefsPtr &preferences) |
EVENTVIEWS_EXPORT void | setResourceColor (const Akonadi::Collection &collection, const QColor &color, const PrefsPtr &preferences) |
int | yearDiff (QDate start, QDate end) |
Detailed Description
Namespace EventViews provides facilities for displaying incidences, including events, to-dos, and journal entries.
Typedef Documentation
◆ KCalPrefsPtr
using EventViews::KCalPrefsPtr = QSharedPointer<CalendarSupport::KCalPrefs> |
Definition at line 53 of file eventview.h.
◆ PrefsPtr
typedef QSharedPointer< Prefs > EventViews::PrefsPtr = QSharedPointer<Prefs> |
Definition at line 20 of file timelabels.h.
Enumeration Type Documentation
◆ anonymous enum
anonymous enum |
Definition at line 46 of file eventview.h.
Function Documentation
◆ cachedSmallIcon()
Equivalent to SmallIcon( name ), but uses QPixmapCache.
KIconLoader already uses a cache, but it's 20x slower on my tests.
- Returns
- A new pixmap if it isn't yet in cache, otherwise returns the cached one.
Definition at line 83 of file helper.cpp.
◆ getTextColor()
Returns a nice QColor for text, give the input color &c.
Definition at line 26 of file helper.cpp.
◆ isColorDark()
|
nodiscard |
Determines if the color
is "dark" or "light" by looking at its luminance.
idea taken from: https://stackoverflow.com/questions/9780632/how-do-i-determine-if-a-color-is-closer-to-white-or-black
- Returns
- true if the specified color is closer to black than white.
Definition at line 20 of file helper.cpp.
◆ resourceColor()
|
nodiscard |
This method returns the proper resource / subresource color for the view.
If a value is stored in the preferences, we use it, else we try to find a CollectionColorAttribute in the collection. If everything else fails, a random color can be set. It is preferred to use this function instead of the EventViews::Prefs::resourceColor function.
- Returns
- The resource color for the incidence. If the incidence belongs to a subresource, the color for the subresource is returned (if set).
- Parameters
-
calendar the calendar for which the resource color should be obtained incidence the incidence for which the color is needed (to determine which subresource needs to be used)
Definition at line 56 of file helper.cpp.
◆ setResourceColor()
void EventViews::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.
It is preferred to use this instead of the EventViews::Prefs::setResourceColor function.
- Parameters
-
collection the collection for which the resource color should be stored color the color to stored preferences a pointer to the EventViews::Prefs to use
Definition at line 31 of file helper.cpp.
◆ yearDiff()
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:51:39 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.