Unity 8
quicklistentry.cpp
1 /* Copyright (C) 2013, 2015 Canonical, Ltd.
2  *
3  * Authors:
4  * Michael Zanetti <michael.zanetti@canonical.com>
5  *
6  * This program 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.
9  *
10  * This program 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.
14  *
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/>.
17  */
18 
19 #include "quicklistentry.h"
20 
21 QuickListEntry::QuickListEntry()
22 {
23 }
24 
25 QString QuickListEntry::actionId() const
26 {
27  return m_actionId;
28 }
29 
30 void QuickListEntry::setActionId(const QString &actionId)
31 {
32  m_actionId = actionId;
33 }
34 
35 QString QuickListEntry::text() const
36 {
37  return m_text;
38 }
39 
40 void QuickListEntry::setText(const QString &text)
41 {
42  m_text = text;
43 }
44 
45 QString QuickListEntry::icon() const
46 {
47  return m_icon;
48 }
49 
50 void QuickListEntry::setIcon(const QString &icon)
51 {
52  m_icon = icon;
53 }
54 
55 bool QuickListEntry::clickable() const
56 {
57  return !m_actionId.isEmpty();
58 }
59 
60 bool QuickListEntry::operator==(const QuickListEntry &other)
61 {
62  return !other.actionId().isEmpty() && other.actionId() == m_actionId;
63 }