2022-07-13 09:49:30 +08:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2022, KylinSoft Co., Ltd.
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
* Authors: iaom <zhangpengfei@kylinos.cn>
|
|
|
|
*
|
|
|
|
*/
|
2022-06-18 10:46:14 +08:00
|
|
|
#include "result-item.h"
|
|
|
|
#include "result-item-private.h"
|
|
|
|
using namespace UkuiSearch;
|
|
|
|
ResultItemPrivate::ResultItemPrivate::ResultItemPrivate(ResultItem *parent) : q(parent)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
ResultItemPrivate::~ResultItemPrivate()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
void ResultItemPrivate::setSearchId(size_t searchId)
|
|
|
|
{
|
|
|
|
m_searchId = searchId;
|
|
|
|
}
|
|
|
|
|
|
|
|
void ResultItemPrivate::setItemKey(QString itemKey)
|
|
|
|
{
|
|
|
|
m_itemKey = itemKey;
|
|
|
|
}
|
|
|
|
|
|
|
|
size_t ResultItemPrivate::getSearchId()
|
|
|
|
{
|
|
|
|
return m_searchId;
|
|
|
|
}
|
|
|
|
|
|
|
|
QString ResultItemPrivate::getItemKey()
|
|
|
|
{
|
|
|
|
return m_itemKey;
|
|
|
|
}
|
|
|
|
ResultItem::ResultItem() : d(new ResultItemPrivate(this))
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
ResultItem::ResultItem(const size_t searchId) : d(new ResultItemPrivate(this))
|
|
|
|
{
|
|
|
|
d->setSearchId(searchId);
|
|
|
|
}
|
|
|
|
|
|
|
|
ResultItem::ResultItem(const QString itemKey) : d(new ResultItemPrivate(this))
|
|
|
|
{
|
|
|
|
d->setItemKey(itemKey);
|
|
|
|
}
|
|
|
|
|
|
|
|
ResultItem::ResultItem(const size_t searchId, const QString itemKey) : d(new ResultItemPrivate(this))
|
|
|
|
{
|
|
|
|
d->setSearchId(searchId);
|
|
|
|
d->setItemKey(itemKey);
|
|
|
|
}
|
|
|
|
|
|
|
|
size_t ResultItem::getSearchId()
|
|
|
|
{
|
|
|
|
return d->getSearchId();
|
|
|
|
}
|
|
|
|
|
|
|
|
QString ResultItem::getItemKey()
|
|
|
|
{
|
|
|
|
return d->getItemKey();
|
|
|
|
}
|
|
|
|
|
|
|
|
ResultItem::~ResultItem()
|
|
|
|
{
|
|
|
|
}
|