File indexing completed on 2024-12-22 04:09:13
0001 /* 0002 * SPDX-FileCopyrightText: 2017 Dmitry Kazakov <dimula73@gmail.com> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #include "KoInteractionStrategyFactory.h" 0008 0009 #include <QString> 0010 0011 struct KoInteractionStrategyFactory::Private 0012 { 0013 int priority = 0; 0014 QString id; 0015 }; 0016 0017 KoInteractionStrategyFactory::KoInteractionStrategyFactory(int priority, const QString &id) 0018 : m_d(new Private) 0019 { 0020 m_d->priority = priority; 0021 m_d->id = id; 0022 } 0023 0024 KoInteractionStrategyFactory::~KoInteractionStrategyFactory() 0025 { 0026 } 0027 0028 QString KoInteractionStrategyFactory::id() const 0029 { 0030 return m_d->id; 0031 } 0032 0033 int KoInteractionStrategyFactory::priority() const 0034 { 0035 return m_d->priority; 0036 } 0037 0038 bool KoInteractionStrategyFactory::compareLess(KoInteractionStrategyFactorySP f1, KoInteractionStrategyFactorySP f2) 0039 { 0040 return f1->priority() < f2->priority(); 0041 } 0042