66 lines
1.6 KiB
C++
66 lines
1.6 KiB
C++
/*
|
|
* 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/>.
|
|
*
|
|
*/
|
|
|
|
#include "commons.h"
|
|
|
|
#include <utility>
|
|
|
|
// ====== LabelItem ====== //
|
|
UkuiMenu::LabelItem::LabelItem(bool disable, int index, QString id, QString displayName)
|
|
: m_disable(disable), m_index(index), m_id(std::move(id)), m_displayName(std::move(displayName)) {}
|
|
|
|
bool UkuiMenu::LabelItem::isDisable() const
|
|
{
|
|
return m_disable;
|
|
}
|
|
|
|
void UkuiMenu::LabelItem::setDisable(bool disable)
|
|
{
|
|
LabelItem::m_disable = disable;
|
|
}
|
|
|
|
int UkuiMenu::LabelItem::index() const
|
|
{
|
|
return m_index;
|
|
}
|
|
|
|
void UkuiMenu::LabelItem::setIndex(int index)
|
|
{
|
|
LabelItem::m_index = index;
|
|
}
|
|
|
|
const QString &UkuiMenu::LabelItem::displayName() const
|
|
{
|
|
return m_id;
|
|
}
|
|
|
|
void UkuiMenu::LabelItem::setDisplayName(const QString &name)
|
|
{
|
|
LabelItem::m_id = name;
|
|
}
|
|
|
|
const QString &UkuiMenu::LabelItem::id() const
|
|
{
|
|
return m_id;
|
|
}
|
|
|
|
void UkuiMenu::LabelItem::setId(const QString &id)
|
|
{
|
|
m_id = id;
|
|
}
|