File indexing completed on 2024-04-21 05:51:27

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 #ifndef SHOULDAPPLYPROPERTY_H
0010 #define SHOULDAPPLYPROPERTY_H
0011 
0012 #include "konsoleprivate_export.h"
0013 #include "profile/Profile.h"
0014 
0015 namespace Konsole
0016 {
0017 /** Utility class to simplify code in SessionManager::applyProfile(). */
0018 class KONSOLEPRIVATE_EXPORT ShouldApplyProperty
0019 {
0020 public:
0021     ShouldApplyProperty(const Profile::Ptr &profile, bool modifiedOnly);
0022 
0023     bool shouldApply(Profile::Property property) const;
0024 
0025 private:
0026     const Profile::Ptr _profile;
0027     bool _modifiedPropertiesOnly;
0028 };
0029 }
0030 
0031 #endif