File indexing completed on 2024-04-14 05:44:14

0001 /*
0002     This source file is part of Konsole, a terminal emulator.
0003 
0004     SPDX-FileCopyrightText: 2006-2008 Robert Knight <robertknight@gmail.com>
0005 
0006     SPDX-License-Identifier: GPL-2.0-or-later
0007 */
0008 
0009 #include "ShouldApplyProperty.h"
0010 
0011 using namespace Konsole;
0012 
0013 ShouldApplyProperty::ShouldApplyProperty(const Profile::Ptr &profile, bool modifiedOnly)
0014     : _profile(profile)
0015     , _modifiedPropertiesOnly(modifiedOnly)
0016 {
0017 }
0018 
0019 bool ShouldApplyProperty::shouldApply(Profile::Property property) const
0020 {
0021     return !_modifiedPropertiesOnly || _profile->isPropertySet(property);
0022 }