2
* Copyright: 2014 Canonical, Ltd
4
* This file is part of reminders
6
* reminders is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; version 3.
10
* reminders is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18
* Authors: Michael Zanetti <michael.zanetti@canonical.com>
24
#include "notesstore.h"
26
Tag::Tag(const QString &guid, QObject *parent) :
38
QString Tag::guid() const
43
QString Tag::name() const
48
void Tag::setName(const QString &name)
56
int Tag::noteCount() const
63
Tag *tag = new Tag(m_guid);
68
void Tag::updateNoteCount()
71
foreach (Note *note, NotesStore::instance()->notes()) {
72
if (note->tagGuids().contains(m_guid)) {
76
if (m_noteCount != noteCount) {
77
m_noteCount = noteCount;
78
emit noteCountChanged();