File indexing completed on 2025-01-05 04:59:39
0001 /* 0002 * SPDX-FileCopyrightText: 2014 Kevin Ottens <ervin@kde.org> 0003 * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0004 */ 0005 0006 #include "akonadiapplicationselectedattribute.h" 0007 0008 using namespace Akonadi; 0009 0010 ApplicationSelectedAttribute::ApplicationSelectedAttribute() 0011 : Attribute(), 0012 m_selected(true) 0013 { 0014 } 0015 0016 ApplicationSelectedAttribute::~ApplicationSelectedAttribute() 0017 { 0018 } 0019 0020 void ApplicationSelectedAttribute::setSelected(bool selected) 0021 { 0022 m_selected = selected; 0023 } 0024 0025 bool ApplicationSelectedAttribute::isSelected() const 0026 { 0027 return m_selected; 0028 } 0029 0030 ApplicationSelectedAttribute *ApplicationSelectedAttribute::clone() const 0031 { 0032 auto attr = new ApplicationSelectedAttribute(); 0033 attr->m_selected = m_selected; 0034 return attr; 0035 } 0036 0037 QByteArray ApplicationSelectedAttribute::type() const 0038 { 0039 return "ZanshinSelected"; 0040 } 0041 0042 QByteArray ApplicationSelectedAttribute::serialized() const 0043 { 0044 return m_selected ? "true" : "false"; 0045 } 0046 0047 void ApplicationSelectedAttribute::deserialize(const QByteArray &data) 0048 { 0049 m_selected = (data == "true"); 0050 }