1 /* Copyright (C) 2012 Mildred <mildred-pub@mildred.fr>
2 Copyright (C) 2015 Erik Quaeghebeur <trojita@equaeghe.nospammail.net>
3 Copyright (C) 2006 - 2015 Jan Kundrát <jkt@kde.org>
5 This file is part of the Trojita Qt IMAP e-mail client,
6 http://trojita.flaska.net/
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License as
10 published by the Free Software Foundation; either version 2 of
11 the License or (at your option) version 3 or any later version
12 accepted by the membership of KDE e.V. (or its successor approved
13 by the membership of KDE e.V.), which shall act as a proxy
14 defined in Section 14 of version 3 of the license.
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with this program. If not, see <http://www.gnu.org/licenses/>.
25 #ifndef GUI_TAGWIDGET_H
26 #define GUI_TAGWIDGET_H
29 #include "Imap/Model/FavoriteTagsModel.h"
34 class TagWidget
: public QLabel
37 Q_PROPERTY(QString tagName READ tagName USER
true)
39 static TagWidget
*addingWidget();
40 static TagWidget
*userKeyword(const QString
&tagName
, Imap::Mailbox::FavoriteTagsModel
*m_favoriteTags
);
41 static TagWidget
*systemFlag(const QString
&flagName
);
43 QString
tagName() const;
45 bool event(QEvent
*e
);
48 void removeClicked(QString
);
63 TagWidget(const Mode mode
, const QString
&tagName
, const QColor
&backgroundColor
);
68 #endif // GUI_TAGWIDGET_H