Skip to content
This repository has been archived by the owner on Nov 11, 2021. It is now read-only.

Commit

Permalink
[kcalcore] export notebook visibility. Contributes to JB#49136
Browse files Browse the repository at this point in the history
  • Loading branch information
dcaliste committed Mar 5, 2020
1 parent ed7a28b commit 82b76a7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions kcalcore/calendar.cpp
Expand Up @@ -513,6 +513,12 @@ bool Calendar::isVisible( const Incidence::Ptr &incidence ) const
return rv;
}

bool Calendar::isVisible( const QString &notebook ) const
{
QHash<QString, bool>::ConstIterator it = d->mNotebooks.find(notebook);
return (it != d->mNotebooks.constEnd()) ? *it : true;
}

void Calendar::clearNotebookAssociations()
{
d->mNotebookIncidences.clear();
Expand Down
7 changes: 7 additions & 0 deletions kcalcore/calendar.h
Expand Up @@ -569,6 +569,13 @@ class KCALCORE_EXPORT Calendar : public QObject, public CustomProperties,
*/
bool isVisible( const Incidence::Ptr &incidence ) const;

/**
Check if notebook is visible.
@param notebook notebook uid.
@return true if notebook is visible, false otherwise
*/
bool isVisible( const QString &notebook ) const;

/**
List all notebook incidences in the memory.
Expand Down

0 comments on commit 82b76a7

Please sign in to comment.