Akonadi::BlockAlarmsAttribute Class

An Attribute that marks that alarms from a calendar collection are blocked. More...

Header: #include <Akonadi/BlockAlarmsAttribute>
CMake: find_package(KPim6AkonadiCalendar REQUIRED)
target_link_libraries(mytarget PRIVATE KPim6::AkonadiCalendar)

Public Functions

BlockAlarmsAttribute()
virtual ~BlockAlarmsAttribute() override
void blockAlarmType(KCalendarCore::Alarm::Type type, bool block = true)
void blockEverything(bool block = true)
bool isAlarmTypeBlocked(KCalendarCore::Alarm::Type type) const
bool isEverythingBlocked() const

Reimplemented Public Functions

virtual Akonadi::BlockAlarmsAttribute *clone() const override
virtual void deserialize(const QByteArray &data) override
virtual QByteArray serialized() const override
virtual QByteArray type() const override

Detailed Description

A calendar collection which has this attribute set won't be evaluated by korgac and therefore it's alarms won't be used, unless explicitly unblocked in blockAlarmType().

Author: Tobias Koenig <tokoe@kdab.com>

See also Akonadi::Attribute.

Member Function Documentation

BlockAlarmsAttribute::BlockAlarmsAttribute()

Creates a new block alarms attribute.

[override virtual noexcept] BlockAlarmsAttribute::~BlockAlarmsAttribute()

Destroys the block alarms attribute.

void BlockAlarmsAttribute::blockAlarmType(KCalendarCore::Alarm::Type type, bool block = true)

Blocks or unblocks given alarm type.

By default, all alarm types are blocked.

void BlockAlarmsAttribute::blockEverything(bool block = true)

Blocks or unblocks every alarm type.

By default, all alarm types are blocked.

[override virtual] Akonadi::BlockAlarmsAttribute *BlockAlarmsAttribute::clone() const

Creates a copy of the attribute.

[override virtual] void BlockAlarmsAttribute::deserialize(const QByteArray &data)

Sets the state of the attribute from the given serialized data.

bool BlockAlarmsAttribute::isAlarmTypeBlocked(KCalendarCore::Alarm::Type type) const

Returns whether given alarm type is blocked or not.

bool BlockAlarmsAttribute::isEverythingBlocked() const

Returns whether all alarms are blocked or not.

[override virtual] QByteArray BlockAlarmsAttribute::serialized() const

Returns the serialized state of the attribute.

[override virtual] QByteArray BlockAlarmsAttribute::type() const

Returns the type of the attribute.