2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 Dmitry Savchenko
|
|
|
|
|
// Copyright (C) 2016 Vasiliy Sorokin
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
2011-10-25 23:14:27 +03:00
|
|
|
|
2012-02-14 22:43:26 +04:00
|
|
|
#include "keyword.h"
|
2017-01-05 17:13:42 +01:00
|
|
|
#include <utils/theme/theme.h>
|
2012-02-14 22:43:26 +04:00
|
|
|
|
2011-10-25 23:14:27 +03:00
|
|
|
namespace Todo {
|
|
|
|
|
namespace Internal {
|
|
|
|
|
|
2017-01-05 17:13:42 +01:00
|
|
|
Keyword::Keyword() : color(Utils::creatorTheme()->color(Utils::Theme::TextColorNormal))
|
2012-02-14 22:43:26 +04:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2011-10-25 23:14:27 +03:00
|
|
|
bool Keyword::equals(const Keyword &other) const
|
2012-02-14 22:43:26 +04:00
|
|
|
{
|
2011-10-25 23:14:27 +03:00
|
|
|
return (this->name == other.name)
|
2015-11-16 16:45:05 +01:00
|
|
|
&& (this->iconType == other.iconType)
|
2011-10-25 23:14:27 +03:00
|
|
|
&& (this->color == other.color);
|
2012-02-14 22:43:26 +04:00
|
|
|
}
|
|
|
|
|
|
2019-11-12 10:26:38 +01:00
|
|
|
bool operator ==(const Keyword &k1, const Keyword &k2)
|
2012-02-14 22:43:26 +04:00
|
|
|
{
|
2011-10-25 23:14:27 +03:00
|
|
|
return k1.equals(k2);
|
2012-02-14 22:43:26 +04:00
|
|
|
}
|
|
|
|
|
|
2019-11-12 10:26:38 +01:00
|
|
|
bool operator !=(const Keyword &k1, const Keyword &k2)
|
2012-02-14 22:43:26 +04:00
|
|
|
{
|
2011-10-25 23:14:27 +03:00
|
|
|
return !k1.equals(k2);
|
2012-02-14 22:43:26 +04:00
|
|
|
}
|
2011-10-25 23:14:27 +03:00
|
|
|
|
|
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace Todo
|