CalendarEvents::EventData

Search for usage in LXR

CalendarEvents::EventData Class Reference

#include <CalendarEvents/CalendarEventsPlugin>

Public Types

enum  EventType { Holiday , Event , Todo }
 

Public Member Functions

 EventData (const EventData &other)
 
QString description () const
 
QDateTime endDateTime () const
 
QString eventColor () const
 
bool isAllDay () const
 
bool isMinor () const
 
EventDataoperator= (const EventData &other)
 
void setDescription (const QString &description)
 
void setEndDateTime (const QDateTime &endDateTime)
 
void setEventColor (const QString &color)
 
void setEventType (EventType type)
 
void setIsAllDay (bool isAllDay)
 
void setIsMinor (bool isMinor)
 
void setStartDateTime (const QDateTime &startDateTime)
 
void setTitle (const QString &title)
 
void setUid (const QString &uid)
 
QDateTime startDateTime () const
 
QString title () const
 
EventType type () const
 
QString uid () const
 

Detailed Description

Data about an event.

Definition at line 29 of file calendareventsplugin.h.

Member Enumeration Documentation

◆ EventType

enum CalendarEvents::EventData::EventType

Definition at line 32 of file calendareventsplugin.h.

Member Function Documentation

◆ description()

QString CalendarEvents::EventData::description ( ) const

Event description, can provide more details about the event.

◆ endDateTime()

QDateTime CalendarEvents::EventData::endDateTime ( ) const

The end date and time of this event.

◆ eventColor()

QString CalendarEvents::EventData::eventColor ( ) const

The color that should be used to mark this event with It comes in the HTML hex format, eg.

#AARRGGBB or #RRGGBB

◆ isAllDay()

bool CalendarEvents::EventData::isAllDay ( ) const

If true, this event goes on the whole day (eg.

a holiday)

◆ isMinor()

bool CalendarEvents::EventData::isMinor ( ) const

If true, this event won't mark the day in the calendar grid The main purpose for this flag is to support namedays, where in some countries the calendars have different name in them every day.

This is just a minor holiday and as such should not mark the calendar grid, otherwise the whole grid would be in a different color.

◆ setDescription()

void CalendarEvents::EventData::setDescription ( const QString & description)

Sets the event description, which allows to add more details about this event.

Parameters
descriptionThe description

◆ setEndDateTime()

void CalendarEvents::EventData::setEndDateTime ( const QDateTime & endDateTime)

Set the end date-time of this event.

Parameters
endDateTimethe date-time of when the event is ending

◆ setEventColor()

void CalendarEvents::EventData::setEventColor ( const QString & color)

This is to support various calendar colors the user might have configured elsewhere.

Parameters
colorThe color for this event in the HTML hex format eg. #AARRGGBB or #RRGGBB (this is passed directly to QML)

◆ setEventType()

void CalendarEvents::EventData::setEventType ( EventType type)

Sets the event type, eg.

a holiday, an event or a todo item

Parameters
typeThe event type,

◆ setIsAllDay()

void CalendarEvents::EventData::setIsAllDay ( bool isAllDay)

If set to true, it will be displayed in the Calendar agenda without any time besides it, marked as "going on all day".

This is useful for single-day events only, for multiple-day events, leave to false (default)

Parameters
isAllDayset to true if the event takes all day, false otherwise (defaults to false)

◆ setIsMinor()

void CalendarEvents::EventData::setIsMinor ( bool isMinor)

If set to true, it won't be marked in the calendar grid.

Parameters
isMinortrue if it's a minor event (like a nameday holiday), false otherwise (defaults to false)

◆ setStartDateTime()

void CalendarEvents::EventData::setStartDateTime ( const QDateTime & startDateTime)

Set the start date-time of this event.

Parameters
startDateTimethe date-time of when the event is starting

◆ setTitle()

void CalendarEvents::EventData::setTitle ( const QString & title)

Sets the title of the event.

Parameters
titleThe event title

◆ setUid()

void CalendarEvents::EventData::setUid ( const QString & uid)

Sets the uid of the event.

This is a mandatory field only if you want to use the eventModified/eventRemoved signals, otherwise setting it is optional

Parameters
uidA unique id, recommended is to use the plugin name as prefix (to keep it unique)

◆ startDateTime()

QDateTime CalendarEvents::EventData::startDateTime ( ) const

The start date and time of this event.

◆ title()

QString CalendarEvents::EventData::title ( ) const

Event title.

◆ type()

EventType CalendarEvents::EventData::type ( ) const

Type of the current event, eg.

a holiday, an event or a todo item

◆ uid()

QString CalendarEvents::EventData::uid ( ) const

Unique ID of the event.


The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:14:03 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.